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/remap.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('remap_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">remap.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 />
122 <code>#include "<a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>"</code><br />
124 <p><a href="remap_8cl_source.xhtml">Go to the source code of this file.</a></p>
125 <table class="memberdecls">
126 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
127 Functions</h2></td></tr>
128 <tr class="memitem:a786803611cc128275d32d9584376713e"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="remap_8cl.xhtml#a786803611cc128275d32d9584376713e">remap_nearest_neighbour</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, __global uchar *mapx_ptr, uint mapx_stride_x, uint mapx_step_x, uint mapx_stride_y, uint mapx_step_y, uint mapx_offset_first_element_in_bytes, __global uchar *mapy_ptr, uint mapy_stride_x, uint mapy_step_x, uint mapy_stride_y, uint mapy_step_y, uint mapy_offset_first_element_in_bytes, const float width, const float height)</td></tr>
129 <tr class="memdesc:a786803611cc128275d32d9584376713e"><td class="mdescLeft"> </td><td class="mdescRight">Performs a remapping of an input image to an output given two remapping image using nearest neighbor as interpolation. <a href="#a786803611cc128275d32d9584376713e">More...</a><br /></td></tr>
130 <tr class="separator:a786803611cc128275d32d9584376713e"><td class="memSeparator" colspan="2"> </td></tr>
131 <tr class="memitem:a1d771133d1dfea450fdbacda1c34ce49"><td class="memItemLeft" align="right" valign="top">__kernel void </td><td class="memItemRight" valign="bottom"><a class="el" href="remap_8cl.xhtml#a1d771133d1dfea450fdbacda1c34ce49">remap_bilinear</a> (__global uchar *in_ptr, uint in_stride_x, uint in_step_x, uint in_stride_y, uint in_step_y, uint in_offset_first_element_in_bytes, __global uchar *out_ptr, uint out_stride_x, uint out_step_x, uint out_stride_y, uint out_step_y, uint out_offset_first_element_in_bytes, __global uchar *mapx_ptr, uint mapx_stride_x, uint mapx_step_x, uint mapx_stride_y, uint mapx_step_y, uint mapx_offset_first_element_in_bytes, __global uchar *mapy_ptr, uint mapy_stride_x, uint mapy_step_x, uint mapy_stride_y, uint mapy_step_y, uint mapy_offset_first_element_in_bytes, const float width, const float height)</td></tr>
132 <tr class="memdesc:a1d771133d1dfea450fdbacda1c34ce49"><td class="mdescLeft"> </td><td class="mdescRight">Performs a remapping of an input image to an output given two remapping image using bilinear as interpolation. <a href="#a1d771133d1dfea450fdbacda1c34ce49">More...</a><br /></td></tr>
133 <tr class="separator:a1d771133d1dfea450fdbacda1c34ce49"><td class="memSeparator" colspan="2"> </td></tr>
135 <h2 class="groupheader">Function Documentation</h2>
136 <a class="anchor" id="a1d771133d1dfea450fdbacda1c34ce49"></a>
137 <div class="memitem">
138 <div class="memproto">
139 <table class="memname">
141 <td class="memname">__kernel void remap_bilinear </td>
143 <td class="paramtype">__global uchar * </td>
144 <td class="paramname"><em>in_ptr</em>, </td>
147 <td class="paramkey"></td>
149 <td class="paramtype">uint </td>
150 <td class="paramname"><em>in_stride_x</em>, </td>
153 <td class="paramkey"></td>
155 <td class="paramtype">uint </td>
156 <td class="paramname"><em>in_step_x</em>, </td>
159 <td class="paramkey"></td>
161 <td class="paramtype">uint </td>
162 <td class="paramname"><em>in_stride_y</em>, </td>
165 <td class="paramkey"></td>
167 <td class="paramtype">uint </td>
168 <td class="paramname"><em>in_step_y</em>, </td>
171 <td class="paramkey"></td>
173 <td class="paramtype">uint </td>
174 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
177 <td class="paramkey"></td>
179 <td class="paramtype">__global uchar * </td>
180 <td class="paramname"><em>out_ptr</em>, </td>
183 <td class="paramkey"></td>
185 <td class="paramtype">uint </td>
186 <td class="paramname"><em>out_stride_x</em>, </td>
189 <td class="paramkey"></td>
191 <td class="paramtype">uint </td>
192 <td class="paramname"><em>out_step_x</em>, </td>
195 <td class="paramkey"></td>
197 <td class="paramtype">uint </td>
198 <td class="paramname"><em>out_stride_y</em>, </td>
201 <td class="paramkey"></td>
203 <td class="paramtype">uint </td>
204 <td class="paramname"><em>out_step_y</em>, </td>
207 <td class="paramkey"></td>
209 <td class="paramtype">uint </td>
210 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
213 <td class="paramkey"></td>
215 <td class="paramtype">__global uchar * </td>
216 <td class="paramname"><em>mapx_ptr</em>, </td>
219 <td class="paramkey"></td>
221 <td class="paramtype">uint </td>
222 <td class="paramname"><em>mapx_stride_x</em>, </td>
225 <td class="paramkey"></td>
227 <td class="paramtype">uint </td>
228 <td class="paramname"><em>mapx_step_x</em>, </td>
231 <td class="paramkey"></td>
233 <td class="paramtype">uint </td>
234 <td class="paramname"><em>mapx_stride_y</em>, </td>
237 <td class="paramkey"></td>
239 <td class="paramtype">uint </td>
240 <td class="paramname"><em>mapx_step_y</em>, </td>
243 <td class="paramkey"></td>
245 <td class="paramtype">uint </td>
246 <td class="paramname"><em>mapx_offset_first_element_in_bytes</em>, </td>
249 <td class="paramkey"></td>
251 <td class="paramtype">__global uchar * </td>
252 <td class="paramname"><em>mapy_ptr</em>, </td>
255 <td class="paramkey"></td>
257 <td class="paramtype">uint </td>
258 <td class="paramname"><em>mapy_stride_x</em>, </td>
261 <td class="paramkey"></td>
263 <td class="paramtype">uint </td>
264 <td class="paramname"><em>mapy_step_x</em>, </td>
267 <td class="paramkey"></td>
269 <td class="paramtype">uint </td>
270 <td class="paramname"><em>mapy_stride_y</em>, </td>
273 <td class="paramkey"></td>
275 <td class="paramtype">uint </td>
276 <td class="paramname"><em>mapy_step_y</em>, </td>
279 <td class="paramkey"></td>
281 <td class="paramtype">uint </td>
282 <td class="paramname"><em>mapy_offset_first_element_in_bytes</em>, </td>
285 <td class="paramkey"></td>
287 <td class="paramtype">const float </td>
288 <td class="paramname"><em>width</em>, </td>
291 <td class="paramkey"></td>
293 <td class="paramtype">const float </td>
294 <td class="paramname"><em>height</em> </td>
302 </div><div class="memdoc">
304 <p>Performs a remapping of an input image to an output given two remapping image using bilinear as interpolation. </p>
305 <p>This kernel performs remapping with this method of pixel coordinate translation: out(x,y) = in(mapx(x,y), mapy(x,y));</p>
306 <dl class="params"><dt>Parameters</dt><dd>
307 <table class="params">
308 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8. </td></tr>
309 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
310 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>in_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
311 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
312 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>in_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
313 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>Offset of the first element in the source image </td></tr>
314 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8. </td></tr>
315 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
316 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>out_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
317 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
318 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>out_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
319 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>Offset of the first element in the destination image </td></tr>
320 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_ptr</td><td>Pointer to the x remapping image. Supported data types: F32. </td></tr>
321 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_stride_x</td><td>Stride of the remapping image in X dimension (in bytes) </td></tr>
322 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_step_x</td><td>mapx_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
323 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_stride_y</td><td>Stride of the remapping image in Y dimension (in bytes) </td></tr>
324 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_step_y</td><td>mapy_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
325 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_offset_first_element_in_bytes</td><td>Offset of the first element in the remapping image </td></tr>
326 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_ptr</td><td>Pointer to the x remapping image. Supported data types: F32. </td></tr>
327 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_stride_x</td><td>Stride of the remapping image in X dimension (in bytes) </td></tr>
328 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_step_x</td><td>mapy_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
329 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_stride_y</td><td>Stride of the remapping image in Y dimension (in bytes) </td></tr>
330 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_step_y</td><td>mapy_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
331 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_offset_first_element_in_bytes</td><td>Offset of the first element in the remapping image </td></tr>
332 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the input image </td></tr>
333 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the input image </td></tr>
338 <p>Definition at line <a class="el" href="remap_8cl_source.xhtml#l00113">113</a> of file <a class="el" href="remap_8cl_source.xhtml">remap.cl</a>.</p>
340 <p>References <a class="el" href="warp__helpers_8h_source.xhtml#l00080">bilinear_interpolate()</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00033">clamp_to_border()</a>, <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00076">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, and <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>.</p>
341 <div class="fragment"><div class="line"><a name="l00120"></a><span class="lineno"> 120</span> {</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(in);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  <a class="code" href="struct_image.xhtml">Image</a> mapx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(mapx);</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  <a class="code" href="struct_image.xhtml">Image</a> mapy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(mapy);</div><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>  float4 mapx_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  float4 mapy_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  float8 map_coords = (float8)(mapx_coords.s0, mapy_coords.s0, mapx_coords.s1, mapy_coords.s1,</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  mapx_coords.s2, mapy_coords.s2, mapx_coords.s3, mapy_coords.s3);</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span> </div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span>  vstore4(<a class="code" href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a>(&in, <a class="code" href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a>(map_coords, width, height), width, height), 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span> }</div><div class="ttc" id="warp__helpers_8h_xhtml_adbdf2ca9e8fe0b67f9359929ef743126"><div class="ttname"><a href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a></div><div class="ttdeci">const float8 clamp_to_border(float8 coords, const float width, const float height)</div><div class="ttdoc">Clamps the given coordinates to the borders. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00033">warp_helpers.h:33</a></div></div>
342 <div class="ttc" id="helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00076">helpers.h:76</a></div></div>
343 <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>
344 <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>
345 <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>
346 <div class="ttc" id="warp__helpers_8h_xhtml_abea9f226daf3e0ad741d03cf7417d353"><div class="ttname"><a href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a></div><div class="ttdeci">const DATA_TYPE4 bilinear_interpolate(const Image *in, const float8 coords, const float width, const float height)</div><div class="ttdoc">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the ...</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00080">warp_helpers.h:80</a></div></div>
347 </div><!-- fragment -->
350 <a class="anchor" id="a786803611cc128275d32d9584376713e"></a>
351 <div class="memitem">
352 <div class="memproto">
353 <table class="memname">
355 <td class="memname">__kernel void remap_nearest_neighbour </td>
357 <td class="paramtype">__global uchar * </td>
358 <td class="paramname"><em>in_ptr</em>, </td>
361 <td class="paramkey"></td>
363 <td class="paramtype">uint </td>
364 <td class="paramname"><em>in_stride_x</em>, </td>
367 <td class="paramkey"></td>
369 <td class="paramtype">uint </td>
370 <td class="paramname"><em>in_step_x</em>, </td>
373 <td class="paramkey"></td>
375 <td class="paramtype">uint </td>
376 <td class="paramname"><em>in_stride_y</em>, </td>
379 <td class="paramkey"></td>
381 <td class="paramtype">uint </td>
382 <td class="paramname"><em>in_step_y</em>, </td>
385 <td class="paramkey"></td>
387 <td class="paramtype">uint </td>
388 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
391 <td class="paramkey"></td>
393 <td class="paramtype">__global uchar * </td>
394 <td class="paramname"><em>out_ptr</em>, </td>
397 <td class="paramkey"></td>
399 <td class="paramtype">uint </td>
400 <td class="paramname"><em>out_stride_x</em>, </td>
403 <td class="paramkey"></td>
405 <td class="paramtype">uint </td>
406 <td class="paramname"><em>out_step_x</em>, </td>
409 <td class="paramkey"></td>
411 <td class="paramtype">uint </td>
412 <td class="paramname"><em>out_stride_y</em>, </td>
415 <td class="paramkey"></td>
417 <td class="paramtype">uint </td>
418 <td class="paramname"><em>out_step_y</em>, </td>
421 <td class="paramkey"></td>
423 <td class="paramtype">uint </td>
424 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
427 <td class="paramkey"></td>
429 <td class="paramtype">__global uchar * </td>
430 <td class="paramname"><em>mapx_ptr</em>, </td>
433 <td class="paramkey"></td>
435 <td class="paramtype">uint </td>
436 <td class="paramname"><em>mapx_stride_x</em>, </td>
439 <td class="paramkey"></td>
441 <td class="paramtype">uint </td>
442 <td class="paramname"><em>mapx_step_x</em>, </td>
445 <td class="paramkey"></td>
447 <td class="paramtype">uint </td>
448 <td class="paramname"><em>mapx_stride_y</em>, </td>
451 <td class="paramkey"></td>
453 <td class="paramtype">uint </td>
454 <td class="paramname"><em>mapx_step_y</em>, </td>
457 <td class="paramkey"></td>
459 <td class="paramtype">uint </td>
460 <td class="paramname"><em>mapx_offset_first_element_in_bytes</em>, </td>
463 <td class="paramkey"></td>
465 <td class="paramtype">__global uchar * </td>
466 <td class="paramname"><em>mapy_ptr</em>, </td>
469 <td class="paramkey"></td>
471 <td class="paramtype">uint </td>
472 <td class="paramname"><em>mapy_stride_x</em>, </td>
475 <td class="paramkey"></td>
477 <td class="paramtype">uint </td>
478 <td class="paramname"><em>mapy_step_x</em>, </td>
481 <td class="paramkey"></td>
483 <td class="paramtype">uint </td>
484 <td class="paramname"><em>mapy_stride_y</em>, </td>
487 <td class="paramkey"></td>
489 <td class="paramtype">uint </td>
490 <td class="paramname"><em>mapy_step_y</em>, </td>
493 <td class="paramkey"></td>
495 <td class="paramtype">uint </td>
496 <td class="paramname"><em>mapy_offset_first_element_in_bytes</em>, </td>
499 <td class="paramkey"></td>
501 <td class="paramtype">const float </td>
502 <td class="paramname"><em>width</em>, </td>
505 <td class="paramkey"></td>
507 <td class="paramtype">const float </td>
508 <td class="paramname"><em>height</em> </td>
516 </div><div class="memdoc">
518 <p>Performs a remapping of an input image to an output given two remapping image using nearest neighbor as interpolation. </p>
519 <p>This kernel performs remapping with this method of pixel coordinate translation: out(x,y) = in(mapx(x,y), mapy(x,y));</p>
520 <dl class="params"><dt>Parameters</dt><dd>
521 <table class="params">
522 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8. </td></tr>
523 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
524 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>in_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
525 <tr><td class="paramdir">[in]</td><td class="paramname">in_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
526 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>in_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
527 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>Offset of the first element in the source image </td></tr>
528 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8. </td></tr>
529 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
530 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>out_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
531 <tr><td class="paramdir">[in]</td><td class="paramname">out_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
532 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>out_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
533 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>Offset of the first element in the destination image </td></tr>
534 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_ptr</td><td>Pointer to the x remapping image. Supported data types: F32. </td></tr>
535 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_stride_x</td><td>Stride of the remapping image in X dimension (in bytes) </td></tr>
536 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_step_x</td><td>mapx_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
537 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_stride_y</td><td>Stride of the remapping image in Y dimension (in bytes) </td></tr>
538 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_step_y</td><td>mapy_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
539 <tr><td class="paramdir">[in]</td><td class="paramname">mapx_offset_first_element_in_bytes</td><td>Offset of the first element in the remapping image </td></tr>
540 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_ptr</td><td>Pointer to the x remapping image. Supported data types: F32. </td></tr>
541 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_stride_x</td><td>Stride of the remapping image in X dimension (in bytes) </td></tr>
542 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_step_x</td><td>mapy_stride_x * number of elements along X processed per work item (in bytes) </td></tr>
543 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_stride_y</td><td>Stride of the remapping image in Y dimension (in bytes) </td></tr>
544 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_step_y</td><td>mapy_stride_y * number of elements along Y processed per work item (in bytes) </td></tr>
545 <tr><td class="paramdir">[in]</td><td class="paramname">mapy_offset_first_element_in_bytes</td><td>Offset of the first element in the remapping image </td></tr>
546 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the input image </td></tr>
547 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the input image </td></tr>
552 <p>Definition at line <a class="el" href="remap_8cl_source.xhtml#l00059">59</a> of file <a class="el" href="remap_8cl_source.xhtml">remap.cl</a>.</p>
554 <p>References <a class="el" href="warp__helpers_8h_source.xhtml#l00033">clamp_to_border()</a>, <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00076">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>, and <a class="el" href="warp__helpers_8h_source.xhtml#l00045">read_texels4()</a>.</p>
555 <div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> {</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>(in);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <a class="code" href="struct_image.xhtml">Image</a> out = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(out);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <a class="code" href="struct_image.xhtml">Image</a> mapx = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(mapx);</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>  <a class="code" href="struct_image.xhtml">Image</a> mapy = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(mapy);</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>  float4 mapx_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>  float4 mapy_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>  float8 map_coords = (float8)(mapx_coords.s0, mapy_coords.s0, mapx_coords.s1, mapy_coords.s1,</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  mapx_coords.s2, mapy_coords.s2, mapx_coords.s3, mapy_coords.s3);</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>  map_coords += (float8)(0.5f);</div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> </div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  vstore4(<a class="code" href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a>(&in, convert_int8(<a class="code" href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a>(map_coords, width, height))), 0, out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> }</div><div class="ttc" id="warp__helpers_8h_xhtml_adbdf2ca9e8fe0b67f9359929ef743126"><div class="ttname"><a href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a></div><div class="ttdeci">const float8 clamp_to_border(float8 coords, const float width, const float height)</div><div class="ttdoc">Clamps the given coordinates to the borders. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00033">warp_helpers.h:33</a></div></div>
556 <div class="ttc" id="helpers_8h_xhtml_a4334a4a76f8e9628c0fb9e1acf616e2a"><div class="ttname"><a href="helpers_8h.xhtml#a4334a4a76f8e9628c0fb9e1acf616e2a">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a></div><div class="ttdeci">#define CONVERT_TO_IMAGE_STRUCT_NO_STEP(name)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00076">helpers.h:76</a></div></div>
557 <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>
558 <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>
559 <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>
560 <div class="ttc" id="warp__helpers_8h_xhtml_aba42442a4c991cdbb52727fa370676f1"><div class="ttname"><a href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a></div><div class="ttdeci">const DATA_TYPE4 read_texels4(const Image *in, const int8 coords)</div><div class="ttdoc">Reads four texels from the input image. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00045">warp_helpers.h:45</a></div></div>
561 </div><!-- fragment -->
564 </div><!-- contents -->
565 </div><!-- doc-content -->
566 <!-- start footer part -->
567 <div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
569 <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="remap_8cl.xhtml">remap.cl</a></li>
570 <li class="footer">Generated on Wed Apr 12 2017 14:26:05 for ARM Compute Library by
571 <a href="http://www.doxygen.org/index.html">
572 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>