Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 1 | <!-- HTML header for doxygen 1.8.9.1--> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| 6 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 7 | <meta name="generator" content="Doxygen 1.8.11"/> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 8 | <meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines --> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 9 | <title>Compute Library: src/core/CL/cl_kernels/warp_helpers.h File Reference</title> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 10 | <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| 11 | <script type="text/javascript" src="jquery.js"></script> |
| 12 | <script type="text/javascript" src="dynsections.js"></script> |
| 13 | <link href="navtree.css" rel="stylesheet" type="text/css"/> |
| 14 | <script type="text/javascript" src="resize.js"></script> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 15 | <script type="text/javascript" src="navtreedata.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 16 | <script type="text/javascript" src="navtree.js"></script> |
| 17 | <script type="text/javascript"> |
| 18 | $(document).ready(initResizable); |
| 19 | $(window).load(resizeHeight); |
| 20 | </script> |
| 21 | <link href="search/search.css" rel="stylesheet" type="text/css"/> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 22 | <script type="text/javascript" src="search/searchdata.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 23 | <script type="text/javascript" src="search/search.js"></script> |
| 24 | <script type="text/javascript"> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 25 | $(document).ready(function() { init_search(); }); |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 26 | </script> |
| 27 | <script type="text/x-mathjax-config"> |
| 28 | MathJax.Hub.Config({ |
| 29 | extensions: ["tex2jax.js"], |
| 30 | jax: ["input/TeX","output/HTML-CSS"], |
| 31 | }); |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 32 | </script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 33 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> |
| 34 | </head> |
| 35 | <body> |
| 36 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> |
| 37 | <div id="titlearea"> |
| 38 | <table cellspacing="0" cellpadding="0"> |
| 39 | <tbody> |
| 40 | <tr style="height: 56px;"> |
| 41 | <td style="padding-left: 0.5em;"> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 42 | <div id="projectname">Compute Library |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 43 |  <span id="projectnumber">17.12</span> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 44 | </div> |
| 45 | </td> |
| 46 | </tr> |
| 47 | </tbody> |
| 48 | </table> |
| 49 | </div> |
| 50 | <!-- end header part --> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 51 | <!-- Generated by Doxygen 1.8.11 --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 52 | <script type="text/javascript"> |
| 53 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
| 54 | </script> |
| 55 | <div id="navrow1" class="tabs"> |
| 56 | <ul class="tablist"> |
| 57 | <li><a href="index.xhtml"><span>Main Page</span></a></li> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 58 | <li><a href="pages.xhtml"><span>Related Pages</span></a></li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 59 | <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li> |
| 60 | <li><a href="annotated.xhtml"><span>Data Structures</span></a></li> |
| 61 | <li class="current"><a href="files.xhtml"><span>Files</span></a></li> |
| 62 | <li> |
| 63 | <div id="MSearchBox" class="MSearchBoxInactive"> |
| 64 | <span class="left"> |
| 65 | <img id="MSearchSelect" src="search/mag_sel.png" |
| 66 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 67 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 68 | alt=""/> |
| 69 | <input type="text" id="MSearchField" value="Search" accesskey="S" |
| 70 | onfocus="searchBox.OnSearchFieldFocus(true)" |
| 71 | onblur="searchBox.OnSearchFieldFocus(false)" |
| 72 | onkeyup="searchBox.OnSearchFieldChange(event)"/> |
| 73 | </span><span class="right"> |
| 74 | <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> |
| 75 | </span> |
| 76 | </div> |
| 77 | </li> |
| 78 | </ul> |
| 79 | </div> |
| 80 | <div id="navrow2" class="tabs2"> |
| 81 | <ul class="tablist"> |
| 82 | <li><a href="files.xhtml"><span>File List</span></a></li> |
| 83 | <li><a href="globals.xhtml"><span>Globals</span></a></li> |
| 84 | </ul> |
| 85 | </div> |
| 86 | </div><!-- top --> |
| 87 | <div id="side-nav" class="ui-resizable side-nav-resizable"> |
| 88 | <div id="nav-tree"> |
| 89 | <div id="nav-tree-contents"> |
| 90 | <div id="nav-sync" class="sync"></div> |
| 91 | </div> |
| 92 | </div> |
| 93 | <div id="splitbar" style="-moz-user-select:none;" |
| 94 | class="ui-resizable-handle"> |
| 95 | </div> |
| 96 | </div> |
| 97 | <script type="text/javascript"> |
| 98 | $(document).ready(function(){initNavTree('warp__helpers_8h.xhtml','');}); |
| 99 | </script> |
| 100 | <div id="doc-content"> |
| 101 | <!-- window showing the filter options --> |
| 102 | <div id="MSearchSelectWindow" |
| 103 | onmouseover="return searchBox.OnSearchSelectShow()" |
| 104 | onmouseout="return searchBox.OnSearchSelectHide()" |
| 105 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 106 | </div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 107 | |
| 108 | <!-- iframe showing the search results (closed by default) --> |
| 109 | <div id="MSearchResultsWindow"> |
| 110 | <iframe src="javascript:void(0)" frameborder="0" |
| 111 | name="MSearchResults" id="MSearchResults"> |
| 112 | </iframe> |
| 113 | </div> |
| 114 | |
| 115 | <div class="header"> |
| 116 | <div class="summary"> |
| 117 | <a href="#func-members">Functions</a> </div> |
| 118 | <div class="headertitle"> |
| 119 | <div class="title">warp_helpers.h File Reference</div> </div> |
| 120 | </div><!--header--> |
| 121 | <div class="contents"> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 122 | <div class="textblock"><code>#include "<a class="el" href="helpers_8h_source.xhtml">helpers.h</a>"</code><br /> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 123 | </div> |
| 124 | <p><a href="warp__helpers_8h_source.xhtml">Go to the source code of this file.</a></p> |
| 125 | <table class="memberdecls"> |
| 126 | <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> |
| 127 | Functions</h2></td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 128 | <tr class="memitem:aaef9851523cbc6f833700f0eb572002b"><td class="memItemLeft" align="right" valign="top">const float8 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a> (float8 coords, const float width, const float height, const float border_size)</td></tr> |
| 129 | <tr class="memdesc:aaef9851523cbc6f833700f0eb572002b"><td class="mdescLeft"> </td><td class="mdescRight">Clamps the given coordinates to the borders according to the border size. <a href="#aaef9851523cbc6f833700f0eb572002b">More...</a><br /></td></tr> |
| 130 | <tr class="separator:aaef9851523cbc6f833700f0eb572002b"><td class="memSeparator" colspan="2"> </td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 131 | <tr class="memitem:adbdf2ca9e8fe0b67f9359929ef743126"><td class="memItemLeft" align="right" valign="top">const float8 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers_8h.xhtml#adbdf2ca9e8fe0b67f9359929ef743126">clamp_to_border</a> (float8 coords, const float width, const float height)</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 132 | <tr class="memdesc:adbdf2ca9e8fe0b67f9359929ef743126"><td class="mdescLeft"> </td><td class="mdescRight">Clamps the given coordinates to the borders. <a href="#adbdf2ca9e8fe0b67f9359929ef743126">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 133 | <tr class="separator:adbdf2ca9e8fe0b67f9359929ef743126"><td class="memSeparator" colspan="2"> </td></tr> |
| 134 | <tr class="memitem:aba42442a4c991cdbb52727fa370676f1"><td class="memItemLeft" align="right" valign="top">const DATA_TYPE4 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers_8h.xhtml#aba42442a4c991cdbb52727fa370676f1">read_texels4</a> (const <a class="el" href="struct_image.xhtml">Image</a> *in, const int8 coords)</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 135 | <tr class="memdesc:aba42442a4c991cdbb52727fa370676f1"><td class="mdescLeft"> </td><td class="mdescRight">Reads four texels from the input image. <a href="#aba42442a4c991cdbb52727fa370676f1">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 136 | <tr class="separator:aba42442a4c991cdbb52727fa370676f1"><td class="memSeparator" colspan="2"> </td></tr> |
| 137 | <tr class="memitem:a4caaeeb51ea58015267a9974675226d1"><td class="memItemLeft" align="right" valign="top">const float2 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers_8h.xhtml#a4caaeeb51ea58015267a9974675226d1">get_current_coords</a> ()</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 138 | <tr class="memdesc:a4caaeeb51ea58015267a9974675226d1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current thread coordinates. <a href="#a4caaeeb51ea58015267a9974675226d1">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 139 | <tr class="separator:a4caaeeb51ea58015267a9974675226d1"><td class="memSeparator" colspan="2"> </td></tr> |
| 140 | <tr class="memitem:a2d8047717d6464cad02c5979d09576db"><td class="memItemLeft" align="right" valign="top">const float8 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers_8h.xhtml#a2d8047717d6464cad02c5979d09576db">get_neighbour_coords</a> (const float2 coord)</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 141 | <tr class="memdesc:a2d8047717d6464cad02c5979d09576db"><td class="mdescLeft"> </td><td class="mdescRight">Given a texel coordinates this function will return the following array of coordinates: [ P, right neighbour, below neighbour, below right neighbour ]. <a href="#a2d8047717d6464cad02c5979d09576db">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 142 | <tr class="separator:a2d8047717d6464cad02c5979d09576db"><td class="memSeparator" colspan="2"> </td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 143 | <tr class="memitem:a8eda58d341afa44da00ebf47f9349499"><td class="memItemLeft" align="right" valign="top">const DATA_TYPE4 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers_8h.xhtml#a8eda58d341afa44da00ebf47f9349499">bilinear_interpolate_with_border</a> (const <a class="el" href="struct_image.xhtml">Image</a> *in, const float8 coords, const float width, const float height, const float border_size)</td></tr> |
| 144 | <tr class="memdesc:a8eda58d341afa44da00ebf47f9349499"><td class="mdescLeft"> </td><td class="mdescRight">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. <a href="#a8eda58d341afa44da00ebf47f9349499">More...</a><br /></td></tr> |
| 145 | <tr class="separator:a8eda58d341afa44da00ebf47f9349499"><td class="memSeparator" colspan="2"> </td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 146 | <tr class="memitem:abea9f226daf3e0ad741d03cf7417d353"><td class="memItemLeft" align="right" valign="top">const DATA_TYPE4 </td><td class="memItemRight" valign="bottom"><a class="el" href="warp__helpers_8h.xhtml#abea9f226daf3e0ad741d03cf7417d353">bilinear_interpolate</a> (const <a class="el" href="struct_image.xhtml">Image</a> *in, const float8 coords, const float width, const float height)</td></tr> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 147 | <tr class="memdesc:abea9f226daf3e0ad741d03cf7417d353"><td class="mdescLeft"> </td><td class="mdescRight">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. <a href="#abea9f226daf3e0ad741d03cf7417d353">More...</a><br /></td></tr> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 148 | <tr class="separator:abea9f226daf3e0ad741d03cf7417d353"><td class="memSeparator" colspan="2"> </td></tr> |
| 149 | </table> |
| 150 | <h2 class="groupheader">Function Documentation</h2> |
| 151 | <a class="anchor" id="abea9f226daf3e0ad741d03cf7417d353"></a> |
| 152 | <div class="memitem"> |
| 153 | <div class="memproto"> |
| 154 | <table class="mlabels"> |
| 155 | <tr> |
| 156 | <td class="mlabels-left"> |
| 157 | <table class="memname"> |
| 158 | <tr> |
| 159 | <td class="memname">const DATA_TYPE4 bilinear_interpolate </td> |
| 160 | <td>(</td> |
| 161 | <td class="paramtype">const <a class="el" href="struct_image.xhtml">Image</a> * </td> |
| 162 | <td class="paramname"><em>in</em>, </td> |
| 163 | </tr> |
| 164 | <tr> |
| 165 | <td class="paramkey"></td> |
| 166 | <td></td> |
| 167 | <td class="paramtype">const float8 </td> |
| 168 | <td class="paramname"><em>coords</em>, </td> |
| 169 | </tr> |
| 170 | <tr> |
| 171 | <td class="paramkey"></td> |
| 172 | <td></td> |
| 173 | <td class="paramtype">const float </td> |
| 174 | <td class="paramname"><em>width</em>, </td> |
| 175 | </tr> |
| 176 | <tr> |
| 177 | <td class="paramkey"></td> |
| 178 | <td></td> |
| 179 | <td class="paramtype">const float </td> |
| 180 | <td class="paramname"><em>height</em> </td> |
| 181 | </tr> |
| 182 | <tr> |
| 183 | <td></td> |
| 184 | <td>)</td> |
| 185 | <td></td><td></td> |
| 186 | </tr> |
| 187 | </table> |
| 188 | </td> |
| 189 | <td class="mlabels-right"> |
| 190 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 191 | </tr> |
| 192 | </table> |
| 193 | </div><div class="memdoc"> |
| 194 | |
| 195 | <p>Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. </p> |
| 196 | <dl class="params"><dt>Parameters</dt><dd> |
| 197 | <table class="params"> |
| 198 | <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Pointer to the source image. </td></tr> |
| 199 | <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> of four 2D coordinates. Even pos is x and odd y. </td></tr> |
| 200 | <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr> |
| 201 | <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr> |
| 202 | </table> |
| 203 | </dd> |
| 204 | </dl> |
| 205 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 206 | <p>Definition at line <a class="el" href="warp__helpers_8h_source.xhtml#l00135">135</a> of file <a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 207 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 208 | <p>References <a class="el" href="warp__helpers_8h_source.xhtml#l00094">bilinear_interpolate_with_border()</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 209 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 210 | <p>Referenced by <a class="el" href="remap_8cl_source.xhtml#l00113">remap_bilinear()</a>, <a class="el" href="warp__affine_8cl_source.xhtml#l00111">warp_affine_bilinear()</a>, and <a class="el" href="warp__perspective_8cl_source.xhtml#l00119">warp_perspective_bilinear()</a>.</p> |
| 211 | <div class="fragment"><div class="line"><a name="l00136"></a><span class="lineno"> 136</span> {</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">return</span> <a class="code" href="warp__helpers_8h.xhtml#a8eda58d341afa44da00ebf47f9349499">bilinear_interpolate_with_border</a>(in, coords, width, height, 1);</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span> }</div><div class="ttc" id="warp__helpers_8h_xhtml_a8eda58d341afa44da00ebf47f9349499"><div class="ttname"><a href="warp__helpers_8h.xhtml#a8eda58d341afa44da00ebf47f9349499">bilinear_interpolate_with_border</a></div><div class="ttdeci">const DATA_TYPE4 bilinear_interpolate_with_border(const Image *in, const float8 coords, const float width, const float height, const float border_size)</div><div class="ttdoc">Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the ...</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00094">warp_helpers.h:94</a></div></div> |
| 212 | </div><!-- fragment --> |
| 213 | </div> |
| 214 | </div> |
| 215 | <a class="anchor" id="a8eda58d341afa44da00ebf47f9349499"></a> |
| 216 | <div class="memitem"> |
| 217 | <div class="memproto"> |
| 218 | <table class="mlabels"> |
| 219 | <tr> |
| 220 | <td class="mlabels-left"> |
| 221 | <table class="memname"> |
| 222 | <tr> |
| 223 | <td class="memname">const DATA_TYPE4 bilinear_interpolate_with_border </td> |
| 224 | <td>(</td> |
| 225 | <td class="paramtype">const <a class="el" href="struct_image.xhtml">Image</a> * </td> |
| 226 | <td class="paramname"><em>in</em>, </td> |
| 227 | </tr> |
| 228 | <tr> |
| 229 | <td class="paramkey"></td> |
| 230 | <td></td> |
| 231 | <td class="paramtype">const float8 </td> |
| 232 | <td class="paramname"><em>coords</em>, </td> |
| 233 | </tr> |
| 234 | <tr> |
| 235 | <td class="paramkey"></td> |
| 236 | <td></td> |
| 237 | <td class="paramtype">const float </td> |
| 238 | <td class="paramname"><em>width</em>, </td> |
| 239 | </tr> |
| 240 | <tr> |
| 241 | <td class="paramkey"></td> |
| 242 | <td></td> |
| 243 | <td class="paramtype">const float </td> |
| 244 | <td class="paramname"><em>height</em>, </td> |
| 245 | </tr> |
| 246 | <tr> |
| 247 | <td class="paramkey"></td> |
| 248 | <td></td> |
| 249 | <td class="paramtype">const float </td> |
| 250 | <td class="paramname"><em>border_size</em> </td> |
| 251 | </tr> |
| 252 | <tr> |
| 253 | <td></td> |
| 254 | <td>)</td> |
| 255 | <td></td><td></td> |
| 256 | </tr> |
| 257 | </table> |
| 258 | </td> |
| 259 | <td class="mlabels-right"> |
| 260 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 261 | </tr> |
| 262 | </table> |
| 263 | </div><div class="memdoc"> |
| 264 | |
| 265 | <p>Computes the bilinear interpolation for each set of coordinates in the vector coords and returns the values. </p> |
| 266 | <dl class="params"><dt>Parameters</dt><dd> |
| 267 | <table class="params"> |
| 268 | <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Pointer to the source image. </td></tr> |
| 269 | <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> of four 2D coordinates. Even pos is x and odd y. </td></tr> |
| 270 | <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr> |
| 271 | <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr> |
| 272 | <tr><td class="paramdir">[in]</td><td class="paramname">border_size</td><td>Border size </td></tr> |
| 273 | </table> |
| 274 | </dd> |
| 275 | </dl> |
| 276 | |
| 277 | <p>Definition at line <a class="el" href="warp__helpers_8h_source.xhtml#l00094">94</a> of file <a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>.</p> |
| 278 | |
| 279 | <p>References <a class="el" href="validation_2_n_e_o_n_2_g_e_m_m_8cpp_source.xhtml#l00115">arm_compute::test::validation::a</a>, <a class="el" href="validation_2_n_e_o_n_2_g_e_m_m_8cpp_source.xhtml#l00116">arm_compute::test::validation::b</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00034">clamp_to_border_with_size()</a>, <a class="el" href="fixed__point_8h_source.xhtml#l00098">CONVERT</a>, <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00081">get_neighbour_coords()</a>, <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p> |
| 280 | |
| 281 | <p>Referenced by <a class="el" href="warp__helpers_8h_source.xhtml#l00135">bilinear_interpolate()</a>, and <a class="el" href="scale_8cl_source.xhtml#l00122">scale_bilinear()</a>.</p> |
| 282 | <div class="fragment"><div class="line"><a name="l00095"></a><span class="lineno"> 95</span> {</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>  <span class="comment">// If any of the 4 texels is out of the image's boundaries we use the border value (REPLICATE or CONSTANT) for any texel out of the image.</span></div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span> </div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>  <span class="comment">// Sets the 4x4 coordinates for each of the four input texels</span></div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span>  <span class="keyword">const</span> float8 fc = floor(coords);</div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keyword">const</span> float16 c1 = (float16)(</div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span>  <a class="code" href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a>(<a class="code" href="warp__helpers_8h.xhtml#a2d8047717d6464cad02c5979d09576db">get_neighbour_coords</a>((float2)(fc.s0, fc.s1)), width, height, border_size),</div><div class="line"><a name="l00102"></a><span class="lineno"> 102</span>  <a class="code" href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a>(<a class="code" href="warp__helpers_8h.xhtml#a2d8047717d6464cad02c5979d09576db">get_neighbour_coords</a>((float2)(fc.s2, fc.s3)), width, height, border_size));</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  <span class="keyword">const</span> float16 c2 = (float16)(</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a>(<a class="code" href="warp__helpers_8h.xhtml#a2d8047717d6464cad02c5979d09576db">get_neighbour_coords</a>((float2)(fc.s4, fc.s5)), width, height, border_size),</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  <a class="code" href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a>(<a class="code" href="warp__helpers_8h.xhtml#a2d8047717d6464cad02c5979d09576db">get_neighbour_coords</a>((float2)(fc.s6, fc.s7)), width, height, border_size));</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span> </div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span>  <span class="comment">// Loads the values from the input image</span></div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="keyword">const</span> float16 t = (float16)(</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>  <span class="comment">/* tl, tr, bl, br */</span></div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>  * ((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s0, c1.s1)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s2, c1.s3)),</div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s4, c1.s5)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s6, c1.s7)),</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.s8, c1.s9)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.sa, c1.sb)),</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.sc, c1.sd)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c1.se, c1.sf)),</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s0, c2.s1)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s2, c2.s3)),</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s4, c2.s5)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s6, c2.s7)),</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.s8, c2.s9)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.sa, c2.sb)),</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.sc, c2.sd)), *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, c2.se, c2.sf)));</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  <span class="keyword">const</span> float8 <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">a</a> = coords - fc;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  <span class="keyword">const</span> float8 <a class="code" href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">b</a> = ((float8)(1.f)) - a;</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keyword">const</span> float4 fr = (float4)(</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  ((t.s0 * b.s0 * b.s1) + (t.s1 * a.s0 * b.s1) + (t.s2 * b.s0 * a.s1) + (t.s3 * a.s0 * a.s1)),</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span>  ((t.s4 * b.s2 * b.s3) + (t.s5 * a.s2 * b.s3) + (t.s6 * b.s2 * a.s3) + (t.s7 * a.s2 * a.s3)),</div><div class="line"><a name="l00123"></a><span class="lineno"> 123</span>  ((t.s8 * b.s4 * b.s5) + (t.s9 * a.s4 * b.s5) + (t.sa * b.s4 * a.s5) + (t.sb * a.s4 * a.s5)),</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  ((t.sc * b.s6 * b.s7) + (t.sd * a.s6 * b.s7) + (t.se * b.s6 * a.s7) + (t.sf * a.s6 * a.s7)));</div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">return</span> <a class="code" href="fixed__point_8h.xhtml#aa8d95ba04fc73845abc6045952cae5be">CONVERT</a>(fr, <a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 4));</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span> }</div><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> |
| 283 | <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_aac40b7097f2bda9274ae07fa33d15a79"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#aac40b7097f2bda9274ae07fa33d15a79">arm_compute::test::validation::a</a></div><div class="ttdeci">Tensor a</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_n_e_o_n_2_g_e_m_m_8cpp_source.xhtml#l00115">GEMM.cpp:115</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 284 | <div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 285 | <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#l00301">helpers.h:301</a></div></div> |
| 286 | <div class="ttc" id="warp__helpers_8h_xhtml_a2d8047717d6464cad02c5979d09576db"><div class="ttname"><a href="warp__helpers_8h.xhtml#a2d8047717d6464cad02c5979d09576db">get_neighbour_coords</a></div><div class="ttdeci">const float8 get_neighbour_coords(const float2 coord)</div><div class="ttdoc">Given a texel coordinates this function will return the following array of coordinates: [ P...</div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00081">warp_helpers.h:81</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 287 | <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 Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 288 | <div class="ttc" id="warp__helpers_8h_xhtml_aaef9851523cbc6f833700f0eb572002b"><div class="ttname"><a href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a></div><div class="ttdeci">const float8 clamp_to_border_with_size(float8 coords, const float width, const float height, const float border_size)</div><div class="ttdoc">Clamps the given coordinates to the borders according to the border size. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00034">warp_helpers.h:34</a></div></div> |
| 289 | <div class="ttc" id="namespacearm__compute_1_1test_1_1validation_xhtml_a7b8004eef325a40dd43eb80755610fff"><div class="ttname"><a href="namespacearm__compute_1_1test_1_1validation.xhtml#a7b8004eef325a40dd43eb80755610fff">arm_compute::test::validation::b</a></div><div class="ttdeci">Tensor b</div><div class="ttdef"><b>Definition:</b> <a href="validation_2_n_e_o_n_2_g_e_m_m_8cpp_source.xhtml#l00116">GEMM.cpp:116</a></div></div> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 290 | </div><!-- fragment --> |
| 291 | </div> |
| 292 | </div> |
| 293 | <a class="anchor" id="adbdf2ca9e8fe0b67f9359929ef743126"></a> |
| 294 | <div class="memitem"> |
| 295 | <div class="memproto"> |
| 296 | <table class="mlabels"> |
| 297 | <tr> |
| 298 | <td class="mlabels-left"> |
| 299 | <table class="memname"> |
| 300 | <tr> |
| 301 | <td class="memname">const float8 clamp_to_border </td> |
| 302 | <td>(</td> |
| 303 | <td class="paramtype">float8 </td> |
| 304 | <td class="paramname"><em>coords</em>, </td> |
| 305 | </tr> |
| 306 | <tr> |
| 307 | <td class="paramkey"></td> |
| 308 | <td></td> |
| 309 | <td class="paramtype">const float </td> |
| 310 | <td class="paramname"><em>width</em>, </td> |
| 311 | </tr> |
| 312 | <tr> |
| 313 | <td class="paramkey"></td> |
| 314 | <td></td> |
| 315 | <td class="paramtype">const float </td> |
| 316 | <td class="paramname"><em>height</em> </td> |
| 317 | </tr> |
| 318 | <tr> |
| 319 | <td></td> |
| 320 | <td>)</td> |
| 321 | <td></td><td></td> |
| 322 | </tr> |
| 323 | </table> |
| 324 | </td> |
| 325 | <td class="mlabels-right"> |
| 326 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 327 | </tr> |
| 328 | </table> |
| 329 | </div><div class="memdoc"> |
| 330 | |
| 331 | <p>Clamps the given coordinates to the borders. </p> |
| 332 | <dl class="params"><dt>Parameters</dt><dd> |
| 333 | <table class="params"> |
| 334 | <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> of 2D coordinates to clamp. Even positions are X coords, odd positions are Y coords. </td></tr> |
| 335 | <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr> |
| 336 | <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr> |
| 337 | </table> |
| 338 | </dd> |
| 339 | </dl> |
| 340 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 341 | <p>Definition at line <a class="el" href="warp__helpers_8h_source.xhtml#l00048">48</a> of file <a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 342 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 343 | <p>References <a class="el" href="warp__helpers_8h_source.xhtml#l00034">clamp_to_border_with_size()</a>.</p> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 344 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 345 | <p>Referenced by <a class="el" href="remap_8cl_source.xhtml#l00113">remap_bilinear()</a>, <a class="el" href="remap_8cl_source.xhtml#l00059">remap_nearest_neighbour()</a>, <a class="el" href="warp__affine_8cl_source.xhtml#l00079">warp_affine_nearest_neighbour()</a>, and <a class="el" href="warp__perspective_8cl_source.xhtml#l00087">warp_perspective_nearest_neighbour()</a>.</p> |
| 346 | <div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> {</div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <span class="keywordflow">return</span> <a class="code" href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a>(coords, width, height, 1);</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> }</div><div class="ttc" id="warp__helpers_8h_xhtml_aaef9851523cbc6f833700f0eb572002b"><div class="ttname"><a href="warp__helpers_8h.xhtml#aaef9851523cbc6f833700f0eb572002b">clamp_to_border_with_size</a></div><div class="ttdeci">const float8 clamp_to_border_with_size(float8 coords, const float width, const float height, const float border_size)</div><div class="ttdoc">Clamps the given coordinates to the borders according to the border size. </div><div class="ttdef"><b>Definition:</b> <a href="warp__helpers_8h_source.xhtml#l00034">warp_helpers.h:34</a></div></div> |
| 347 | </div><!-- fragment --> |
| 348 | </div> |
| 349 | </div> |
| 350 | <a class="anchor" id="aaef9851523cbc6f833700f0eb572002b"></a> |
| 351 | <div class="memitem"> |
| 352 | <div class="memproto"> |
| 353 | <table class="mlabels"> |
| 354 | <tr> |
| 355 | <td class="mlabels-left"> |
| 356 | <table class="memname"> |
| 357 | <tr> |
| 358 | <td class="memname">const float8 clamp_to_border_with_size </td> |
| 359 | <td>(</td> |
| 360 | <td class="paramtype">float8 </td> |
| 361 | <td class="paramname"><em>coords</em>, </td> |
| 362 | </tr> |
| 363 | <tr> |
| 364 | <td class="paramkey"></td> |
| 365 | <td></td> |
| 366 | <td class="paramtype">const float </td> |
| 367 | <td class="paramname"><em>width</em>, </td> |
| 368 | </tr> |
| 369 | <tr> |
| 370 | <td class="paramkey"></td> |
| 371 | <td></td> |
| 372 | <td class="paramtype">const float </td> |
| 373 | <td class="paramname"><em>height</em>, </td> |
| 374 | </tr> |
| 375 | <tr> |
| 376 | <td class="paramkey"></td> |
| 377 | <td></td> |
| 378 | <td class="paramtype">const float </td> |
| 379 | <td class="paramname"><em>border_size</em> </td> |
| 380 | </tr> |
| 381 | <tr> |
| 382 | <td></td> |
| 383 | <td>)</td> |
| 384 | <td></td><td></td> |
| 385 | </tr> |
| 386 | </table> |
| 387 | </td> |
| 388 | <td class="mlabels-right"> |
| 389 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 390 | </tr> |
| 391 | </table> |
| 392 | </div><div class="memdoc"> |
| 393 | |
| 394 | <p>Clamps the given coordinates to the borders according to the border size. </p> |
| 395 | <dl class="params"><dt>Parameters</dt><dd> |
| 396 | <table class="params"> |
| 397 | <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> of 2D coordinates to clamp. Even positions are X coords, odd positions are Y coords. </td></tr> |
| 398 | <tr><td class="paramdir">[in]</td><td class="paramname">width</td><td>Width of the image </td></tr> |
| 399 | <tr><td class="paramdir">[in]</td><td class="paramname">height</td><td>Height of the image </td></tr> |
| 400 | <tr><td class="paramdir">[in]</td><td class="paramname">border_size</td><td>Border size of the image </td></tr> |
| 401 | </table> |
| 402 | </dd> |
| 403 | </dl> |
| 404 | |
| 405 | <p>Definition at line <a class="el" href="warp__helpers_8h_source.xhtml#l00034">34</a> of file <a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>.</p> |
| 406 | |
| 407 | <p>References <a class="el" href="arm__compute_2core_2_helpers_8h_source.xhtml#l00265">arm_compute::clamp()</a>.</p> |
| 408 | |
| 409 | <p>Referenced by <a class="el" href="warp__helpers_8h_source.xhtml#l00094">bilinear_interpolate_with_border()</a>, <a class="el" href="warp__helpers_8h_source.xhtml#l00048">clamp_to_border()</a>, and <a class="el" href="scale_8cl_source.xhtml#l00086">scale_nearest_neighbour()</a>.</p> |
| 410 | <div class="fragment"><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> {</div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>  <span class="keyword">const</span> float4 clamped_x = <a class="code" href="namespacearm__compute.xhtml#a1c0b9414fe3a6ef6a7a23bd324ae9e67">clamp</a>(coords.even, 0.0f - border_size, width - 1 + border_size);</div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span>  <span class="keyword">const</span> float4 clamped_y = <a class="code" href="namespacearm__compute.xhtml#a1c0b9414fe3a6ef6a7a23bd324ae9e67">clamp</a>(coords.odd, 0.0f - border_size, height - 1 + border_size);</div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  <span class="keywordflow">return</span> (float8)(clamped_x.s0, clamped_y.s0, clamped_x.s1, clamped_y.s1, clamped_x.s2, clamped_y.s2, clamped_x.s3, clamped_y.s3);</div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> }</div><div class="ttc" id="namespacearm__compute_xhtml_a1c0b9414fe3a6ef6a7a23bd324ae9e67"><div class="ttname"><a href="namespacearm__compute.xhtml#a1c0b9414fe3a6ef6a7a23bd324ae9e67">arm_compute::clamp</a></div><div class="ttdeci">T clamp(const T &n, const T &lower, const T &upper)</div><div class="ttdoc">Performs clamping among a lower and upper value. </div><div class="ttdef"><b>Definition:</b> <a href="arm__compute_2core_2_helpers_8h_source.xhtml#l00265">Helpers.h:265</a></div></div> |
Anthony Barbier | dbdab85 | 2017-06-23 15:42:00 +0100 | [diff] [blame] | 411 | </div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 412 | </div> |
| 413 | </div> |
| 414 | <a class="anchor" id="a4caaeeb51ea58015267a9974675226d1"></a> |
| 415 | <div class="memitem"> |
| 416 | <div class="memproto"> |
| 417 | <table class="mlabels"> |
| 418 | <tr> |
| 419 | <td class="mlabels-left"> |
| 420 | <table class="memname"> |
| 421 | <tr> |
| 422 | <td class="memname">const float2 get_current_coords </td> |
| 423 | <td>(</td> |
| 424 | <td class="paramname"></td><td>)</td> |
| 425 | <td></td> |
| 426 | </tr> |
| 427 | </table> |
| 428 | </td> |
| 429 | <td class="mlabels-right"> |
| 430 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 431 | </tr> |
| 432 | </table> |
| 433 | </div><div class="memdoc"> |
| 434 | |
| 435 | <p>Returns the current thread coordinates. </p> |
| 436 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 437 | <p>Definition at line <a class="el" href="warp__helpers_8h_source.xhtml#l00067">67</a> of file <a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 438 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 439 | <p>Referenced by <a class="el" href="scale_8cl_source.xhtml#l00122">scale_bilinear()</a>, <a class="el" href="scale_8cl_source.xhtml#l00086">scale_nearest_neighbour()</a>, <a class="el" href="warp__affine_8cl_source.xhtml#l00111">warp_affine_bilinear()</a>, <a class="el" href="warp__affine_8cl_source.xhtml#l00079">warp_affine_nearest_neighbour()</a>, <a class="el" href="warp__perspective_8cl_source.xhtml#l00119">warp_perspective_bilinear()</a>, and <a class="el" href="warp__perspective_8cl_source.xhtml#l00087">warp_perspective_nearest_neighbour()</a>.</p> |
| 440 | <div class="fragment"><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> {</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>  <span class="keywordflow">return</span> (float2)(get_global_id(0) * 4, get_global_id(1));</div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> }</div></div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 441 | </div> |
| 442 | </div> |
| 443 | <a class="anchor" id="a2d8047717d6464cad02c5979d09576db"></a> |
| 444 | <div class="memitem"> |
| 445 | <div class="memproto"> |
| 446 | <table class="mlabels"> |
| 447 | <tr> |
| 448 | <td class="mlabels-left"> |
| 449 | <table class="memname"> |
| 450 | <tr> |
| 451 | <td class="memname">const float8 get_neighbour_coords </td> |
| 452 | <td>(</td> |
| 453 | <td class="paramtype">const float2 </td> |
| 454 | <td class="paramname"><em>coord</em></td><td>)</td> |
| 455 | <td></td> |
| 456 | </tr> |
| 457 | </table> |
| 458 | </td> |
| 459 | <td class="mlabels-right"> |
| 460 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 461 | </tr> |
| 462 | </table> |
| 463 | </div><div class="memdoc"> |
| 464 | |
| 465 | <p>Given a texel coordinates this function will return the following array of coordinates: [ P, right neighbour, below neighbour, below right neighbour ]. </p> |
| 466 | <dl class="section note"><dt>Note</dt><dd>No checks to see if the coordinates are out of the image are done here.</dd></dl> |
| 467 | <dl class="params"><dt>Parameters</dt><dd> |
| 468 | <table class="params"> |
| 469 | <tr><td class="paramdir">[in]</td><td class="paramname">coord</td><td>Input coordinates</td></tr> |
| 470 | </table> |
| 471 | </dd> |
| 472 | </dl> |
| 473 | <dl class="section return"><dt>Returns</dt><dd>vector of 8 floats with the coordinates, even positions are x and odd y. </dd></dl> |
| 474 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 475 | <p>Definition at line <a class="el" href="warp__helpers_8h_source.xhtml#l00081">81</a> of file <a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 476 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 477 | <p>Referenced by <a class="el" href="warp__helpers_8h_source.xhtml#l00094">bilinear_interpolate_with_border()</a>.</p> |
| 478 | <div class="fragment"><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> {</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  <span class="keywordflow">return</span> (float8)(<span class="comment">/*tl*/</span> coord.s0, coord.s1, <span class="comment">/*tr*/</span> coord.s0 + 1, coord.s1, <span class="comment">/*bl*/</span> coord.s0, coord.s1 + 1, <span class="comment">/*br*/</span> coord.s0 + 1, coord.s1 + 1);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> }</div></div><!-- fragment --> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 479 | </div> |
| 480 | </div> |
| 481 | <a class="anchor" id="aba42442a4c991cdbb52727fa370676f1"></a> |
| 482 | <div class="memitem"> |
| 483 | <div class="memproto"> |
| 484 | <table class="mlabels"> |
| 485 | <tr> |
| 486 | <td class="mlabels-left"> |
| 487 | <table class="memname"> |
| 488 | <tr> |
| 489 | <td class="memname">const DATA_TYPE4 read_texels4 </td> |
| 490 | <td>(</td> |
| 491 | <td class="paramtype">const <a class="el" href="struct_image.xhtml">Image</a> * </td> |
| 492 | <td class="paramname"><em>in</em>, </td> |
| 493 | </tr> |
| 494 | <tr> |
| 495 | <td class="paramkey"></td> |
| 496 | <td></td> |
| 497 | <td class="paramtype">const int8 </td> |
| 498 | <td class="paramname"><em>coords</em> </td> |
| 499 | </tr> |
| 500 | <tr> |
| 501 | <td></td> |
| 502 | <td>)</td> |
| 503 | <td></td><td></td> |
| 504 | </tr> |
| 505 | </table> |
| 506 | </td> |
| 507 | <td class="mlabels-right"> |
| 508 | <span class="mlabels"><span class="mlabel">inline</span></span> </td> |
| 509 | </tr> |
| 510 | </table> |
| 511 | </div><div class="memdoc"> |
| 512 | |
| 513 | <p>Reads four texels from the input image. </p> |
| 514 | <p>The coords vector is used to determine which texels to be read.</p> |
| 515 | <dl class="params"><dt>Parameters</dt><dd> |
| 516 | <table class="params"> |
| 517 | <tr><td class="paramdir">[in]</td><td class="paramname">in</td><td>Pointer to the source image. </td></tr> |
| 518 | <tr><td class="paramdir">[in]</td><td class="paramname">coords</td><td><a class="el" href="struct_vector.xhtml" title="Structure to hold Vector information. ">Vector</a> of coordinates to be read from the image. </td></tr> |
| 519 | </table> |
| 520 | </dd> |
| 521 | </dl> |
| 522 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 523 | <p>Definition at line <a class="el" href="warp__helpers_8h_source.xhtml#l00058">58</a> of file <a class="el" href="warp__helpers_8h_source.xhtml">warp_helpers.h</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 524 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 525 | <p>References <a class="el" href="convolution3x3_8cl_source.xhtml#l00027">DATA_TYPE</a>, <a class="el" href="helpers_8h_source.xhtml#l00301">offset()</a>, and <a class="el" href="fixed__point_8h_source.xhtml#l00093">VEC_DATA_TYPE</a>.</p> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 526 | |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 527 | <p>Referenced by <a class="el" href="remap_8cl_source.xhtml#l00059">remap_nearest_neighbour()</a>, <a class="el" href="scale_8cl_source.xhtml#l00086">scale_nearest_neighbour()</a>, <a class="el" href="warp__affine_8cl_source.xhtml#l00079">warp_affine_nearest_neighbour()</a>, and <a class="el" href="warp__perspective_8cl_source.xhtml#l00087">warp_perspective_nearest_neighbour()</a>.</p> |
| 528 | <div class="fragment"><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> {</div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  <span class="keywordflow">return</span> (<a class="code" href="fixed__point_8h.xhtml#a36f754c05b6fddf6df0d8d0a74f8159f">VEC_DATA_TYPE</a>(<a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a>, 4))(*((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, coords.s0, coords.s1)),</div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, coords.s2, coords.s3)),</div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, coords.s4, coords.s5)),</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  *((__global <a class="code" href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a> *)<a class="code" href="helpers_8h.xhtml#a009469e4d9b8fce3b6d5e97d2077827d">offset</a>(in, coords.s6, coords.s7)));</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> }</div><div class="ttc" id="convolution3x3_8cl_xhtml_afb8c72ce35c4a1f4a2588d6573e54aa1"><div class="ttname"><a href="convolution3x3_8cl.xhtml#afb8c72ce35c4a1f4a2588d6573e54aa1">DATA_TYPE</a></div><div class="ttdeci">#define DATA_TYPE</div><div class="ttdef"><b>Definition:</b> <a href="convolution3x3_8cl_source.xhtml#l00027">convolution3x3.cl:27</a></div></div> |
| 529 | <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#l00301">helpers.h:301</a></div></div> |
Kaizen | 8938bd3 | 2017-09-28 14:38:23 +0100 | [diff] [blame] | 530 | <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 Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 531 | </div><!-- fragment --> |
| 532 | </div> |
| 533 | </div> |
| 534 | </div><!-- contents --> |
| 535 | </div><!-- doc-content --> |
| 536 | <!-- start footer part --> |
| 537 | <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> |
| 538 | <ul> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 539 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.xhtml">src</a></li><li class="navelem"><a class="el" href="dir_aebb8dcc11953d78e620bbef0b9e2183.xhtml">core</a></li><li class="navelem"><a class="el" href="dir_8c278f79c760e5c5fbd911f9870614c1.xhtml">CL</a></li><li class="navelem"><a class="el" href="dir_25885286e9dad4fa105b7b25a8031bbf.xhtml">cl_kernels</a></li><li class="navelem"><a class="el" href="warp__helpers_8h.xhtml">warp_helpers.h</a></li> |
| 540 | <li class="footer">Generated on Thu Dec 14 2017 23:48:34 for Compute Library by |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 541 | <a href="http://www.doxygen.org/index.html"> |
Anthony Barbier | 8140e1e | 2017-12-14 23:48:46 +0000 | [diff] [blame^] | 542 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li> |
Anthony Barbier | 871448e | 2017-03-24 14:54:29 +0000 | [diff] [blame] | 543 | </ul> |
| 544 | </div> |
| 545 | </body> |
| 546 | </html> |