blob: 84ff047b12f8f30466a60ca9e945ce0e87730323 [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/convolution7x7.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
Kaizenbf8b01d2017-10-12 14:26:51 +010041 &#160;<span id="projectnumber">17.10</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('convolution7x7_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">convolution7x7.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="convolution7x7_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>
127<tr class="memitem:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>&#160;&#160;&#160;short</td></tr>
128<tr class="separator:afb8c72ce35c4a1f4a2588d6573e54aa1"><td class="memSeparator" colspan="2">&#160;</td></tr>
129<tr class="memitem:a26babb0c719990ecbdf3abc6de920875"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>&#160;&#160;&#160;int</td></tr>
130<tr class="separator:a26babb0c719990ecbdf3abc6de920875"><td class="memSeparator" colspan="2">&#160;</td></tr>
131<tr class="memitem:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>&#160;&#160;&#160;uchar</td></tr>
132<tr class="separator:ac06f3e24d3fffd3c465d8b2a6e7c985e"><td class="memSeparator" colspan="2">&#160;</td></tr>
133</table><table class="memberdecls">
134<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
135Functions</h2></td></tr>
136<tr class="memitem:a7cedca46bfb1e16a870477a88ce93b9c"><td class="memItemLeft" align="right" valign="top">short8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a> (__global const uchar *left_pixel, const short left1_coeff, const short left2_coeff, const short left3_coeff, const short middle_coeff, const short right1_coeff, const short right2_coeff, const short right3_coeff)</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100137<tr class="memdesc:a7cedca46bfb1e16a870477a88ce93b9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute a 1D horizontal convolution of size 7 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). <a href="#a7cedca46bfb1e16a870477a88ce93b9c">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000138<tr class="separator:a7cedca46bfb1e16a870477a88ce93b9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
139<tr class="memitem:a8946e11bc6019e8dd7d06b00d27a5b1b"><td class="memItemLeft" align="right" valign="top">int8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#a8946e11bc6019e8dd7d06b00d27a5b1b">convolution7x1</a> (<a class="el" href="struct_image.xhtml">Image</a> *src, const short up1_coeff, const short up2_coeff, const short up3_coeff, const short middle_coeff, const short down1_coeff, const short down2_coeff, const short down3_coeff)</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100140<tr class="memdesc:a8946e11bc6019e8dd7d06b00d27a5b1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute a 1D vertical convolution of size 7 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). <a href="#a8946e11bc6019e8dd7d06b00d27a5b1b">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000141<tr class="separator:a8946e11bc6019e8dd7d06b00d27a5b1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
142<tr class="memitem:abda5491f14bab2d88026e3174a2151c2"><td class="memItemLeft" align="right" valign="top">short8&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#abda5491f14bab2d88026e3174a2151c2">convolution7x7</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, const short mat25, const short mat26, const short mat27, const short mat28, const short mat29, const short mat30, const short mat31, const short mat32, const short mat33, const short mat34, const short mat35, const short mat36, const short mat37, const short mat38, const short mat39, const short mat40, const short mat41, const short mat42, const short mat43, const short mat44, const short mat45, const short mat46, const short mat47, const short mat48, uint scale)</td></tr>
Kaizen8938bd32017-09-28 14:38:23 +0100143<tr class="memdesc:abda5491f14bab2d88026e3174a2151c2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 7x7 convolution matrix to a single channel U8 input image and return the result. <a href="#abda5491f14bab2d88026e3174a2151c2">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000144<tr class="separator:abda5491f14bab2d88026e3174a2151c2"><td class="memSeparator" colspan="2">&#160;</td></tr>
145<tr class="memitem:af82c3330f3fbf7caa9229ffd9a4149fb"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#af82c3330f3fbf7caa9229ffd9a4149fb">convolution_separable1x7_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>
Kaizen8938bd32017-09-28 14:38:23 +0100146<tr class="memdesc:af82c3330f3fbf7caa9229ffd9a4149fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 1x7 static convolution matrix to a single channel U8 input image and output a single temporary channel image. <a href="#af82c3330f3fbf7caa9229ffd9a4149fb">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000147<tr class="separator:af82c3330f3fbf7caa9229ffd9a4149fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
148<tr class="memitem:a27d964d8bf6620c7e9960e895df40ade"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#a27d964d8bf6620c7e9960e895df40ade">convolution_separable7x1_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>
Kaizen8938bd32017-09-28 14:38:23 +0100149<tr class="memdesc:a27d964d8bf6620c7e9960e895df40ade"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a 7x1 static convolution matrix to a single channel U8 input image and output a single channel image. <a href="#a27d964d8bf6620c7e9960e895df40ade">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000150<tr class="separator:a27d964d8bf6620c7e9960e895df40ade"><td class="memSeparator" colspan="2">&#160;</td></tr>
151<tr class="memitem:aac65ae3322d90d7b270614f331ef600e"><td class="memItemLeft" align="right" valign="top">__kernel void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="convolution7x7_8cl.xhtml#aac65ae3322d90d7b270614f331ef600e">convolution7x7_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>
Kaizen8938bd32017-09-28 14:38:23 +0100152<tr class="memdesc:aac65ae3322d90d7b270614f331ef600e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply a static 7x7 convolution matrix to a single channel U8 input image and output a single channel U8 image including the borders. <a href="#aac65ae3322d90d7b270614f331ef600e">More...</a><br/></td></tr>
Anthony Barbier871448e2017-03-24 14:54:29 +0000153<tr class="separator:aac65ae3322d90d7b270614f331ef600e"><td class="memSeparator" colspan="2">&#160;</td></tr>
154</table>
155<h2 class="groupheader">Macro Definition Documentation</h2>
156<a class="anchor" id="a26babb0c719990ecbdf3abc6de920875"></a>
157<div class="memitem">
158<div class="memproto">
159 <table class="memname">
160 <tr>
161 <td class="memname">#define COMPUTE_TYPE&#160;&#160;&#160;int</td>
162 </tr>
163 </table>
164</div><div class="memdoc">
165
166<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00031">31</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
167
Kaizen8938bd32017-09-28 14:38:23 +0100168<p>Referenced by <a class="el" href="convolution7x7_8cl_source.xhtml#l00097">convolution7x1()</a>, and <a class="el" href="convolution7x7_8cl_source.xhtml#l00287">convolution_separable7x1_static()</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000169
170</div>
171</div>
172<a class="anchor" id="afb8c72ce35c4a1f4a2588d6573e54aa1"></a>
173<div class="memitem">
174<div class="memproto">
175 <table class="memname">
176 <tr>
177 <td class="memname">#define DATA_TYPE&#160;&#160;&#160;short</td>
178 </tr>
179 </table>
180</div><div class="memdoc">
181
182<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00027">27</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
183
184<p>Referenced by <a class="el" href="convolution7x7_8cl_source.xhtml#l00052">convolution1x7()</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00097">convolution7x1()</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00202">convolution7x7()</a>, and <a class="el" href="convolution7x7_8cl_source.xhtml#l00254">convolution_separable1x7_static()</a>.</p>
185
186</div>
187</div>
188<a class="anchor" id="ac06f3e24d3fffd3c465d8b2a6e7c985e"></a>
189<div class="memitem">
190<div class="memproto">
191 <table class="memname">
192 <tr>
193 <td class="memname">#define DATA_TYPE_OUT&#160;&#160;&#160;uchar</td>
194 </tr>
195 </table>
196</div><div class="memdoc">
197
198<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00035">35</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
199
200<p>Referenced by <a class="el" href="convolution7x7_8cl_source.xhtml#l00323">convolution7x7_static()</a>, and <a class="el" href="convolution7x7_8cl_source.xhtml#l00287">convolution_separable7x1_static()</a>.</p>
201
202</div>
203</div>
204<h2 class="groupheader">Function Documentation</h2>
205<a class="anchor" id="a7cedca46bfb1e16a870477a88ce93b9c"></a>
206<div class="memitem">
207<div class="memproto">
208 <table class="memname">
209 <tr>
210 <td class="memname">short8 convolution1x7 </td>
211 <td>(</td>
212 <td class="paramtype">__global const uchar *&#160;</td>
213 <td class="paramname"><em>left_pixel</em>, </td>
214 </tr>
215 <tr>
216 <td class="paramkey"></td>
217 <td></td>
218 <td class="paramtype">const short&#160;</td>
219 <td class="paramname"><em>left1_coeff</em>, </td>
220 </tr>
221 <tr>
222 <td class="paramkey"></td>
223 <td></td>
224 <td class="paramtype">const short&#160;</td>
225 <td class="paramname"><em>left2_coeff</em>, </td>
226 </tr>
227 <tr>
228 <td class="paramkey"></td>
229 <td></td>
230 <td class="paramtype">const short&#160;</td>
231 <td class="paramname"><em>left3_coeff</em>, </td>
232 </tr>
233 <tr>
234 <td class="paramkey"></td>
235 <td></td>
236 <td class="paramtype">const short&#160;</td>
237 <td class="paramname"><em>middle_coeff</em>, </td>
238 </tr>
239 <tr>
240 <td class="paramkey"></td>
241 <td></td>
242 <td class="paramtype">const short&#160;</td>
243 <td class="paramname"><em>right1_coeff</em>, </td>
244 </tr>
245 <tr>
246 <td class="paramkey"></td>
247 <td></td>
248 <td class="paramtype">const short&#160;</td>
249 <td class="paramname"><em>right2_coeff</em>, </td>
250 </tr>
251 <tr>
252 <td class="paramkey"></td>
253 <td></td>
254 <td class="paramtype">const short&#160;</td>
255 <td class="paramname"><em>right3_coeff</em>&#160;</td>
256 </tr>
257 <tr>
258 <td></td>
259 <td>)</td>
260 <td></td><td></td>
261 </tr>
262 </table>
263</div><div class="memdoc">
264
265<p>Compute a 1D horizontal convolution of size 7 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). </p>
266<dl class="params"><dt>Parameters</dt><dd>
267 <table class="params">
268 <tr><td class="paramdir">[in]</td><td class="paramname">left_pixel</td><td>Pointer to the left pixel </td></tr>
269 <tr><td class="paramdir">[in]</td><td class="paramname">left1_coeff</td><td>Weight of the most left pixel </td></tr>
270 <tr><td class="paramdir">[in]</td><td class="paramname">left2_coeff</td><td>Weight of the second left pixel </td></tr>
271 <tr><td class="paramdir">[in]</td><td class="paramname">left3_coeff</td><td>Weight of the left pixel </td></tr>
272 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff</td><td>Weight of the middle pixel </td></tr>
273 <tr><td class="paramdir">[in]</td><td class="paramname">right1_coeff</td><td>Weight of the right pixel </td></tr>
274 <tr><td class="paramdir">[in]</td><td class="paramname">right2_coeff</td><td>Weight of the second right pixel </td></tr>
275 <tr><td class="paramdir">[in]</td><td class="paramname">right3_coeff</td><td>Weight of the most right pixel</td></tr>
276 </table>
277 </dd>
278</dl>
279<dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted values. </dd></dl>
280
281<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00052">52</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
282
Kaizen8938bd32017-09-28 14:38:23 +0100283<p>References <a class="el" href="fixed__point_8h_source.xhtml#l00098">CONVERT</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00027">DATA_TYPE</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000284
285<p>Referenced by <a class="el" href="convolution7x7_8cl_source.xhtml#l00202">convolution7x7()</a>, <a class="el" href="convolution__rectangle_8cl_source.xhtml#l00064">convolution_rectangle()</a>, and <a class="el" href="convolution7x7_8cl_source.xhtml#l00254">convolution_separable1x7_static()</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100286<div class="fragment"><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>&#160;{</div>
287<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>&#160; uchar16 temp = vload16(0, left_pixel);</div>
288<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div>
289<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div>
290<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; left1 = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s01234567, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8));</div>
291<div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div>
292<div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; left2 = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s12345678, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div>
293<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div>
294<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; left3 = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s23456789, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div>
295<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div>
296<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; middle = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s3456789a, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div>
297<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div>
298<div class="line"><a name="l00073"></a><span class="lineno"> 73</span>&#160; right1 = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s456789ab, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div>
299<div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div>
300<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160; right2 = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s56789abc, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div>
301<div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8)</div>
302<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>&#160; right3 = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(temp.s6789abcd, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8));</div>
303<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>&#160;</div>
304<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>&#160; return left1 * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))left1_coeff + left2 * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))left2_coeff + left3 * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))left3_coeff + middle * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE,</div>
305<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>&#160; 8))middle_coeff + right1 * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))right1_coeff + right2 * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))right2_coeff + right3 * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(DATA_TYPE, 8))right3_coeff;</div>
306<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>&#160;}</div>
307<div class="ttc" id="fixed__point_8h_xhtml_aa8d95ba04fc73845abc6045952cae5be"><div class="ttname"><a href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a></div><div class="ttdeci">#define CONVERT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00098">fixed_point.h:98</a></div></div>
308<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 +0000309<div class="ttc" id="convolution7x7_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00027">convolution7x7.cl:27</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000310</div><!-- fragment -->
311</div>
312</div>
313<a class="anchor" id="a8946e11bc6019e8dd7d06b00d27a5b1b"></a>
314<div class="memitem">
315<div class="memproto">
316 <table class="memname">
317 <tr>
318 <td class="memname">int8 convolution7x1 </td>
319 <td>(</td>
320 <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> *&#160;</td>
321 <td class="paramname"><em>src</em>, </td>
322 </tr>
323 <tr>
324 <td class="paramkey"></td>
325 <td></td>
326 <td class="paramtype">const short&#160;</td>
327 <td class="paramname"><em>up1_coeff</em>, </td>
328 </tr>
329 <tr>
330 <td class="paramkey"></td>
331 <td></td>
332 <td class="paramtype">const short&#160;</td>
333 <td class="paramname"><em>up2_coeff</em>, </td>
334 </tr>
335 <tr>
336 <td class="paramkey"></td>
337 <td></td>
338 <td class="paramtype">const short&#160;</td>
339 <td class="paramname"><em>up3_coeff</em>, </td>
340 </tr>
341 <tr>
342 <td class="paramkey"></td>
343 <td></td>
344 <td class="paramtype">const short&#160;</td>
345 <td class="paramname"><em>middle_coeff</em>, </td>
346 </tr>
347 <tr>
348 <td class="paramkey"></td>
349 <td></td>
350 <td class="paramtype">const short&#160;</td>
351 <td class="paramname"><em>down1_coeff</em>, </td>
352 </tr>
353 <tr>
354 <td class="paramkey"></td>
355 <td></td>
356 <td class="paramtype">const short&#160;</td>
357 <td class="paramname"><em>down2_coeff</em>, </td>
358 </tr>
359 <tr>
360 <td class="paramkey"></td>
361 <td></td>
362 <td class="paramtype">const short&#160;</td>
363 <td class="paramname"><em>down3_coeff</em>&#160;</td>
364 </tr>
365 <tr>
366 <td></td>
367 <td>)</td>
368 <td></td><td></td>
369 </tr>
370 </table>
371</div><div class="memdoc">
372
373<p>Compute a 1D vertical convolution of size 7 for 8 bytes assuming the input is made of 1 channel of 1 byte (i.e 8 pixels). </p>
374<dl class="params"><dt>Parameters</dt><dd>
375 <table class="params">
376 <tr><td class="paramdir">[in]</td><td class="paramname">src</td><td>Pointer to source image. </td></tr>
377 <tr><td class="paramdir">[in]</td><td class="paramname">up1_coeff</td><td>Weight of the most up pixel </td></tr>
378 <tr><td class="paramdir">[in]</td><td class="paramname">up2_coeff</td><td>Weight of the second up pixel </td></tr>
379 <tr><td class="paramdir">[in]</td><td class="paramname">up3_coeff</td><td>Weight of the up pixel </td></tr>
380 <tr><td class="paramdir">[in]</td><td class="paramname">middle_coeff</td><td>Weight of the middle pixel </td></tr>
381 <tr><td class="paramdir">[in]</td><td class="paramname">down1_coeff</td><td>Weight of the down pixel </td></tr>
382 <tr><td class="paramdir">[in]</td><td class="paramname">down2_coeff</td><td>Weight of the second down pixel </td></tr>
383 <tr><td class="paramdir">[in]</td><td class="paramname">down3_coeff</td><td>Weight of the third down pixel</td></tr>
384 </table>
385 </dd>
386</dl>
387<dl class="section return"><dt>Returns</dt><dd>a short8 containing 8 convoluted values. </dd></dl>
388
389<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00097">97</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
390
Kaizenbf8b01d2017-10-12 14:26:51 +0100391<p>References <a class="el" href="convolution7x7_8cl_source.xhtml#l00031">COMPUTE_TYPE</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00098">CONVERT</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00295">offset()</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000392
393<p>Referenced by <a class="el" href="convolution7x7_8cl_source.xhtml#l00287">convolution_separable7x1_static()</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100394<div class="fragment"><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160;{</div>
395<div class="line"><a name="l00107"></a><span class="lineno"> 107</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8)</div>
396<div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160; val;</div>
397<div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8)</div>
398<div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; out = (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))0;</div>
399<div class="line"><a name="l00111"></a><span class="lineno"> 111</span>&#160;</div>
400<div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; val = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, -3)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div>
401<div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; out += val * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))up1_coeff;</div>
402<div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160;</div>
403<div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; val = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, -2)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div>
404<div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160; out += val * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))up2_coeff;</div>
405<div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div>
406<div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160; val = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, -1)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div>
407<div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160; out += val * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))up3_coeff;</div>
408<div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div>
409<div class="line"><a name="l00121"></a><span class="lineno"> 121</span>&#160; val = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 0)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div>
410<div class="line"><a name="l00122"></a><span class="lineno"> 122</span>&#160; out += val * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))middle_coeff;</div>
411<div class="line"><a name="l00123"></a><span class="lineno"> 123</span>&#160;</div>
412<div class="line"><a name="l00124"></a><span class="lineno"> 124</span>&#160; val = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 1)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div>
413<div class="line"><a name="l00125"></a><span class="lineno"> 125</span>&#160; out += val * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))down1_coeff;</div>
414<div class="line"><a name="l00126"></a><span class="lineno"> 126</span>&#160;</div>
415<div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; val = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 2)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div>
416<div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160; out += val * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))down2_coeff;</div>
417<div class="line"><a name="l00129"></a><span class="lineno"> 129</span>&#160;</div>
418<div class="line"><a name="l00130"></a><span class="lineno"> 130</span>&#160; val = <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(vload8(0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, 0, 3)), <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8));</div>
419<div class="line"><a name="l00131"></a><span class="lineno"> 131</span>&#160; out += val * (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(COMPUTE_TYPE, 8))down3_coeff;</div>
420<div class="line"><a name="l00132"></a><span class="lineno"> 132</span>&#160;</div>
421<div class="line"><a name="l00133"></a><span class="lineno"> 133</span>&#160; return out;</div>
422<div class="line"><a name="l00134"></a><span class="lineno"> 134</span>&#160;}</div>
423<div class="ttc" id="fixed__point_8h_xhtml_aa8d95ba04fc73845abc6045952cae5be"><div class="ttname"><a href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a></div><div class="ttdeci">#define CONVERT(x, type)</div><div class="ttdef"><b>Definition:</b> <a href="fixed__point_8h_source.xhtml#l00098">fixed_point.h:98</a></div></div>
424<div class="ttc" id="convolution7x7_8cl_xhtml_a26babb0c719990ecbdf3abc6de920875"><div class="ttname"><a href="convolution7x7_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a></div><div class="ttdeci">#define COMPUTE_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00031">convolution7x7.cl:31</a></div></div>
Kaizenbf8b01d2017-10-12 14:26:51 +0100425<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#l00295">helpers.h:295</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100426<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 +0000427<div class="ttc" id="convolution7x7_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00027">convolution7x7.cl:27</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000428</div><!-- fragment -->
429</div>
430</div>
431<a class="anchor" id="abda5491f14bab2d88026e3174a2151c2"></a>
432<div class="memitem">
433<div class="memproto">
434 <table class="memname">
435 <tr>
436 <td class="memname">short8 convolution7x7 </td>
437 <td>(</td>
438 <td class="paramtype"><a class="el" href="struct_image.xhtml">Image</a> *&#160;</td>
439 <td class="paramname"><em>src</em>, </td>
440 </tr>
441 <tr>
442 <td class="paramkey"></td>
443 <td></td>
444 <td class="paramtype">const short&#160;</td>
445 <td class="paramname"><em>mat0</em>, </td>
446 </tr>
447 <tr>
448 <td class="paramkey"></td>
449 <td></td>
450 <td class="paramtype">const short&#160;</td>
451 <td class="paramname"><em>mat1</em>, </td>
452 </tr>
453 <tr>
454 <td class="paramkey"></td>
455 <td></td>
456 <td class="paramtype">const short&#160;</td>
457 <td class="paramname"><em>mat2</em>, </td>
458 </tr>
459 <tr>
460 <td class="paramkey"></td>
461 <td></td>
462 <td class="paramtype">const short&#160;</td>
463 <td class="paramname"><em>mat3</em>, </td>
464 </tr>
465 <tr>
466 <td class="paramkey"></td>
467 <td></td>
468 <td class="paramtype">const short&#160;</td>
469 <td class="paramname"><em>mat4</em>, </td>
470 </tr>
471 <tr>
472 <td class="paramkey"></td>
473 <td></td>
474 <td class="paramtype">const short&#160;</td>
475 <td class="paramname"><em>mat5</em>, </td>
476 </tr>
477 <tr>
478 <td class="paramkey"></td>
479 <td></td>
480 <td class="paramtype">const short&#160;</td>
481 <td class="paramname"><em>mat6</em>, </td>
482 </tr>
483 <tr>
484 <td class="paramkey"></td>
485 <td></td>
486 <td class="paramtype">const short&#160;</td>
487 <td class="paramname"><em>mat7</em>, </td>
488 </tr>
489 <tr>
490 <td class="paramkey"></td>
491 <td></td>
492 <td class="paramtype">const short&#160;</td>
493 <td class="paramname"><em>mat8</em>, </td>
494 </tr>
495 <tr>
496 <td class="paramkey"></td>
497 <td></td>
498 <td class="paramtype">const short&#160;</td>
499 <td class="paramname"><em>mat9</em>, </td>
500 </tr>
501 <tr>
502 <td class="paramkey"></td>
503 <td></td>
504 <td class="paramtype">const short&#160;</td>
505 <td class="paramname"><em>mat10</em>, </td>
506 </tr>
507 <tr>
508 <td class="paramkey"></td>
509 <td></td>
510 <td class="paramtype">const short&#160;</td>
511 <td class="paramname"><em>mat11</em>, </td>
512 </tr>
513 <tr>
514 <td class="paramkey"></td>
515 <td></td>
516 <td class="paramtype">const short&#160;</td>
517 <td class="paramname"><em>mat12</em>, </td>
518 </tr>
519 <tr>
520 <td class="paramkey"></td>
521 <td></td>
522 <td class="paramtype">const short&#160;</td>
523 <td class="paramname"><em>mat13</em>, </td>
524 </tr>
525 <tr>
526 <td class="paramkey"></td>
527 <td></td>
528 <td class="paramtype">const short&#160;</td>
529 <td class="paramname"><em>mat14</em>, </td>
530 </tr>
531 <tr>
532 <td class="paramkey"></td>
533 <td></td>
534 <td class="paramtype">const short&#160;</td>
535 <td class="paramname"><em>mat15</em>, </td>
536 </tr>
537 <tr>
538 <td class="paramkey"></td>
539 <td></td>
540 <td class="paramtype">const short&#160;</td>
541 <td class="paramname"><em>mat16</em>, </td>
542 </tr>
543 <tr>
544 <td class="paramkey"></td>
545 <td></td>
546 <td class="paramtype">const short&#160;</td>
547 <td class="paramname"><em>mat17</em>, </td>
548 </tr>
549 <tr>
550 <td class="paramkey"></td>
551 <td></td>
552 <td class="paramtype">const short&#160;</td>
553 <td class="paramname"><em>mat18</em>, </td>
554 </tr>
555 <tr>
556 <td class="paramkey"></td>
557 <td></td>
558 <td class="paramtype">const short&#160;</td>
559 <td class="paramname"><em>mat19</em>, </td>
560 </tr>
561 <tr>
562 <td class="paramkey"></td>
563 <td></td>
564 <td class="paramtype">const short&#160;</td>
565 <td class="paramname"><em>mat20</em>, </td>
566 </tr>
567 <tr>
568 <td class="paramkey"></td>
569 <td></td>
570 <td class="paramtype">const short&#160;</td>
571 <td class="paramname"><em>mat21</em>, </td>
572 </tr>
573 <tr>
574 <td class="paramkey"></td>
575 <td></td>
576 <td class="paramtype">const short&#160;</td>
577 <td class="paramname"><em>mat22</em>, </td>
578 </tr>
579 <tr>
580 <td class="paramkey"></td>
581 <td></td>
582 <td class="paramtype">const short&#160;</td>
583 <td class="paramname"><em>mat23</em>, </td>
584 </tr>
585 <tr>
586 <td class="paramkey"></td>
587 <td></td>
588 <td class="paramtype">const short&#160;</td>
589 <td class="paramname"><em>mat24</em>, </td>
590 </tr>
591 <tr>
592 <td class="paramkey"></td>
593 <td></td>
594 <td class="paramtype">const short&#160;</td>
595 <td class="paramname"><em>mat25</em>, </td>
596 </tr>
597 <tr>
598 <td class="paramkey"></td>
599 <td></td>
600 <td class="paramtype">const short&#160;</td>
601 <td class="paramname"><em>mat26</em>, </td>
602 </tr>
603 <tr>
604 <td class="paramkey"></td>
605 <td></td>
606 <td class="paramtype">const short&#160;</td>
607 <td class="paramname"><em>mat27</em>, </td>
608 </tr>
609 <tr>
610 <td class="paramkey"></td>
611 <td></td>
612 <td class="paramtype">const short&#160;</td>
613 <td class="paramname"><em>mat28</em>, </td>
614 </tr>
615 <tr>
616 <td class="paramkey"></td>
617 <td></td>
618 <td class="paramtype">const short&#160;</td>
619 <td class="paramname"><em>mat29</em>, </td>
620 </tr>
621 <tr>
622 <td class="paramkey"></td>
623 <td></td>
624 <td class="paramtype">const short&#160;</td>
625 <td class="paramname"><em>mat30</em>, </td>
626 </tr>
627 <tr>
628 <td class="paramkey"></td>
629 <td></td>
630 <td class="paramtype">const short&#160;</td>
631 <td class="paramname"><em>mat31</em>, </td>
632 </tr>
633 <tr>
634 <td class="paramkey"></td>
635 <td></td>
636 <td class="paramtype">const short&#160;</td>
637 <td class="paramname"><em>mat32</em>, </td>
638 </tr>
639 <tr>
640 <td class="paramkey"></td>
641 <td></td>
642 <td class="paramtype">const short&#160;</td>
643 <td class="paramname"><em>mat33</em>, </td>
644 </tr>
645 <tr>
646 <td class="paramkey"></td>
647 <td></td>
648 <td class="paramtype">const short&#160;</td>
649 <td class="paramname"><em>mat34</em>, </td>
650 </tr>
651 <tr>
652 <td class="paramkey"></td>
653 <td></td>
654 <td class="paramtype">const short&#160;</td>
655 <td class="paramname"><em>mat35</em>, </td>
656 </tr>
657 <tr>
658 <td class="paramkey"></td>
659 <td></td>
660 <td class="paramtype">const short&#160;</td>
661 <td class="paramname"><em>mat36</em>, </td>
662 </tr>
663 <tr>
664 <td class="paramkey"></td>
665 <td></td>
666 <td class="paramtype">const short&#160;</td>
667 <td class="paramname"><em>mat37</em>, </td>
668 </tr>
669 <tr>
670 <td class="paramkey"></td>
671 <td></td>
672 <td class="paramtype">const short&#160;</td>
673 <td class="paramname"><em>mat38</em>, </td>
674 </tr>
675 <tr>
676 <td class="paramkey"></td>
677 <td></td>
678 <td class="paramtype">const short&#160;</td>
679 <td class="paramname"><em>mat39</em>, </td>
680 </tr>
681 <tr>
682 <td class="paramkey"></td>
683 <td></td>
684 <td class="paramtype">const short&#160;</td>
685 <td class="paramname"><em>mat40</em>, </td>
686 </tr>
687 <tr>
688 <td class="paramkey"></td>
689 <td></td>
690 <td class="paramtype">const short&#160;</td>
691 <td class="paramname"><em>mat41</em>, </td>
692 </tr>
693 <tr>
694 <td class="paramkey"></td>
695 <td></td>
696 <td class="paramtype">const short&#160;</td>
697 <td class="paramname"><em>mat42</em>, </td>
698 </tr>
699 <tr>
700 <td class="paramkey"></td>
701 <td></td>
702 <td class="paramtype">const short&#160;</td>
703 <td class="paramname"><em>mat43</em>, </td>
704 </tr>
705 <tr>
706 <td class="paramkey"></td>
707 <td></td>
708 <td class="paramtype">const short&#160;</td>
709 <td class="paramname"><em>mat44</em>, </td>
710 </tr>
711 <tr>
712 <td class="paramkey"></td>
713 <td></td>
714 <td class="paramtype">const short&#160;</td>
715 <td class="paramname"><em>mat45</em>, </td>
716 </tr>
717 <tr>
718 <td class="paramkey"></td>
719 <td></td>
720 <td class="paramtype">const short&#160;</td>
721 <td class="paramname"><em>mat46</em>, </td>
722 </tr>
723 <tr>
724 <td class="paramkey"></td>
725 <td></td>
726 <td class="paramtype">const short&#160;</td>
727 <td class="paramname"><em>mat47</em>, </td>
728 </tr>
729 <tr>
730 <td class="paramkey"></td>
731 <td></td>
732 <td class="paramtype">const short&#160;</td>
733 <td class="paramname"><em>mat48</em>, </td>
734 </tr>
735 <tr>
736 <td class="paramkey"></td>
737 <td></td>
738 <td class="paramtype">uint&#160;</td>
739 <td class="paramname"><em>scale</em>&#160;</td>
740 </tr>
741 <tr>
742 <td></td>
743 <td>)</td>
744 <td></td><td></td>
745 </tr>
746 </table>
747</div><div class="memdoc">
748
749<p>Apply a 7x7 convolution matrix to a single channel U8 input image and return the result. </p>
Kaizen8938bd32017-09-28 14:38:23 +0100750<p>Convolution matrix layout:<br/>
751[ mat0, mat1, mat2, mat3 , mat4, mat5, mat6 ]<br/>
752[ mat7, mat8, mat9, mat10, mat11, mat12, mat13 ]<br/>
753[ mat14, mat15, mat16, mat17, mat18, mat19, mat20 ]<br/>
754[ mat21, mat22, mat23, mat24, mat25, mat26, mat27 ]<br/>
755[ mat28, mat29, mat30, mat31, mat32, mat33, mat34 ]<br/>
756[ mat35, mat36, mat37, mat38, mat39, mat40, mat41 ]<br/>
Anthony Barbier871448e2017-03-24 14:54:29 +0000757[ mat42, mat43, mat44, mat45, mat46, mat47, mat48 ]</p>
758<dl class="params"><dt>Parameters</dt><dd>
759 <table class="params">
760 <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>
761 <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr>
762 <tr><td class="paramdir">[in]</td><td class="paramname">mat1</td><td>Coefficient from the convolution matrix </td></tr>
763 <tr><td class="paramdir">[in]</td><td class="paramname">mat2</td><td>Coefficient from the convolution matrix </td></tr>
764 <tr><td class="paramdir">[in]</td><td class="paramname">mat3</td><td>Coefficient from the convolution matrix </td></tr>
765 <tr><td class="paramdir">[in]</td><td class="paramname">mat4</td><td>Coefficient from the convolution matrix </td></tr>
766 <tr><td class="paramdir">[in]</td><td class="paramname">mat5</td><td>Coefficient from the convolution matrix </td></tr>
767 <tr><td class="paramdir">[in]</td><td class="paramname">mat6</td><td>Coefficient from the convolution matrix </td></tr>
768 <tr><td class="paramdir">[in]</td><td class="paramname">mat0</td><td>Coefficient from the convolution matrix </td></tr>
769 <tr><td class="paramdir">[in]</td><td class="paramname">mat7</td><td>Coefficient from the convolution matrix </td></tr>
770 <tr><td class="paramdir">[in]</td><td class="paramname">mat8</td><td>Coefficient from the convolution matrix </td></tr>
771 <tr><td class="paramdir">[in]</td><td class="paramname">mat9</td><td>Coefficient from the convolution matrix </td></tr>
772 <tr><td class="paramdir">[in]</td><td class="paramname">mat10</td><td>Coefficient from the convolution matrix </td></tr>
773 <tr><td class="paramdir">[in]</td><td class="paramname">mat11</td><td>Coefficient from the convolution matrix </td></tr>
774 <tr><td class="paramdir">[in]</td><td class="paramname">mat12</td><td>Coefficient from the convolution matrix </td></tr>
775 <tr><td class="paramdir">[in]</td><td class="paramname">mat13</td><td>Coefficient from the convolution matrix </td></tr>
776 <tr><td class="paramdir">[in]</td><td class="paramname">mat14</td><td>Coefficient from the convolution matrix </td></tr>
777 <tr><td class="paramdir">[in]</td><td class="paramname">mat15</td><td>Coefficient from the convolution matrix </td></tr>
778 <tr><td class="paramdir">[in]</td><td class="paramname">mat16</td><td>Coefficient from the convolution matrix </td></tr>
779 <tr><td class="paramdir">[in]</td><td class="paramname">mat10</td><td>Coefficient from the convolution matrix </td></tr>
780 <tr><td class="paramdir">[in]</td><td class="paramname">mat17</td><td>Coefficient from the convolution matrix </td></tr>
781 <tr><td class="paramdir">[in]</td><td class="paramname">mat18</td><td>Coefficient from the convolution matrix </td></tr>
782 <tr><td class="paramdir">[in]</td><td class="paramname">mat19</td><td>Coefficient from the convolution matrix </td></tr>
783 <tr><td class="paramdir">[in]</td><td class="paramname">mat20</td><td>Coefficient from the convolution matrix </td></tr>
784 <tr><td class="paramdir">[in]</td><td class="paramname">mat21</td><td>Coefficient from the convolution matrix </td></tr>
785 <tr><td class="paramdir">[in]</td><td class="paramname">mat22</td><td>Coefficient from the convolution matrix </td></tr>
786 <tr><td class="paramdir">[in]</td><td class="paramname">mat23</td><td>Coefficient from the convolution matrix </td></tr>
787 <tr><td class="paramdir">[in]</td><td class="paramname">mat24</td><td>Coefficient from the convolution matrix </td></tr>
788 <tr><td class="paramdir">[in]</td><td class="paramname">mat25</td><td>Coefficient from the convolution matrix </td></tr>
789 <tr><td class="paramdir">[in]</td><td class="paramname">mat26</td><td>Coefficient from the convolution matrix </td></tr>
790 <tr><td class="paramdir">[in]</td><td class="paramname">mat27</td><td>Coefficient from the convolution matrix </td></tr>
791 <tr><td class="paramdir">[in]</td><td class="paramname">mat28</td><td>Coefficient from the convolution matrix </td></tr>
792 <tr><td class="paramdir">[in]</td><td class="paramname">mat29</td><td>Coefficient from the convolution matrix </td></tr>
793 <tr><td class="paramdir">[in]</td><td class="paramname">mat30</td><td>Coefficient from the convolution matrix </td></tr>
794 <tr><td class="paramdir">[in]</td><td class="paramname">mat31</td><td>Coefficient from the convolution matrix </td></tr>
795 <tr><td class="paramdir">[in]</td><td class="paramname">mat32</td><td>Coefficient from the convolution matrix </td></tr>
796 <tr><td class="paramdir">[in]</td><td class="paramname">mat33</td><td>Coefficient from the convolution matrix </td></tr>
797 <tr><td class="paramdir">[in]</td><td class="paramname">mat34</td><td>Coefficient from the convolution matrix </td></tr>
798 <tr><td class="paramdir">[in]</td><td class="paramname">mat35</td><td>Coefficient from the convolution matrix </td></tr>
799 <tr><td class="paramdir">[in]</td><td class="paramname">mat36</td><td>Coefficient from the convolution matrix </td></tr>
800 <tr><td class="paramdir">[in]</td><td class="paramname">mat37</td><td>Coefficient from the convolution matrix </td></tr>
801 <tr><td class="paramdir">[in]</td><td class="paramname">mat38</td><td>Coefficient from the convolution matrix </td></tr>
802 <tr><td class="paramdir">[in]</td><td class="paramname">mat39</td><td>Coefficient from the convolution matrix </td></tr>
803 <tr><td class="paramdir">[in]</td><td class="paramname">mat40</td><td>Coefficient from the convolution matrix </td></tr>
804 <tr><td class="paramdir">[in]</td><td class="paramname">mat41</td><td>Coefficient from the convolution matrix </td></tr>
805 <tr><td class="paramdir">[in]</td><td class="paramname">mat42</td><td>Coefficient from the convolution matrix </td></tr>
806 <tr><td class="paramdir">[in]</td><td class="paramname">mat43</td><td>Coefficient from the convolution matrix </td></tr>
807 <tr><td class="paramdir">[in]</td><td class="paramname">mat44</td><td>Coefficient from the convolution matrix </td></tr>
808 <tr><td class="paramdir">[in]</td><td class="paramname">mat45</td><td>Coefficient from the convolution matrix </td></tr>
809 <tr><td class="paramdir">[in]</td><td class="paramname">mat46</td><td>Coefficient from the convolution matrix </td></tr>
810 <tr><td class="paramdir">[in]</td><td class="paramname">mat47</td><td>Coefficient from the convolution matrix </td></tr>
811 <tr><td class="paramdir">[in]</td><td class="paramname">mat48</td><td>Coefficient from the convolution matrix </td></tr>
812 <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>
813 </table>
814 </dd>
815</dl>
816
817<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00202">202</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
818
Kaizenbf8b01d2017-10-12 14:26:51 +0100819<p>References <a class="el" href="convolution7x7_8cl_source.xhtml#l00052">convolution1x7()</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00295">offset()</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Anthony Barbier871448e2017-03-24 14:54:29 +0000820
821<p>Referenced by <a class="el" href="convolution7x7_8cl_source.xhtml#l00323">convolution7x7_static()</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100822<div class="fragment"><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>&#160;{</div>
823<div class="line"><a name="l00215"></a><span class="lineno"> 215</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div>
824<div class="line"><a name="l00216"></a><span class="lineno"> 216</span>&#160; pixels;</div>
825<div class="line"><a name="l00217"></a><span class="lineno"> 217</span>&#160;</div>
826<div class="line"><a name="l00218"></a><span class="lineno"> 218</span>&#160; pixels = <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -3, -3), mat0, mat1, mat2, mat3, mat4, mat5, mat6);</div>
827<div class="line"><a name="l00219"></a><span class="lineno"> 219</span>&#160; pixels += <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -3, -2), mat7, mat8, mat9, mat10, mat11, mat12, mat13);</div>
828<div class="line"><a name="l00220"></a><span class="lineno"> 220</span>&#160; pixels += <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -3, -1), mat14, mat15, mat16, mat17, mat18, mat19, mat20);</div>
829<div class="line"><a name="l00221"></a><span class="lineno"> 221</span>&#160; pixels += <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -3, 0), mat21, mat22, mat23, mat24, mat25, mat26, mat27);</div>
830<div class="line"><a name="l00222"></a><span class="lineno"> 222</span>&#160; pixels += <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -3, 1), mat28, mat29, mat30, mat31, mat32, mat33, mat34);</div>
831<div class="line"><a name="l00223"></a><span class="lineno"> 223</span>&#160; pixels += <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -3, 2), mat35, mat36, mat37, mat38, mat39, mat40, mat41);</div>
832<div class="line"><a name="l00224"></a><span class="lineno"> 224</span>&#160; pixels += <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(src, -3, 3), mat42, mat43, mat44, mat45, mat46, mat47, mat48);</div>
833<div class="line"><a name="l00225"></a><span class="lineno"> 225</span>&#160;</div>
834<div class="line"><a name="l00226"></a><span class="lineno"> 226</span>&#160; if(<a class="code" href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">scale</a> &gt; 0)</div>
835<div class="line"><a name="l00227"></a><span class="lineno"> 227</span>&#160; {</div>
836<div class="line"><a name="l00228"></a><span class="lineno"> 228</span>&#160; pixels /= (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8))scale;</div>
837<div class="line"><a name="l00229"></a><span class="lineno"> 229</span>&#160; }</div>
838<div class="line"><a name="l00230"></a><span class="lineno"> 230</span>&#160;</div>
839<div class="line"><a name="l00231"></a><span class="lineno"> 231</span>&#160; <span class="keywordflow">return</span> convert_short8_sat(pixels);</div>
840<div class="line"><a name="l00232"></a><span class="lineno"> 232</span>&#160;}</div>
Kaizenbf8b01d2017-10-12 14:26:51 +0100841<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#l00295">helpers.h:295</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100842<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 +0000843<div class="ttc" id="convolution7x7_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00027">convolution7x7.cl:27</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100844<div class="ttc" id="namespacearm__compute_1_1test_1_1validation_1_1reference_xhtml_a2c08fc82f2e4b9733cd0dacd6eabe579"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation_1_1reference.xhtml#a2c08fc82f2e4b9733cd0dacd6eabe579">arm_compute::test::validation::reference::scale</a></div><div class="ttdeci">SimpleTensor&lt; T &gt; scale(const SimpleTensor&lt; T &gt; &amp;in, float scale_x, float scale_y, InterpolationPolicy policy, BorderMode border_mode, T constant_border_value)</div><div class="ttdef"><b>Definition:</b> <a href="_c_p_p_2_scale_8cpp_source.xhtml#l00039">Scale.cpp:39</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000845<div class="ttc" id="convolution7x7_8cl_xhtml_a7cedca46bfb1e16a870477a88ce93b9c"><div class="ttname"><a href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a></div><div class="ttdeci">short8 convolution1x7(__global const uchar *left_pixel, const short left1_coeff, const short left2_coeff, const short left3_coeff, const short middle_coeff, const short right1_coeff, const short right2_coeff, const short right3_coeff)</div><div class="ttdoc">Compute a 1D horizontal convolution of size 7 for 8 bytes assuming the input is made of 1 channel of ...</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00052">convolution7x7.cl:52</a></div></div>
846</div><!-- fragment -->
847</div>
848</div>
849<a class="anchor" id="aac65ae3322d90d7b270614f331ef600e"></a>
850<div class="memitem">
851<div class="memproto">
852 <table class="memname">
853 <tr>
854 <td class="memname">__kernel void convolution7x7_static </td>
855 <td>(</td>
856 <td class="paramtype">__global uchar *&#160;</td>
857 <td class="paramname"><em>src_ptr</em>, </td>
858 </tr>
859 <tr>
860 <td class="paramkey"></td>
861 <td></td>
862 <td class="paramtype">uint&#160;</td>
863 <td class="paramname"><em>src_stride_x</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>src_step_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>src_stride_y</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>src_step_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>src_offset_first_element_in_bytes</em>, </td>
888 </tr>
889 <tr>
890 <td class="paramkey"></td>
891 <td></td>
892 <td class="paramtype">__global uchar *&#160;</td>
893 <td class="paramname"><em>dst_ptr</em>, </td>
894 </tr>
895 <tr>
896 <td class="paramkey"></td>
897 <td></td>
898 <td class="paramtype">uint&#160;</td>
899 <td class="paramname"><em>dst_stride_x</em>, </td>
900 </tr>
901 <tr>
902 <td class="paramkey"></td>
903 <td></td>
904 <td class="paramtype">uint&#160;</td>
905 <td class="paramname"><em>dst_step_x</em>, </td>
906 </tr>
907 <tr>
908 <td class="paramkey"></td>
909 <td></td>
910 <td class="paramtype">uint&#160;</td>
911 <td class="paramname"><em>dst_stride_y</em>, </td>
912 </tr>
913 <tr>
914 <td class="paramkey"></td>
915 <td></td>
916 <td class="paramtype">uint&#160;</td>
917 <td class="paramname"><em>dst_step_y</em>, </td>
918 </tr>
919 <tr>
920 <td class="paramkey"></td>
921 <td></td>
922 <td class="paramtype">uint&#160;</td>
923 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
924 </tr>
925 <tr>
926 <td></td>
927 <td>)</td>
928 <td></td><td></td>
929 </tr>
930 </table>
931</div><div class="memdoc">
932
933<p>Apply a static 7x7 convolution matrix to a single channel U8 input image and output a single channel U8 image including the borders. </p>
Kaizen8938bd32017-09-28 14:38:23 +0100934<dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients(MAT0, MAT1, ... MAT48, SCALE), DATA_TYPE_OUT need to be passed at compile time:<br/>
Anthony Barbier871448e2017-03-24 14:54:29 +0000935e.g. -DMAT0=7 -DMAT1=8, ... -DMAT48=48, -DSCALE=6, -DDATA_TYPE_OUT=int</dd></dl>
936<dl class="params"><dt>Parameters</dt><dd>
937 <table class="params">
938 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U8 </td></tr>
939 <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>
940 <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>
941 <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>
942 <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>
943 <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>
944 <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>
945 <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>
946 <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>
947 <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>
948 <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>
949 <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>
950 </table>
951 </dd>
952</dl>
953
954<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00323">323</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
955
Kaizenbf8b01d2017-10-12 14:26:51 +0100956<p>References <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00040">CONVERT_SAT</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00202">convolution7x7()</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00035">DATA_TYPE_OUT</a>, <a class="el" href="helpers_8h_source.xhtml#l00136">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +0100957<div class="fragment"><div class="line"><a name="l00326"></a><span class="lineno"> 326</span>&#160;{</div>
958<div class="line"><a name="l00327"></a><span class="lineno"> 327</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>
959<div class="line"><a name="l00328"></a><span class="lineno"> 328</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>
960<div class="line"><a name="l00329"></a><span class="lineno"> 329</span>&#160;</div>
961<div class="line"><a name="l00330"></a><span class="lineno"> 330</span>&#160; short8 pixels = <a class="code" href="convolution7x7_8cl.xhtml#abda5491f14bab2d88026e3174a2151c2">convolution7x7</a>(&amp;src,</div>
962<div class="line"><a name="l00331"></a><span class="lineno"> 331</span>&#160; MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6, MAT7, MAT8, MAT9, MAT10, MAT11, MAT12, MAT13,</div>
963<div class="line"><a name="l00332"></a><span class="lineno"> 332</span>&#160; MAT14, MAT15, MAT16, MAT17, MAT18, MAT19, MAT20, MAT21, MAT22, MAT23, MAT24, MAT25,</div>
964<div class="line"><a name="l00333"></a><span class="lineno"> 333</span>&#160; MAT26, MAT27, MAT28, MAT29, MAT30, MAT31, MAT32, MAT33, MAT34, MAT35, MAT36, MAT37,</div>
965<div class="line"><a name="l00334"></a><span class="lineno"> 334</span>&#160; MAT38, MAT39, MAT40, MAT41, MAT42, MAT43, MAT44, MAT45, MAT46, MAT47, MAT48, SCALE);</div>
966<div class="line"><a name="l00335"></a><span class="lineno"> 335</span>&#160;</div>
967<div class="line"><a name="l00336"></a><span class="lineno"> 336</span>&#160; <span class="comment">// Clamp results to [ 0, 255 ] and store them in dst</span></div>
968<div class="line"><a name="l00337"></a><span class="lineno"> 337</span>&#160; vstore8(<a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>(pixels, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 8)), 0, (__global <a class="code" href="convolution7x7_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a> *)dst.<a class="code" href="struct_image.xhtml#acf52c23cbd7424606c10a606524e3e32">ptr</a>);</div>
969<div class="line"><a name="l00338"></a><span class="lineno"> 338</span>&#160;}</div>
970<div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00040">direct_convolution1x1.cl:40</a></div></div>
Kaizenbf8b01d2017-10-12 14:26:51 +0100971<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#l00096">helpers.h:96</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +0000972<div class="ttc" id="convolution7x7_8cl_xhtml_abda5491f14bab2d88026e3174a2151c2"><div class="ttname"><a href="convolution7x7_8cl.xhtml#abda5491f14bab2d88026e3174a2151c2">convolution7x7</a></div><div class="ttdeci">short8 convolution7x7(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, const short mat25, const short mat26, const short mat27, const short mat28, const short mat29, const short mat30, const short mat31, const short mat32, const short mat33, const short mat34, const short mat35, const short mat36, const short mat37, const short mat38, const short mat39, const short mat40, const short mat41, const short mat42, const short mat43, const short mat44, const short mat45, const short mat46, const short mat47, const short mat48, uint scale)</div><div class="ttdoc">Apply a 7x7 convolution matrix to a single channel U8 input image and return the result. </div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00202">convolution7x7.cl:202</a></div></div>
Kaizenbf8b01d2017-10-12 14:26:51 +0100973<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#l00134">helpers.h:134</a></div></div>
974<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#l00136">helpers.h:136</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +0100975<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 +0000976<div class="ttc" id="convolution7x7_8cl_xhtml_ac06f3e24d3fffd3c465d8b2a6e7c985e"><div class="ttname"><a href="convolution7x7_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a></div><div class="ttdeci">#define DATA_TYPE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00035">convolution7x7.cl:35</a></div></div>
977</div><!-- fragment -->
978</div>
979</div>
980<a class="anchor" id="af82c3330f3fbf7caa9229ffd9a4149fb"></a>
981<div class="memitem">
982<div class="memproto">
983 <table class="memname">
984 <tr>
985 <td class="memname">__kernel void convolution_separable1x7_static </td>
986 <td>(</td>
987 <td class="paramtype">__global uchar *&#160;</td>
988 <td class="paramname"><em>src_ptr</em>, </td>
989 </tr>
990 <tr>
991 <td class="paramkey"></td>
992 <td></td>
993 <td class="paramtype">uint&#160;</td>
994 <td class="paramname"><em>src_stride_x</em>, </td>
995 </tr>
996 <tr>
997 <td class="paramkey"></td>
998 <td></td>
999 <td class="paramtype">uint&#160;</td>
1000 <td class="paramname"><em>src_step_x</em>, </td>
1001 </tr>
1002 <tr>
1003 <td class="paramkey"></td>
1004 <td></td>
1005 <td class="paramtype">uint&#160;</td>
1006 <td class="paramname"><em>src_stride_y</em>, </td>
1007 </tr>
1008 <tr>
1009 <td class="paramkey"></td>
1010 <td></td>
1011 <td class="paramtype">uint&#160;</td>
1012 <td class="paramname"><em>src_step_y</em>, </td>
1013 </tr>
1014 <tr>
1015 <td class="paramkey"></td>
1016 <td></td>
1017 <td class="paramtype">uint&#160;</td>
1018 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
1019 </tr>
1020 <tr>
1021 <td class="paramkey"></td>
1022 <td></td>
1023 <td class="paramtype">__global uchar *&#160;</td>
1024 <td class="paramname"><em>dst_ptr</em>, </td>
1025 </tr>
1026 <tr>
1027 <td class="paramkey"></td>
1028 <td></td>
1029 <td class="paramtype">uint&#160;</td>
1030 <td class="paramname"><em>dst_stride_x</em>, </td>
1031 </tr>
1032 <tr>
1033 <td class="paramkey"></td>
1034 <td></td>
1035 <td class="paramtype">uint&#160;</td>
1036 <td class="paramname"><em>dst_step_x</em>, </td>
1037 </tr>
1038 <tr>
1039 <td class="paramkey"></td>
1040 <td></td>
1041 <td class="paramtype">uint&#160;</td>
1042 <td class="paramname"><em>dst_stride_y</em>, </td>
1043 </tr>
1044 <tr>
1045 <td class="paramkey"></td>
1046 <td></td>
1047 <td class="paramtype">uint&#160;</td>
1048 <td class="paramname"><em>dst_step_y</em>, </td>
1049 </tr>
1050 <tr>
1051 <td class="paramkey"></td>
1052 <td></td>
1053 <td class="paramtype">uint&#160;</td>
1054 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
1055 </tr>
1056 <tr>
1057 <td></td>
1058 <td>)</td>
1059 <td></td><td></td>
1060 </tr>
1061 </table>
1062</div><div class="memdoc">
1063
1064<p>Apply a 1x7 static convolution matrix to a single channel U8 input image and output a single temporary channel image. </p>
Kaizen8938bd32017-09-28 14:38:23 +01001065<dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients (MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6) and DATA_TYPE need to be passed at compile time:<br/>
Anthony Barbier871448e2017-03-24 14:54:29 +00001066e.g. -DMAT0=1 -DMAT1=2, ... -DMAT6=6, -DDATA_TYPE=int</dd></dl>
1067<dl class="params"><dt>Parameters</dt><dd>
1068 <table class="params">
1069 <tr><td class="paramdir">[in]</td><td class="paramname">src_ptr</td><td>Pointer to the source image. Supported data types: U8 </td></tr>
1070 <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>
1071 <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>
1072 <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>
1073 <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>
1074 <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>
1075 <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>
1076 <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>
1077 <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>
1078 <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>
1079 <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>
1080 <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>
1081 </table>
1082 </dd>
1083</dl>
1084
1085<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00254">254</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
1086
Kaizenbf8b01d2017-10-12 14:26:51 +01001087<p>References <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00052">convolution1x7()</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00295">offset()</a>, <a class="el" href="helpers_8h_source.xhtml#l00136">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +01001088<div class="fragment"><div class="line"><a name="l00257"></a><span class="lineno"> 257</span>&#160;{</div>
1089<div class="line"><a name="l00258"></a><span class="lineno"> 258</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>
1090<div class="line"><a name="l00259"></a><span class="lineno"> 259</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>
1091<div class="line"><a name="l00260"></a><span class="lineno"> 260</span>&#160;</div>
1092<div class="line"><a name="l00261"></a><span class="lineno"> 261</span>&#160; <span class="comment">// Output pixels</span></div>
1093<div class="line"><a name="l00262"></a><span class="lineno"> 262</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 8)</div>
1094<div class="line"><a name="l00263"></a><span class="lineno"> 263</span>&#160; pixels = <a class="code" href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a>(<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(&amp;src, -3, 0), MAT0, MAT1, MAT2, MAT3, MAT4, MAT5, MAT6);</div>
1095<div class="line"><a name="l00264"></a><span class="lineno"> 264</span>&#160;</div>
1096<div class="line"><a name="l00265"></a><span class="lineno"> 265</span>&#160; <span class="comment">// Store result in dst</span></div>
1097<div class="line"><a name="l00266"></a><span class="lineno"> 266</span>&#160; vstore8(pixels, 0, (__global <a class="code" href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)dst.ptr);</div>
1098<div class="line"><a name="l00267"></a><span class="lineno"> 267</span>&#160;}</div>
Kaizenbf8b01d2017-10-12 14:26:51 +01001099<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#l00295">helpers.h:295</a></div></div>
1100<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#l00096">helpers.h:96</a></div></div>
1101<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#l00134">helpers.h:134</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +01001102<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 +00001103<div class="ttc" id="convolution7x7_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution7x7_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00027">convolution7x7.cl:27</a></div></div>
1104<div class="ttc" id="convolution7x7_8cl_xhtml_a7cedca46bfb1e16a870477a88ce93b9c"><div class="ttname"><a href="convolution7x7_8cl.xhtml#a7cedca46bfb1e16a870477a88ce93b9c">convolution1x7</a></div><div class="ttdeci">short8 convolution1x7(__global const uchar *left_pixel, const short left1_coeff, const short left2_coeff, const short left3_coeff, const short middle_coeff, const short right1_coeff, const short right2_coeff, const short right3_coeff)</div><div class="ttdoc">Compute a 1D horizontal convolution of size 7 for 8 bytes assuming the input is made of 1 channel of ...</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00052">convolution7x7.cl:52</a></div></div>
1105</div><!-- fragment -->
1106</div>
1107</div>
1108<a class="anchor" id="a27d964d8bf6620c7e9960e895df40ade"></a>
1109<div class="memitem">
1110<div class="memproto">
1111 <table class="memname">
1112 <tr>
1113 <td class="memname">__kernel void convolution_separable7x1_static </td>
1114 <td>(</td>
1115 <td class="paramtype">__global uchar *&#160;</td>
1116 <td class="paramname"><em>src_ptr</em>, </td>
1117 </tr>
1118 <tr>
1119 <td class="paramkey"></td>
1120 <td></td>
1121 <td class="paramtype">uint&#160;</td>
1122 <td class="paramname"><em>src_stride_x</em>, </td>
1123 </tr>
1124 <tr>
1125 <td class="paramkey"></td>
1126 <td></td>
1127 <td class="paramtype">uint&#160;</td>
1128 <td class="paramname"><em>src_step_x</em>, </td>
1129 </tr>
1130 <tr>
1131 <td class="paramkey"></td>
1132 <td></td>
1133 <td class="paramtype">uint&#160;</td>
1134 <td class="paramname"><em>src_stride_y</em>, </td>
1135 </tr>
1136 <tr>
1137 <td class="paramkey"></td>
1138 <td></td>
1139 <td class="paramtype">uint&#160;</td>
1140 <td class="paramname"><em>src_step_y</em>, </td>
1141 </tr>
1142 <tr>
1143 <td class="paramkey"></td>
1144 <td></td>
1145 <td class="paramtype">uint&#160;</td>
1146 <td class="paramname"><em>src_offset_first_element_in_bytes</em>, </td>
1147 </tr>
1148 <tr>
1149 <td class="paramkey"></td>
1150 <td></td>
1151 <td class="paramtype">__global uchar *&#160;</td>
1152 <td class="paramname"><em>dst_ptr</em>, </td>
1153 </tr>
1154 <tr>
1155 <td class="paramkey"></td>
1156 <td></td>
1157 <td class="paramtype">uint&#160;</td>
1158 <td class="paramname"><em>dst_stride_x</em>, </td>
1159 </tr>
1160 <tr>
1161 <td class="paramkey"></td>
1162 <td></td>
1163 <td class="paramtype">uint&#160;</td>
1164 <td class="paramname"><em>dst_step_x</em>, </td>
1165 </tr>
1166 <tr>
1167 <td class="paramkey"></td>
1168 <td></td>
1169 <td class="paramtype">uint&#160;</td>
1170 <td class="paramname"><em>dst_stride_y</em>, </td>
1171 </tr>
1172 <tr>
1173 <td class="paramkey"></td>
1174 <td></td>
1175 <td class="paramtype">uint&#160;</td>
1176 <td class="paramname"><em>dst_step_y</em>, </td>
1177 </tr>
1178 <tr>
1179 <td class="paramkey"></td>
1180 <td></td>
1181 <td class="paramtype">uint&#160;</td>
1182 <td class="paramname"><em>dst_offset_first_element_in_bytes</em>&#160;</td>
1183 </tr>
1184 <tr>
1185 <td></td>
1186 <td>)</td>
1187 <td></td><td></td>
1188 </tr>
1189 </table>
1190</div><div class="memdoc">
1191
1192<p>Apply a 7x1 static convolution matrix to a single channel U8 input image and output a single channel image. </p>
Kaizen8938bd32017-09-28 14:38:23 +01001193<dl class="section attention"><dt>Attention</dt><dd>The matrix coefficients (MAT7, MAT8, MAT9, MAT10, MAT11, MAT12, MAT13, SCALE), COMPUTE_TYPE and DATA_TYPE_OUT need to be passed at compile time:<br/>
Anthony Barbier871448e2017-03-24 14:54:29 +00001194e.g. -DMAT0=7 -DMAT1=8, ... -DMAT24=13, -DSCALE=6, -DCOMPUTE_TYPE=int, -DDATA_TYPE_OUT=int</dd></dl>
1195<dl class="params"><dt>Parameters</dt><dd>
1196 <table class="params">
1197 <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>
1198 <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>
1199 <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>
1200 <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>
1201 <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>
1202 <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>
1203 <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>
1204 <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>
1205 <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>
1206 <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>
1207 <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>
1208 <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>
1209 </table>
1210 </dd>
1211</dl>
1212
1213<p>Definition at line <a class="el" href="convolution7x7_8cl_source.xhtml#l00287">287</a> of file <a class="el" href="convolution7x7_8cl_source.xhtml">convolution7x7.cl</a>.</p>
1214
Kaizenbf8b01d2017-10-12 14:26:51 +01001215<p>References <a class="el" href="convolution7x7_8cl_source.xhtml#l00031">COMPUTE_TYPE</a>, <a class="el" href="direct__convolution1x1_8cl_source.xhtml#l00040">CONVERT_SAT</a>, <a class="el" href="helpers_8h_source.xhtml#l00096">CONVERT_TO_IMAGE_STRUCT</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00097">convolution7x1()</a>, <a class="el" href="convolution7x7_8cl_source.xhtml#l00035">DATA_TYPE_OUT</a>, <a class="el" href="helpers_8h_source.xhtml#l00136">Image::ptr</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p>
Kaizen8938bd32017-09-28 14:38:23 +01001216<div class="fragment"><div class="line"><a name="l00290"></a><span class="lineno"> 290</span>&#160;{</div>
1217<div class="line"><a name="l00291"></a><span class="lineno"> 291</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>
1218<div class="line"><a name="l00292"></a><span class="lineno"> 292</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>
1219<div class="line"><a name="l00293"></a><span class="lineno"> 293</span>&#160;</div>
1220<div class="line"><a name="l00294"></a><span class="lineno"> 294</span>&#160; <span class="comment">// Output pixels</span></div>
1221<div class="line"><a name="l00295"></a><span class="lineno"> 295</span>&#160; <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8)</div>
1222<div class="line"><a name="l00296"></a><span class="lineno"> 296</span>&#160; pixels = <a class="code" href="convolution7x7_8cl.xhtml#a8946e11bc6019e8dd7d06b00d27a5b1b">convolution7x1</a>(&amp;src, MAT7, MAT8, MAT9, MAT10, MAT11, MAT12, MAT13);</div>
1223<div class="line"><a name="l00297"></a><span class="lineno"> 297</span>&#160;</div>
1224<div class="line"><a name="l00298"></a><span class="lineno"> 298</span>&#160; <span class="comment">// Divide by the scale</span></div>
1225<div class="line"><a name="l00299"></a><span class="lineno"> 299</span>&#160; pixels /= (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a>, 8))SCALE;</div>
1226<div class="line"><a name="l00300"></a><span class="lineno"> 300</span>&#160;</div>
1227<div class="line"><a name="l00301"></a><span class="lineno"> 301</span>&#160; <span class="comment">// Store result in dst</span></div>
1228<div class="line"><a name="l00302"></a><span class="lineno"> 302</span>&#160; vstore8(<a class="code" href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a>(pixels, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution7x7_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a>, 8)), 0, (__global DATA_TYPE_OUT *)dst.ptr);</div>
1229<div class="line"><a name="l00303"></a><span class="lineno"> 303</span>&#160;}</div>
1230<div class="ttc" id="direct__convolution1x1_8cl_xhtml_a1f15728672380ade7a238f5e783d54d2"><div class="ttname"><a href="direct__convolution1x1_8cl.xhtml#a1f15728672380ade7a238f5e783d54d2">CONVERT_SAT</a></div><div class="ttdeci">#define CONVERT_SAT(a, b)</div><div class="ttdef"><b>Definition:</b> <a href="direct__convolution1x1_8cl_source.xhtml#l00040">direct_convolution1x1.cl:40</a></div></div>
1231<div class="ttc" id="convolution7x7_8cl_xhtml_a26babb0c719990ecbdf3abc6de920875"><div class="ttname"><a href="convolution7x7_8cl.xhtml#a26babb0c719990ecbdf3abc6de920875">COMPUTE_TYPE</a></div><div class="ttdeci">#define COMPUTE_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00031">convolution7x7.cl:31</a></div></div>
Kaizenbf8b01d2017-10-12 14:26:51 +01001232<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#l00096">helpers.h:96</a></div></div>
Anthony Barbier871448e2017-03-24 14:54:29 +00001233<div class="ttc" id="convolution7x7_8cl_xhtml_a8946e11bc6019e8dd7d06b00d27a5b1b"><div class="ttname"><a href="convolution7x7_8cl.xhtml#a8946e11bc6019e8dd7d06b00d27a5b1b">convolution7x1</a></div><div class="ttdeci">int8 convolution7x1(Image *src, const short up1_coeff, const short up2_coeff, const short up3_coeff, const short middle_coeff, const short down1_coeff, const short down2_coeff, const short down3_coeff)</div><div class="ttdoc">Compute a 1D vertical convolution of size 7 for 8 bytes assuming the input is made of 1 channel of 1 ...</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00097">convolution7x7.cl:97</a></div></div>
Kaizenbf8b01d2017-10-12 14:26:51 +01001234<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#l00134">helpers.h:134</a></div></div>
Kaizen8938bd32017-09-28 14:38:23 +01001235<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 +00001236<div class="ttc" id="convolution7x7_8cl_xhtml_ac06f3e24d3fffd3c465d8b2a6e7c985e"><div class="ttname"><a href="convolution7x7_8cl.xhtml#ac06f3e24d3fffd3c465d8b2a6e7c985e">DATA_TYPE_OUT</a></div><div class="ttdeci">#define DATA_TYPE_OUT</div><div class="ttdef"><b>Definition:</b> <a href="convolution7x7_8cl_source.xhtml#l00035">convolution7x7.cl:35</a></div></div>
1237</div><!-- fragment -->
1238</div>
1239</div>
1240</div><!-- contents -->
1241</div><!-- doc-content -->
1242<!-- start footer part -->
1243<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
1244 <ul>
Kaizen8938bd32017-09-28 14:38:23 +01001245 <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="convolution7x7_8cl.xhtml">convolution7x7.cl</a></li>
Kaizenbf8b01d2017-10-12 14:26:51 +01001246 <li class="footer">Generated on Thu Oct 12 2017 14:26:35 for Compute Library by
Anthony Barbier871448e2017-03-24 14:54:29 +00001247 <a href="http://www.doxygen.org/index.html">
Kaizen8938bd32017-09-28 14:38:23 +01001248 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
Anthony Barbier871448e2017-03-24 14:54:29 +00001249 </ul>
1250</div>
1251</body>
1252</html>