blob: 17417307b150409e78351726b711a858424ef3d0 [file] [log] [blame]
Anthony Barbier871448e2017-03-24 14:54:29 +00001<!-- HTML header for doxygen 1.8.9.1-->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<meta http-equiv="X-UA-Compatible" content="IE=9"/>
Kaizen8938bd32017-09-28 14:38:23 +01007<meta name="generator" content="Doxygen 1.8.6"/>
Anthony Barbier871448e2017-03-24 14:54:29 +00008<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
Anthony Barbierdbdab852017-06-23 15:42:00 +01009<title>Compute Library: src/core/CL/cl_kernels/remap.cl File Reference</title>
Anthony Barbier871448e2017-03-24 14:54:29 +000010<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>
Anthony Barbier871448e2017-03-24 14:54:29 +000015<script type="text/javascript" src="navtree.js"></script>
16<script type="text/javascript">
17 $(document).ready(initResizable);
18 $(window).load(resizeHeight);
19</script>
20<link href="search/search.css" rel="stylesheet" type="text/css"/>
Anthony Barbier871448e2017-03-24 14:54:29 +000021<script type="text/javascript" src="search/search.js"></script>
22<script type="text/javascript">
Kaizen8938bd32017-09-28 14:38:23 +010023 $(document).ready(function() { searchBox.OnSelectItem(0); });
Anthony Barbier871448e2017-03-24 14:54:29 +000024</script>
25<script type="text/x-mathjax-config">
26 MathJax.Hub.Config({
27 extensions: ["tex2jax.js"],
28 jax: ["input/TeX","output/HTML-CSS"],
29});
Kaizen8938bd32017-09-28 14:38:23 +010030</script><script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
Anthony Barbier871448e2017-03-24 14:54:29 +000031<link href="doxygen.css" rel="stylesheet" type="text/css" />
32</head>
33<body>
34<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
35<div id="titlearea">
36<table cellspacing="0" cellpadding="0">
37 <tbody>
38 <tr style="height: 56px;">
39 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010040 <div id="projectname">Compute Library
Kaizen8938bd32017-09-28 14:38:23 +010041 &#160;<span id="projectnumber">17.09</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000042 </div>
43 </td>
44 </tr>
45 </tbody>
46</table>
47</div>
48<!-- end header part -->
Kaizen8938bd32017-09-28 14:38:23 +010049<!-- Generated by Doxygen 1.8.6 -->
Anthony Barbier871448e2017-03-24 14:54:29 +000050<script type="text/javascript">
51var searchBox = new SearchBox("searchBox", "search",false,'Search');
52</script>
53 <div id="navrow1" class="tabs">
54 <ul class="tablist">
55 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010056 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000057 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
58 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
59 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
60 <li>
61 <div id="MSearchBox" class="MSearchBoxInactive">
62 <span class="left">
63 <img id="MSearchSelect" src="search/mag_sel.png"
64 onmouseover="return searchBox.OnSearchSelectShow()"
65 onmouseout="return searchBox.OnSearchSelectHide()"
66 alt=""/>
67 <input type="text" id="MSearchField" value="Search" accesskey="S"
68 onfocus="searchBox.OnSearchFieldFocus(true)"
69 onblur="searchBox.OnSearchFieldFocus(false)"
70 onkeyup="searchBox.OnSearchFieldChange(event)"/>
71 </span><span class="right">
72 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
73 </span>
74 </div>
75 </li>
76 </ul>
77 </div>
78 <div id="navrow2" class="tabs2">
79 <ul class="tablist">
80 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
81 <li><a href="globals.xhtml"><span>Globals</span></a></li>
82 </ul>
83 </div>
84</div><!-- top -->
85<div id="side-nav" class="ui-resizable side-nav-resizable">
86 <div id="nav-tree">
87 <div id="nav-tree-contents">
88 <div id="nav-sync" class="sync"></div>
89 </div>
90 </div>
91 <div id="splitbar" style="-moz-user-select:none;"
92 class="ui-resizable-handle">
93 </div>
94</div>
95<script type="text/javascript">
96$(document).ready(function(){initNavTree('remap_8cl.xhtml','');});
97</script>
98<div id="doc-content">
99<!-- window showing the filter options -->
100<div id="MSearchSelectWindow"
101 onmouseover="return searchBox.OnSearchSelectShow()"
102 onmouseout="return searchBox.OnSearchSelectHide()"
103 onkeydown="return searchBox.OnSearchSelectKey(event)">
Kaizen8938bd32017-09-28 14:38:23 +0100104<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000105
106<!-- iframe showing the search results (closed by default) -->
107<div id="MSearchResultsWindow">
108<iframe src="javascript:void(0)" frameborder="0"
109 name="MSearchResults" id="MSearchResults">
110</iframe>
111</div>
112
113<div class="header">
114 <div class="summary">
115<a href="#func-members">Functions</a> </div>
116 <div class="headertitle">
117<div class="title">remap.cl File Reference</div> </div>
118</div><!--header-->
119<div class="contents">
Kaizen8938bd32017-09-28 14:38:23 +0100120<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br/>
121<code>#include &quot;<a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>&quot;</code><br/>
Anthony Barbier871448e2017-03-24 14:54:29 +0000122</div>
123<p><a href="remap_8cl_source.xhtml">Go to the source code of this file.</a></p>
124<table class="memberdecls">
125<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
126Functions</h2></td></tr>
127<tr class="memitem:a786803611cc128275d32d9584376713e"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</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>
Kaizen8938bd32017-09-28 14:38:23 +0100128<tr class="memdesc:a786803611cc128275d32d9584376713e"><td class="mdescLeft">&#160;</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>
Anthony Barbier871448e2017-03-24 14:54:29 +0000129<tr class="separator:a786803611cc128275d32d9584376713e"><td class="memSeparator" colspan="2">&#160;</td></tr>
130<tr class="memitem:a1d771133d1dfea450fdbacda1c34ce49"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</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>
Kaizen8938bd32017-09-28 14:38:23 +0100131<tr class="memdesc:a1d771133d1dfea450fdbacda1c34ce49"><td class="mdescLeft">&#160;</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>
Anthony Barbier871448e2017-03-24 14:54:29 +0000132<tr class="separator:a1d771133d1dfea450fdbacda1c34ce49"><td class="memSeparator" colspan="2">&#160;</td></tr>
133</table>
134<h2 class="groupheader">Function Documentation</h2>
135<a class="anchor" id="a1d771133d1dfea450fdbacda1c34ce49"></a>
136<div class="memitem">
137<div class="memproto">
138 <table class="memname">
139 <tr>
140 <td class="memname">__kernel void remap_bilinear </td>
141 <td>(</td>
142 <td class="paramtype">__global uchar *&#160;</td>
143 <td class="paramname"><em>in_ptr</em>, </td>
144 </tr>
145 <tr>
146 <td class="paramkey"></td>
147 <td></td>
148 <td class="paramtype">uint&#160;</td>
149 <td class="paramname"><em>in_stride_x</em>, </td>
150 </tr>
151 <tr>
152 <td class="paramkey"></td>
153 <td></td>
154 <td class="paramtype">uint&#160;</td>
155 <td class="paramname"><em>in_step_x</em>, </td>
156 </tr>
157 <tr>
158 <td class="paramkey"></td>
159 <td></td>
160 <td class="paramtype">uint&#160;</td>
161 <td class="paramname"><em>in_stride_y</em>, </td>
162 </tr>
163 <tr>
164 <td class="paramkey"></td>
165 <td></td>
166 <td class="paramtype">uint&#160;</td>
167 <td class="paramname"><em>in_step_y</em>, </td>
168 </tr>
169 <tr>
170 <td class="paramkey"></td>
171 <td></td>
172 <td class="paramtype">uint&#160;</td>
173 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
174 </tr>
175 <tr>
176 <td class="paramkey"></td>
177 <td></td>
178 <td class="paramtype">__global uchar *&#160;</td>
179 <td class="paramname"><em>out_ptr</em>, </td>
180 </tr>
181 <tr>
182 <td class="paramkey"></td>
183 <td></td>
184 <td class="paramtype">uint&#160;</td>
185 <td class="paramname"><em>out_stride_x</em>, </td>
186 </tr>
187 <tr>
188 <td class="paramkey"></td>
189 <td></td>
190 <td class="paramtype">uint&#160;</td>
191 <td class="paramname"><em>out_step_x</em>, </td>
192 </tr>
193 <tr>
194 <td class="paramkey"></td>
195 <td></td>
196 <td class="paramtype">uint&#160;</td>
197 <td class="paramname"><em>out_stride_y</em>, </td>
198 </tr>
199 <tr>
200 <td class="paramkey"></td>
201 <td></td>
202 <td class="paramtype">uint&#160;</td>
203 <td class="paramname"><em>out_step_y</em>, </td>
204 </tr>
205 <tr>
206 <td class="paramkey"></td>
207 <td></td>
208 <td class="paramtype">uint&#160;</td>
209 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
210 </tr>
211 <tr>
212 <td class="paramkey"></td>
213 <td></td>
214 <td class="paramtype">__global uchar *&#160;</td>
215 <td class="paramname"><em>mapx_ptr</em>, </td>
216 </tr>
217 <tr>
218 <td class="paramkey"></td>
219 <td></td>
220 <td class="paramtype">uint&#160;</td>
221 <td class="paramname"><em>mapx_stride_x</em>, </td>
222 </tr>
223 <tr>
224 <td class="paramkey"></td>
225 <td></td>
226 <td class="paramtype">uint&#160;</td>
227 <td class="paramname"><em>mapx_step_x</em>, </td>
228 </tr>
229 <tr>
230 <td class="paramkey"></td>
231 <td></td>
232 <td class="paramtype">uint&#160;</td>
233 <td class="paramname"><em>mapx_stride_y</em>, </td>
234 </tr>
235 <tr>
236 <td class="paramkey"></td>
237 <td></td>
238 <td class="paramtype">uint&#160;</td>
239 <td class="paramname"><em>mapx_step_y</em>, </td>
240 </tr>
241 <tr>
242 <td class="paramkey"></td>
243 <td></td>
244 <td class="paramtype">uint&#160;</td>
245 <td class="paramname"><em>mapx_offset_first_element_in_bytes</em>, </td>
246 </tr>
247 <tr>
248 <td class="paramkey"></td>
249 <td></td>
250 <td class="paramtype">__global uchar *&#160;</td>
251 <td class="paramname"><em>mapy_ptr</em>, </td>
252 </tr>
253 <tr>
254 <td class="paramkey"></td>
255 <td></td>
256 <td class="paramtype">uint&#160;</td>
257 <td class="paramname"><em>mapy_stride_x</em>, </td>
258 </tr>
259 <tr>
260 <td class="paramkey"></td>
261 <td></td>
262 <td class="paramtype">uint&#160;</td>
263 <td class="paramname"><em>mapy_step_x</em>, </td>
264 </tr>
265 <tr>
266 <td class="paramkey"></td>
267 <td></td>
268 <td class="paramtype">uint&#160;</td>
269 <td class="paramname"><em>mapy_stride_y</em>, </td>
270 </tr>
271 <tr>
272 <td class="paramkey"></td>
273 <td></td>
274 <td class="paramtype">uint&#160;</td>
275 <td class="paramname"><em>mapy_step_y</em>, </td>
276 </tr>
277 <tr>
278 <td class="paramkey"></td>
279 <td></td>
280 <td class="paramtype">uint&#160;</td>
281 <td class="paramname"><em>mapy_offset_first_element_in_bytes</em>, </td>
282 </tr>
283 <tr>
284 <td class="paramkey"></td>
285 <td></td>
286 <td class="paramtype">const float&#160;</td>
287 <td class="paramname"><em>width</em>, </td>
288 </tr>
289 <tr>
290 <td class="paramkey"></td>
291 <td></td>
292 <td class="paramtype">const float&#160;</td>
293 <td class="paramname"><em>height</em>&#160;</td>
294 </tr>
295 <tr>
296 <td></td>
297 <td>)</td>
298 <td></td><td></td>
299 </tr>
300 </table>
301</div><div class="memdoc">
302
303<p>Performs a remapping of an input image to an output given two remapping image using bilinear as interpolation. </p>
304<p>This kernel performs remapping with this method of pixel coordinate translation: out(x,y) = in(mapx(x,y), mapy(x,y));</p>
305<dl class="params"><dt>Parameters</dt><dd>
306 <table class="params">
307 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8. </td></tr>
308 <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>
309 <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>
310 <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>
311 <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>
312 <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>
313 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8. </td></tr>
314 <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>
315 <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>
316 <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>
317 <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>
318 <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>
319 <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>
320 <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>
321 <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>
322 <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>
323 <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>
324 <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>
325 <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>
326 <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>
327 <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>
328 <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>
329 <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>
330 <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>
331 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the input image </td></tr>
332 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the input image </td></tr>
333 </table>
334 </dd>
335</dl>
336
337<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>
338
Kaizen8938bd32017-09-28 14:38:23 +0100339<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#l00093">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, and <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>.</p>
340<div class="fragment"><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;{</div>
341<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; <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>
342<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; <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>
343<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160; <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>
344<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <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>
345<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160;</div>
346<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; float4 mapx_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
347<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; float4 mapy_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
348<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; float8 map_coords = (float8)(mapx_coords.s0, mapy_coords.s0, mapx_coords.s1, mapy_coords.s1,</div>
349<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160; mapx_coords.s2, mapy_coords.s2, mapx_coords.s3, mapy_coords.s3);</div>
350<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;</div>
351<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; vstore4(<a class="code" href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a>(&amp;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>
352<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;}</div>
353<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>
354<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#l00096">helpers.h:96</a></div></div>
355<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#l00093">helpers.h:93</a></div></div>
356<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#l00131">helpers.h:131</a></div></div>
357<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#l00133">helpers.h:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000358<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>
359</div><!-- fragment -->
360</div>
361</div>
362<a class="anchor" id="a786803611cc128275d32d9584376713e"></a>
363<div class="memitem">
364<div class="memproto">
365 <table class="memname">
366 <tr>
367 <td class="memname">__kernel void remap_nearest_neighbour </td>
368 <td>(</td>
369 <td class="paramtype">__global uchar *&#160;</td>
370 <td class="paramname"><em>in_ptr</em>, </td>
371 </tr>
372 <tr>
373 <td class="paramkey"></td>
374 <td></td>
375 <td class="paramtype">uint&#160;</td>
376 <td class="paramname"><em>in_stride_x</em>, </td>
377 </tr>
378 <tr>
379 <td class="paramkey"></td>
380 <td></td>
381 <td class="paramtype">uint&#160;</td>
382 <td class="paramname"><em>in_step_x</em>, </td>
383 </tr>
384 <tr>
385 <td class="paramkey"></td>
386 <td></td>
387 <td class="paramtype">uint&#160;</td>
388 <td class="paramname"><em>in_stride_y</em>, </td>
389 </tr>
390 <tr>
391 <td class="paramkey"></td>
392 <td></td>
393 <td class="paramtype">uint&#160;</td>
394 <td class="paramname"><em>in_step_y</em>, </td>
395 </tr>
396 <tr>
397 <td class="paramkey"></td>
398 <td></td>
399 <td class="paramtype">uint&#160;</td>
400 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
401 </tr>
402 <tr>
403 <td class="paramkey"></td>
404 <td></td>
405 <td class="paramtype">__global uchar *&#160;</td>
406 <td class="paramname"><em>out_ptr</em>, </td>
407 </tr>
408 <tr>
409 <td class="paramkey"></td>
410 <td></td>
411 <td class="paramtype">uint&#160;</td>
412 <td class="paramname"><em>out_stride_x</em>, </td>
413 </tr>
414 <tr>
415 <td class="paramkey"></td>
416 <td></td>
417 <td class="paramtype">uint&#160;</td>
418 <td class="paramname"><em>out_step_x</em>, </td>
419 </tr>
420 <tr>
421 <td class="paramkey"></td>
422 <td></td>
423 <td class="paramtype">uint&#160;</td>
424 <td class="paramname"><em>out_stride_y</em>, </td>
425 </tr>
426 <tr>
427 <td class="paramkey"></td>
428 <td></td>
429 <td class="paramtype">uint&#160;</td>
430 <td class="paramname"><em>out_step_y</em>, </td>
431 </tr>
432 <tr>
433 <td class="paramkey"></td>
434 <td></td>
435 <td class="paramtype">uint&#160;</td>
436 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
437 </tr>
438 <tr>
439 <td class="paramkey"></td>
440 <td></td>
441 <td class="paramtype">__global uchar *&#160;</td>
442 <td class="paramname"><em>mapx_ptr</em>, </td>
443 </tr>
444 <tr>
445 <td class="paramkey"></td>
446 <td></td>
447 <td class="paramtype">uint&#160;</td>
448 <td class="paramname"><em>mapx_stride_x</em>, </td>
449 </tr>
450 <tr>
451 <td class="paramkey"></td>
452 <td></td>
453 <td class="paramtype">uint&#160;</td>
454 <td class="paramname"><em>mapx_step_x</em>, </td>
455 </tr>
456 <tr>
457 <td class="paramkey"></td>
458 <td></td>
459 <td class="paramtype">uint&#160;</td>
460 <td class="paramname"><em>mapx_stride_y</em>, </td>
461 </tr>
462 <tr>
463 <td class="paramkey"></td>
464 <td></td>
465 <td class="paramtype">uint&#160;</td>
466 <td class="paramname"><em>mapx_step_y</em>, </td>
467 </tr>
468 <tr>
469 <td class="paramkey"></td>
470 <td></td>
471 <td class="paramtype">uint&#160;</td>
472 <td class="paramname"><em>mapx_offset_first_element_in_bytes</em>, </td>
473 </tr>
474 <tr>
475 <td class="paramkey"></td>
476 <td></td>
477 <td class="paramtype">__global uchar *&#160;</td>
478 <td class="paramname"><em>mapy_ptr</em>, </td>
479 </tr>
480 <tr>
481 <td class="paramkey"></td>
482 <td></td>
483 <td class="paramtype">uint&#160;</td>
484 <td class="paramname"><em>mapy_stride_x</em>, </td>
485 </tr>
486 <tr>
487 <td class="paramkey"></td>
488 <td></td>
489 <td class="paramtype">uint&#160;</td>
490 <td class="paramname"><em>mapy_step_x</em>, </td>
491 </tr>
492 <tr>
493 <td class="paramkey"></td>
494 <td></td>
495 <td class="paramtype">uint&#160;</td>
496 <td class="paramname"><em>mapy_stride_y</em>, </td>
497 </tr>
498 <tr>
499 <td class="paramkey"></td>
500 <td></td>
501 <td class="paramtype">uint&#160;</td>
502 <td class="paramname"><em>mapy_step_y</em>, </td>
503 </tr>
504 <tr>
505 <td class="paramkey"></td>
506 <td></td>
507 <td class="paramtype">uint&#160;</td>
508 <td class="paramname"><em>mapy_offset_first_element_in_bytes</em>, </td>
509 </tr>
510 <tr>
511 <td class="paramkey"></td>
512 <td></td>
513 <td class="paramtype">const float&#160;</td>
514 <td class="paramname"><em>width</em>, </td>
515 </tr>
516 <tr>
517 <td class="paramkey"></td>
518 <td></td>
519 <td class="paramtype">const float&#160;</td>
520 <td class="paramname"><em>height</em>&#160;</td>
521 </tr>
522 <tr>
523 <td></td>
524 <td>)</td>
525 <td></td><td></td>
526 </tr>
527 </table>
528</div><div class="memdoc">
529
530<p>Performs a remapping of an input image to an output given two remapping image using nearest neighbor as interpolation. </p>
531<p>This kernel performs remapping with this method of pixel coordinate translation: out(x,y) = in(mapx(x,y), mapy(x,y));</p>
532<dl class="params"><dt>Parameters</dt><dd>
533 <table class="params">
534 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8. </td></tr>
535 <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>
536 <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>
537 <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>
538 <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>
539 <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>
540 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8. </td></tr>
541 <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>
542 <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>
543 <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>
544 <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>
545 <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>
546 <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>
547 <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>
548 <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>
549 <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>
550 <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>
551 <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>
552 <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>
553 <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>
554 <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>
555 <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>
556 <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>
557 <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>
558 <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the input image </td></tr>
559 <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the input image </td></tr>
560 </table>
561 </dd>
562</dl>
563
564<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>
565
Kaizen8938bd32017-09-28 14:38:23 +0100566<p>References <a class="el" href="warp__helpers_8h_source.xhtml#l00033">clamp_to_border()</a>, <a class="el" href="helpers_8h_source.xhtml#l00093">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT_NO_STEP</a>, <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>, and <a class="el" href="warp__helpers_8h_source.xhtml#l00045">read_texels4()</a>.</p>
567<div class="fragment"><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;{</div>
568<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <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>
569<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <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>
570<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; <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>
571<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <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>
572<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160;</div>
573<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; float4 mapx_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapx.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
574<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; float4 mapy_coords = vload4(0, (__global <span class="keywordtype">float</span> *)mapy.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
575<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; float8 map_coords = (float8)(mapx_coords.s0, mapy_coords.s0, mapx_coords.s1, mapy_coords.s1,</div>
576<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; mapx_coords.s2, mapy_coords.s2, mapx_coords.s3, mapy_coords.s3);</div>
577<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; map_coords += (float8)(0.5f);</div>
578<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160;</div>
579<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160; vstore4(<a class="code" href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a>(&amp;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>
580<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160;}</div>
581<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>
582<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#l00096">helpers.h:96</a></div></div>
583<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#l00093">helpers.h:93</a></div></div>
584<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#l00131">helpers.h:131</a></div></div>
585<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#l00133">helpers.h:133</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000586<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>
587</div><!-- fragment -->
588</div>
589</div>
590</div><!-- contents -->
591</div><!-- doc-content -->
592<!-- start footer part -->
593<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
594 <ul>
Kaizen8938bd32017-09-28 14:38:23 +0100595 <li class="navelem"><a class="el" href="dir_55b5a5006e943fb664ff8cff3cfe7768.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_f6c3ae42d7e27145d0a3c3e38ca1c000.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_1b7ae9123c88e650426d50d95c19d414.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_b7c3d80b0dadb2139bc73b7161751c12.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="remap_8cl.xhtml">remap.cl</a></li>
596 <li class="footer">Generated on Thu Sep 28 2017 14:37:54 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000597 <a href="http://www.doxygen.org/index.html">
Kaizen8938bd32017-09-28 14:38:23 +0100598 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000599 </ul>
600</div>
601</body>
602</html>