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">
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);
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(); });
27 <script type="text/x-mathjax-config">
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
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" />
36 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
38 <table cellspacing="0" cellpadding="0">
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
42 <div id="projectname">ARM Compute Library
43  <span id="projectnumber">17.04</span>
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');
55 <div id="navrow1" class="tabs">
57 <li><a href="index.xhtml"><span>Main Page</span></a></li>
58 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
59 <li><a href="annotated.xhtml"><span>Data Structures</span></a></li>
60 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
62 <div id="MSearchBox" class="MSearchBoxInactive">
64 <img id="MSearchSelect" src="search/mag_sel.png"
65 onmouseover="return searchBox.OnSearchSelectShow()"
66 onmouseout="return searchBox.OnSearchSelectHide()"
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>
79 <div id="navrow2" class="tabs2">
81 <li><a href="files.xhtml"><span>File List</span></a></li>
82 <li><a href="globals.xhtml"><span>Globals</span></a></li>
86 <div id="side-nav" class="ui-resizable side-nav-resizable">
88 <div id="nav-tree-contents">
89 <div id="nav-sync" class="sync"></div>
92 <div id="splitbar" style="-moz-user-select:none;"
93 class="ui-resizable-handle">
96 <script type="text/javascript">
97 $(document).ready(function(){initNavTree('channel__extract_8cl.xhtml','');});
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)">
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">
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>
120 <div class="contents">
121 <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br />
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 </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"> </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"> </td></tr>
130 <tr class="memitem:ae133ea6ea26771fc36a31d0a3d783077"><td class="memItemLeft" align="right" valign="top">__kernel void </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"> </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"> </td></tr>
133 <tr class="memitem:a6f8110fd6923dfc2db9daf1f3ed92435"><td class="memItemLeft" align="right" valign="top">__kernel void </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"> </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"> </td></tr>
136 <tr class="memitem:a3d22dccc2444106a5325b842c096486c"><td class="memItemLeft" align="right" valign="top">__kernel void </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"> </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"> </td></tr>
139 <tr class="memitem:a5dc3971835f11066639e63f02545932b"><td class="memItemLeft" align="right" valign="top">__kernel void </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"> </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"> </td></tr>
142 <tr class="memitem:a628f0c1a3a80b8dc275ad0ca877e3833"><td class="memItemLeft" align="right" valign="top">__kernel void </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"> </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"> </td></tr>
145 <tr class="memitem:a8b54e12b0c19a206a73ade8e8bed82f3"><td class="memItemLeft" align="right" valign="top">__kernel void </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"> </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"> </td></tr>
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">
155 <td class="memname">__kernel void channel_extract_NV12 </td>
157 <td class="paramtype">__global uchar * </td>
158 <td class="paramname"><em>src_ptr</em>, </td>
161 <td class="paramkey"></td>
163 <td class="paramtype">uint </td>
164 <td class="paramname"><em>src_stride_x</em>, </td>
167 <td class="paramkey"></td>
169 <td class="paramtype">uint </td>
170 <td class="paramname"><em>src_step_x</em>, </td>
173 <td class="paramkey"></td>
175 <td class="paramtype">uint </td>
176 <td class="paramname"><em>src_stride_y</em>, </td>
179 <td class="paramkey"></td>
181 <td class="paramtype">uint </td>
182 <td class="paramname"><em>src_step_y</em>, </td>
185 <td class="paramkey"></td>
187 <td class="paramtype">uint </td>
188 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
191 <td class="paramkey"></td>
193 <td class="paramtype">__global uchar * </td>
194 <td class="paramname"><em>dst_ptr</em>, </td>
197 <td class="paramkey"></td>
199 <td class="paramtype">uint </td>
200 <td class="paramname"><em>dst_stride_x</em>, </td>
203 <td class="paramkey"></td>
205 <td class="paramtype">uint </td>
206 <td class="paramname"><em>dst_step_x</em>, </td>
209 <td class="paramkey"></td>
211 <td class="paramtype">uint </td>
212 <td class="paramname"><em>dst_stride_y</em>, </td>
215 <td class="paramkey"></td>
217 <td class="paramtype">uint </td>
218 <td class="paramname"><em>dst_step_y</em>, </td>
221 <td class="paramkey"></td>
223 <td class="paramtype">uint </td>
224 <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td>
232 </div><div class="memdoc">
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>
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>
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> {</div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <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>  <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> </div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  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> </div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="preprocessor">#if defined CHANNEL_U</span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  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> <span class="preprocessor">#elif defined CHANNEL_V</span></div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  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> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span> }</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 -->
264 <a class="anchor" id="a628f0c1a3a80b8dc275ad0ca877e3833"></a>
265 <div class="memitem">
266 <div class="memproto">
267 <table class="memname">
269 <td class="memname">__kernel void channel_extract_NV21 </td>
271 <td class="paramtype">__global uchar * </td>
272 <td class="paramname"><em>src_ptr</em>, </td>
275 <td class="paramkey"></td>
277 <td class="paramtype">uint </td>
278 <td class="paramname"><em>src_stride_x</em>, </td>
281 <td class="paramkey"></td>
283 <td class="paramtype">uint </td>
284 <td class="paramname"><em>src_step_x</em>, </td>
287 <td class="paramkey"></td>
289 <td class="paramtype">uint </td>
290 <td class="paramname"><em>src_stride_y</em>, </td>
293 <td class="paramkey"></td>
295 <td class="paramtype">uint </td>
296 <td class="paramname"><em>src_step_y</em>, </td>
299 <td class="paramkey"></td>
301 <td class="paramtype">uint </td>
302 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
305 <td class="paramkey"></td>
307 <td class="paramtype">__global uchar * </td>
308 <td class="paramname"><em>dst_ptr</em>, </td>
311 <td class="paramkey"></td>
313 <td class="paramtype">uint </td>
314 <td class="paramname"><em>dst_stride_x</em>, </td>
317 <td class="paramkey"></td>
319 <td class="paramtype">uint </td>
320 <td class="paramname"><em>dst_step_x</em>, </td>
323 <td class="paramkey"></td>
325 <td class="paramtype">uint </td>
326 <td class="paramname"><em>dst_stride_y</em>, </td>
329 <td class="paramkey"></td>
331 <td class="paramtype">uint </td>
332 <td class="paramname"><em>dst_step_y</em>, </td>
335 <td class="paramkey"></td>
337 <td class="paramtype">uint </td>
338 <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td>
346 </div><div class="memdoc">
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>
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>
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> {</div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  <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>  <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> </div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  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> </div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> <span class="preprocessor">#if defined CHANNEL_U</span></div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  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> <span class="preprocessor">#elif defined CHANNEL_V</span></div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>  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> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> }</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 -->
378 <a class="anchor" id="aeecb8084159259d10790df3e0a602cbf"></a>
379 <div class="memitem">
380 <div class="memproto">
381 <table class="memname">
383 <td class="memname">__kernel void channel_extract_RGB888 </td>
385 <td class="paramtype">__global uchar * </td>
386 <td class="paramname"><em>src_ptr</em>, </td>
389 <td class="paramkey"></td>
391 <td class="paramtype">uint </td>
392 <td class="paramname"><em>src_stride_x</em>, </td>
395 <td class="paramkey"></td>
397 <td class="paramtype">uint </td>
398 <td class="paramname"><em>src_step_x</em>, </td>
401 <td class="paramkey"></td>
403 <td class="paramtype">uint </td>
404 <td class="paramname"><em>src_stride_y</em>, </td>
407 <td class="paramkey"></td>
409 <td class="paramtype">uint </td>
410 <td class="paramname"><em>src_step_y</em>, </td>
413 <td class="paramkey"></td>
415 <td class="paramtype">uint </td>
416 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
419 <td class="paramkey"></td>
421 <td class="paramtype">__global uchar * </td>
422 <td class="paramname"><em>dst_ptr</em>, </td>
425 <td class="paramkey"></td>
427 <td class="paramtype">uint </td>
428 <td class="paramname"><em>dst_stride_x</em>, </td>
431 <td class="paramkey"></td>
433 <td class="paramtype">uint </td>
434 <td class="paramname"><em>dst_step_x</em>, </td>
437 <td class="paramkey"></td>
439 <td class="paramtype">uint </td>
440 <td class="paramname"><em>dst_stride_y</em>, </td>
443 <td class="paramkey"></td>
445 <td class="paramtype">uint </td>
446 <td class="paramname"><em>dst_step_y</em>, </td>
449 <td class="paramkey"></td>
451 <td class="paramtype">uint </td>
452 <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td>
460 </div><div class="memdoc">
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>
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>
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> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <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>  <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> </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  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>  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> </div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> <span class="preprocessor">#if defined CHANNEL_R</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  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>  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> <span class="preprocessor">#elif defined CHANNEL_G</span></div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  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>  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> <span class="preprocessor">#elif defined CHANNEL_B</span></div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  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>  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> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> }</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 -->
491 <a class="anchor" id="ae133ea6ea26771fc36a31d0a3d783077"></a>
492 <div class="memitem">
493 <div class="memproto">
494 <table class="memname">
496 <td class="memname">__kernel void channel_extract_RGBA8888 </td>
498 <td class="paramtype">__global uchar * </td>
499 <td class="paramname"><em>src_ptr</em>, </td>
502 <td class="paramkey"></td>
504 <td class="paramtype">uint </td>
505 <td class="paramname"><em>src_stride_x</em>, </td>
508 <td class="paramkey"></td>
510 <td class="paramtype">uint </td>
511 <td class="paramname"><em>src_step_x</em>, </td>
514 <td class="paramkey"></td>
516 <td class="paramtype">uint </td>
517 <td class="paramname"><em>src_stride_y</em>, </td>
520 <td class="paramkey"></td>
522 <td class="paramtype">uint </td>
523 <td class="paramname"><em>src_step_y</em>, </td>
526 <td class="paramkey"></td>
528 <td class="paramtype">uint </td>
529 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
532 <td class="paramkey"></td>
534 <td class="paramtype">__global uchar * </td>
535 <td class="paramname"><em>dst_ptr</em>, </td>
538 <td class="paramkey"></td>
540 <td class="paramtype">uint </td>
541 <td class="paramname"><em>dst_stride_x</em>, </td>
544 <td class="paramkey"></td>
546 <td class="paramtype">uint </td>
547 <td class="paramname"><em>dst_step_x</em>, </td>
550 <td class="paramkey"></td>
552 <td class="paramtype">uint </td>
553 <td class="paramname"><em>dst_stride_y</em>, </td>
556 <td class="paramkey"></td>
558 <td class="paramtype">uint </td>
559 <td class="paramname"><em>dst_step_y</em>, </td>
562 <td class="paramkey"></td>
564 <td class="paramtype">uint </td>
565 <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td>
573 </div><div class="memdoc">
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>
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>
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> {</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <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>  <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> </div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  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>  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> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span> <span class="preprocessor">#if defined CHANNEL_R</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  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> <span class="preprocessor">#elif defined CHANNEL_G</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  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> <span class="preprocessor">#elif defined CHANNEL_B</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  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> <span class="preprocessor">#elif defined CHANNEL_A</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  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> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> }</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 -->
604 <a class="anchor" id="a3d22dccc2444106a5325b842c096486c"></a>
605 <div class="memitem">
606 <div class="memproto">
607 <table class="memname">
609 <td class="memname">__kernel void channel_extract_UYVY422 </td>
611 <td class="paramtype">__global uchar * </td>
612 <td class="paramname"><em>src_ptr</em>, </td>
615 <td class="paramkey"></td>
617 <td class="paramtype">uint </td>
618 <td class="paramname"><em>src_stride_x</em>, </td>
621 <td class="paramkey"></td>
623 <td class="paramtype">uint </td>
624 <td class="paramname"><em>src_step_x</em>, </td>
627 <td class="paramkey"></td>
629 <td class="paramtype">uint </td>
630 <td class="paramname"><em>src_stride_y</em>, </td>
633 <td class="paramkey"></td>
635 <td class="paramtype">uint </td>
636 <td class="paramname"><em>src_step_y</em>, </td>
639 <td class="paramkey"></td>
641 <td class="paramtype">uint </td>
642 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
645 <td class="paramkey"></td>
647 <td class="paramtype">__global uchar * </td>
648 <td class="paramname"><em>dst_ptr</em>, </td>
651 <td class="paramkey"></td>
653 <td class="paramtype">uint </td>
654 <td class="paramname"><em>dst_stride_x</em>, </td>
657 <td class="paramkey"></td>
659 <td class="paramtype">uint </td>
660 <td class="paramname"><em>dst_step_x</em>, </td>
663 <td class="paramkey"></td>
665 <td class="paramtype">uint </td>
666 <td class="paramname"><em>dst_stride_y</em>, </td>
669 <td class="paramkey"></td>
671 <td class="paramtype">uint </td>
672 <td class="paramname"><em>dst_step_y</em>, </td>
675 <td class="paramkey"></td>
677 <td class="paramtype">uint </td>
678 <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td>
686 </div><div class="memdoc">
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>
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>
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> {</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <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>  <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> </div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>  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> </div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span> <span class="preprocessor">#if defined CHANNEL_Y</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  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> <span class="preprocessor">#elif defined CHANNEL_U</span></div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  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> <span class="preprocessor">#elif defined CHANNEL_V</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>  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> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> }</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 -->
717 <a class="anchor" id="a6f8110fd6923dfc2db9daf1f3ed92435"></a>
718 <div class="memitem">
719 <div class="memproto">
720 <table class="memname">
722 <td class="memname">__kernel void channel_extract_YUYV422 </td>
724 <td class="paramtype">__global uchar * </td>
725 <td class="paramname"><em>src_ptr</em>, </td>
728 <td class="paramkey"></td>
730 <td class="paramtype">uint </td>
731 <td class="paramname"><em>src_stride_x</em>, </td>
734 <td class="paramkey"></td>
736 <td class="paramtype">uint </td>
737 <td class="paramname"><em>src_step_x</em>, </td>
740 <td class="paramkey"></td>
742 <td class="paramtype">uint </td>
743 <td class="paramname"><em>src_stride_y</em>, </td>
746 <td class="paramkey"></td>
748 <td class="paramtype">uint </td>
749 <td class="paramname"><em>src_step_y</em>, </td>
752 <td class="paramkey"></td>
754 <td class="paramtype">uint </td>
755 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
758 <td class="paramkey"></td>
760 <td class="paramtype">__global uchar * </td>
761 <td class="paramname"><em>dst_ptr</em>, </td>
764 <td class="paramkey"></td>
766 <td class="paramtype">uint </td>
767 <td class="paramname"><em>dst_stride_x</em>, </td>
770 <td class="paramkey"></td>
772 <td class="paramtype">uint </td>
773 <td class="paramname"><em>dst_step_x</em>, </td>
776 <td class="paramkey"></td>
778 <td class="paramtype">uint </td>
779 <td class="paramname"><em>dst_stride_y</em>, </td>
782 <td class="paramkey"></td>
784 <td class="paramtype">uint </td>
785 <td class="paramname"><em>dst_step_y</em>, </td>
788 <td class="paramkey"></td>
790 <td class="paramtype">uint </td>
791 <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td>
799 </div><div class="memdoc">
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>
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>
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> {</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <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>  <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> </div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  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> </div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> <span class="preprocessor">#if defined CHANNEL_Y</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  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> <span class="preprocessor">#elif defined CHANNEL_U</span></div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  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> <span class="preprocessor">#elif defined CHANNEL_V</span></div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  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> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> }</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 -->
830 <a class="anchor" id="a8b54e12b0c19a206a73ade8e8bed82f3"></a>
831 <div class="memitem">
832 <div class="memproto">
833 <table class="memname">
835 <td class="memname">__kernel void copy_plane </td>
837 <td class="paramtype">__global uchar * </td>
838 <td class="paramname"><em>src_ptr</em>, </td>
841 <td class="paramkey"></td>
843 <td class="paramtype">uint </td>
844 <td class="paramname"><em>src_stride_x</em>, </td>
847 <td class="paramkey"></td>
849 <td class="paramtype">uint </td>
850 <td class="paramname"><em>src_step_x</em>, </td>
853 <td class="paramkey"></td>
855 <td class="paramtype">uint </td>
856 <td class="paramname"><em>src_stride_y</em>, </td>
859 <td class="paramkey"></td>
861 <td class="paramtype">uint </td>
862 <td class="paramname"><em>src_step_y</em>, </td>
865 <td class="paramkey"></td>
867 <td class="paramtype">uint </td>
868 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
871 <td class="paramkey"></td>
873 <td class="paramtype">__global uchar * </td>
874 <td class="paramname"><em>dst_ptr</em>, </td>
877 <td class="paramkey"></td>
879 <td class="paramtype">uint </td>
880 <td class="paramname"><em>dst_stride_x</em>, </td>
883 <td class="paramkey"></td>
885 <td class="paramtype">uint </td>
886 <td class="paramname"><em>dst_step_x</em>, </td>
889 <td class="paramkey"></td>
891 <td class="paramtype">uint </td>
892 <td class="paramname"><em>dst_stride_y</em>, </td>
895 <td class="paramkey"></td>
897 <td class="paramtype">uint </td>
898 <td class="paramname"><em>dst_step_y</em>, </td>
901 <td class="paramkey"></td>
903 <td class="paramtype">uint </td>
904 <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td>
912 </div><div class="memdoc">
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>
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>
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> {</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span>  <span class="comment">// Get pixels pointer</span></div><div class="line"><a name="l00267"></a><span class="lineno"> 267</span>  <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>  <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> </div><div class="line"><a name="l00270"></a><span class="lineno"> 270</span>  <span class="comment">// Copy plane data</span></div><div class="line"><a name="l00271"></a><span class="lineno"> 271</span>  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> }</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 -->
942 </div><!-- contents -->
943 </div><!-- doc-content -->
944 <!-- start footer part -->
945 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
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>