blob: 16e45fbccbbb135fd33a83cdc547bbaeecd2e1b0 [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"/>
7<meta name="generator" content="Doxygen 1.8.11"/>
8<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/convolution5x5.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>
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);
20</script>
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(); });
26</script>
27<script type="text/x-mathjax-config">
28 MathJax.Hub.Config({
29 extensions: ["tex2jax.js"],
30 jax: ["input/TeX","output/HTML-CSS"],
31});
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" />
34</head>
35<body>
36<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
37<div id="titlearea">
38<table cellspacing="0" cellpadding="0">
39 <tbody>
40 <tr style="height: 56px;">
41 <td style="padding-left: 0.5em;">
Anthony Barbierdbdab852017-06-23 15:42:00 +010042 <div id="projectname">Compute Library
43 &#160;<span id="projectnumber">v17.06</span>
Anthony Barbier871448e2017-03-24 14:54:29 +000044 </div>
45 </td>
46 </tr>
47 </tbody>
48</table>
49</div>
50<!-- end header part -->
51<!-- Generated by Doxygen 1.8.11 -->
52<script type="text/javascript">
53var searchBox = new SearchBox("searchBox", "search",false,'Search');
54</script>
55 <div id="navrow1" class="tabs">
56 <ul class="tablist">
57 <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +010058 <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
Anthony Barbier871448e2017-03-24 14:54:29 +000059 <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
60 <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
61 <li class="current"><a href="files.xhtml"><span>Files</span></a></li>
62 <li>
63 <div id="MSearchBox" class="MSearchBoxInactive">
64 <span class="left">
65 <img id="MSearchSelect" src="search/mag_sel.png"
66 onmouseover="return searchBox.OnSearchSelectShow()"
67 onmouseout="return searchBox.OnSearchSelectHide()"
68 alt=""/>
69 <input type="text" id="MSearchField" value="Search" accesskey="S"
70 onfocus="searchBox.OnSearchFieldFocus(true)"
71 onblur="searchBox.OnSearchFieldFocus(false)"
72 onkeyup="searchBox.OnSearchFieldChange(event)"/>
73 </span><span class="right">
74 <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
75 </span>
76 </div>
77 </li>
78 </ul>
79 </div>
80 <div id="navrow2" class="tabs2">
81 <ul class="tablist">
82 <li><a href="files.xhtml"><span>File&#160;List</span></a></li>
83 <li><a href="globals.xhtml"><span>Globals</span></a></li>
84 </ul>
85 </div>
86</div><!-- top -->
87<div id="side-nav" class="ui-resizable side-nav-resizable">
88 <div id="nav-tree">
89 <div id="nav-tree-contents">
90 <div id="nav-sync" class="sync"></div>
91 </div>
92 </div>
93 <div id="splitbar" style="-moz-user-select:none;"
94 class="ui-resizable-handle">
95 </div>
96</div>
97<script type="text/javascript">
98$(document).ready(function(){initNavTree('convolution5x5_8cl.xhtml','');});
99</script>
100<div id="doc-content">
101<!-- window showing the filter options -->
102<div id="MSearchSelectWindow"
103 onmouseover="return searchBox.OnSearchSelectShow()"
104 onmouseout="return searchBox.OnSearchSelectHide()"
105 onkeydown="return searchBox.OnSearchSelectKey(event)">
106</div>
107
108<!-- iframe showing the search results (closed by default) -->
109<div id="MSearchResultsWindow">
110<iframe src="javascript:void(0)" frameborder="0"
111 name="MSearchResults" id="MSearchResults">
112</iframe>
113</div>
114
115<div class="header">
116 <div class="summary">
117<a href="#define-members">Macros</a> &#124;
118<a href="#func-members">Functions</a> </div>
119 <div class="headertitle">
120<div class="title">convolution5x5.cl File Reference</div> </div>
121</div><!--header-->
122<div class="contents">
123<div class="textblock"><code>#include &quot;<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>&quot;</code><br />
124</div>
125<p><a href="convolution5x5_8cl_source.xhtml">Go to the source code of this file.</a></p>
126<table class="memberdecls">
127<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
128Macros</h2></td></tr>
129<tr class="memitem:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;&#160;&#160;short</td></tr>
130<tr class="separator:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
131<tr class="memitem:a26babb0c719990ecbdf3abc6de920875"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>&#160;&#160;&#160;int</td></tr>
132<tr class="separator:a26babb0c719990ecbdf3abc6de920875"><td class="memSeparator" colspan="2">&#160;</td></tr>
133<tr class="memitem:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>&#160;&#160;&#160;uchar</td></tr>
134<tr class="separator:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memSeparator" colspan="2">&#160;</td></tr>
135</table><table class="memberdecls">
136<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
137Functions</h2></td></tr>
138<tr class="memitem:abd315efadde56274531a8b2bdb43f688"><td class="memItemLeft" align="right" valign="top">short8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a> (__global const uchar *left_pixel, const short left1_coeff, const short left2_coeff, const short middle_coeff, const short right1_coeff, const short right2_coeff)</td></tr>
139<tr class="memdesc:abd315efadde56274531a8b2bdb43f688"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute a 1D horizontal convolution of size 5 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). <a href="#abd315efadde56274531a8b2bdb43f688">More...</a><br /></td></tr>
140<tr class="separator:abd315efadde56274531a8b2bdb43f688"><td class="memSeparator" colspan="2">&#160;</td></tr>
141<tr class="memitem:af8d82290182db5e89de313121bbb22d2"><td class="memItemLeft" align="right" valign="top">int8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#af8d82290182db5e89de313121bbb22d2">convolution5x1</a> (<a class="el" href="struct_image.xhtml">Image</a> *src, const short up1_coeff, const short up2_coeff, const short middle_coeff, const short down1_coeff, const short down2_coeff)</td></tr>
142<tr class="memdesc:af8d82290182db5e89de313121bbb22d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute a 1D vertical convolution of size 5 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). <a href="#af8d82290182db5e89de313121bbb22d2">More...</a><br /></td></tr>
143<tr class="separator:af8d82290182db5e89de313121bbb22d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
144<tr class="memitem:ac80109c09492de142b4b7498f2fc6abb"><td class="memItemLeft" align="right" valign="top">short8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#ac80109c09492de142b4b7498f2fc6abb">convolution5x5</a> (<a class="el" href="struct_image.xhtml">Image</a> *src, const short mat0, const short mat1, const short mat2, const short mat3, const short mat4, const short mat5, const short mat6, const short mat7, const short mat8, const short mat9, const short mat10, const short mat11, const short mat12, const short mat13, const short mat14, const short mat15, const short mat16, const short mat17, const short mat18, const short mat19, const short mat20, const short mat21, const short mat22, const short mat23, const short mat24, uint scale)</td></tr>
145<tr class="memdesc:ac80109c09492de142b4b7498f2fc6abb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 5x5 convolution matrix to a single channel U8 input image and return the result. <a href="#ac80109c09492de142b4b7498f2fc6abb">More...</a><br /></td></tr>
146<tr class="separator:ac80109c09492de142b4b7498f2fc6abb"><td class="memSeparator" colspan="2">&#160;</td></tr>
147<tr class="memitem:a59312d2415e9c4baa221da9394ea4e3c"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#a59312d2415e9c4baa221da9394ea4e3c">convolution_separable1x5_static</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
148<tr class="memdesc:a59312d2415e9c4baa221da9394ea4e3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 1x5 static convolution matrix to a single channel U8 input image and output a single temporary channel image(Support U16, S16, S32). <a href="#a59312d2415e9c4baa221da9394ea4e3c">More...</a><br /></td></tr>
149<tr class="separator:a59312d2415e9c4baa221da9394ea4e3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
150<tr class="memitem:afafa1a261166012b37a2cae3130b6b33"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#afafa1a261166012b37a2cae3130b6b33">convolution_separable5x1_static</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
151<tr class="memdesc:afafa1a261166012b37a2cae3130b6b33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 5x1 static convolution matrix to a single channel U8 input image and output a single channel image. <a href="#afafa1a261166012b37a2cae3130b6b33">More...</a><br /></td></tr>
152<tr class="separator:afafa1a261166012b37a2cae3130b6b33"><td class="memSeparator" colspan="2">&#160;</td></tr>
153<tr class="memitem:a643ab36ceadc54b36cb5b73ef0154913"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution5x5_8cl.xhtml#a643ab36ceadc54b36cb5b73ef0154913">convolution5x5_static</a> (__global uchar *src_ptr, uint src_stride_x, uint src_step_x, uint src_stride_y, uint src_step_y, uint src_offset_first_element_in_bytes, __global uchar *dst_ptr, uint dst_stride_x, uint dst_step_x, uint dst_stride_y, uint dst_step_y, uint dst_offset_first_element_in_bytes)</td></tr>
154<tr class="memdesc:a643ab36ceadc54b36cb5b73ef0154913"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a static 5x5 convolution matrix to a single channel U8 input image and output a single channel image including borders. <a href="#a643ab36ceadc54b36cb5b73ef0154913">More...</a><br /></td></tr>
155<tr class="separator:a643ab36ceadc54b36cb5b73ef0154913"><td class="memSeparator" colspan="2">&#160;</td></tr>
156</table>
157<h2 class="groupheader">Macro Definition Documentation</h2>
158<a class="anchor" id="a26babb0c719990ecbdf3abc6de920875"></a>
159<div class="memitem">
160<div class="memproto">
161 <table class="memname">
162 <tr>
163 <td class="memname">#define COMPUTE_TYPE&#160;&#160;&#160;int</td>
164 </tr>
165 </table>
166</div><div class="memdoc">
167
168<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00031">31</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
169
170<p>Referenced by <a class="el" href="convolution5x5_8cl_source.xhtml#l00050">convolution1x5()</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00087">convolution5x1()</a>, and <a class="el" href="convolution5x5_8cl_source.xhtml#l00238">convolution_separable5x1_static()</a>.</p>
171
172</div>
173</div>
174<a class="anchor" id="afb8c72ce35c4a1f4a2588d6573e54aa1"></a>
175<div class="memitem">
176<div class="memproto">
177 <table class="memname">
178 <tr>
179 <td class="memname">#define DATA_TYPE&#160;&#160;&#160;short</td>
180 </tr>
181 </table>
182</div><div class="memdoc">
183
184<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00027">27</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
185
186<p>Referenced by <a class="el" href="convolution5x5_8cl_source.xhtml#l00050">convolution1x5()</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00087">convolution5x1()</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00159">convolution5x5()</a>, and <a class="el" href="convolution5x5_8cl_source.xhtml#l00205">convolution_separable1x5_static()</a>.</p>
187
188</div>
189</div>
190<a class="anchor" id="ac06f3e24d3fffd3c465d8b2a6e7c985e"></a>
191<div class="memitem">
192<div class="memproto">
193 <table class="memname">
194 <tr>
195 <td class="memname">#define DATA_TYPE_OUT&#160;&#160;&#160;uchar</td>
196 </tr>
197 </table>
198</div><div class="memdoc">
199
200<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00035">35</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
201
202<p>Referenced by <a class="el" href="convolution5x5_8cl_source.xhtml#l00274">convolution5x5_static()</a>, and <a class="el" href="convolution5x5_8cl_source.xhtml#l00238">convolution_separable5x1_static()</a>.</p>
203
204</div>
205</div>
206<h2 class="groupheader">Function Documentation</h2>
207<a class="anchor" id="abd315efadde56274531a8b2bdb43f688"></a>
208<div class="memitem">
209<div class="memproto">
210 <table class="memname">
211 <tr>
212 <td class="memname">short8 convolution1x5 </td>
213 <td>(</td>
214 <td class="paramtype">__global const uchar *&#160;</td>
215 <td class="paramname"><em>left_pixel</em>, </td>
216 </tr>
217 <tr>
218 <td class="paramkey"></td>
219 <td></td>
220 <td class="paramtype">const short&#160;</td>
221 <td class="paramname"><em>left1_coeff</em>, </td>
222 </tr>
223 <tr>
224 <td class="paramkey"></td>
225 <td></td>
226 <td class="paramtype">const short&#160;</td>
227 <td class="paramname"><em>left2_coeff</em>, </td>
228 </tr>
229 <tr>
230 <td class="paramkey"></td>
231 <td></td>
232 <td class="paramtype">const short&#160;</td>
233 <td class="paramname"><em>middle_coeff</em>, </td>
234 </tr>
235 <tr>
236 <td class="paramkey"></td>
237 <td></td>
238 <td class="paramtype">const short&#160;</td>
239 <td class="paramname"><em>right1_coeff</em>, </td>
240 </tr>
241 <tr>
242 <td class="paramkey"></td>
243 <td></td>
244 <td class="paramtype">const short&#160;</td>
245 <td class="paramname"><em>right2_coeff</em>&#160;</td>
246 </tr>
247 <tr>
248 <td></td>
249 <td>)</td>
250 <td></td><td></td>
251 </tr>
252 </table>
253</div><div class="memdoc">
254
255<p>Compute a 1D horizontal convolution of size 5 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). </p>
256<dl class="params"><dt>Parameters</dt><dd>
257 <table class="params">
258 <tr><td class="paramdir">[in]</td><td class="paramname">left_pixel</td><td>Pointer to the left pixel </td></tr>
259 <tr><td class="paramdir">[in]</td><td class="paramname">left1_coeff</td><td>Weight of the most left pixel </td></tr>
260 <tr><td class="paramdir">[in]</td><td class="paramname">left2_coeff</td><td>Weight of the left pixel </td></tr>
261 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff</td><td>Weight of the middle pixel </td></tr>
262 <tr><td class="paramdir">[in]</td><td class="paramname">right1_coeff</td><td>Weight of the right pixel </td></tr>
263 <tr><td class="paramdir">[in]</td><td class="paramname">right2_coeff</td><td>Weight of the most right pixel</td></tr>
264 </table>
265 </dd>
266</dl>
267<dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted values. </dd></dl>
268
269<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00050">50</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
270
271<p>References <a class="el" href="convolution5x5_8cl_source.xhtml#l00031">COMPUTE_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00035">CONVERT</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="helpers_8h_source.xhtml#l00032">VEC_DATA_TYPE</a>.</p>
272
273<p>Referenced by <a class="el" href="convolution5x5_8cl_source.xhtml#l00159">convolution5x5()</a>, <a class="el" href="convolution__rectangle_8cl_source.xhtml#l00064">convolution_rectangle()</a>, and <a class="el" href="convolution5x5_8cl_source.xhtml#l00205">convolution_separable1x5_static()</a>.</p>
274<div class="fragment"><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;{</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160; uchar16 temp = vload16(0, left_pixel);</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160; left1 = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s01234567, <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8));</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160; left2 = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s12345678, <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; middle = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s23456789, <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; right1 = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s3456789a, <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; right2 = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s456789ab, <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;</div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; return left1 * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))left1_coeff + left2 * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))left2_coeff</div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; + middle * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))middle_coeff + right1 * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))right1_coeff + right2 * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))right2_coeff;</div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="helpers_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="helpers_8h_source.xhtml#l00032">helpers.h:32</a></div></div>
275<div class="ttc" id="convolution5x5_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00027">convolution5x5.cl:27</a></div></div>
276<div class="ttc" id="helpers_8h_xhtml_aa8d95ba04fc73845abc6045952cae5be"><div class="ttname"><a href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a></div><div class="ttdeci">#define CONVERT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00035">helpers.h:35</a></div></div>
277</div><!-- fragment -->
278</div>
279</div>
280<a class="anchor" id="af8d82290182db5e89de313121bbb22d2"></a>
281<div class="memitem">
282<div class="memproto">
283 <table class="memname">
284 <tr>
285 <td class="memname">int8 convolution5x1 </td>
286 <td>(</td>
287 <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> *&#160;</td>
288 <td class="paramname"><em>src</em>, </td>
289 </tr>
290 <tr>
291 <td class="paramkey"></td>
292 <td></td>
293 <td class="paramtype">const short&#160;</td>
294 <td class="paramname"><em>up1_coeff</em>, </td>
295 </tr>
296 <tr>
297 <td class="paramkey"></td>
298 <td></td>
299 <td class="paramtype">const short&#160;</td>
300 <td class="paramname"><em>up2_coeff</em>, </td>
301 </tr>
302 <tr>
303 <td class="paramkey"></td>
304 <td></td>
305 <td class="paramtype">const short&#160;</td>
306 <td class="paramname"><em>middle_coeff</em>, </td>
307 </tr>
308 <tr>
309 <td class="paramkey"></td>
310 <td></td>
311 <td class="paramtype">const short&#160;</td>
312 <td class="paramname"><em>down1_coeff</em>, </td>
313 </tr>
314 <tr>
315 <td class="paramkey"></td>
316 <td></td>
317 <td class="paramtype">const short&#160;</td>
318 <td class="paramname"><em>down2_coeff</em>&#160;</td>
319 </tr>
320 <tr>
321 <td></td>
322 <td>)</td>
323 <td></td><td></td>
324 </tr>
325 </table>
326</div><div class="memdoc">
327
328<p>Compute a 1D vertical convolution of size 5 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). </p>
329<dl class="params"><dt>Parameters</dt><dd>
330 <table class="params">
331 <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to source image. </td></tr>
332 <tr><td class="paramdir">[in]</td><td class="paramname">up1_coeff</td><td>Weight of the most up pixel </td></tr>
333 <tr><td class="paramdir">[in]</td><td class="paramname">up2_coeff</td><td>Weight of the up pixel </td></tr>
334 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff</td><td>Weight of the middle pixel </td></tr>
335 <tr><td class="paramdir">[in]</td><td class="paramname">down1_coeff</td><td>Weight of the down pixel </td></tr>
336 <tr><td class="paramdir">[in]</td><td class="paramname">down2_coeff</td><td>Weight of the most down pixel</td></tr>
337 </table>
338 </dd>
339</dl>
340<dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted values. </dd></dl>
341
342<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00087">87</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
343
344<p>References <a class="el" href="convolution5x5_8cl_source.xhtml#l00031">COMPUTE_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00035">CONVERT</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00201">offset()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00032">VEC_DATA_TYPE</a>.</p>
345
346<p>Referenced by <a class="el" href="convolution5x5_8cl_source.xhtml#l00238">convolution_separable5x1_static()</a>.</p>
347<div class="fragment"><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160;{</div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8)</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; val;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8)</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160; out = (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))0;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>&#160;</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>&#160; val = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, -2)), <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>&#160; out += val * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))up1_coeff;</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>&#160; val = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, -1)), <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; out += val * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))up2_coeff;</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; val = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 0)), <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; out += val * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))middle_coeff;</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; val = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 1)), <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; out += val * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))down1_coeff;</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; val = <a class="code" href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 2)), <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; out += val * (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))down2_coeff;</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; return out;</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;}</div><div class="ttc" id="convolution5x5_8cl_xhtml_a26babb0c719990ecbdf3abc6de920875"><div class="ttname"><a href="convolution5x5_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a></div><div class="ttdeci">#define COMPUTE_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00031">convolution5x5.cl:31</a></div></div>
348<div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00201">helpers.h:201</a></div></div>
349<div class="ttc" id="helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="helpers_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="helpers_8h_source.xhtml#l00032">helpers.h:32</a></div></div>
350<div class="ttc" id="convolution5x5_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00027">convolution5x5.cl:27</a></div></div>
351<div class="ttc" id="helpers_8h_xhtml_aa8d95ba04fc73845abc6045952cae5be"><div class="ttname"><a href="helpers_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a></div><div class="ttdeci">#define CONVERT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00035">helpers.h:35</a></div></div>
352</div><!-- fragment -->
353</div>
354</div>
355<a class="anchor" id="ac80109c09492de142b4b7498f2fc6abb"></a>
356<div class="memitem">
357<div class="memproto">
358 <table class="memname">
359 <tr>
360 <td class="memname">short8 convolution5x5 </td>
361 <td>(</td>
362 <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> *&#160;</td>
363 <td class="paramname"><em>src</em>, </td>
364 </tr>
365 <tr>
366 <td class="paramkey"></td>
367 <td></td>
368 <td class="paramtype">const short&#160;</td>
369 <td class="paramname"><em>mat0</em>, </td>
370 </tr>
371 <tr>
372 <td class="paramkey"></td>
373 <td></td>
374 <td class="paramtype">const short&#160;</td>
375 <td class="paramname"><em>mat1</em>, </td>
376 </tr>
377 <tr>
378 <td class="paramkey"></td>
379 <td></td>
380 <td class="paramtype">const short&#160;</td>
381 <td class="paramname"><em>mat2</em>, </td>
382 </tr>
383 <tr>
384 <td class="paramkey"></td>
385 <td></td>
386 <td class="paramtype">const short&#160;</td>
387 <td class="paramname"><em>mat3</em>, </td>
388 </tr>
389 <tr>
390 <td class="paramkey"></td>
391 <td></td>
392 <td class="paramtype">const short&#160;</td>
393 <td class="paramname"><em>mat4</em>, </td>
394 </tr>
395 <tr>
396 <td class="paramkey"></td>
397 <td></td>
398 <td class="paramtype">const short&#160;</td>
399 <td class="paramname"><em>mat5</em>, </td>
400 </tr>
401 <tr>
402 <td class="paramkey"></td>
403 <td></td>
404 <td class="paramtype">const short&#160;</td>
405 <td class="paramname"><em>mat6</em>, </td>
406 </tr>
407 <tr>
408 <td class="paramkey"></td>
409 <td></td>
410 <td class="paramtype">const short&#160;</td>
411 <td class="paramname"><em>mat7</em>, </td>
412 </tr>
413 <tr>
414 <td class="paramkey"></td>
415 <td></td>
416 <td class="paramtype">const short&#160;</td>
417 <td class="paramname"><em>mat8</em>, </td>
418 </tr>
419 <tr>
420 <td class="paramkey"></td>
421 <td></td>
422 <td class="paramtype">const short&#160;</td>
423 <td class="paramname"><em>mat9</em>, </td>
424 </tr>
425 <tr>
426 <td class="paramkey"></td>
427 <td></td>
428 <td class="paramtype">const short&#160;</td>
429 <td class="paramname"><em>mat10</em>, </td>
430 </tr>
431 <tr>
432 <td class="paramkey"></td>
433 <td></td>
434 <td class="paramtype">const short&#160;</td>
435 <td class="paramname"><em>mat11</em>, </td>
436 </tr>
437 <tr>
438 <td class="paramkey"></td>
439 <td></td>
440 <td class="paramtype">const short&#160;</td>
441 <td class="paramname"><em>mat12</em>, </td>
442 </tr>
443 <tr>
444 <td class="paramkey"></td>
445 <td></td>
446 <td class="paramtype">const short&#160;</td>
447 <td class="paramname"><em>mat13</em>, </td>
448 </tr>
449 <tr>
450 <td class="paramkey"></td>
451 <td></td>
452 <td class="paramtype">const short&#160;</td>
453 <td class="paramname"><em>mat14</em>, </td>
454 </tr>
455 <tr>
456 <td class="paramkey"></td>
457 <td></td>
458 <td class="paramtype">const short&#160;</td>
459 <td class="paramname"><em>mat15</em>, </td>
460 </tr>
461 <tr>
462 <td class="paramkey"></td>
463 <td></td>
464 <td class="paramtype">const short&#160;</td>
465 <td class="paramname"><em>mat16</em>, </td>
466 </tr>
467 <tr>
468 <td class="paramkey"></td>
469 <td></td>
470 <td class="paramtype">const short&#160;</td>
471 <td class="paramname"><em>mat17</em>, </td>
472 </tr>
473 <tr>
474 <td class="paramkey"></td>
475 <td></td>
476 <td class="paramtype">const short&#160;</td>
477 <td class="paramname"><em>mat18</em>, </td>
478 </tr>
479 <tr>
480 <td class="paramkey"></td>
481 <td></td>
482 <td class="paramtype">const short&#160;</td>
483 <td class="paramname"><em>mat19</em>, </td>
484 </tr>
485 <tr>
486 <td class="paramkey"></td>
487 <td></td>
488 <td class="paramtype">const short&#160;</td>
489 <td class="paramname"><em>mat20</em>, </td>
490 </tr>
491 <tr>
492 <td class="paramkey"></td>
493 <td></td>
494 <td class="paramtype">const short&#160;</td>
495 <td class="paramname"><em>mat21</em>, </td>
496 </tr>
497 <tr>
498 <td class="paramkey"></td>
499 <td></td>
500 <td class="paramtype">const short&#160;</td>
501 <td class="paramname"><em>mat22</em>, </td>
502 </tr>
503 <tr>
504 <td class="paramkey"></td>
505 <td></td>
506 <td class="paramtype">const short&#160;</td>
507 <td class="paramname"><em>mat23</em>, </td>
508 </tr>
509 <tr>
510 <td class="paramkey"></td>
511 <td></td>
512 <td class="paramtype">const short&#160;</td>
513 <td class="paramname"><em>mat24</em>, </td>
514 </tr>
515 <tr>
516 <td class="paramkey"></td>
517 <td></td>
518 <td class="paramtype">uint&#160;</td>
519 <td class="paramname"><em>scale</em>&#160;</td>
520 </tr>
521 <tr>
522 <td></td>
523 <td>)</td>
524 <td></td><td></td>
525 </tr>
526 </table>
527</div><div class="memdoc">
528
529<p>Apply a 5x5 convolution matrix to a single channel U8 input image and return the result. </p>
530<p>Convolution matrix layout:<br />
531[ mat0, mat1, mat2, mat3 , mat4 ]<br />
532[ mat5, mat6, mat7, mat8, mat9 ]<br />
533[ mat10, mat11, mat12, mat13, mat14 ]<br />
534[ mat15, mat16, mat17, mat18, mat19 ]<br />
535[ mat20, mat21, mat22, mat23, mat24 ]</p>
536<dl class="params"><dt>Parameters</dt><dd>
537 <table class="params">
538 <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>A pointer to source <a class="el" href="struct_image.xhtml" title="Structure to hold Image information. ">Image</a> structure. </td></tr>
539 <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr>
540 <tr><td class="paramdir">[in]</td><td class="paramname">mat1</td><td>Coefficient from the convolution matrix </td></tr>
541 <tr><td class="paramdir">[in]</td><td class="paramname">mat2</td><td>Coefficient from the convolution matrix </td></tr>
542 <tr><td class="paramdir">[in]</td><td class="paramname">mat3</td><td>Coefficient from the convolution matrix </td></tr>
543 <tr><td class="paramdir">[in]</td><td class="paramname">mat4</td><td>Coefficient from the convolution matrix </td></tr>
544 <tr><td class="paramdir">[in]</td><td class="paramname">mat5</td><td>Coefficient from the convolution matrix </td></tr>
545 <tr><td class="paramdir">[in]</td><td class="paramname">mat6</td><td>Coefficient from the convolution matrix </td></tr>
546 <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr>
547 <tr><td class="paramdir">[in]</td><td class="paramname">mat7</td><td>Coefficient from the convolution matrix </td></tr>
548 <tr><td class="paramdir">[in]</td><td class="paramname">mat8</td><td>Coefficient from the convolution matrix </td></tr>
549 <tr><td class="paramdir">[in]</td><td class="paramname">mat9</td><td>Coefficient from the convolution matrix </td></tr>
550 <tr><td class="paramdir">[in]</td><td class="paramname">mat10</td><td>Coefficient from the convolution matrix </td></tr>
551 <tr><td class="paramdir">[in]</td><td class="paramname">mat11</td><td>Coefficient from the convolution matrix </td></tr>
552 <tr><td class="paramdir">[in]</td><td class="paramname">mat12</td><td>Coefficient from the convolution matrix </td></tr>
553 <tr><td class="paramdir">[in]</td><td class="paramname">mat13</td><td>Coefficient from the convolution matrix </td></tr>
554 <tr><td class="paramdir">[in]</td><td class="paramname">mat14</td><td>Coefficient from the convolution matrix </td></tr>
555 <tr><td class="paramdir">[in]</td><td class="paramname">mat15</td><td>Coefficient from the convolution matrix </td></tr>
556 <tr><td class="paramdir">[in]</td><td class="paramname">mat16</td><td>Coefficient from the convolution matrix </td></tr>
557 <tr><td class="paramdir">[in]</td><td class="paramname">mat10</td><td>Coefficient from the convolution matrix </td></tr>
558 <tr><td class="paramdir">[in]</td><td class="paramname">mat17</td><td>Coefficient from the convolution matrix </td></tr>
559 <tr><td class="paramdir">[in]</td><td class="paramname">mat18</td><td>Coefficient from the convolution matrix </td></tr>
560 <tr><td class="paramdir">[in]</td><td class="paramname">mat19</td><td>Coefficient from the convolution matrix </td></tr>
561 <tr><td class="paramdir">[in]</td><td class="paramname">mat20</td><td>Coefficient from the convolution matrix </td></tr>
562 <tr><td class="paramdir">[in]</td><td class="paramname">mat21</td><td>Coefficient from the convolution matrix </td></tr>
563 <tr><td class="paramdir">[in]</td><td class="paramname">mat22</td><td>Coefficient from the convolution matrix </td></tr>
564 <tr><td class="paramdir">[in]</td><td class="paramname">mat23</td><td>Coefficient from the convolution matrix </td></tr>
565 <tr><td class="paramdir">[in]</td><td class="paramname">mat24</td><td>Coefficient from the convolution matrix </td></tr>
566 <tr><td class="paramdir">[in]</td><td class="paramname">scale</td><td>Convolution matrix scale (Sum of the coefficients, or 1 if the sum is 0)</td></tr>
567 </table>
568 </dd>
569</dl>
570<dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted and scaled values. </dd></dl>
571
572<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00159">159</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
573
574<p>References <a class="el" href="convolution5x5_8cl_source.xhtml#l00050">convolution1x5()</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00201">offset()</a>, and <a class="el" href="helpers_8h_source.xhtml#l00032">VEC_DATA_TYPE</a>.</p>
575
576<p>Referenced by <a class="el" href="convolution5x5_8cl_source.xhtml#l00274">convolution5x5_static()</a>.</p>
577<div class="fragment"><div class="line"><a name="l00167"></a><span class="lineno"> 167</span>&#160;{</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>&#160; pixels;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160; pixels = <a class="code" href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -2, -2), mat0, mat1, mat2, mat3, mat4);</div><div class="line"><a name="l00172"></a><span class="lineno"> 172</span>&#160; pixels += <a class="code" href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -2, -1), mat5, mat6, mat7, mat8, mat9);</div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span>&#160; pixels += <a class="code" href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -2, 0), mat10, mat11, mat12, mat13, mat14);</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>&#160; pixels += <a class="code" href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -2, 1), mat15, mat16, mat17, mat18, mat19);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; pixels += <a class="code" href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -2, 2), mat20, mat21, mat22, mat23, mat24);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>&#160; if(scale &gt; 0)</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>&#160; {</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>&#160; pixels /= (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8))scale;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; }</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160; <span class="keywordflow">return</span> convert_short8_sat(pixels);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00201">helpers.h:201</a></div></div>
578<div class="ttc" id="helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="helpers_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="helpers_8h_source.xhtml#l00032">helpers.h:32</a></div></div>
579<div class="ttc" id="convolution5x5_8cl_xhtml_abd315efadde56274531a8b2bdb43f688"><div class="ttname"><a href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a></div><div class="ttdeci">short8 convolution1x5(__global const uchar *left_pixel, const short left1_coeff, const short left2_coeff, const short middle_coeff, const short right1_coeff, const short right2_coeff)</div><div class="ttdoc">Compute a 1D horizontal convolution of size 5 for 8 bytes assuming the input is made of 1 channel of ...</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00050">convolution5x5.cl:50</a></div></div>
580<div class="ttc" id="convolution5x5_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00027">convolution5x5.cl:27</a></div></div>
581</div><!-- fragment -->
582</div>
583</div>
584<a class="anchor" id="a643ab36ceadc54b36cb5b73ef0154913"></a>
585<div class="memitem">
586<div class="memproto">
587 <table class="memname">
588 <tr>
589 <td class="memname">__kernel void convolution5x5_static </td>
590 <td>(</td>
591 <td class="paramtype">__global uchar *&#160;</td>
592 <td class="paramname"><em>src_ptr</em>, </td>
593 </tr>
594 <tr>
595 <td class="paramkey"></td>
596 <td></td>
597 <td class="paramtype">uint&#160;</td>
598 <td class="paramname"><em>src_stride_x</em>, </td>
599 </tr>
600 <tr>
601 <td class="paramkey"></td>
602 <td></td>
603 <td class="paramtype">uint&#160;</td>
604 <td class="paramname"><em>src_step_x</em>, </td>
605 </tr>
606 <tr>
607 <td class="paramkey"></td>
608 <td></td>
609 <td class="paramtype">uint&#160;</td>
610 <td class="paramname"><em>src_stride_y</em>, </td>
611 </tr>
612 <tr>
613 <td class="paramkey"></td>
614 <td></td>
615 <td class="paramtype">uint&#160;</td>
616 <td class="paramname"><em>src_step_y</em>, </td>
617 </tr>
618 <tr>
619 <td class="paramkey"></td>
620 <td></td>
621 <td class="paramtype">uint&#160;</td>
622 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
623 </tr>
624 <tr>
625 <td class="paramkey"></td>
626 <td></td>
627 <td class="paramtype">__global uchar *&#160;</td>
628 <td class="paramname"><em>dst_ptr</em>, </td>
629 </tr>
630 <tr>
631 <td class="paramkey"></td>
632 <td></td>
633 <td class="paramtype">uint&#160;</td>
634 <td class="paramname"><em>dst_stride_x</em>, </td>
635 </tr>
636 <tr>
637 <td class="paramkey"></td>
638 <td></td>
639 <td class="paramtype">uint&#160;</td>
640 <td class="paramname"><em>dst_step_x</em>, </td>
641 </tr>
642 <tr>
643 <td class="paramkey"></td>
644 <td></td>
645 <td class="paramtype">uint&#160;</td>
646 <td class="paramname"><em>dst_stride_y</em>, </td>
647 </tr>
648 <tr>
649 <td class="paramkey"></td>
650 <td></td>
651 <td class="paramtype">uint&#160;</td>
652 <td class="paramname"><em>dst_step_y</em>, </td>
653 </tr>
654 <tr>
655 <td class="paramkey"></td>
656 <td></td>
657 <td class="paramtype">uint&#160;</td>
658 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
659 </tr>
660 <tr>
661 <td></td>
662 <td>)</td>
663 <td></td><td></td>
664 </tr>
665 </table>
666</div><div class="memdoc">
667
668<p>Apply a static 5x5 convolution matrix to a single channel U8 input image and output a single channel image including borders. </p>
669<dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients(MAT0, MAT1, ... MAT24, SCALE), DATA_TYPE_OUT need to be passed at compile time:<br />
670e.g. -DMAT0=1 -DMAT1=2, ... -DMAT24=24, -DSCALE=6, -DDATA_TYPE_OUT=int</dd></dl>
671<dl class="params"><dt>Parameters</dt><dd>
672 <table class="params">
673 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U8 </td></tr>
674 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
675 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
676 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
677 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
678 <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
679 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported data types: U8, S16 </td></tr>
680 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
681 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
682 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
683 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
684 <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
685 </table>
686 </dd>
687</dl>
688
689<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00274">274</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
690
691<p>References <a class="el" href="helpers_8h_source.xhtml#l00038">CONVERT_SAT</a>, <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00159">convolution5x5()</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00035">DATA_TYPE_OUT</a>, <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>, and <a class="el" href="helpers_8h_source.xhtml#l00032">VEC_DATA_TYPE</a>.</p>
692<div class="fragment"><div class="line"><a name="l00277"></a><span class="lineno"> 277</span>&#160;{</div><div class="line"><a name="l00278"></a><span class="lineno"> 278</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> src = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00279"></a><span class="lineno"> 279</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> dst = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span>&#160;</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span>&#160; short8 pixels = <a class="code" href="convolution5x5_8cl.xhtml#ac80109c09492de142b4b7498f2fc6abb">convolution5x5</a>(&amp;src,</div><div class="line"><a name="l00282"></a><span class="lineno"> 282</span>&#160; MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6, MAT7, MAT8, MAT9, MAT10, MAT11, MAT12, MAT13,</div><div class="line"><a name="l00283"></a><span class="lineno"> 283</span>&#160; MAT14, MAT15, MAT16, MAT17, MAT18, MAT19, MAT20, MAT21, MAT22, MAT23, MAT24, SCALE);</div><div class="line"><a name="l00284"></a><span class="lineno"> 284</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno"> 285</span>&#160; <span class="comment">// Store the result as is in dst</span></div><div class="line"><a name="l00286"></a><span class="lineno"> 286</span>&#160; vstore8(<a class="code" href="helpers_8h.xhtml#a23fb01b6f3453cc0e48a026fd44f6acd">CONVERT_SAT</a>(pixels, <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 8)), 0, (__global <a class="code" href="convolution5x5_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a> *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div><div class="line"><a name="l00287"></a><span class="lineno"> 287</span>&#160;}</div><div class="ttc" id="convolution5x5_8cl_xhtml_ac80109c09492de142b4b7498f2fc6abb"><div class="ttname"><a href="convolution5x5_8cl.xhtml#ac80109c09492de142b4b7498f2fc6abb">convolution5x5</a></div><div class="ttdeci">short8 convolution5x5(Image *src, const short mat0, const short mat1, const short mat2, const short mat3, const short mat4, const short mat5, const short mat6, const short mat7, const short mat8, const short mat9, const short mat10, const short mat11, const short mat12, const short mat13, const short mat14, const short mat15, const short mat16, const short mat17, const short mat18, const short mat19, const short mat20, const short mat21, const short mat22, const short mat23, const short mat24, uint scale)</div><div class="ttdoc">Apply a 5x5 convolution matrix to a single channel U8 input image and return the result. </div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00159">convolution5x5.cl:159</a></div></div>
693<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>
694<div class="ttc" id="helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="helpers_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="helpers_8h_source.xhtml#l00032">helpers.h:32</a></div></div>
695<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>
696<div class="ttc" id="helpers_8h_xhtml_a23fb01b6f3453cc0e48a026fd44f6acd"><div class="ttname"><a href="helpers_8h.xhtml#a23fb01b6f3453cc0e48a026fd44f6acd">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00038">helpers.h:38</a></div></div>
697<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>
698<div class="ttc" id="convolution5x5_8cl_xhtml_ac06f3e24d3fffd3c465d8b2a6e7c985e"><div class="ttname"><a href="convolution5x5_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a></div><div class="ttdeci">#define DATA_TYPE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00035">convolution5x5.cl:35</a></div></div>
699</div><!-- fragment -->
700</div>
701</div>
702<a class="anchor" id="a59312d2415e9c4baa221da9394ea4e3c"></a>
703<div class="memitem">
704<div class="memproto">
705 <table class="memname">
706 <tr>
707 <td class="memname">__kernel void convolution_separable1x5_static </td>
708 <td>(</td>
709 <td class="paramtype">__global uchar *&#160;</td>
710 <td class="paramname"><em>src_ptr</em>, </td>
711 </tr>
712 <tr>
713 <td class="paramkey"></td>
714 <td></td>
715 <td class="paramtype">uint&#160;</td>
716 <td class="paramname"><em>src_stride_x</em>, </td>
717 </tr>
718 <tr>
719 <td class="paramkey"></td>
720 <td></td>
721 <td class="paramtype">uint&#160;</td>
722 <td class="paramname"><em>src_step_x</em>, </td>
723 </tr>
724 <tr>
725 <td class="paramkey"></td>
726 <td></td>
727 <td class="paramtype">uint&#160;</td>
728 <td class="paramname"><em>src_stride_y</em>, </td>
729 </tr>
730 <tr>
731 <td class="paramkey"></td>
732 <td></td>
733 <td class="paramtype">uint&#160;</td>
734 <td class="paramname"><em>src_step_y</em>, </td>
735 </tr>
736 <tr>
737 <td class="paramkey"></td>
738 <td></td>
739 <td class="paramtype">uint&#160;</td>
740 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
741 </tr>
742 <tr>
743 <td class="paramkey"></td>
744 <td></td>
745 <td class="paramtype">__global uchar *&#160;</td>
746 <td class="paramname"><em>dst_ptr</em>, </td>
747 </tr>
748 <tr>
749 <td class="paramkey"></td>
750 <td></td>
751 <td class="paramtype">uint&#160;</td>
752 <td class="paramname"><em>dst_stride_x</em>, </td>
753 </tr>
754 <tr>
755 <td class="paramkey"></td>
756 <td></td>
757 <td class="paramtype">uint&#160;</td>
758 <td class="paramname"><em>dst_step_x</em>, </td>
759 </tr>
760 <tr>
761 <td class="paramkey"></td>
762 <td></td>
763 <td class="paramtype">uint&#160;</td>
764 <td class="paramname"><em>dst_stride_y</em>, </td>
765 </tr>
766 <tr>
767 <td class="paramkey"></td>
768 <td></td>
769 <td class="paramtype">uint&#160;</td>
770 <td class="paramname"><em>dst_step_y</em>, </td>
771 </tr>
772 <tr>
773 <td class="paramkey"></td>
774 <td></td>
775 <td class="paramtype">uint&#160;</td>
776 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
777 </tr>
778 <tr>
779 <td></td>
780 <td>)</td>
781 <td></td><td></td>
782 </tr>
783 </table>
784</div><div class="memdoc">
785
786<p>Apply a 1x5 static convolution matrix to a single channel U8 input image and output a single temporary channel image(Support U16, S16, S32). </p>
787<dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients (MAT0, MAT1, MAT2, MAT3, MAT4) and DATA_TYPE need to be passed at compile time:<br />
788e.g. -DMAT0=1 -DMAT2=2, -DMAT3=3, -DMAT4=4, -DDATA_TYPE=int</dd></dl>
789<dl class="params"><dt>Parameters</dt><dd>
790 <table class="params">
791 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U8 </td></tr>
792 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
793 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
794 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
795 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
796 <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
797 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported data types: U16, S16, S32 </td></tr>
798 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
799 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
800 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
801 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
802 <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
803 </table>
804 </dd>
805</dl>
806
807<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00205">205</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
808
809<p>References <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00050">convolution1x5()</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00201">offset()</a>, <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>, and <a class="el" href="helpers_8h_source.xhtml#l00032">VEC_DATA_TYPE</a>.</p>
810<div class="fragment"><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>&#160;{</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> src = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00210"></a><span class="lineno"> 210</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> dst = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>&#160; <span class="comment">// Output pixels</span></div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160; pixels = <a class="code" href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, -2, 0), MAT0, MAT1, MAT2, MAT3, MAT4);</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; <span class="comment">// Store result in dst</span></div><div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160; vstore8(pixels, 0, (__global <a class="code" href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)dst.ptr);</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160;}</div><div class="ttc" id="helpers_8h_xhtml_a009469e4d9b8fce3b6d5e97d2077827d"><div class="ttname"><a href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a></div><div class="ttdeci">__global uchar * offset(const Image *img, int x, int y)</div><div class="ttdoc">Get the pointer position of a Image. </div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00201">helpers.h:201</a></div></div>
811<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>
812<div class="ttc" id="helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="helpers_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="helpers_8h_source.xhtml#l00032">helpers.h:32</a></div></div>
813<div class="ttc" id="convolution5x5_8cl_xhtml_abd315efadde56274531a8b2bdb43f688"><div class="ttname"><a href="convolution5x5_8cl.xhtml#abd315efadde56274531a8b2bdb43f688">convolution1x5</a></div><div class="ttdeci">short8 convolution1x5(__global const uchar *left_pixel, const short left1_coeff, const short left2_coeff, const short middle_coeff, const short right1_coeff, const short right2_coeff)</div><div class="ttdoc">Compute a 1D horizontal convolution of size 5 for 8 bytes assuming the input is made of 1 channel of ...</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00050">convolution5x5.cl:50</a></div></div>
814<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>
815<div class="ttc" id="convolution5x5_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution5x5_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00027">convolution5x5.cl:27</a></div></div>
816</div><!-- fragment -->
817</div>
818</div>
819<a class="anchor" id="afafa1a261166012b37a2cae3130b6b33"></a>
820<div class="memitem">
821<div class="memproto">
822 <table class="memname">
823 <tr>
824 <td class="memname">__kernel void convolution_separable5x1_static </td>
825 <td>(</td>
826 <td class="paramtype">__global uchar *&#160;</td>
827 <td class="paramname"><em>src_ptr</em>, </td>
828 </tr>
829 <tr>
830 <td class="paramkey"></td>
831 <td></td>
832 <td class="paramtype">uint&#160;</td>
833 <td class="paramname"><em>src_stride_x</em>, </td>
834 </tr>
835 <tr>
836 <td class="paramkey"></td>
837 <td></td>
838 <td class="paramtype">uint&#160;</td>
839 <td class="paramname"><em>src_step_x</em>, </td>
840 </tr>
841 <tr>
842 <td class="paramkey"></td>
843 <td></td>
844 <td class="paramtype">uint&#160;</td>
845 <td class="paramname"><em>src_stride_y</em>, </td>
846 </tr>
847 <tr>
848 <td class="paramkey"></td>
849 <td></td>
850 <td class="paramtype">uint&#160;</td>
851 <td class="paramname"><em>src_step_y</em>, </td>
852 </tr>
853 <tr>
854 <td class="paramkey"></td>
855 <td></td>
856 <td class="paramtype">uint&#160;</td>
857 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
858 </tr>
859 <tr>
860 <td class="paramkey"></td>
861 <td></td>
862 <td class="paramtype">__global uchar *&#160;</td>
863 <td class="paramname"><em>dst_ptr</em>, </td>
864 </tr>
865 <tr>
866 <td class="paramkey"></td>
867 <td></td>
868 <td class="paramtype">uint&#160;</td>
869 <td class="paramname"><em>dst_stride_x</em>, </td>
870 </tr>
871 <tr>
872 <td class="paramkey"></td>
873 <td></td>
874 <td class="paramtype">uint&#160;</td>
875 <td class="paramname"><em>dst_step_x</em>, </td>
876 </tr>
877 <tr>
878 <td class="paramkey"></td>
879 <td></td>
880 <td class="paramtype">uint&#160;</td>
881 <td class="paramname"><em>dst_stride_y</em>, </td>
882 </tr>
883 <tr>
884 <td class="paramkey"></td>
885 <td></td>
886 <td class="paramtype">uint&#160;</td>
887 <td class="paramname"><em>dst_step_y</em>, </td>
888 </tr>
889 <tr>
890 <td class="paramkey"></td>
891 <td></td>
892 <td class="paramtype">uint&#160;</td>
893 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
894 </tr>
895 <tr>
896 <td></td>
897 <td>)</td>
898 <td></td><td></td>
899 </tr>
900 </table>
901</div><div class="memdoc">
902
903<p>Apply a 5x1 static convolution matrix to a single channel U8 input image and output a single channel image. </p>
904<dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients (MAT5, MAT6, MAT7, MAT8, MAT9, SCALE), COMPUTE_TYPE and DATA_TYPE_OUT need to be passed at compile time:<br />
905e.g. -DMAT5=1 -DMAT6=2, -DMAT7=3, -DMAT8=4, -DMAT9=5, -DSCALE=6, -DCOMPUTE_TYPE=int, -DDATA_TYPE_OUT=int</dd></dl>
906<dl class="params"><dt>Parameters</dt><dd>
907 <table class="params">
908 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U16, S16, S32 </td></tr>
909 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_x</td><td>Stride of the source image in X dimension (in bytes) </td></tr>
910 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_x</td><td>src_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
911 <tr><td class="paramdir">[in]</td><td class="paramname">src_stride_y</td><td>Stride of the source image in Y dimension (in bytes) </td></tr>
912 <tr><td class="paramdir">[in]</td><td class="paramname">src_step_y</td><td>src_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
913 <tr><td class="paramdir">[in]</td><td class="paramname">src_offset_first_element_in_bytes</td><td>The offset of the first element in the source image </td></tr>
914 <tr><td class="paramdir">[out]</td><td class="paramname">dst_ptr</td><td>Pointer to the destination image. Supported data types: U8, S16 </td></tr>
915 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_x</td><td>Stride of the destination image in X dimension (in bytes) </td></tr>
916 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_x</td><td>dst_stride_x * number of elements along X processed per workitem(in bytes) </td></tr>
917 <tr><td class="paramdir">[in]</td><td class="paramname">dst_stride_y</td><td>Stride of the destination image in Y dimension (in bytes) </td></tr>
918 <tr><td class="paramdir">[in]</td><td class="paramname">dst_step_y</td><td>dst_stride_y * number of elements along Y processed per workitem(in bytes) </td></tr>
919 <tr><td class="paramdir">[in]</td><td class="paramname">dst_offset_first_element_in_bytes</td><td>The offset of the first element in the destination image </td></tr>
920 </table>
921 </dd>
922</dl>
923
924<p>Definition at line <a class="el" href="convolution5x5_8cl_source.xhtml#l00238">238</a> of file <a class="el" href="convolution5x5_8cl_source.xhtml">convolution5x5.cl</a>.</p>
925
926<p>References <a class="el" href="convolution5x5_8cl_source.xhtml#l00031">COMPUTE_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00038">CONVERT_SAT</a>, <a class="el" href="helpers_8h_source.xhtml#l00073">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00087">convolution5x1()</a>, <a class="el" href="convolution5x5_8cl_source.xhtml#l00035">DATA_TYPE_OUT</a>, <a class="el" href="helpers_8h_source.xhtml#l00097">Image::ptr</a>, and <a class="el" href="helpers_8h_source.xhtml#l00032">VEC_DATA_TYPE</a>.</p>
927<div class="fragment"><div class="line"><a name="l00241"></a><span class="lineno"> 241</span>&#160;{</div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> src = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(src);</div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span>&#160; <a class="code" href="struct_image.xhtml">Image</a> dst = <a class="code" href="helpers_8h.xhtml#aebe814363556c244be043b13e7969197">CONVERT_TO_IMAGE_STRUCT</a>(dst);</div><div class="line"><a name="l00244"></a><span class="lineno"> 244</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno"> 245</span>&#160; <span class="comment">// Output pixels</span></div><div class="line"><a name="l00246"></a><span class="lineno"> 246</span>&#160; <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8)</div><div class="line"><a name="l00247"></a><span class="lineno"> 247</span>&#160; pixels = <a class="code" href="convolution5x5_8cl.xhtml#af8d82290182db5e89de313121bbb22d2">convolution5x1</a>(&amp;src, MAT5, MAT6, MAT7, MAT8, MAT9);</div><div class="line"><a name="l00248"></a><span class="lineno"> 248</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno"> 249</span>&#160; <span class="comment">// Divide by the scale</span></div><div class="line"><a name="l00250"></a><span class="lineno"> 250</span>&#160; pixels /= (<a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8))SCALE;</div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>&#160; <span class="comment">// Store result in dst</span></div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span>&#160; vstore8(<a class="code" href="helpers_8h.xhtml#a23fb01b6f3453cc0e48a026fd44f6acd">CONVERT_SAT</a>(pixels, <a class="code" href="helpers_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution5x5_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 8)), 0, (__global DATA_TYPE_OUT *)dst.ptr);</div><div class="line"><a name="l00254"></a><span class="lineno"> 254</span>&#160;}</div><div class="ttc" id="convolution5x5_8cl_xhtml_af8d82290182db5e89de313121bbb22d2"><div class="ttname"><a href="convolution5x5_8cl.xhtml#af8d82290182db5e89de313121bbb22d2">convolution5x1</a></div><div class="ttdeci">int8 convolution5x1(Image *src, const short up1_coeff, const short up2_coeff, const short middle_coeff, const short down1_coeff, const short down2_coeff)</div><div class="ttdoc">Compute a 1D vertical convolution of size 5 for 8 bytes assuming the input is made of 1 channel of 1 ...</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00087">convolution5x5.cl:87</a></div></div>
928<div class="ttc" id="convolution5x5_8cl_xhtml_a26babb0c719990ecbdf3abc6de920875"><div class="ttname"><a href="convolution5x5_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a></div><div class="ttdeci">#define COMPUTE_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00031">convolution5x5.cl:31</a></div></div>
929<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>
930<div class="ttc" id="helpers_8h_xhtml_a36f754c05b6fddf6df0d8d0a74f8159f"><div class="ttname"><a href="helpers_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="helpers_8h_source.xhtml#l00032">helpers.h:32</a></div></div>
931<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>
932<div class="ttc" id="helpers_8h_xhtml_a23fb01b6f3453cc0e48a026fd44f6acd"><div class="ttname"><a href="helpers_8h.xhtml#a23fb01b6f3453cc0e48a026fd44f6acd">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="helpers_8h_source.xhtml#l00038">helpers.h:38</a></div></div>
933<div class="ttc" id="convolution5x5_8cl_xhtml_ac06f3e24d3fffd3c465d8b2a6e7c985e"><div class="ttname"><a href="convolution5x5_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a></div><div class="ttdeci">#define DATA_TYPE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="convolution5x5_8cl_source.xhtml#l00035">convolution5x5.cl:35</a></div></div>
934</div><!-- fragment -->
935</div>
936</div>
937</div><!-- contents -->
938</div><!-- doc-content -->
939<!-- start footer part -->
940<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
941 <ul>
942 <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="convolution5x5_8cl.xhtml">convolution5x5.cl</a></li>
Anthony Barbierdbdab852017-06-23 15:42:00 +0100943 <li class="footer">Generated on Fri Jun 23 2017 15:44:34 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +0000944 <a href="http://www.doxygen.org/index.html">
945 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
946 </ul>
947</div>
948</body>
949</html>