arm_compute v18.05
[platform/upstream/armcl.git] / documentation / channel__extract_8cl.xhtml
1 <!-- HTML header for doxygen 1.8.9.1-->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
7 <meta name="generator" content="Doxygen 1.8.11"/>
8 <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
9 <title>Compute Library: src/core/CL/cl_kernels/channel_extract.cl File Reference</title>
10 <link href="tabs.css" rel="stylesheet" type="text/css"/>
11 <script type="text/javascript" src="jquery.js"></script>
12 <script type="text/javascript" src="dynsections.js"></script>
13 <link href="navtree.css" rel="stylesheet" type="text/css"/>
14 <script type="text/javascript" src="resize.js"></script>
15 <script type="text/javascript" src="navtreedata.js"></script>
16 <script type="text/javascript" src="navtree.js"></script>
17 <script type="text/javascript">
18   $(document).ready(initResizable);
19   $(window).load(resizeHeight);
20 </script>
21 <link href="search/search.css" rel="stylesheet" type="text/css"/>
22 <script type="text/javascript" src="search/searchdata.js"></script>
23 <script type="text/javascript" src="search/search.js"></script>
24 <script type="text/javascript">
25   $(document).ready(function() { init_search(); });
26 </script>
27 <script type="text/x-mathjax-config">
28   MathJax.Hub.Config({
29     extensions: ["tex2jax.js"],
30     jax: ["input/TeX","output/HTML-CSS"],
31 });
32 </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
33 <link href="doxygen.css" rel="stylesheet" type="text/css" />
34 </head>
35 <body>
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
37 <div id="titlearea">
38 <table cellspacing="0" cellpadding="0">
39  <tbody>
40  <tr style="height: 56px;">
41   <td style="padding-left: 0.5em;">
42    <div id="projectname">Compute Library
43    &#160;<span id="projectnumber">18.05</span>
44    </div>
45   </td>
46  </tr>
47  </tbody>
48 </table>
49 </div>
50 <!-- end header part -->
51 <!-- Generated by Doxygen 1.8.11 -->
52 <script type="text/javascript">
53 var searchBox = new SearchBox("searchBox", "search",false,'Search');
54 </script>
55   <div id="navrow1" class="tabs">
56     <ul class="tablist">
57       <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
58       <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
59       <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60       <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
61       <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
62       <li>
63         <div id="MSearchBox" class="MSearchBoxInactive">
64         <span class="left">
65           <img id="MSearchSelect" src="search/mag_sel.png"
66                onmouseover="return searchBox.OnSearchSelectShow()"
67                onmouseout="return searchBox.OnSearchSelectHide()"
68                alt=""/>
69           <input type="text" id="MSearchField" value="Search" accesskey="S"
70                onfocus="searchBox.OnSearchFieldFocus(true)" 
71                onblur="searchBox.OnSearchFieldFocus(false)" 
72                onkeyup="searchBox.OnSearchFieldChange(event)"/>
73           </span><span class="right">
74             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
75           </span>
76         </div>
77       </li>
78     </ul>
79   </div>
80   <div id="navrow2" class="tabs2">
81     <ul class="tablist">
82       <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
83       <li><a href="globals.xhtml"><span>Globals</span></a></li>
84     </ul>
85   </div>
86 </div><!-- top -->
87 <div id="side-nav" class="ui-resizable side-nav-resizable">
88   <div id="nav-tree">
89     <div id="nav-tree-contents">
90       <div id="nav-sync" class="sync"></div>
91     </div>
92   </div>
93   <div id="splitbar" style="-moz-user-select:none;" 
94        class="ui-resizable-handle">
95   </div>
96 </div>
97 <script type="text/javascript">
98 $(document).ready(function(){initNavTree('channel__extract_8cl.xhtml','');});
99 </script>
100 <div id="doc-content">
101 <!-- window showing the filter options -->
102 <div id="MSearchSelectWindow"
103      onmouseover="return searchBox.OnSearchSelectShow()"
104      onmouseout="return searchBox.OnSearchSelectHide()"
105      onkeydown="return searchBox.OnSearchSelectKey(event)">
106 </div>
107
108 <!-- iframe showing the search results (closed by default) -->
109 <div id="MSearchResultsWindow">
110 <iframe src="javascript:void(0)" frameborder="0" 
111         name="MSearchResults" id="MSearchResults">
112 </iframe>
113 </div>
114
115 <div class="header">
116   <div class="summary">
117 <a href="#func-members">Functions</a>  </div>
118   <div class="headertitle">
119 <div class="title">channel_extract.cl File Reference</div>  </div>
120 </div><!--header-->
121 <div class="contents">
122 <div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
123 </div>
124 <p><a href="channel__extract_8cl_source.xhtml">Go to the source code of this file.</a></p>
125 <table class="memberdecls">
126 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
127 Functions</h2></td></tr>
128 <tr class="memitem:aeecb8084159259d10790df3e0a602cbf"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="channel__extract_8cl.xhtml#aeecb8084159259d10790df3e0a602cbf">channel_extract_RGB888</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
129 <tr class="memdesc:aeecb8084159259d10790df3e0a602cbf"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function extracts a given channel from an RGB image.  <a href="#aeecb8084159259d10790df3e0a602cbf">More...</a><br /></td></tr>
130 <tr class="separator:aeecb8084159259d10790df3e0a602cbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
131 <tr class="memitem:ae133ea6ea26771fc36a31d0a3d783077"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="channel__extract_8cl.xhtml#ae133ea6ea26771fc36a31d0a3d783077">channel_extract_RGBA8888</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
132 <tr class="memdesc:ae133ea6ea26771fc36a31d0a3d783077"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function extracts a given channel from an RGBA image.  <a href="#ae133ea6ea26771fc36a31d0a3d783077">More...</a><br /></td></tr>
133 <tr class="separator:ae133ea6ea26771fc36a31d0a3d783077"><td class="memSeparator" colspan="2">&#160;</td></tr>
134 <tr class="memitem:a6f8110fd6923dfc2db9daf1f3ed92435"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="channel__extract_8cl.xhtml#a6f8110fd6923dfc2db9daf1f3ed92435">channel_extract_YUYV422</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
135 <tr class="memdesc:a6f8110fd6923dfc2db9daf1f3ed92435"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function extracts a given channel from an YUYV image.  <a href="#a6f8110fd6923dfc2db9daf1f3ed92435">More...</a><br /></td></tr>
136 <tr class="separator:a6f8110fd6923dfc2db9daf1f3ed92435"><td class="memSeparator" colspan="2">&#160;</td></tr>
137 <tr class="memitem:a3d22dccc2444106a5325b842c096486c"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="channel__extract_8cl.xhtml#a3d22dccc2444106a5325b842c096486c">channel_extract_UYVY422</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
138 <tr class="memdesc:a3d22dccc2444106a5325b842c096486c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function extracts a given channel from an UYUV image.  <a href="#a3d22dccc2444106a5325b842c096486c">More...</a><br /></td></tr>
139 <tr class="separator:a3d22dccc2444106a5325b842c096486c"><td class="memSeparator" colspan="2">&#160;</td></tr>
140 <tr class="memitem:a5dc3971835f11066639e63f02545932b"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="channel__extract_8cl.xhtml#a5dc3971835f11066639e63f02545932b">channel_extract_NV12</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
141 <tr class="memdesc:a5dc3971835f11066639e63f02545932b"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function extracts a given channel from an NV12 image.  <a href="#a5dc3971835f11066639e63f02545932b">More...</a><br /></td></tr>
142 <tr class="separator:a5dc3971835f11066639e63f02545932b"><td class="memSeparator" colspan="2">&#160;</td></tr>
143 <tr class="memitem:a628f0c1a3a80b8dc275ad0ca877e3833"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="channel__extract_8cl.xhtml#a628f0c1a3a80b8dc275ad0ca877e3833">channel_extract_NV21</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
144 <tr class="memdesc:a628f0c1a3a80b8dc275ad0ca877e3833"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function extracts a given channel from an NV21 image.  <a href="#a628f0c1a3a80b8dc275ad0ca877e3833">More...</a><br /></td></tr>
145 <tr class="separator:a628f0c1a3a80b8dc275ad0ca877e3833"><td class="memSeparator" colspan="2">&#160;</td></tr>
146 <tr class="memitem:a8b54e12b0c19a206a73ade8e8bed82f3"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="channel__extract_8cl.xhtml#a8b54e12b0c19a206a73ade8e8bed82f3">copy_plane</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
147 <tr class="memdesc:a8b54e12b0c19a206a73ade8e8bed82f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function extracts a given plane from an multi-planar image.  <a href="#a8b54e12b0c19a206a73ade8e8bed82f3">More...</a><br /></td></tr>
148 <tr class="separator:a8b54e12b0c19a206a73ade8e8bed82f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
149 </table>
150 <h2 class="groupheader">Function Documentation</h2>
151 <a class="anchor" id="a5dc3971835f11066639e63f02545932b"></a>
152 <div class="memitem">
153 <div class="memproto">
154       <table class="memname">
155         <tr>
156           <td class="memname">__kernel void channel_extract_NV12 </td>
157           <td>(</td>
158           <td class="paramtype">__global uchar *&#160;</td>
159           <td class="paramname"><em>src_ptr</em>, </td>
160         </tr>
161         <tr>
162           <td class="paramkey"></td>
163           <td></td>
164           <td class="paramtype">uint&#160;</td>
165           <td class="paramname"><em>src_stride_x</em>, </td>
166         </tr>
167         <tr>
168           <td class="paramkey"></td>
169           <td></td>
170           <td class="paramtype">uint&#160;</td>
171           <td class="paramname"><em>src_step_x</em>, </td>
172         </tr>
173         <tr>
174           <td class="paramkey"></td>
175           <td></td>
176           <td class="paramtype">uint&#160;</td>
177           <td class="paramname"><em>src_stride_y</em>, </td>
178         </tr>
179         <tr>
180           <td class="paramkey"></td>
181           <td></td>
182           <td class="paramtype">uint&#160;</td>
183           <td class="paramname"><em>src_step_y</em>, </td>
184         </tr>
185         <tr>
186           <td class="paramkey"></td>
187           <td></td>
188           <td class="paramtype">uint&#160;</td>
189           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
190         </tr>
191         <tr>
192           <td class="paramkey"></td>
193           <td></td>
194           <td class="paramtype">__global uchar *&#160;</td>
195           <td class="paramname"><em>dst_ptr</em>, </td>
196         </tr>
197         <tr>
198           <td class="paramkey"></td>
199           <td></td>
200           <td class="paramtype">uint&#160;</td>
201           <td class="paramname"><em>dst_stride_x</em>, </td>
202         </tr>
203         <tr>
204           <td class="paramkey"></td>
205           <td></td>
206           <td class="paramtype">uint&#160;</td>
207           <td class="paramname"><em>dst_step_x</em>, </td>
208         </tr>
209         <tr>
210           <td class="paramkey"></td>
211           <td></td>
212           <td class="paramtype">uint&#160;</td>
213           <td class="paramname"><em>dst_stride_y</em>, </td>
214         </tr>
215         <tr>
216           <td class="paramkey"></td>
217           <td></td>
218           <td class="paramtype">uint&#160;</td>
219           <td class="paramname"><em>dst_step_y</em>, </td>
220         </tr>
221         <tr>
222           <td class="paramkey"></td>
223           <td></td>
224           <td class="paramtype">uint&#160;</td>
225           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
226         </tr>
227         <tr>
228           <td></td>
229           <td>)</td>
230           <td></td><td></td>
231         </tr>
232       </table>
233 </div><div class="memdoc">
234
235 <p>This function extracts a given channel from an NV12 image. </p>
236 <dl class="section note"><dt>Note</dt><dd>Channel to be extracted should be passed as a pre-processor argument, e.g. -DCHANNEL_U will extract the U channel. </dd></dl>
237 <dl class="section warning"><dt>Warning</dt><dd>Only channels UV can be extracted using this kernel.</dd></dl>
238 <dl class="params"><dt>Parameters</dt><dd>
239   <table class="params">
240     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: NV12 (UV88) </td></tr>
241     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
242     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
243     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
244     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
245     <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
246     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
247     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
248     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
249     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
250     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
251     <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
252   </table>
253   </dd>
254 </dl>
255
256 <p>Definition at line <a class="el" href="channel__extract_8cl_source.xhtml#l00195">195</a> of file <a class="el" href="channel__extract_8cl_source.xhtml">channel_extract.cl</a>.</p>
257
258 <p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00137">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
259 <div class="fragment"><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;{</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    uchar16 data = vload16(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;<span class="preprocessor">#ifdef CHANNEL_U</span></div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    vstore8(data.s02468ACE, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_V)</span></div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    vstore8(data.s13579BDF, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
260 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00137">Convolution.cpp:137</a></div></div>
261 <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
262 <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
263 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
264 </div><!-- fragment -->
265 </div>
266 </div>
267 <a class="anchor" id="a628f0c1a3a80b8dc275ad0ca877e3833"></a>
268 <div class="memitem">
269 <div class="memproto">
270       <table class="memname">
271         <tr>
272           <td class="memname">__kernel void channel_extract_NV21 </td>
273           <td>(</td>
274           <td class="paramtype">__global uchar *&#160;</td>
275           <td class="paramname"><em>src_ptr</em>, </td>
276         </tr>
277         <tr>
278           <td class="paramkey"></td>
279           <td></td>
280           <td class="paramtype">uint&#160;</td>
281           <td class="paramname"><em>src_stride_x</em>, </td>
282         </tr>
283         <tr>
284           <td class="paramkey"></td>
285           <td></td>
286           <td class="paramtype">uint&#160;</td>
287           <td class="paramname"><em>src_step_x</em>, </td>
288         </tr>
289         <tr>
290           <td class="paramkey"></td>
291           <td></td>
292           <td class="paramtype">uint&#160;</td>
293           <td class="paramname"><em>src_stride_y</em>, </td>
294         </tr>
295         <tr>
296           <td class="paramkey"></td>
297           <td></td>
298           <td class="paramtype">uint&#160;</td>
299           <td class="paramname"><em>src_step_y</em>, </td>
300         </tr>
301         <tr>
302           <td class="paramkey"></td>
303           <td></td>
304           <td class="paramtype">uint&#160;</td>
305           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
306         </tr>
307         <tr>
308           <td class="paramkey"></td>
309           <td></td>
310           <td class="paramtype">__global uchar *&#160;</td>
311           <td class="paramname"><em>dst_ptr</em>, </td>
312         </tr>
313         <tr>
314           <td class="paramkey"></td>
315           <td></td>
316           <td class="paramtype">uint&#160;</td>
317           <td class="paramname"><em>dst_stride_x</em>, </td>
318         </tr>
319         <tr>
320           <td class="paramkey"></td>
321           <td></td>
322           <td class="paramtype">uint&#160;</td>
323           <td class="paramname"><em>dst_step_x</em>, </td>
324         </tr>
325         <tr>
326           <td class="paramkey"></td>
327           <td></td>
328           <td class="paramtype">uint&#160;</td>
329           <td class="paramname"><em>dst_stride_y</em>, </td>
330         </tr>
331         <tr>
332           <td class="paramkey"></td>
333           <td></td>
334           <td class="paramtype">uint&#160;</td>
335           <td class="paramname"><em>dst_step_y</em>, </td>
336         </tr>
337         <tr>
338           <td class="paramkey"></td>
339           <td></td>
340           <td class="paramtype">uint&#160;</td>
341           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
342         </tr>
343         <tr>
344           <td></td>
345           <td>)</td>
346           <td></td><td></td>
347         </tr>
348       </table>
349 </div><div class="memdoc">
350
351 <p>This function extracts a given channel from an NV21 image. </p>
352 <dl class="section note"><dt>Note</dt><dd>Channel to be extracted should be passed as a pre-processor argument, e.g. -DCHANNEL_U will extract the U channel. </dd></dl>
353 <dl class="section warning"><dt>Warning</dt><dd>Only channels UV can be extracted using this kernel.</dd></dl>
354 <dl class="params"><dt>Parameters</dt><dd>
355   <table class="params">
356     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: NV21 (UV88) </td></tr>
357     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
358     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
359     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
360     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
361     <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
362     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
363     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
364     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
365     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
366     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
367     <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
368   </table>
369   </dd>
370 </dl>
371
372 <p>Definition at line <a class="el" href="channel__extract_8cl_source.xhtml#l00230">230</a> of file <a class="el" href="channel__extract_8cl_source.xhtml">channel_extract.cl</a>.</p>
373
374 <p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00137">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
375 <div class="fragment"><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;{</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;    <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    uchar16 data = vload16(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;<span class="preprocessor">#ifdef CHANNEL_U</span></div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;    vstore8(data.s13579BDF, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_V)</span></div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;    vstore8(data.s02468ACE, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
376 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00137">Convolution.cpp:137</a></div></div>
377 <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
378 <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
379 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
380 </div><!-- fragment -->
381 </div>
382 </div>
383 <a class="anchor" id="aeecb8084159259d10790df3e0a602cbf"></a>
384 <div class="memitem">
385 <div class="memproto">
386       <table class="memname">
387         <tr>
388           <td class="memname">__kernel void channel_extract_RGB888 </td>
389           <td>(</td>
390           <td class="paramtype">__global uchar *&#160;</td>
391           <td class="paramname"><em>src_ptr</em>, </td>
392         </tr>
393         <tr>
394           <td class="paramkey"></td>
395           <td></td>
396           <td class="paramtype">uint&#160;</td>
397           <td class="paramname"><em>src_stride_x</em>, </td>
398         </tr>
399         <tr>
400           <td class="paramkey"></td>
401           <td></td>
402           <td class="paramtype">uint&#160;</td>
403           <td class="paramname"><em>src_step_x</em>, </td>
404         </tr>
405         <tr>
406           <td class="paramkey"></td>
407           <td></td>
408           <td class="paramtype">uint&#160;</td>
409           <td class="paramname"><em>src_stride_y</em>, </td>
410         </tr>
411         <tr>
412           <td class="paramkey"></td>
413           <td></td>
414           <td class="paramtype">uint&#160;</td>
415           <td class="paramname"><em>src_step_y</em>, </td>
416         </tr>
417         <tr>
418           <td class="paramkey"></td>
419           <td></td>
420           <td class="paramtype">uint&#160;</td>
421           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
422         </tr>
423         <tr>
424           <td class="paramkey"></td>
425           <td></td>
426           <td class="paramtype">__global uchar *&#160;</td>
427           <td class="paramname"><em>dst_ptr</em>, </td>
428         </tr>
429         <tr>
430           <td class="paramkey"></td>
431           <td></td>
432           <td class="paramtype">uint&#160;</td>
433           <td class="paramname"><em>dst_stride_x</em>, </td>
434         </tr>
435         <tr>
436           <td class="paramkey"></td>
437           <td></td>
438           <td class="paramtype">uint&#160;</td>
439           <td class="paramname"><em>dst_step_x</em>, </td>
440         </tr>
441         <tr>
442           <td class="paramkey"></td>
443           <td></td>
444           <td class="paramtype">uint&#160;</td>
445           <td class="paramname"><em>dst_stride_y</em>, </td>
446         </tr>
447         <tr>
448           <td class="paramkey"></td>
449           <td></td>
450           <td class="paramtype">uint&#160;</td>
451           <td class="paramname"><em>dst_step_y</em>, </td>
452         </tr>
453         <tr>
454           <td class="paramkey"></td>
455           <td></td>
456           <td class="paramtype">uint&#160;</td>
457           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
458         </tr>
459         <tr>
460           <td></td>
461           <td>)</td>
462           <td></td><td></td>
463         </tr>
464       </table>
465 </div><div class="memdoc">
466
467 <p>This function extracts a given channel from an RGB image. </p>
468 <dl class="section note"><dt>Note</dt><dd>Channel to be extracted should be passed as a pre-processor argument, e.g. -DCHANNEL_B will extract the B channel.</dd></dl>
469 <dl class="params"><dt>Parameters</dt><dd>
470   <table class="params">
471     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: RGB </td></tr>
472     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
473     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
474     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
475     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
476     <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
477     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
478     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
479     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
480     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
481     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
482     <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
483   </table>
484   </dd>
485 </dl>
486
487 <p>Definition at line <a class="el" href="channel__extract_8cl_source.xhtml#l00043">43</a> of file <a class="el" href="channel__extract_8cl_source.xhtml">channel_extract.cl</a>.</p>
488
489 <p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00137">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
490 <div class="fragment"><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;{</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    uchar16 data  = vload16(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    uchar8  data2 = vload8(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="preprocessor">#ifdef CHANNEL_R</span></div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    vstore4(data.s0369, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    vstore4((uchar4)(data.sCF, data2.s25), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 4);</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_G)</span></div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    vstore4(data.s147A, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    vstore4((uchar4)(data.sD, data2.s036), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 4);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_B)</span></div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    vstore4(data.s258B, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    vstore4((uchar4)(data.sE, data2.s147), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 4);</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_R or CHANNEL_G or CHANNEL_B */</span><span class="preprocessor"></span></div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
491 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00137">Convolution.cpp:137</a></div></div>
492 <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
493 <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
494 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
495 </div><!-- fragment -->
496 </div>
497 </div>
498 <a class="anchor" id="ae133ea6ea26771fc36a31d0a3d783077"></a>
499 <div class="memitem">
500 <div class="memproto">
501       <table class="memname">
502         <tr>
503           <td class="memname">__kernel void channel_extract_RGBA8888 </td>
504           <td>(</td>
505           <td class="paramtype">__global uchar *&#160;</td>
506           <td class="paramname"><em>src_ptr</em>, </td>
507         </tr>
508         <tr>
509           <td class="paramkey"></td>
510           <td></td>
511           <td class="paramtype">uint&#160;</td>
512           <td class="paramname"><em>src_stride_x</em>, </td>
513         </tr>
514         <tr>
515           <td class="paramkey"></td>
516           <td></td>
517           <td class="paramtype">uint&#160;</td>
518           <td class="paramname"><em>src_step_x</em>, </td>
519         </tr>
520         <tr>
521           <td class="paramkey"></td>
522           <td></td>
523           <td class="paramtype">uint&#160;</td>
524           <td class="paramname"><em>src_stride_y</em>, </td>
525         </tr>
526         <tr>
527           <td class="paramkey"></td>
528           <td></td>
529           <td class="paramtype">uint&#160;</td>
530           <td class="paramname"><em>src_step_y</em>, </td>
531         </tr>
532         <tr>
533           <td class="paramkey"></td>
534           <td></td>
535           <td class="paramtype">uint&#160;</td>
536           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
537         </tr>
538         <tr>
539           <td class="paramkey"></td>
540           <td></td>
541           <td class="paramtype">__global uchar *&#160;</td>
542           <td class="paramname"><em>dst_ptr</em>, </td>
543         </tr>
544         <tr>
545           <td class="paramkey"></td>
546           <td></td>
547           <td class="paramtype">uint&#160;</td>
548           <td class="paramname"><em>dst_stride_x</em>, </td>
549         </tr>
550         <tr>
551           <td class="paramkey"></td>
552           <td></td>
553           <td class="paramtype">uint&#160;</td>
554           <td class="paramname"><em>dst_step_x</em>, </td>
555         </tr>
556         <tr>
557           <td class="paramkey"></td>
558           <td></td>
559           <td class="paramtype">uint&#160;</td>
560           <td class="paramname"><em>dst_stride_y</em>, </td>
561         </tr>
562         <tr>
563           <td class="paramkey"></td>
564           <td></td>
565           <td class="paramtype">uint&#160;</td>
566           <td class="paramname"><em>dst_step_y</em>, </td>
567         </tr>
568         <tr>
569           <td class="paramkey"></td>
570           <td></td>
571           <td class="paramtype">uint&#160;</td>
572           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
573         </tr>
574         <tr>
575           <td></td>
576           <td>)</td>
577           <td></td><td></td>
578         </tr>
579       </table>
580 </div><div class="memdoc">
581
582 <p>This function extracts a given channel from an RGBA image. </p>
583 <dl class="section note"><dt>Note</dt><dd>Channel to be extracted should be passed as a pre-processor argument, e.g. -DCHANNEL_B will extract the B channel.</dd></dl>
584 <dl class="params"><dt>Parameters</dt><dd>
585   <table class="params">
586     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: RGBA </td></tr>
587     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
588     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
589     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
590     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
591     <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
592     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
593     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
594     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
595     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
596     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
597     <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
598   </table>
599   </dd>
600 </dl>
601
602 <p>Definition at line <a class="el" href="channel__extract_8cl_source.xhtml#l00083">83</a> of file <a class="el" href="channel__extract_8cl_source.xhtml">channel_extract.cl</a>.</p>
603
604 <p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00137">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
605 <div class="fragment"><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;{</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    uchar16 data  = vload16(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    uchar16 data2 = vload16(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a> + 16);</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="preprocessor">#ifdef CHANNEL_R</span></div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    vstore8((uchar8)(data.s048C, data2.s048C), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_G)</span></div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    vstore8((uchar8)(data.s159D, data2.s159D), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_B)</span></div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    vstore8((uchar8)(data.s26AE, data2.s26AE), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_A)</span></div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    vstore8((uchar8)(data.s37BF, data2.s37BF), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_R or CHANNEL_G or CHANNEL_B or CHANNEL_A */</span><span class="preprocessor"></span></div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
606 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00137">Convolution.cpp:137</a></div></div>
607 <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
608 <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
609 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
610 </div><!-- fragment -->
611 </div>
612 </div>
613 <a class="anchor" id="a3d22dccc2444106a5325b842c096486c"></a>
614 <div class="memitem">
615 <div class="memproto">
616       <table class="memname">
617         <tr>
618           <td class="memname">__kernel void channel_extract_UYVY422 </td>
619           <td>(</td>
620           <td class="paramtype">__global uchar *&#160;</td>
621           <td class="paramname"><em>src_ptr</em>, </td>
622         </tr>
623         <tr>
624           <td class="paramkey"></td>
625           <td></td>
626           <td class="paramtype">uint&#160;</td>
627           <td class="paramname"><em>src_stride_x</em>, </td>
628         </tr>
629         <tr>
630           <td class="paramkey"></td>
631           <td></td>
632           <td class="paramtype">uint&#160;</td>
633           <td class="paramname"><em>src_step_x</em>, </td>
634         </tr>
635         <tr>
636           <td class="paramkey"></td>
637           <td></td>
638           <td class="paramtype">uint&#160;</td>
639           <td class="paramname"><em>src_stride_y</em>, </td>
640         </tr>
641         <tr>
642           <td class="paramkey"></td>
643           <td></td>
644           <td class="paramtype">uint&#160;</td>
645           <td class="paramname"><em>src_step_y</em>, </td>
646         </tr>
647         <tr>
648           <td class="paramkey"></td>
649           <td></td>
650           <td class="paramtype">uint&#160;</td>
651           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
652         </tr>
653         <tr>
654           <td class="paramkey"></td>
655           <td></td>
656           <td class="paramtype">__global uchar *&#160;</td>
657           <td class="paramname"><em>dst_ptr</em>, </td>
658         </tr>
659         <tr>
660           <td class="paramkey"></td>
661           <td></td>
662           <td class="paramtype">uint&#160;</td>
663           <td class="paramname"><em>dst_stride_x</em>, </td>
664         </tr>
665         <tr>
666           <td class="paramkey"></td>
667           <td></td>
668           <td class="paramtype">uint&#160;</td>
669           <td class="paramname"><em>dst_step_x</em>, </td>
670         </tr>
671         <tr>
672           <td class="paramkey"></td>
673           <td></td>
674           <td class="paramtype">uint&#160;</td>
675           <td class="paramname"><em>dst_stride_y</em>, </td>
676         </tr>
677         <tr>
678           <td class="paramkey"></td>
679           <td></td>
680           <td class="paramtype">uint&#160;</td>
681           <td class="paramname"><em>dst_step_y</em>, </td>
682         </tr>
683         <tr>
684           <td class="paramkey"></td>
685           <td></td>
686           <td class="paramtype">uint&#160;</td>
687           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
688         </tr>
689         <tr>
690           <td></td>
691           <td>)</td>
692           <td></td><td></td>
693         </tr>
694       </table>
695 </div><div class="memdoc">
696
697 <p>This function extracts a given channel from an UYUV image. </p>
698 <dl class="section note"><dt>Note</dt><dd>Channel to be extracted should be passed as a pre-processor argument, e.g. -DCHANNEL_U will extract the U channel.</dd></dl>
699 <dl class="params"><dt>Parameters</dt><dd>
700   <table class="params">
701     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: UYUV </td></tr>
702     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
703     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
704     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
705     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
706     <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
707     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
708     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
709     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
710     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
711     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
712     <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
713   </table>
714   </dd>
715 </dl>
716
717 <p>Definition at line <a class="el" href="channel__extract_8cl_source.xhtml#l00158">158</a> of file <a class="el" href="channel__extract_8cl_source.xhtml">channel_extract.cl</a>.</p>
718
719 <p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00137">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
720 <div class="fragment"><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;{</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    uchar16 data = vload16(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;<span class="preprocessor">#ifdef CHANNEL_Y</span></div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    vstore8(data.s13579BDF, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_U)</span></div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    vstore4(data.s048C, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_V)</span></div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    vstore4(data.s26AE, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_Y or CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
721 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00137">Convolution.cpp:137</a></div></div>
722 <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
723 <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
724 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
725 </div><!-- fragment -->
726 </div>
727 </div>
728 <a class="anchor" id="a6f8110fd6923dfc2db9daf1f3ed92435"></a>
729 <div class="memitem">
730 <div class="memproto">
731       <table class="memname">
732         <tr>
733           <td class="memname">__kernel void channel_extract_YUYV422 </td>
734           <td>(</td>
735           <td class="paramtype">__global uchar *&#160;</td>
736           <td class="paramname"><em>src_ptr</em>, </td>
737         </tr>
738         <tr>
739           <td class="paramkey"></td>
740           <td></td>
741           <td class="paramtype">uint&#160;</td>
742           <td class="paramname"><em>src_stride_x</em>, </td>
743         </tr>
744         <tr>
745           <td class="paramkey"></td>
746           <td></td>
747           <td class="paramtype">uint&#160;</td>
748           <td class="paramname"><em>src_step_x</em>, </td>
749         </tr>
750         <tr>
751           <td class="paramkey"></td>
752           <td></td>
753           <td class="paramtype">uint&#160;</td>
754           <td class="paramname"><em>src_stride_y</em>, </td>
755         </tr>
756         <tr>
757           <td class="paramkey"></td>
758           <td></td>
759           <td class="paramtype">uint&#160;</td>
760           <td class="paramname"><em>src_step_y</em>, </td>
761         </tr>
762         <tr>
763           <td class="paramkey"></td>
764           <td></td>
765           <td class="paramtype">uint&#160;</td>
766           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
767         </tr>
768         <tr>
769           <td class="paramkey"></td>
770           <td></td>
771           <td class="paramtype">__global uchar *&#160;</td>
772           <td class="paramname"><em>dst_ptr</em>, </td>
773         </tr>
774         <tr>
775           <td class="paramkey"></td>
776           <td></td>
777           <td class="paramtype">uint&#160;</td>
778           <td class="paramname"><em>dst_stride_x</em>, </td>
779         </tr>
780         <tr>
781           <td class="paramkey"></td>
782           <td></td>
783           <td class="paramtype">uint&#160;</td>
784           <td class="paramname"><em>dst_step_x</em>, </td>
785         </tr>
786         <tr>
787           <td class="paramkey"></td>
788           <td></td>
789           <td class="paramtype">uint&#160;</td>
790           <td class="paramname"><em>dst_stride_y</em>, </td>
791         </tr>
792         <tr>
793           <td class="paramkey"></td>
794           <td></td>
795           <td class="paramtype">uint&#160;</td>
796           <td class="paramname"><em>dst_step_y</em>, </td>
797         </tr>
798         <tr>
799           <td class="paramkey"></td>
800           <td></td>
801           <td class="paramtype">uint&#160;</td>
802           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
803         </tr>
804         <tr>
805           <td></td>
806           <td>)</td>
807           <td></td><td></td>
808         </tr>
809       </table>
810 </div><div class="memdoc">
811
812 <p>This function extracts a given channel from an YUYV image. </p>
813 <dl class="section note"><dt>Note</dt><dd>Channel to be extracted should be passed as a pre-processor argument, e.g. -DCHANNEL_U will extract the U channel.</dd></dl>
814 <dl class="params"><dt>Parameters</dt><dd>
815   <table class="params">
816     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: YUYV </td></tr>
817     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
818     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
819     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
820     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
821     <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
822     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
823     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
824     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
825     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
826     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
827     <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
828   </table>
829   </dd>
830 </dl>
831
832 <p>Definition at line <a class="el" href="channel__extract_8cl_source.xhtml#l00122">122</a> of file <a class="el" href="channel__extract_8cl_source.xhtml">channel_extract.cl</a>.</p>
833
834 <p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00137">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
835 <div class="fragment"><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;{</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    uchar16 data = vload16(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;<span class="preprocessor">#ifdef CHANNEL_Y</span></div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    vstore8(data.s02468ACE, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_U)</span></div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;    vstore4(data.s159D, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor">#elif defined(CHANNEL_V)</span></div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    vstore4(data.s37BF, 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_Y or CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
836 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00137">Convolution.cpp:137</a></div></div>
837 <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
838 <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
839 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
840 </div><!-- fragment -->
841 </div>
842 </div>
843 <a class="anchor" id="a8b54e12b0c19a206a73ade8e8bed82f3"></a>
844 <div class="memitem">
845 <div class="memproto">
846       <table class="memname">
847         <tr>
848           <td class="memname">__kernel void copy_plane </td>
849           <td>(</td>
850           <td class="paramtype">__global uchar *&#160;</td>
851           <td class="paramname"><em>src_ptr</em>, </td>
852         </tr>
853         <tr>
854           <td class="paramkey"></td>
855           <td></td>
856           <td class="paramtype">uint&#160;</td>
857           <td class="paramname"><em>src_stride_x</em>, </td>
858         </tr>
859         <tr>
860           <td class="paramkey"></td>
861           <td></td>
862           <td class="paramtype">uint&#160;</td>
863           <td class="paramname"><em>src_step_x</em>, </td>
864         </tr>
865         <tr>
866           <td class="paramkey"></td>
867           <td></td>
868           <td class="paramtype">uint&#160;</td>
869           <td class="paramname"><em>src_stride_y</em>, </td>
870         </tr>
871         <tr>
872           <td class="paramkey"></td>
873           <td></td>
874           <td class="paramtype">uint&#160;</td>
875           <td class="paramname"><em>src_step_y</em>, </td>
876         </tr>
877         <tr>
878           <td class="paramkey"></td>
879           <td></td>
880           <td class="paramtype">uint&#160;</td>
881           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
882         </tr>
883         <tr>
884           <td class="paramkey"></td>
885           <td></td>
886           <td class="paramtype">__global uchar *&#160;</td>
887           <td class="paramname"><em>dst_ptr</em>, </td>
888         </tr>
889         <tr>
890           <td class="paramkey"></td>
891           <td></td>
892           <td class="paramtype">uint&#160;</td>
893           <td class="paramname"><em>dst_stride_x</em>, </td>
894         </tr>
895         <tr>
896           <td class="paramkey"></td>
897           <td></td>
898           <td class="paramtype">uint&#160;</td>
899           <td class="paramname"><em>dst_step_x</em>, </td>
900         </tr>
901         <tr>
902           <td class="paramkey"></td>
903           <td></td>
904           <td class="paramtype">uint&#160;</td>
905           <td class="paramname"><em>dst_stride_y</em>, </td>
906         </tr>
907         <tr>
908           <td class="paramkey"></td>
909           <td></td>
910           <td class="paramtype">uint&#160;</td>
911           <td class="paramname"><em>dst_step_y</em>, </td>
912         </tr>
913         <tr>
914           <td class="paramkey"></td>
915           <td></td>
916           <td class="paramtype">uint&#160;</td>
917           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
918         </tr>
919         <tr>
920           <td></td>
921           <td>)</td>
922           <td></td><td></td>
923         </tr>
924       </table>
925 </div><div class="memdoc">
926
927 <p>This function extracts a given plane from an multi-planar image. </p>
928 <dl class="params"><dt>Parameters</dt><dd>
929   <table class="params">
930     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
931     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
932     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
933     <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
934     <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
935     <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
936     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
937     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
938     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
939     <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
940     <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
941     <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
942   </table>
943   </dd>
944 </dl>
945
946 <p>Definition at line <a class="el" href="channel__extract_8cl_source.xhtml#l00262">262</a> of file <a class="el" href="channel__extract_8cl_source.xhtml">channel_extract.cl</a>.</p>
947
948 <p>References <a class="el" href="helpers_8h_source.xhtml#l00104">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00137">arm_compute::test::validation::dst</a>, <a class="el" href="helpers_8h_source.xhtml#l00144">Image::ptr</a>, and <a class="el" href="_c_l_2_convolution_8cpp_source.xhtml#l00147">arm_compute::test::validation::src</a>.</p>
949 <div class="fragment"><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;{</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">src</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;    <span class="comment">// Copy plane data</span></div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;    vstore8(vload8(0, src.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>), 0, dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00104">helpers.h:104</a></div></div>
950 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00137">Convolution.cpp:137</a></div></div>
951 <div class="ttc" id="struct_image_xhtml"><div class="ttname"><a href="struct_image.xhtml">Image</a></div><div class="ttdoc">Structure to hold Image information. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00142">helpers.h:142</a></div></div>
952 <div class="ttc" id="struct_image_xhtml_acf52c23cbd7424606c10a606524e3e32"><div class="ttname"><a href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">Image::ptr</a></div><div class="ttdeci">__global uchar * ptr</div><div class="ttdoc">Pointer to the starting postion of the buffer. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00144">helpers.h:144</a></div></div>
953 <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a6743f0a130e8311e6f5b1a23df102472"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a6743f0a130e8311e6f5b1a23df102472">arm_compute::test::validation::src</a></div><div class="ttdeci">convolution configure &amp; src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_convolution_8cpp_source.xhtml#l00147">Convolution.cpp:147</a></div></div>
954 </div><!-- fragment -->
955 </div>
956 </div>
957 </div><!-- contents -->
958 </div><!-- doc-content -->
959 <!-- start footer part -->
960 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
961   <ul>
962     <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="channel__extract_8cl.xhtml">channel_extract.cl</a></li>
963     <li class="footer">Generated on Wed May 23 2018 11:36:38 for Compute Library by
964     <a href="http://www.doxygen.org/index.html">
965     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
966   </ul>
967 </div>
968 </body>
969 </html>