blob: 9c01247f25163f046a776e5f8ea26b6176b45bd6 [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/depth_convert.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('depth__convert_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="#define-members">Macros</a> &#124;
116<a href="#func-members">Functions</a> </div>
117 <div class="headertitle">
118<div class="title">depth_convert.cl File Reference</div> </div>
119</div><!--header-->
120<div class="contents">
Kaizen8938bd32017-09-28 14:38:23 +0100121<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br/>
Anthony Barbier871448e2017-03-24 14:54:29 +0000122</div>
123<p><a href="depth__convert_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="define-members"></a>
126Macros</h2></td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100127<tr class="memitem:a5b0d9908c0af31eaa7a31d0b5cf8e56d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="depth__convert_8cl.xhtml#a5b0d9908c0af31eaa7a31d0b5cf8e56d">CONVERT_DOWN</a>(x, type)&#160;&#160;&#160;<a class="el" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(x, type)</td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000128<tr class="separator:a5b0d9908c0af31eaa7a31d0b5cf8e56d"><td class="memSeparator" colspan="2">&#160;</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100129<tr class="memitem:a9bed30cda5ab157322d2f0bbdff46d28"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="depth__convert_8cl.xhtml#a9bed30cda5ab157322d2f0bbdff46d28">CONVERT_UP</a>(x, type)&#160;&#160;&#160;<a class="el" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(x, type)</td></tr>
130<tr class="separator:a9bed30cda5ab157322d2f0bbdff46d28"><td class="memSeparator" colspan="2">&#160;</td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000131</table><table class="memberdecls">
132<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
133Functions</h2></td></tr>
134<tr class="memitem:aab970e69ff53ae814fae772df4ae9c2d"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="depth__convert_8cl.xhtml#aab970e69ff53ae814fae772df4ae9c2d">convert_depth_down</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, const int shift)</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100135<tr class="memdesc:aab970e69ff53ae814fae772df4ae9c2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs a down-scaling depth conversion. <a href="#aab970e69ff53ae814fae772df4ae9c2d">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000136<tr class="separator:aab970e69ff53ae814fae772df4ae9c2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
137<tr class="memitem:ae2f96efadb55c92fe506140c36b6b25d"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="depth__convert_8cl.xhtml#ae2f96efadb55c92fe506140c36b6b25d">convert_depth_up</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, const int shift)</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100138<tr class="memdesc:ae2f96efadb55c92fe506140c36b6b25d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function performs a up-scaling depth conversion. <a href="#ae2f96efadb55c92fe506140c36b6b25d">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000139<tr class="separator:ae2f96efadb55c92fe506140c36b6b25d"><td class="memSeparator" colspan="2">&#160;</td></tr>
140</table>
141<h2 class="groupheader">Macro Definition Documentation</h2>
142<a class="anchor" id="a5b0d9908c0af31eaa7a31d0b5cf8e56d"></a>
143<div class="memitem">
144<div class="memproto">
145 <table class="memname">
146 <tr>
147 <td class="memname">#define CONVERT_DOWN</td>
148 <td>(</td>
149 <td class="paramtype">&#160;</td>
150 <td class="paramname">x, </td>
151 </tr>
152 <tr>
153 <td class="paramkey"></td>
154 <td></td>
155 <td class="paramtype">&#160;</td>
156 <td class="paramname">type&#160;</td>
157 </tr>
158 <tr>
159 <td></td>
160 <td>)</td>
161 <td></td><td>&#160;&#160;&#160;<a class="el" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(x, type)</td>
162 </tr>
163 </table>
164</div><div class="memdoc">
165
Kaizen8938bd32017-09-28 14:38:23 +0100166<p>Definition at line <a class="el" href="depth__convert_8cl_source.xhtml#l00046">46</a> of file <a class="el" href="depth__convert_8cl_source.xhtml">depth_convert.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000167
Kaizen8938bd32017-09-28 14:38:23 +0100168<p>Referenced by <a class="el" href="depth__convert_8cl_source.xhtml#l00074">convert_depth_down()</a>.</p>
169
170</div>
171</div>
172<a class="anchor" id="a9bed30cda5ab157322d2f0bbdff46d28"></a>
173<div class="memitem">
174<div class="memproto">
175 <table class="memname">
176 <tr>
177 <td class="memname">#define CONVERT_UP</td>
178 <td>(</td>
179 <td class="paramtype">&#160;</td>
180 <td class="paramname">x, </td>
181 </tr>
182 <tr>
183 <td class="paramkey"></td>
184 <td></td>
185 <td class="paramtype">&#160;</td>
186 <td class="paramname">type&#160;</td>
187 </tr>
188 <tr>
189 <td></td>
190 <td>)</td>
191 <td></td><td>&#160;&#160;&#160;<a class="el" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(x, type)</td>
192 </tr>
193 </table>
194</div><div class="memdoc">
195
196<p>Definition at line <a class="el" href="depth__convert_8cl_source.xhtml#l00049">49</a> of file <a class="el" href="depth__convert_8cl_source.xhtml">depth_convert.cl</a>.</p>
197
198<p>Referenced by <a class="el" href="depth__convert_8cl_source.xhtml#l00115">convert_depth_up()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000199
200</div>
201</div>
202<h2 class="groupheader">Function Documentation</h2>
203<a class="anchor" id="aab970e69ff53ae814fae772df4ae9c2d"></a>
204<div class="memitem">
205<div class="memproto">
206 <table class="memname">
207 <tr>
208 <td class="memname">__kernel void convert_depth_down </td>
209 <td>(</td>
210 <td class="paramtype">__global uchar *&#160;</td>
211 <td class="paramname"><em>in_ptr</em>, </td>
212 </tr>
213 <tr>
214 <td class="paramkey"></td>
215 <td></td>
216 <td class="paramtype">uint&#160;</td>
217 <td class="paramname"><em>in_stride_x</em>, </td>
218 </tr>
219 <tr>
220 <td class="paramkey"></td>
221 <td></td>
222 <td class="paramtype">uint&#160;</td>
223 <td class="paramname"><em>in_step_x</em>, </td>
224 </tr>
225 <tr>
226 <td class="paramkey"></td>
227 <td></td>
228 <td class="paramtype">uint&#160;</td>
229 <td class="paramname"><em>in_stride_y</em>, </td>
230 </tr>
231 <tr>
232 <td class="paramkey"></td>
233 <td></td>
234 <td class="paramtype">uint&#160;</td>
235 <td class="paramname"><em>in_step_y</em>, </td>
236 </tr>
237 <tr>
238 <td class="paramkey"></td>
239 <td></td>
240 <td class="paramtype">uint&#160;</td>
241 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
242 </tr>
243 <tr>
244 <td class="paramkey"></td>
245 <td></td>
246 <td class="paramtype">__global uchar *&#160;</td>
247 <td class="paramname"><em>out_ptr</em>, </td>
248 </tr>
249 <tr>
250 <td class="paramkey"></td>
251 <td></td>
252 <td class="paramtype">uint&#160;</td>
253 <td class="paramname"><em>out_stride_x</em>, </td>
254 </tr>
255 <tr>
256 <td class="paramkey"></td>
257 <td></td>
258 <td class="paramtype">uint&#160;</td>
259 <td class="paramname"><em>out_step_x</em>, </td>
260 </tr>
261 <tr>
262 <td class="paramkey"></td>
263 <td></td>
264 <td class="paramtype">uint&#160;</td>
265 <td class="paramname"><em>out_stride_y</em>, </td>
266 </tr>
267 <tr>
268 <td class="paramkey"></td>
269 <td></td>
270 <td class="paramtype">uint&#160;</td>
271 <td class="paramname"><em>out_step_y</em>, </td>
272 </tr>
273 <tr>
274 <td class="paramkey"></td>
275 <td></td>
276 <td class="paramtype">uint&#160;</td>
277 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
278 </tr>
279 <tr>
280 <td class="paramkey"></td>
281 <td></td>
282 <td class="paramtype">const int&#160;</td>
283 <td class="paramname"><em>shift</em>&#160;</td>
284 </tr>
285 <tr>
286 <td></td>
287 <td>)</td>
288 <td></td><td></td>
289 </tr>
290 </table>
291</div><div class="memdoc">
292
293<p>This function performs a down-scaling depth conversion. </p>
294<dl class="section attention"><dt>Attention</dt><dd>The input and output data_types need to be passed at compile time using -DDATA_TYPE_IN and -DDATA_TYPE_OUT: e.g. -DDATA_TYPE_IN=uchar -DDATA_TYPE_OUT=short</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100295<dl class="section note"><dt>Note</dt><dd>In case of fixed-point operation -DFIXED_POINT_POSITION=fixed_point_position must be provided: e.g. -DFIXED_POINT_POSITION=3</dd></dl>
Anthony Barbier871448e2017-03-24 14:54:29 +0000296<dl class="params"><dt>Parameters</dt><dd>
297 <table class="params">
Kaizen8938bd32017-09-28 14:38:23 +0100298 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8, U16, S16, U32, S32, F16, F32 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000299 <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>
300 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>in_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
301 <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>
302 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>in_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
303 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100304 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: QS8, U8, QS16, U16, S16, U32, S32 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000305 <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>
306 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>out_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
307 <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>
308 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>out_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
309 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
310 <tr><td class="paramdir">[in]</td><td class="paramname">shift</td><td>The integer shift amount value. Supported data types: S32 </td></tr>
311 </table>
312 </dd>
313</dl>
314
Kaizen8938bd32017-09-28 14:38:23 +0100315<p>Definition at line <a class="el" href="depth__convert_8cl_source.xhtml#l00074">74</a> of file <a class="el" href="depth__convert_8cl_source.xhtml">depth_convert.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000316
Kaizen8938bd32017-09-28 14:38:23 +0100317<p>References <a class="el" href="depth__convert_8cl_source.xhtml#l00046">CONVERT_DOWN</a>, <a class="el" href="helpers_8h_source.xhtml#l00093">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00031">DATA_TYPE_OUT</a>, <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
318<div class="fragment"><div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;{</div>
319<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; <span class="comment">// Get pixels pointer</span></div>
320<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> in = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div>
321<div class="line"><a name="l00081"></a><span class="lineno"> 81</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>
322<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160;</div>
323<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <span class="comment">// Load data</span></div>
324<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE_IN, 16)</div>
325<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; in_data = vload16(0, (__global DATA_TYPE_IN *)in.ptr);</div>
326<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160;</div>
327<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;<span class="preprocessor">#if defined(FIXED_POINT_POSITION)</span></div>
328<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160;<span class="preprocessor"></span> vstore16(<a class="code" href="depth__convert_8cl.xhtml#a5b0d9908c0af31eaa7a31d0b5cf8e56d">CONVERT_DOWN</a>(in_data, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE_IN, 16), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 16), FIXED_POINT_POSITION), 0, (__global <a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a> *)out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
329<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* FIXED_POINT_POSITION */</span><span class="preprocessor"></span></div>
330<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>&#160;<span class="preprocessor"></span> vstore16(<a class="code" href="depth__convert_8cl.xhtml#a5b0d9908c0af31eaa7a31d0b5cf8e56d">CONVERT_DOWN</a>(in_data &gt;&gt; shift, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 16)), 0, (__global <a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a> *)out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
331<div class="line"><a name="l00091"></a><span class="lineno"> 91</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* FIXED_POINT_POSITION */</span><span class="preprocessor"></span></div>
332<div class="line"><a name="l00092"></a><span class="lineno"> 92</span>&#160;<span class="preprocessor"></span>}</div>
333<div class="ttc" id="depth__convert_8cl_xhtml_a5b0d9908c0af31eaa7a31d0b5cf8e56d"><div class="ttname"><a href="depth__convert_8cl.xhtml#a5b0d9908c0af31eaa7a31d0b5cf8e56d">CONVERT_DOWN</a></div><div class="ttdeci">#define CONVERT_DOWN(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="depth__convert_8cl_source.xhtml#l00046">depth_convert.cl:46</a></div></div>
334<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>
335<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>
336<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>
337<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000338<div class="ttc" id="convolution3x3_8cl_xhtml_ac06f3e24d3fffd3c465d8b2a6e7c985e"><div class="ttname"><a href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a></div><div class="ttdeci">#define DATA_TYPE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00031">convolution3x3.cl:31</a></div></div>
339</div><!-- fragment -->
340</div>
341</div>
342<a class="anchor" id="ae2f96efadb55c92fe506140c36b6b25d"></a>
343<div class="memitem">
344<div class="memproto">
345 <table class="memname">
346 <tr>
347 <td class="memname">__kernel void convert_depth_up </td>
348 <td>(</td>
349 <td class="paramtype">__global uchar *&#160;</td>
350 <td class="paramname"><em>in_ptr</em>, </td>
351 </tr>
352 <tr>
353 <td class="paramkey"></td>
354 <td></td>
355 <td class="paramtype">uint&#160;</td>
356 <td class="paramname"><em>in_stride_x</em>, </td>
357 </tr>
358 <tr>
359 <td class="paramkey"></td>
360 <td></td>
361 <td class="paramtype">uint&#160;</td>
362 <td class="paramname"><em>in_step_x</em>, </td>
363 </tr>
364 <tr>
365 <td class="paramkey"></td>
366 <td></td>
367 <td class="paramtype">uint&#160;</td>
368 <td class="paramname"><em>in_stride_y</em>, </td>
369 </tr>
370 <tr>
371 <td class="paramkey"></td>
372 <td></td>
373 <td class="paramtype">uint&#160;</td>
374 <td class="paramname"><em>in_step_y</em>, </td>
375 </tr>
376 <tr>
377 <td class="paramkey"></td>
378 <td></td>
379 <td class="paramtype">uint&#160;</td>
380 <td class="paramname"><em>in_offset_first_element_in_bytes</em>, </td>
381 </tr>
382 <tr>
383 <td class="paramkey"></td>
384 <td></td>
385 <td class="paramtype">__global uchar *&#160;</td>
386 <td class="paramname"><em>out_ptr</em>, </td>
387 </tr>
388 <tr>
389 <td class="paramkey"></td>
390 <td></td>
391 <td class="paramtype">uint&#160;</td>
392 <td class="paramname"><em>out_stride_x</em>, </td>
393 </tr>
394 <tr>
395 <td class="paramkey"></td>
396 <td></td>
397 <td class="paramtype">uint&#160;</td>
398 <td class="paramname"><em>out_step_x</em>, </td>
399 </tr>
400 <tr>
401 <td class="paramkey"></td>
402 <td></td>
403 <td class="paramtype">uint&#160;</td>
404 <td class="paramname"><em>out_stride_y</em>, </td>
405 </tr>
406 <tr>
407 <td class="paramkey"></td>
408 <td></td>
409 <td class="paramtype">uint&#160;</td>
410 <td class="paramname"><em>out_step_y</em>, </td>
411 </tr>
412 <tr>
413 <td class="paramkey"></td>
414 <td></td>
415 <td class="paramtype">uint&#160;</td>
416 <td class="paramname"><em>out_offset_first_element_in_bytes</em>, </td>
417 </tr>
418 <tr>
419 <td class="paramkey"></td>
420 <td></td>
421 <td class="paramtype">const int&#160;</td>
422 <td class="paramname"><em>shift</em>&#160;</td>
423 </tr>
424 <tr>
425 <td></td>
426 <td>)</td>
427 <td></td><td></td>
428 </tr>
429 </table>
430</div><div class="memdoc">
431
432<p>This function performs a up-scaling depth conversion. </p>
433<dl class="section attention"><dt>Attention</dt><dd>The input and output data_types need to be passed at compile time using -DDATA_TYPE_IN and -DDATA_TYPE_OUT: e.g. -DDATA_TYPE_IN=uchar -DDATA_TYPE_OUT=short</dd></dl>
Kaizen8938bd32017-09-28 14:38:23 +0100434<dl class="section note"><dt>Note</dt><dd>In case of fixed-point operation -DFIXED_POINT_POSITION=fixed_point_position must be provided: e.g. -DFIXED_POINT_POSITION=3</dd></dl>
Anthony Barbier871448e2017-03-24 14:54:29 +0000435<dl class="params"><dt>Parameters</dt><dd>
436 <table class="params">
Kaizen8938bd32017-09-28 14:38:23 +0100437 <tr><td class="paramdir">[in]</td><td class="paramname">in_ptr</td><td>Pointer to the source image. Supported data types: U8, QS8, U16, S16, QS16, U32 or S32 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000438 <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>
439 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_x</td><td>in_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
440 <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>
441 <tr><td class="paramdir">[in]</td><td class="paramname">in_step_y</td><td>in_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
442 <tr><td class="paramdir">[in]</td><td class="paramname">in_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100443 <tr><td class="paramdir">[out]</td><td class="paramname">out_ptr</td><td>Pointer to the destination image. Supported data types: U8, U16, S16, U32, S32, F16 or F32 </td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000444 <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>
445 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_x</td><td>out_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
446 <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>
447 <tr><td class="paramdir">[in]</td><td class="paramname">out_step_y</td><td>out_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
448 <tr><td class="paramdir">[in]</td><td class="paramname">out_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
449 <tr><td class="paramdir">[in]</td><td class="paramname">shift</td><td>The integer shift amount value. Supported data types: S32 </td></tr>
450 </table>
451 </dd>
452</dl>
453
Kaizen8938bd32017-09-28 14:38:23 +0100454<p>Definition at line <a class="el" href="depth__convert_8cl_source.xhtml#l00115">115</a> of file <a class="el" href="depth__convert_8cl_source.xhtml">depth_convert.cl</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000455
Kaizen8938bd32017-09-28 14:38:23 +0100456<p>References <a class="el" href="helpers_8h_source.xhtml#l00093">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="depth__convert_8cl_source.xhtml#l00049">CONVERT_UP</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00031">DATA_TYPE_OUT</a>, <a class="el" href="helpers_8h_source.xhtml#l00133">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
457<div class="fragment"><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;{</div>
458<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160; <span class="comment">// Get pixels pointer</span></div>
459<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#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(in);</div>
460<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>
461<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div>
462<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; <span class="comment">// Load data</span></div>
463<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE_IN, 16)</div>
464<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160; in_data = vload16(0, (__global DATA_TYPE_IN *)in.ptr);</div>
465<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160;</div>
466<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;<span class="preprocessor">#if defined(FIXED_POINT_POSITION)</span></div>
467<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;<span class="preprocessor"></span> vstore16(<a class="code" href="depth__convert_8cl.xhtml#a9bed30cda5ab157322d2f0bbdff46d28">CONVERT_UP</a>(in_data, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE_IN, 16), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 16), FIXED_POINT_POSITION), 0, (__global <a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a> *)out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
468<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160;<span class="preprocessor">#else </span><span class="comment">/* FIXED_POINT_POSITION */</span><span class="preprocessor"></span></div>
469<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160;<span class="preprocessor"></span> vstore16(<a class="code" href="depth__convert_8cl.xhtml#a9bed30cda5ab157322d2f0bbdff46d28">CONVERT_UP</a>(in_data, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 16)) &lt;&lt; shift, 0, (__global <a class="code" href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a> *)out.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
470<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* FIXED_POINT_POSITION */</span><span class="preprocessor"></span></div>
471<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160;<span class="preprocessor"></span>}</div>
472<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>
473<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>
474<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>
475<div class="ttc" id="fixed__point_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a></div><div class="ttdeci">#define VEC_DATA_TYPE(type, size)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00093">fixed_point.h:93</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000476<div class="ttc" id="convolution3x3_8cl_xhtml_ac06f3e24d3fffd3c465d8b2a6e7c985e"><div class="ttname"><a href="convolution3x3_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a></div><div class="ttdeci">#define DATA_TYPE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00031">convolution3x3.cl:31</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100477<div class="ttc" id="depth__convert_8cl_xhtml_a9bed30cda5ab157322d2f0bbdff46d28"><div class="ttname"><a href="depth__convert_8cl.xhtml#a9bed30cda5ab157322d2f0bbdff46d28">CONVERT_UP</a></div><div class="ttdeci">#define CONVERT_UP(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="depth__convert_8cl_source.xhtml#l00049">depth_convert.cl:49</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000478</div><!-- fragment -->
479</div>
480</div>
481</div><!-- contents -->
482</div><!-- doc-content -->
483<!-- start footer part -->
484<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
485 <ul>
Kaizen8938bd32017-09-28 14:38:23 +0100486 <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="depth__convert_8cl.xhtml">depth_convert.cl</a></li>
487 <li class="footer">Generated on Thu Sep 28 2017 14:37:53 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000488 <a href="http://www.doxygen.org/index.html">
Kaizen8938bd32017-09-28 14:38:23 +0100489 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +0000490 </ul>
491</div>
492</body>
493</html>