arm_compute v17.04
[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>ARM 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">ARM Compute Library
43    &#160;<span id="projectnumber">17.04</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="namespaces.xhtml"><span>Namespaces</span></a></li>
59       <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
60       <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
61       <li>
62         <div id="MSearchBox" class="MSearchBoxInactive">
63         <span class="left">
64           <img id="MSearchSelect" src="search/mag_sel.png"
65                onmouseover="return searchBox.OnSearchSelectShow()"
66                onmouseout="return searchBox.OnSearchSelectHide()"
67                alt=""/>
68           <input type="text" id="MSearchField" value="Search" accesskey="S"
69                onfocus="searchBox.OnSearchFieldFocus(true)" 
70                onblur="searchBox.OnSearchFieldFocus(false)" 
71                onkeyup="searchBox.OnSearchFieldChange(event)"/>
72           </span><span class="right">
73             <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
74           </span>
75         </div>
76       </li>
77     </ul>
78   </div>
79   <div id="navrow2" class="tabs2">
80     <ul class="tablist">
81       <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
82       <li><a href="globals.xhtml"><span>Globals</span></a></li>
83     </ul>
84   </div>
85 </div><!-- top -->
86 <div id="side-nav" class="ui-resizable side-nav-resizable">
87   <div id="nav-tree">
88     <div id="nav-tree-contents">
89       <div id="nav-sync" class="sync"></div>
90     </div>
91   </div>
92   <div id="splitbar" style="-moz-user-select:none;" 
93        class="ui-resizable-handle">
94   </div>
95 </div>
96 <script type="text/javascript">
97 $(document).ready(function(){initNavTree('channel__extract_8cl.xhtml','');});
98 </script>
99 <div id="doc-content">
100 <!-- window showing the filter options -->
101 <div id="MSearchSelectWindow"
102      onmouseover="return searchBox.OnSearchSelectShow()"
103      onmouseout="return searchBox.OnSearchSelectHide()"
104      onkeydown="return searchBox.OnSearchSelectKey(event)">
105 </div>
106
107 <!-- iframe showing the search results (closed by default) -->
108 <div id="MSearchResultsWindow">
109 <iframe src="javascript:void(0)" frameborder="0" 
110         name="MSearchResults" id="MSearchResults">
111 </iframe>
112 </div>
113
114 <div class="header">
115   <div class="summary">
116 <a href="#func-members">Functions</a>  </div>
117   <div class="headertitle">
118 <div class="title">channel_extract.cl File Reference</div>  </div>
119 </div><!--header-->
120 <div class="contents">
121 <div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
122 </div>
123 <p><a href="channel__extract_8cl_source.xhtml">Go to the source code of this file.</a></p>
124 <table class="memberdecls">
125 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
126 Functions</h2></td></tr>
127 <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>
128 <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>
129 <tr class="separator:aeecb8084159259d10790df3e0a602cbf"><td class="memSeparator" colspan="2">&#160;</td></tr>
130 <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>
131 <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>
132 <tr class="separator:ae133ea6ea26771fc36a31d0a3d783077"><td class="memSeparator" colspan="2">&#160;</td></tr>
133 <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>
134 <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>
135 <tr class="separator:a6f8110fd6923dfc2db9daf1f3ed92435"><td class="memSeparator" colspan="2">&#160;</td></tr>
136 <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>
137 <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>
138 <tr class="separator:a3d22dccc2444106a5325b842c096486c"><td class="memSeparator" colspan="2">&#160;</td></tr>
139 <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>
140 <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>
141 <tr class="separator:a5dc3971835f11066639e63f02545932b"><td class="memSeparator" colspan="2">&#160;</td></tr>
142 <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>
143 <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>
144 <tr class="separator:a628f0c1a3a80b8dc275ad0ca877e3833"><td class="memSeparator" colspan="2">&#160;</td></tr>
145 <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>
146 <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>
147 <tr class="separator:a8b54e12b0c19a206a73ade8e8bed82f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
148 </table>
149 <h2 class="groupheader">Function Documentation</h2>
150 <a class="anchor" id="a5dc3971835f11066639e63f02545932b"></a>
151 <div class="memitem">
152 <div class="memproto">
153       <table class="memname">
154         <tr>
155           <td class="memname">__kernel void channel_extract_NV12 </td>
156           <td>(</td>
157           <td class="paramtype">__global uchar *&#160;</td>
158           <td class="paramname"><em>src_ptr</em>, </td>
159         </tr>
160         <tr>
161           <td class="paramkey"></td>
162           <td></td>
163           <td class="paramtype">uint&#160;</td>
164           <td class="paramname"><em>src_stride_x</em>, </td>
165         </tr>
166         <tr>
167           <td class="paramkey"></td>
168           <td></td>
169           <td class="paramtype">uint&#160;</td>
170           <td class="paramname"><em>src_step_x</em>, </td>
171         </tr>
172         <tr>
173           <td class="paramkey"></td>
174           <td></td>
175           <td class="paramtype">uint&#160;</td>
176           <td class="paramname"><em>src_stride_y</em>, </td>
177         </tr>
178         <tr>
179           <td class="paramkey"></td>
180           <td></td>
181           <td class="paramtype">uint&#160;</td>
182           <td class="paramname"><em>src_step_y</em>, </td>
183         </tr>
184         <tr>
185           <td class="paramkey"></td>
186           <td></td>
187           <td class="paramtype">uint&#160;</td>
188           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
189         </tr>
190         <tr>
191           <td class="paramkey"></td>
192           <td></td>
193           <td class="paramtype">__global uchar *&#160;</td>
194           <td class="paramname"><em>dst_ptr</em>, </td>
195         </tr>
196         <tr>
197           <td class="paramkey"></td>
198           <td></td>
199           <td class="paramtype">uint&#160;</td>
200           <td class="paramname"><em>dst_stride_x</em>, </td>
201         </tr>
202         <tr>
203           <td class="paramkey"></td>
204           <td></td>
205           <td class="paramtype">uint&#160;</td>
206           <td class="paramname"><em>dst_step_x</em>, </td>
207         </tr>
208         <tr>
209           <td class="paramkey"></td>
210           <td></td>
211           <td class="paramtype">uint&#160;</td>
212           <td class="paramname"><em>dst_stride_y</em>, </td>
213         </tr>
214         <tr>
215           <td class="paramkey"></td>
216           <td></td>
217           <td class="paramtype">uint&#160;</td>
218           <td class="paramname"><em>dst_step_y</em>, </td>
219         </tr>
220         <tr>
221           <td class="paramkey"></td>
222           <td></td>
223           <td class="paramtype">uint&#160;</td>
224           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
225         </tr>
226         <tr>
227           <td></td>
228           <td>)</td>
229           <td></td><td></td>
230         </tr>
231       </table>
232 </div><div class="memdoc">
233
234 <p>This function extracts a given channel from an NV12 image. </p>
235 <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>
236 <dl class="section warning"><dt>Warning</dt><dd>Only channels UV can be extracted using this kernel.</dd></dl>
237 <dl class="params"><dt>Parameters</dt><dd>
238   <table class="params">
239     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: NV12 (UV88) </td></tr>
240     <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>
241     <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>
242     <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>
243     <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>
244     <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>
245     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
246     <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>
247     <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>
248     <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>
249     <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>
250     <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>
251   </table>
252   </dd>
253 </dl>
254
255 <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>
256
257 <p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
258 <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> src = <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> dst = <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">#if defined 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></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#l00073">helpers.h:73</a></div></div>
259 <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#l00095">helpers.h:95</a></div></div>
260 <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#l00097">helpers.h:97</a></div></div>
261 </div><!-- fragment -->
262 </div>
263 </div>
264 <a class="anchor" id="a628f0c1a3a80b8dc275ad0ca877e3833"></a>
265 <div class="memitem">
266 <div class="memproto">
267       <table class="memname">
268         <tr>
269           <td class="memname">__kernel void channel_extract_NV21 </td>
270           <td>(</td>
271           <td class="paramtype">__global uchar *&#160;</td>
272           <td class="paramname"><em>src_ptr</em>, </td>
273         </tr>
274         <tr>
275           <td class="paramkey"></td>
276           <td></td>
277           <td class="paramtype">uint&#160;</td>
278           <td class="paramname"><em>src_stride_x</em>, </td>
279         </tr>
280         <tr>
281           <td class="paramkey"></td>
282           <td></td>
283           <td class="paramtype">uint&#160;</td>
284           <td class="paramname"><em>src_step_x</em>, </td>
285         </tr>
286         <tr>
287           <td class="paramkey"></td>
288           <td></td>
289           <td class="paramtype">uint&#160;</td>
290           <td class="paramname"><em>src_stride_y</em>, </td>
291         </tr>
292         <tr>
293           <td class="paramkey"></td>
294           <td></td>
295           <td class="paramtype">uint&#160;</td>
296           <td class="paramname"><em>src_step_y</em>, </td>
297         </tr>
298         <tr>
299           <td class="paramkey"></td>
300           <td></td>
301           <td class="paramtype">uint&#160;</td>
302           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
303         </tr>
304         <tr>
305           <td class="paramkey"></td>
306           <td></td>
307           <td class="paramtype">__global uchar *&#160;</td>
308           <td class="paramname"><em>dst_ptr</em>, </td>
309         </tr>
310         <tr>
311           <td class="paramkey"></td>
312           <td></td>
313           <td class="paramtype">uint&#160;</td>
314           <td class="paramname"><em>dst_stride_x</em>, </td>
315         </tr>
316         <tr>
317           <td class="paramkey"></td>
318           <td></td>
319           <td class="paramtype">uint&#160;</td>
320           <td class="paramname"><em>dst_step_x</em>, </td>
321         </tr>
322         <tr>
323           <td class="paramkey"></td>
324           <td></td>
325           <td class="paramtype">uint&#160;</td>
326           <td class="paramname"><em>dst_stride_y</em>, </td>
327         </tr>
328         <tr>
329           <td class="paramkey"></td>
330           <td></td>
331           <td class="paramtype">uint&#160;</td>
332           <td class="paramname"><em>dst_step_y</em>, </td>
333         </tr>
334         <tr>
335           <td class="paramkey"></td>
336           <td></td>
337           <td class="paramtype">uint&#160;</td>
338           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
339         </tr>
340         <tr>
341           <td></td>
342           <td>)</td>
343           <td></td><td></td>
344         </tr>
345       </table>
346 </div><div class="memdoc">
347
348 <p>This function extracts a given channel from an NV21 image. </p>
349 <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>
350 <dl class="section warning"><dt>Warning</dt><dd>Only channels UV can be extracted using this kernel.</dd></dl>
351 <dl class="params"><dt>Parameters</dt><dd>
352   <table class="params">
353     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: NV21 (UV88) </td></tr>
354     <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>
355     <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>
356     <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>
357     <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>
358     <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>
359     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
360     <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>
361     <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>
362     <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>
363     <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>
364     <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>
365   </table>
366   </dd>
367 </dl>
368
369 <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>
370
371 <p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
372 <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> src = <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> dst = <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">#if defined 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></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#l00073">helpers.h:73</a></div></div>
373 <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#l00095">helpers.h:95</a></div></div>
374 <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#l00097">helpers.h:97</a></div></div>
375 </div><!-- fragment -->
376 </div>
377 </div>
378 <a class="anchor" id="aeecb8084159259d10790df3e0a602cbf"></a>
379 <div class="memitem">
380 <div class="memproto">
381       <table class="memname">
382         <tr>
383           <td class="memname">__kernel void channel_extract_RGB888 </td>
384           <td>(</td>
385           <td class="paramtype">__global uchar *&#160;</td>
386           <td class="paramname"><em>src_ptr</em>, </td>
387         </tr>
388         <tr>
389           <td class="paramkey"></td>
390           <td></td>
391           <td class="paramtype">uint&#160;</td>
392           <td class="paramname"><em>src_stride_x</em>, </td>
393         </tr>
394         <tr>
395           <td class="paramkey"></td>
396           <td></td>
397           <td class="paramtype">uint&#160;</td>
398           <td class="paramname"><em>src_step_x</em>, </td>
399         </tr>
400         <tr>
401           <td class="paramkey"></td>
402           <td></td>
403           <td class="paramtype">uint&#160;</td>
404           <td class="paramname"><em>src_stride_y</em>, </td>
405         </tr>
406         <tr>
407           <td class="paramkey"></td>
408           <td></td>
409           <td class="paramtype">uint&#160;</td>
410           <td class="paramname"><em>src_step_y</em>, </td>
411         </tr>
412         <tr>
413           <td class="paramkey"></td>
414           <td></td>
415           <td class="paramtype">uint&#160;</td>
416           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
417         </tr>
418         <tr>
419           <td class="paramkey"></td>
420           <td></td>
421           <td class="paramtype">__global uchar *&#160;</td>
422           <td class="paramname"><em>dst_ptr</em>, </td>
423         </tr>
424         <tr>
425           <td class="paramkey"></td>
426           <td></td>
427           <td class="paramtype">uint&#160;</td>
428           <td class="paramname"><em>dst_stride_x</em>, </td>
429         </tr>
430         <tr>
431           <td class="paramkey"></td>
432           <td></td>
433           <td class="paramtype">uint&#160;</td>
434           <td class="paramname"><em>dst_step_x</em>, </td>
435         </tr>
436         <tr>
437           <td class="paramkey"></td>
438           <td></td>
439           <td class="paramtype">uint&#160;</td>
440           <td class="paramname"><em>dst_stride_y</em>, </td>
441         </tr>
442         <tr>
443           <td class="paramkey"></td>
444           <td></td>
445           <td class="paramtype">uint&#160;</td>
446           <td class="paramname"><em>dst_step_y</em>, </td>
447         </tr>
448         <tr>
449           <td class="paramkey"></td>
450           <td></td>
451           <td class="paramtype">uint&#160;</td>
452           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
453         </tr>
454         <tr>
455           <td></td>
456           <td>)</td>
457           <td></td><td></td>
458         </tr>
459       </table>
460 </div><div class="memdoc">
461
462 <p>This function extracts a given channel from an RGB image. </p>
463 <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>
464 <dl class="params"><dt>Parameters</dt><dd>
465   <table class="params">
466     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: RGB </td></tr>
467     <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>
468     <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>
469     <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>
470     <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>
471     <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>
472     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
473     <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>
474     <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>
475     <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>
476     <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>
477     <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>
478   </table>
479   </dd>
480 </dl>
481
482 <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>
483
484 <p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
485 <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> src = <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> dst = <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">#if defined 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></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#l00073">helpers.h:73</a></div></div>
486 <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#l00095">helpers.h:95</a></div></div>
487 <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#l00097">helpers.h:97</a></div></div>
488 </div><!-- fragment -->
489 </div>
490 </div>
491 <a class="anchor" id="ae133ea6ea26771fc36a31d0a3d783077"></a>
492 <div class="memitem">
493 <div class="memproto">
494       <table class="memname">
495         <tr>
496           <td class="memname">__kernel void channel_extract_RGBA8888 </td>
497           <td>(</td>
498           <td class="paramtype">__global uchar *&#160;</td>
499           <td class="paramname"><em>src_ptr</em>, </td>
500         </tr>
501         <tr>
502           <td class="paramkey"></td>
503           <td></td>
504           <td class="paramtype">uint&#160;</td>
505           <td class="paramname"><em>src_stride_x</em>, </td>
506         </tr>
507         <tr>
508           <td class="paramkey"></td>
509           <td></td>
510           <td class="paramtype">uint&#160;</td>
511           <td class="paramname"><em>src_step_x</em>, </td>
512         </tr>
513         <tr>
514           <td class="paramkey"></td>
515           <td></td>
516           <td class="paramtype">uint&#160;</td>
517           <td class="paramname"><em>src_stride_y</em>, </td>
518         </tr>
519         <tr>
520           <td class="paramkey"></td>
521           <td></td>
522           <td class="paramtype">uint&#160;</td>
523           <td class="paramname"><em>src_step_y</em>, </td>
524         </tr>
525         <tr>
526           <td class="paramkey"></td>
527           <td></td>
528           <td class="paramtype">uint&#160;</td>
529           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
530         </tr>
531         <tr>
532           <td class="paramkey"></td>
533           <td></td>
534           <td class="paramtype">__global uchar *&#160;</td>
535           <td class="paramname"><em>dst_ptr</em>, </td>
536         </tr>
537         <tr>
538           <td class="paramkey"></td>
539           <td></td>
540           <td class="paramtype">uint&#160;</td>
541           <td class="paramname"><em>dst_stride_x</em>, </td>
542         </tr>
543         <tr>
544           <td class="paramkey"></td>
545           <td></td>
546           <td class="paramtype">uint&#160;</td>
547           <td class="paramname"><em>dst_step_x</em>, </td>
548         </tr>
549         <tr>
550           <td class="paramkey"></td>
551           <td></td>
552           <td class="paramtype">uint&#160;</td>
553           <td class="paramname"><em>dst_stride_y</em>, </td>
554         </tr>
555         <tr>
556           <td class="paramkey"></td>
557           <td></td>
558           <td class="paramtype">uint&#160;</td>
559           <td class="paramname"><em>dst_step_y</em>, </td>
560         </tr>
561         <tr>
562           <td class="paramkey"></td>
563           <td></td>
564           <td class="paramtype">uint&#160;</td>
565           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
566         </tr>
567         <tr>
568           <td></td>
569           <td>)</td>
570           <td></td><td></td>
571         </tr>
572       </table>
573 </div><div class="memdoc">
574
575 <p>This function extracts a given channel from an RGBA image. </p>
576 <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>
577 <dl class="params"><dt>Parameters</dt><dd>
578   <table class="params">
579     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: RGBA </td></tr>
580     <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>
581     <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>
582     <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>
583     <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>
584     <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>
585     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
586     <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>
587     <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>
588     <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>
589     <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>
590     <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>
591   </table>
592   </dd>
593 </dl>
594
595 <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>
596
597 <p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
598 <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> src = <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> dst = <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">#if defined 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></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#l00073">helpers.h:73</a></div></div>
599 <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#l00095">helpers.h:95</a></div></div>
600 <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#l00097">helpers.h:97</a></div></div>
601 </div><!-- fragment -->
602 </div>
603 </div>
604 <a class="anchor" id="a3d22dccc2444106a5325b842c096486c"></a>
605 <div class="memitem">
606 <div class="memproto">
607       <table class="memname">
608         <tr>
609           <td class="memname">__kernel void channel_extract_UYVY422 </td>
610           <td>(</td>
611           <td class="paramtype">__global uchar *&#160;</td>
612           <td class="paramname"><em>src_ptr</em>, </td>
613         </tr>
614         <tr>
615           <td class="paramkey"></td>
616           <td></td>
617           <td class="paramtype">uint&#160;</td>
618           <td class="paramname"><em>src_stride_x</em>, </td>
619         </tr>
620         <tr>
621           <td class="paramkey"></td>
622           <td></td>
623           <td class="paramtype">uint&#160;</td>
624           <td class="paramname"><em>src_step_x</em>, </td>
625         </tr>
626         <tr>
627           <td class="paramkey"></td>
628           <td></td>
629           <td class="paramtype">uint&#160;</td>
630           <td class="paramname"><em>src_stride_y</em>, </td>
631         </tr>
632         <tr>
633           <td class="paramkey"></td>
634           <td></td>
635           <td class="paramtype">uint&#160;</td>
636           <td class="paramname"><em>src_step_y</em>, </td>
637         </tr>
638         <tr>
639           <td class="paramkey"></td>
640           <td></td>
641           <td class="paramtype">uint&#160;</td>
642           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
643         </tr>
644         <tr>
645           <td class="paramkey"></td>
646           <td></td>
647           <td class="paramtype">__global uchar *&#160;</td>
648           <td class="paramname"><em>dst_ptr</em>, </td>
649         </tr>
650         <tr>
651           <td class="paramkey"></td>
652           <td></td>
653           <td class="paramtype">uint&#160;</td>
654           <td class="paramname"><em>dst_stride_x</em>, </td>
655         </tr>
656         <tr>
657           <td class="paramkey"></td>
658           <td></td>
659           <td class="paramtype">uint&#160;</td>
660           <td class="paramname"><em>dst_step_x</em>, </td>
661         </tr>
662         <tr>
663           <td class="paramkey"></td>
664           <td></td>
665           <td class="paramtype">uint&#160;</td>
666           <td class="paramname"><em>dst_stride_y</em>, </td>
667         </tr>
668         <tr>
669           <td class="paramkey"></td>
670           <td></td>
671           <td class="paramtype">uint&#160;</td>
672           <td class="paramname"><em>dst_step_y</em>, </td>
673         </tr>
674         <tr>
675           <td class="paramkey"></td>
676           <td></td>
677           <td class="paramtype">uint&#160;</td>
678           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
679         </tr>
680         <tr>
681           <td></td>
682           <td>)</td>
683           <td></td><td></td>
684         </tr>
685       </table>
686 </div><div class="memdoc">
687
688 <p>This function extracts a given channel from an UYUV image. </p>
689 <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>
690 <dl class="params"><dt>Parameters</dt><dd>
691   <table class="params">
692     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: UYUV </td></tr>
693     <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>
694     <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>
695     <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>
696     <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>
697     <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>
698     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
699     <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>
700     <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>
701     <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>
702     <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>
703     <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>
704   </table>
705   </dd>
706 </dl>
707
708 <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>
709
710 <p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
711 <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> src = <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> dst = <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">#if defined 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></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#l00073">helpers.h:73</a></div></div>
712 <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#l00095">helpers.h:95</a></div></div>
713 <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#l00097">helpers.h:97</a></div></div>
714 </div><!-- fragment -->
715 </div>
716 </div>
717 <a class="anchor" id="a6f8110fd6923dfc2db9daf1f3ed92435"></a>
718 <div class="memitem">
719 <div class="memproto">
720       <table class="memname">
721         <tr>
722           <td class="memname">__kernel void channel_extract_YUYV422 </td>
723           <td>(</td>
724           <td class="paramtype">__global uchar *&#160;</td>
725           <td class="paramname"><em>src_ptr</em>, </td>
726         </tr>
727         <tr>
728           <td class="paramkey"></td>
729           <td></td>
730           <td class="paramtype">uint&#160;</td>
731           <td class="paramname"><em>src_stride_x</em>, </td>
732         </tr>
733         <tr>
734           <td class="paramkey"></td>
735           <td></td>
736           <td class="paramtype">uint&#160;</td>
737           <td class="paramname"><em>src_step_x</em>, </td>
738         </tr>
739         <tr>
740           <td class="paramkey"></td>
741           <td></td>
742           <td class="paramtype">uint&#160;</td>
743           <td class="paramname"><em>src_stride_y</em>, </td>
744         </tr>
745         <tr>
746           <td class="paramkey"></td>
747           <td></td>
748           <td class="paramtype">uint&#160;</td>
749           <td class="paramname"><em>src_step_y</em>, </td>
750         </tr>
751         <tr>
752           <td class="paramkey"></td>
753           <td></td>
754           <td class="paramtype">uint&#160;</td>
755           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
756         </tr>
757         <tr>
758           <td class="paramkey"></td>
759           <td></td>
760           <td class="paramtype">__global uchar *&#160;</td>
761           <td class="paramname"><em>dst_ptr</em>, </td>
762         </tr>
763         <tr>
764           <td class="paramkey"></td>
765           <td></td>
766           <td class="paramtype">uint&#160;</td>
767           <td class="paramname"><em>dst_stride_x</em>, </td>
768         </tr>
769         <tr>
770           <td class="paramkey"></td>
771           <td></td>
772           <td class="paramtype">uint&#160;</td>
773           <td class="paramname"><em>dst_step_x</em>, </td>
774         </tr>
775         <tr>
776           <td class="paramkey"></td>
777           <td></td>
778           <td class="paramtype">uint&#160;</td>
779           <td class="paramname"><em>dst_stride_y</em>, </td>
780         </tr>
781         <tr>
782           <td class="paramkey"></td>
783           <td></td>
784           <td class="paramtype">uint&#160;</td>
785           <td class="paramname"><em>dst_step_y</em>, </td>
786         </tr>
787         <tr>
788           <td class="paramkey"></td>
789           <td></td>
790           <td class="paramtype">uint&#160;</td>
791           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
792         </tr>
793         <tr>
794           <td></td>
795           <td>)</td>
796           <td></td><td></td>
797         </tr>
798       </table>
799 </div><div class="memdoc">
800
801 <p>This function extracts a given channel from an YUYV image. </p>
802 <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>
803 <dl class="params"><dt>Parameters</dt><dd>
804   <table class="params">
805     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: YUYV </td></tr>
806     <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>
807     <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>
808     <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>
809     <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>
810     <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>
811     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
812     <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>
813     <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>
814     <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>
815     <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>
816     <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>
817   </table>
818   </dd>
819 </dl>
820
821 <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>
822
823 <p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
824 <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> src = <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> dst = <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">#if defined 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></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#l00073">helpers.h:73</a></div></div>
825 <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#l00095">helpers.h:95</a></div></div>
826 <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#l00097">helpers.h:97</a></div></div>
827 </div><!-- fragment -->
828 </div>
829 </div>
830 <a class="anchor" id="a8b54e12b0c19a206a73ade8e8bed82f3"></a>
831 <div class="memitem">
832 <div class="memproto">
833       <table class="memname">
834         <tr>
835           <td class="memname">__kernel void copy_plane </td>
836           <td>(</td>
837           <td class="paramtype">__global uchar *&#160;</td>
838           <td class="paramname"><em>src_ptr</em>, </td>
839         </tr>
840         <tr>
841           <td class="paramkey"></td>
842           <td></td>
843           <td class="paramtype">uint&#160;</td>
844           <td class="paramname"><em>src_stride_x</em>, </td>
845         </tr>
846         <tr>
847           <td class="paramkey"></td>
848           <td></td>
849           <td class="paramtype">uint&#160;</td>
850           <td class="paramname"><em>src_step_x</em>, </td>
851         </tr>
852         <tr>
853           <td class="paramkey"></td>
854           <td></td>
855           <td class="paramtype">uint&#160;</td>
856           <td class="paramname"><em>src_stride_y</em>, </td>
857         </tr>
858         <tr>
859           <td class="paramkey"></td>
860           <td></td>
861           <td class="paramtype">uint&#160;</td>
862           <td class="paramname"><em>src_step_y</em>, </td>
863         </tr>
864         <tr>
865           <td class="paramkey"></td>
866           <td></td>
867           <td class="paramtype">uint&#160;</td>
868           <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
869         </tr>
870         <tr>
871           <td class="paramkey"></td>
872           <td></td>
873           <td class="paramtype">__global uchar *&#160;</td>
874           <td class="paramname"><em>dst_ptr</em>, </td>
875         </tr>
876         <tr>
877           <td class="paramkey"></td>
878           <td></td>
879           <td class="paramtype">uint&#160;</td>
880           <td class="paramname"><em>dst_stride_x</em>, </td>
881         </tr>
882         <tr>
883           <td class="paramkey"></td>
884           <td></td>
885           <td class="paramtype">uint&#160;</td>
886           <td class="paramname"><em>dst_step_x</em>, </td>
887         </tr>
888         <tr>
889           <td class="paramkey"></td>
890           <td></td>
891           <td class="paramtype">uint&#160;</td>
892           <td class="paramname"><em>dst_stride_y</em>, </td>
893         </tr>
894         <tr>
895           <td class="paramkey"></td>
896           <td></td>
897           <td class="paramtype">uint&#160;</td>
898           <td class="paramname"><em>dst_step_y</em>, </td>
899         </tr>
900         <tr>
901           <td class="paramkey"></td>
902           <td></td>
903           <td class="paramtype">uint&#160;</td>
904           <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
905         </tr>
906         <tr>
907           <td></td>
908           <td>)</td>
909           <td></td><td></td>
910         </tr>
911       </table>
912 </div><div class="memdoc">
913
914 <p>This function extracts a given plane from an multi-planar image. </p>
915 <dl class="params"><dt>Parameters</dt><dd>
916   <table class="params">
917     <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr>
918     <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>
919     <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>
920     <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>
921     <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>
922     <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>
923     <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr>
924     <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>
925     <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>
926     <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>
927     <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>
928     <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>
929   </table>
930   </dd>
931 </dl>
932
933 <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>
934
935 <p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
936 <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> src = <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> dst = <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;    vstore16(vload16(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#l00073">helpers.h:73</a></div></div>
937 <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#l00095">helpers.h:95</a></div></div>
938 <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#l00097">helpers.h:97</a></div></div>
939 </div><!-- fragment -->
940 </div>
941 </div>
942 </div><!-- contents -->
943 </div><!-- doc-content -->
944 <!-- start footer part -->
945 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
946   <ul>
947     <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>
948     <li class="footer">Generated on Wed Apr 12 2017 14:26:05 for ARM Compute Library by
949     <a href="http://www.doxygen.org/index.html">
950     <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
951   </ul>
952 </div>
953 </body>
954 </html>