author | lana |
Thu, 26 Dec 2013 12:04:16 -0800 | |
changeset 23010 | 6dadb192ad81 |
parent 15628 | 228422512f97 |
permissions | -rw-r--r-- |
2 | 1 |
/* |
23010
6dadb192ad81
8029235: Update copyright year to match last edit in jdk8 jdk repository for 2013
lana
parents:
15628
diff
changeset
|
2 |
* Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. |
2 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
5506 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5506 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2 | 10 |
* |
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
5506 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2 | 24 |
*/ |
25 |
||
26 |
||
27 |
#ifndef __MLIB_C_IMAGECONV_H |
|
28 |
#define __MLIB_C_IMAGECONV_H |
|
29 |
||
30 |
#ifdef __cplusplus |
|
31 |
extern "C" { |
|
32 |
#endif /* __cplusplus */ |
|
33 |
||
15628
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
34 |
// Shared macro defined for cleanup of allocated memory. |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
35 |
#ifndef FREE_AND_RETURN_STATUS |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
36 |
#define FREE_AND_RETURN_STATUS \ |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
37 |
{ \ |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
38 |
if (pbuff != buff) mlib_free(pbuff); \ |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
39 |
if (k != akernel) mlib_free(k); \ |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
40 |
return status; \ |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
41 |
} |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
42 |
#endif /* FREE_AND_RETURN_STATUS */ |
228422512f97
8005129: [parfait] #1122 - #1130 native/sun/awt/medialib/mlib_Image*.c Memory leak of pointer 'k' allocated with mlib_malloc
jgodinez
parents:
5506
diff
changeset
|
43 |
|
2 | 44 |
mlib_status mlib_c_conv2x2ext_s16(mlib_image *dst, |
45 |
const mlib_image *src, |
|
46 |
mlib_s32 dx_l, |
|
47 |
mlib_s32 dx_r, |
|
48 |
mlib_s32 dy_t, |
|
49 |
mlib_s32 dy_b, |
|
50 |
const mlib_s32 *kern, |
|
51 |
mlib_s32 scale, |
|
52 |
mlib_s32 cmask); |
|
53 |
||
54 |
mlib_status mlib_c_conv2x2ext_u16(mlib_image *dst, |
|
55 |
const mlib_image *src, |
|
56 |
mlib_s32 dx_l, |
|
57 |
mlib_s32 dx_r, |
|
58 |
mlib_s32 dy_t, |
|
59 |
mlib_s32 dy_b, |
|
60 |
const mlib_s32 *kern, |
|
61 |
mlib_s32 scale, |
|
62 |
mlib_s32 cmask); |
|
63 |
||
64 |
mlib_status mlib_c_conv2x2ext_u8(mlib_image *dst, |
|
65 |
const mlib_image *src, |
|
66 |
mlib_s32 dx_l, |
|
67 |
mlib_s32 dx_r, |
|
68 |
mlib_s32 dy_t, |
|
69 |
mlib_s32 dy_b, |
|
70 |
const mlib_s32 *kern, |
|
71 |
mlib_s32 scale, |
|
72 |
mlib_s32 cmask); |
|
73 |
||
74 |
mlib_status mlib_c_conv2x2nw_s16(mlib_image *dst, |
|
75 |
const mlib_image *src, |
|
76 |
const mlib_s32 *kern, |
|
77 |
mlib_s32 scale, |
|
78 |
mlib_s32 cmask); |
|
79 |
||
80 |
mlib_status mlib_c_conv2x2nw_u16(mlib_image *dst, |
|
81 |
const mlib_image *src, |
|
82 |
const mlib_s32 *kern, |
|
83 |
mlib_s32 scale, |
|
84 |
mlib_s32 cmask); |
|
85 |
||
86 |
mlib_status mlib_c_conv2x2nw_u8(mlib_image *dst, |
|
87 |
const mlib_image *src, |
|
88 |
const mlib_s32 *kern, |
|
89 |
mlib_s32 scale, |
|
90 |
mlib_s32 cmask); |
|
91 |
||
92 |
mlib_status mlib_c_conv3x3ext_u8(mlib_image *dst, |
|
93 |
const mlib_image *src, |
|
94 |
mlib_s32 dx_l, |
|
95 |
mlib_s32 dx_r, |
|
96 |
mlib_s32 dy_t, |
|
97 |
mlib_s32 dy_b, |
|
98 |
const mlib_s32 *kern, |
|
99 |
mlib_s32 scale, |
|
100 |
mlib_s32 cmask); |
|
101 |
||
102 |
mlib_status mlib_c_conv3x3nw_u8(mlib_image *dst, |
|
103 |
const mlib_image *src, |
|
104 |
const mlib_s32 *kern, |
|
105 |
mlib_s32 scale, |
|
106 |
mlib_s32 cmask); |
|
107 |
||
108 |
mlib_status mlib_c_conv4x4ext_u8(mlib_image *dst, |
|
109 |
const mlib_image *src, |
|
110 |
mlib_s32 dx_l, |
|
111 |
mlib_s32 dx_r, |
|
112 |
mlib_s32 dy_t, |
|
113 |
mlib_s32 dy_b, |
|
114 |
const mlib_s32 *kern, |
|
115 |
mlib_s32 scale, |
|
116 |
mlib_s32 cmask); |
|
117 |
||
118 |
mlib_status mlib_c_conv4x4nw_u8(mlib_image *dst, |
|
119 |
const mlib_image *src, |
|
120 |
const mlib_s32 *kern, |
|
121 |
mlib_s32 scale, |
|
122 |
mlib_s32 cmask); |
|
123 |
||
124 |
mlib_status mlib_c_conv5x5ext_u8(mlib_image *dst, |
|
125 |
const mlib_image *src, |
|
126 |
mlib_s32 dx_l, |
|
127 |
mlib_s32 dx_r, |
|
128 |
mlib_s32 dy_t, |
|
129 |
mlib_s32 dy_b, |
|
130 |
const mlib_s32 *kern, |
|
131 |
mlib_s32 scale, |
|
132 |
mlib_s32 cmask); |
|
133 |
||
134 |
mlib_status mlib_c_conv5x5nw_u8(mlib_image *dst, |
|
135 |
const mlib_image *src, |
|
136 |
const mlib_s32 *kern, |
|
137 |
mlib_s32 scale, |
|
138 |
mlib_s32 cmask); |
|
139 |
||
140 |
mlib_status mlib_c_conv7x7ext_u8(mlib_image *dst, |
|
141 |
const mlib_image *src, |
|
142 |
mlib_s32 dx_l, |
|
143 |
mlib_s32 dx_r, |
|
144 |
mlib_s32 dy_t, |
|
145 |
mlib_s32 dy_b, |
|
146 |
const mlib_s32 *kern, |
|
147 |
mlib_s32 scale, |
|
148 |
mlib_s32 cmask); |
|
149 |
||
150 |
mlib_status mlib_c_conv7x7nw_u8(mlib_image *dst, |
|
151 |
const mlib_image *src, |
|
152 |
const mlib_s32 *kern, |
|
153 |
mlib_s32 scale, |
|
154 |
mlib_s32 cmask); |
|
155 |
||
156 |
mlib_status mlib_c_convMxNnw_u8(mlib_image *dst, |
|
157 |
const mlib_image *src, |
|
158 |
const mlib_s32 *kernel, |
|
159 |
mlib_s32 m, |
|
160 |
mlib_s32 n, |
|
161 |
mlib_s32 dm, |
|
162 |
mlib_s32 dn, |
|
163 |
mlib_s32 scale, |
|
164 |
mlib_s32 cmask); |
|
165 |
||
166 |
mlib_status mlib_c_convMxNext_u8(mlib_image *dst, |
|
167 |
const mlib_image *src, |
|
168 |
const mlib_s32 *kern, |
|
169 |
mlib_s32 m, |
|
170 |
mlib_s32 n, |
|
171 |
mlib_s32 dx_l, |
|
172 |
mlib_s32 dx_r, |
|
173 |
mlib_s32 dy_t, |
|
174 |
mlib_s32 dy_b, |
|
175 |
mlib_s32 scale, |
|
176 |
mlib_s32 cmask); |
|
177 |
||
178 |
#if ! defined ( __sparc ) /* for x86, using integer multiplies is faster */ |
|
179 |
||
180 |
mlib_status mlib_i_conv3x3ext_s16(mlib_image *dst, |
|
181 |
const mlib_image *src, |
|
182 |
mlib_s32 dx_l, |
|
183 |
mlib_s32 dx_r, |
|
184 |
mlib_s32 dy_t, |
|
185 |
mlib_s32 dy_b, |
|
186 |
const mlib_s32 *kern, |
|
187 |
mlib_s32 scale, |
|
188 |
mlib_s32 cmask); |
|
189 |
||
190 |
mlib_status mlib_i_conv3x3ext_u16(mlib_image *dst, |
|
191 |
const mlib_image *src, |
|
192 |
mlib_s32 dx_l, |
|
193 |
mlib_s32 dx_r, |
|
194 |
mlib_s32 dy_t, |
|
195 |
mlib_s32 dy_b, |
|
196 |
const mlib_s32 *kern, |
|
197 |
mlib_s32 scale, |
|
198 |
mlib_s32 cmask); |
|
199 |
||
200 |
mlib_status mlib_i_conv3x3ext_u8(mlib_image *dst, |
|
201 |
const mlib_image *src, |
|
202 |
mlib_s32 dx_l, |
|
203 |
mlib_s32 dx_r, |
|
204 |
mlib_s32 dy_t, |
|
205 |
mlib_s32 dy_b, |
|
206 |
const mlib_s32 *kern, |
|
207 |
mlib_s32 scale, |
|
208 |
mlib_s32 cmask); |
|
209 |
||
210 |
mlib_status mlib_i_conv3x3nw_s16(mlib_image *dst, |
|
211 |
const mlib_image *src, |
|
212 |
const mlib_s32 *kern, |
|
213 |
mlib_s32 scale, |
|
214 |
mlib_s32 cmask); |
|
215 |
||
216 |
mlib_status mlib_i_conv3x3nw_u16(mlib_image *dst, |
|
217 |
const mlib_image *src, |
|
218 |
const mlib_s32 *kern, |
|
219 |
mlib_s32 scale, |
|
220 |
mlib_s32 cmask); |
|
221 |
||
222 |
mlib_status mlib_i_conv3x3nw_u8(mlib_image *dst, |
|
223 |
const mlib_image *src, |
|
224 |
const mlib_s32 *kern, |
|
225 |
mlib_s32 scale, |
|
226 |
mlib_s32 cmask); |
|
227 |
||
228 |
mlib_status mlib_i_conv5x5ext_s16(mlib_image *dst, |
|
229 |
const mlib_image *src, |
|
230 |
mlib_s32 dx_l, |
|
231 |
mlib_s32 dx_r, |
|
232 |
mlib_s32 dy_t, |
|
233 |
mlib_s32 dy_b, |
|
234 |
const mlib_s32 *kern, |
|
235 |
mlib_s32 scale, |
|
236 |
mlib_s32 cmask); |
|
237 |
||
238 |
mlib_status mlib_i_conv5x5ext_u16(mlib_image *dst, |
|
239 |
const mlib_image *src, |
|
240 |
mlib_s32 dx_l, |
|
241 |
mlib_s32 dx_r, |
|
242 |
mlib_s32 dy_t, |
|
243 |
mlib_s32 dy_b, |
|
244 |
const mlib_s32 *kern, |
|
245 |
mlib_s32 scale, |
|
246 |
mlib_s32 cmask); |
|
247 |
||
248 |
mlib_status mlib_i_conv5x5ext_u8(mlib_image *dst, |
|
249 |
const mlib_image *src, |
|
250 |
mlib_s32 dx_l, |
|
251 |
mlib_s32 dx_r, |
|
252 |
mlib_s32 dy_t, |
|
253 |
mlib_s32 dy_b, |
|
254 |
const mlib_s32 *kern, |
|
255 |
mlib_s32 scale, |
|
256 |
mlib_s32 cmask); |
|
257 |
||
258 |
mlib_status mlib_i_conv5x5nw_s16(mlib_image *dst, |
|
259 |
const mlib_image *src, |
|
260 |
const mlib_s32 *kern, |
|
261 |
mlib_s32 scale, |
|
262 |
mlib_s32 cmask); |
|
263 |
||
264 |
mlib_status mlib_i_conv5x5nw_u16(mlib_image *dst, |
|
265 |
const mlib_image *src, |
|
266 |
const mlib_s32 *kern, |
|
267 |
mlib_s32 scale, |
|
268 |
mlib_s32 cmask); |
|
269 |
||
270 |
mlib_status mlib_i_conv5x5nw_u8(mlib_image *dst, |
|
271 |
const mlib_image *src, |
|
272 |
const mlib_s32 *kern, |
|
273 |
mlib_s32 scale, |
|
274 |
mlib_s32 cmask); |
|
275 |
||
276 |
mlib_status mlib_i_convMxNnw_s16(mlib_image *dst, |
|
277 |
const mlib_image *src, |
|
278 |
const mlib_s32 *kernel, |
|
279 |
mlib_s32 m, |
|
280 |
mlib_s32 n, |
|
281 |
mlib_s32 dm, |
|
282 |
mlib_s32 dn, |
|
283 |
mlib_s32 scale, |
|
284 |
mlib_s32 cmask); |
|
285 |
||
286 |
mlib_status mlib_i_convMxNnw_u16(mlib_image *dst, |
|
287 |
const mlib_image *src, |
|
288 |
const mlib_s32 *kernel, |
|
289 |
mlib_s32 m, |
|
290 |
mlib_s32 n, |
|
291 |
mlib_s32 dm, |
|
292 |
mlib_s32 dn, |
|
293 |
mlib_s32 scale, |
|
294 |
mlib_s32 cmask); |
|
295 |
||
296 |
mlib_status mlib_i_convMxNnw_u8(mlib_image *dst, |
|
297 |
const mlib_image *src, |
|
298 |
const mlib_s32 *kernel, |
|
299 |
mlib_s32 m, |
|
300 |
mlib_s32 n, |
|
301 |
mlib_s32 dm, |
|
302 |
mlib_s32 dn, |
|
303 |
mlib_s32 scale, |
|
304 |
mlib_s32 cmask); |
|
305 |
||
306 |
mlib_status mlib_i_convMxNext_u8(mlib_image *dst, |
|
307 |
const mlib_image *src, |
|
308 |
const mlib_s32 *kern, |
|
309 |
mlib_s32 m, |
|
310 |
mlib_s32 n, |
|
311 |
mlib_s32 dx_l, |
|
312 |
mlib_s32 dx_r, |
|
313 |
mlib_s32 dy_t, |
|
314 |
mlib_s32 dy_b, |
|
315 |
mlib_s32 scale, |
|
316 |
mlib_s32 cmask); |
|
317 |
||
318 |
mlib_status mlib_i_convMxNext_s16(mlib_image *dst, |
|
319 |
const mlib_image *src, |
|
320 |
const mlib_s32 *kernel, |
|
321 |
mlib_s32 m, |
|
322 |
mlib_s32 n, |
|
323 |
mlib_s32 dx_l, |
|
324 |
mlib_s32 dx_r, |
|
325 |
mlib_s32 dy_t, |
|
326 |
mlib_s32 dy_b, |
|
327 |
mlib_s32 scale, |
|
328 |
mlib_s32 cmask); |
|
329 |
||
330 |
mlib_status mlib_i_convMxNext_u16(mlib_image *dst, |
|
331 |
const mlib_image *src, |
|
332 |
const mlib_s32 *kernel, |
|
333 |
mlib_s32 m, |
|
334 |
mlib_s32 n, |
|
335 |
mlib_s32 dx_l, |
|
336 |
mlib_s32 dx_r, |
|
337 |
mlib_s32 dy_t, |
|
338 |
mlib_s32 dy_b, |
|
339 |
mlib_s32 scale, |
|
340 |
mlib_s32 cmask); |
|
341 |
||
342 |
#endif /* ! defined ( __sparc ) ( for x86, using integer multiplies is faster ) */ |
|
343 |
||
344 |
#ifdef __cplusplus |
|
345 |
} |
|
346 |
#endif /* __cplusplus */ |
|
347 |
#endif /* __MLIB_C_IMAGECONV_H */ |