| <!-- HTML header for doxygen 1.8.15--> |
| <!-- Remember to use version doxygen 1.8.15 +--> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
| <meta name="generator" content="Doxygen 1.8.15"/> |
| <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
| <title>Compute Library: src/core/CL/cl_kernels/channel_extract.cl File Reference</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="jquery.js"></script> |
| <script type="text/javascript" src="dynsections.js"></script> |
| <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="resize.js"></script> |
| <script type="text/javascript" src="navtreedata.js"></script> |
| <script type="text/javascript" src="navtree.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(document).ready(initResizable); |
| /* @license-end */</script> |
| <link href="search/search.css" rel="stylesheet" type="text/css"/> |
| <script type="text/javascript" src="search/searchdata.js"></script> |
| <script type="text/javascript" src="search/search.js"></script> |
| <script type="text/x-mathjax-config"> |
| MathJax.Hub.Config({ |
| extensions: ["tex2jax.js"], |
| jax: ["input/TeX","output/HTML-CSS"], |
| }); |
| </script><script type="text/javascript" async="async" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
| <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| <link href="stylesheet.css" rel="stylesheet" type="text/css"/> |
| </head> |
| <body> |
| <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| <div id="titlearea"> |
| <table cellspacing="0" cellpadding="0"> |
| <tbody> |
| <tr style="height: 56px;"> |
| <img alt="Compute Library" src="https://raw.githubusercontent.com/ARM-software/ComputeLibrary/gh-pages/ACL_logo.png" style="max-width: 100%;margin-top: 15px;margin-left: 10px"/> |
| <td style="padding-left: 0.5em;"> |
| <div id="projectname"> |
|  <span id="projectnumber">20.02.1</span> |
| </div> |
| </td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| <!-- end header part --> |
| <!-- Generated by Doxygen 1.8.15 --> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| /* @license-end */ |
| </script> |
| <script type="text/javascript" src="menudata.js"></script> |
| <script type="text/javascript" src="menu.js"></script> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(function() { |
| initMenu('',true,false,'search.php','Search'); |
| $(document).ready(function() { init_search(); }); |
| }); |
| /* @license-end */</script> |
| <div id="main-nav"></div> |
| </div><!-- top --> |
| <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| <div id="nav-tree"> |
| <div id="nav-tree-contents"> |
| <div id="nav-sync" class="sync"></div> |
| </div> |
| </div> |
| <div id="splitbar" style="-moz-user-select:none;" |
| class="ui-resizable-handle"> |
| </div> |
| </div> |
| <script type="text/javascript"> |
| /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */ |
| $(document).ready(function(){initNavTree('channel__extract_8cl.xhtml','');}); |
| /* @license-end */ |
| </script> |
| <div id="doc-content"> |
| <!-- window showing the filter options --> |
| <div id="MSearchSelectWindow" |
| onmouseover="return searchBox.OnSearchSelectShow()" |
| onmouseout="return searchBox.OnSearchSelectHide()" |
| onkeydown="return searchBox.OnSearchSelectKey(event)"> |
| </div> |
| |
| <!-- iframe showing the search results (closed by default) --> |
| <div id="MSearchResultsWindow"> |
| <iframe src="javascript:void(0)" frameborder="0" |
| name="MSearchResults" id="MSearchResults"> |
| </iframe> |
| </div> |
| |
| <div class="header"> |
| <div class="summary"> |
| <a href="#func-members">Functions</a> </div> |
| <div class="headertitle"> |
| <div class="title">channel_extract.cl File Reference</div> </div> |
| </div><!--header--> |
| <div class="contents"> |
| <div class="textblock"><code>#include "<a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml">helpers.h</a>"</code><br /> |
| </div> |
| <p><a href="channel__extract_8cl_source.xhtml">Go to the source code of this file.</a></p> |
| <table class="memberdecls"> |
| <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| Functions</h2></td></tr> |
| <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> |
| <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> |
| <tr class="separator:aeecb8084159259d10790df3e0a602cbf"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <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> |
| <tr class="separator:ae133ea6ea26771fc36a31d0a3d783077"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <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> |
| <tr class="separator:a6f8110fd6923dfc2db9daf1f3ed92435"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <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> |
| <tr class="separator:a3d22dccc2444106a5325b842c096486c"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <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> |
| <tr class="separator:a5dc3971835f11066639e63f02545932b"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <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> |
| <tr class="separator:a628f0c1a3a80b8dc275ad0ca877e3833"><td class="memSeparator" colspan="2"> </td></tr> |
| <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> |
| <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> |
| <tr class="separator:a8b54e12b0c19a206a73ade8e8bed82f3"><td class="memSeparator" colspan="2"> </td></tr> |
| </table> |
| <h2 class="groupheader">Function Documentation</h2> |
| <a id="a5dc3971835f11066639e63f02545932b"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a5dc3971835f11066639e63f02545932b">◆ </a></span>channel_extract_NV12()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void channel_extract_NV12 </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>src_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>dst_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This function extracts a given channel from an NV12 image. </p> |
| <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> |
| <dl class="section warning"><dt>Warning</dt><dd>Only channels UV can be extracted using this kernel.</dd></dl> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: NV12 (UV88) </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| </table> |
| </dd> |
| </dl> |
| |
| <p class="definition">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> |
| <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> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr);</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">#ifdef CHANNEL_U</span></div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  vstore8(data.s02468ACE, 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span> <span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">helpers.h:311</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">AbsoluteDifference.cpp:102</a></div></div> |
| <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a989ab3e96426615bb98e04e0235088ca"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">arm_compute::test::validation::src</a></div><div class="ttdeci">cast configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_cast_8cpp_source.xhtml#l00169">Cast.cpp:169</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">arm_compute::test::validation::dst</a>, and <a class="el" href="_c_l_2_cast_8cpp_source.xhtml#l00169">arm_compute::test::validation::src</a>.</p> |
| |
| </div> |
| </div> |
| <a id="a628f0c1a3a80b8dc275ad0ca877e3833"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a628f0c1a3a80b8dc275ad0ca877e3833">◆ </a></span>channel_extract_NV21()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void channel_extract_NV21 </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>src_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>dst_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This function extracts a given channel from an NV21 image. </p> |
| <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> |
| <dl class="section warning"><dt>Warning</dt><dd>Only channels UV can be extracted using this kernel.</dd></dl> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: NV21 (UV88) </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| </table> |
| </dd> |
| </dl> |
| |
| <p class="definition">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> |
| <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> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>);</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr);</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">#ifdef CHANNEL_U</span></div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>  vstore8(data.s13579BDF, 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span> <span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">helpers.h:311</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">AbsoluteDifference.cpp:102</a></div></div> |
| <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a989ab3e96426615bb98e04e0235088ca"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">arm_compute::test::validation::src</a></div><div class="ttdeci">cast configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_cast_8cpp_source.xhtml#l00169">Cast.cpp:169</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">arm_compute::test::validation::dst</a>, and <a class="el" href="_c_l_2_cast_8cpp_source.xhtml#l00169">arm_compute::test::validation::src</a>.</p> |
| |
| </div> |
| </div> |
| <a id="aeecb8084159259d10790df3e0a602cbf"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#aeecb8084159259d10790df3e0a602cbf">◆ </a></span>channel_extract_RGB888()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void channel_extract_RGB888 </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>src_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>dst_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This function extracts a given channel from an RGB image. </p> |
| <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> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: RGB </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| </table> |
| </dd> |
| </dl> |
| |
| <p class="definition">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> |
| <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> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>);</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr);</div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  uchar8 data2 = vload8(0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr + 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">#ifdef CHANNEL_R</span></div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  vstore4(data.s0369, 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  vstore4((uchar4)(data.sCF, data2.s25), 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr + 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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  vstore4((uchar4)(data.sD, data2.s036), 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr + 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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  vstore4((uchar4)(data.sE, data2.s147), 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr + 4);</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> <span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_R or CHANNEL_G or CHANNEL_B */</span><span class="preprocessor"></span></div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">helpers.h:311</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">AbsoluteDifference.cpp:102</a></div></div> |
| <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a989ab3e96426615bb98e04e0235088ca"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">arm_compute::test::validation::src</a></div><div class="ttdeci">cast configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_cast_8cpp_source.xhtml#l00169">Cast.cpp:169</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">arm_compute::test::validation::dst</a>, and <a class="el" href="_c_l_2_cast_8cpp_source.xhtml#l00169">arm_compute::test::validation::src</a>.</p> |
| |
| </div> |
| </div> |
| <a id="ae133ea6ea26771fc36a31d0a3d783077"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#ae133ea6ea26771fc36a31d0a3d783077">◆ </a></span>channel_extract_RGBA8888()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void channel_extract_RGBA8888 </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>src_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>dst_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This function extracts a given channel from an RGBA image. </p> |
| <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> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: RGBA </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| </table> |
| </dd> |
| </dl> |
| |
| <p class="definition">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> |
| <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> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>);</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr);</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span>  uchar16 data2 = vload16(0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr + 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">#ifdef CHANNEL_R</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  vstore8((uchar8)(data.s048C, data2.s048C), 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span> <span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_R or CHANNEL_G or CHANNEL_B or CHANNEL_A */</span><span class="preprocessor"></span></div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">helpers.h:311</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">AbsoluteDifference.cpp:102</a></div></div> |
| <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a989ab3e96426615bb98e04e0235088ca"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">arm_compute::test::validation::src</a></div><div class="ttdeci">cast configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_cast_8cpp_source.xhtml#l00169">Cast.cpp:169</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">arm_compute::test::validation::dst</a>, and <a class="el" href="_c_l_2_cast_8cpp_source.xhtml#l00169">arm_compute::test::validation::src</a>.</p> |
| |
| </div> |
| </div> |
| <a id="a3d22dccc2444106a5325b842c096486c"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a3d22dccc2444106a5325b842c096486c">◆ </a></span>channel_extract_UYVY422()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void channel_extract_UYVY422 </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>src_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>dst_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This function extracts a given channel from an UYUV image. </p> |
| <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> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: UYUV </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| </table> |
| </dd> |
| </dl> |
| |
| <p class="definition">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> |
| <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> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>);</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr);</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">#ifdef CHANNEL_Y</span></div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  vstore8(data.s13579BDF, 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_Y or CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">helpers.h:311</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">AbsoluteDifference.cpp:102</a></div></div> |
| <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a989ab3e96426615bb98e04e0235088ca"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">arm_compute::test::validation::src</a></div><div class="ttdeci">cast configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_cast_8cpp_source.xhtml#l00169">Cast.cpp:169</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">arm_compute::test::validation::dst</a>, and <a class="el" href="_c_l_2_cast_8cpp_source.xhtml#l00169">arm_compute::test::validation::src</a>.</p> |
| |
| </div> |
| </div> |
| <a id="a6f8110fd6923dfc2db9daf1f3ed92435"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a6f8110fd6923dfc2db9daf1f3ed92435">◆ </a></span>channel_extract_YUYV422()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void channel_extract_YUYV422 </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>src_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>dst_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This function extracts a given channel from an YUYV image. </p> |
| <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> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: YUYV </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| </table> |
| </dd> |
| </dl> |
| |
| <p class="definition">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> |
| <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> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr);</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">#ifdef CHANNEL_Y</span></div><div class="line"><a name="l00133"></a><span class="lineno"> 133</span>  vstore8(data.s02468ACE, 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</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, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> <span class="preprocessor">#endif </span><span class="comment">/* CHANNEL_Y or CHANNEL_U or CHANNEL_V */</span><span class="preprocessor"></span></div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">helpers.h:311</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">AbsoluteDifference.cpp:102</a></div></div> |
| <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a989ab3e96426615bb98e04e0235088ca"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">arm_compute::test::validation::src</a></div><div class="ttdeci">cast configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_cast_8cpp_source.xhtml#l00169">Cast.cpp:169</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">arm_compute::test::validation::dst</a>, and <a class="el" href="_c_l_2_cast_8cpp_source.xhtml#l00169">arm_compute::test::validation::src</a>.</p> |
| |
| </div> |
| </div> |
| <a id="a8b54e12b0c19a206a73ade8e8bed82f3"></a> |
| <h2 class="memtitle"><span class="permalink"><a href="#a8b54e12b0c19a206a73ade8e8bed82f3">◆ </a></span>copy_plane()</h2> |
| |
| <div class="memitem"> |
| <div class="memproto"> |
| <table class="memname"> |
| <tr> |
| <td class="memname">__kernel void copy_plane </td> |
| <td>(</td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>src_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">__global uchar * </td> |
| <td class="paramname"><em>dst_ptr</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_x</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_stride_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_step_y</em>, </td> |
| </tr> |
| <tr> |
| <td class="paramkey"></td> |
| <td></td> |
| <td class="paramtype">uint </td> |
| <td class="paramname"><em>dst_offset_first_element_in_bytes</em> </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td>)</td> |
| <td></td><td></td> |
| </tr> |
| </table> |
| </div><div class="memdoc"> |
| |
| <p>This function extracts a given plane from an multi-planar image. </p> |
| <dl class="params"><dt>Parameters</dt><dd> |
| <table class="params"> |
| <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported Format: U8 </td></tr> |
| <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> |
| <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> |
| <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> |
| <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> |
| <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> |
| </table> |
| </dd> |
| </dl> |
| |
| <p class="definition">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> |
| <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> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>);</div><div class="line"><a name="l00268"></a><span class="lineno"> 268</span>  <a class="code" href="struct_image.xhtml">Image</a> <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a> = <a class="code" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(<a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>);</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>  vstore8(vload8(0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">src</a>.ptr), 0, <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">dst</a>.ptr);</div><div class="line"><a name="l00272"></a><span class="lineno"> 272</span> }</div><div class="ttc" id="src_2core_2_c_l_2cl__kernels_2_helpers_8h_xhtml_aebe814363556c244be043b13e7969197"><div class="ttname"><a href="src_2core_2_c_l_2cl__kernels_2_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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">helpers.h:311</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_adbf67dcee294e673cf796f1ed8aeb6a4"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#adbf67dcee294e673cf796f1ed8aeb6a4">arm_compute::test::validation::dst</a></div><div class="ttdeci">CLTensor dst</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">AbsoluteDifference.cpp:102</a></div></div> |
| <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="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00349">helpers.h:349</a></div></div> |
| <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a989ab3e96426615bb98e04e0235088ca"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a989ab3e96426615bb98e04e0235088ca">arm_compute::test::validation::src</a></div><div class="ttdeci">cast configure & src</div><div class="ttdef"><b>Definition:</b> <a href="_c_l_2_cast_8cpp_source.xhtml#l00169">Cast.cpp:169</a></div></div> |
| </div><!-- fragment --> |
| <p class="reference">References <a class="el" href="src_2core_2_c_l_2cl__kernels_2_helpers_8h_source.xhtml#l00311">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="_c_l_2_absolute_difference_8cpp_source.xhtml#l00102">arm_compute::test::validation::dst</a>, and <a class="el" href="_c_l_2_cast_8cpp_source.xhtml#l00169">arm_compute::test::validation::src</a>.</p> |
| |
| </div> |
| </div> |
| </div><!-- contents --> |
| </div><!-- doc-content --> |
| <!-- start footer part --> |
| <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| <ul> |
| <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> |
| <li class="footer">Generated on Thu Mar 5 2020 16:07:07 for Compute Library by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.15 </li> |
| </ul> |
| </div> |
| </body> |
| </html> |