equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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 |
22 * or visit www.oracle.com if you need additional information or have any |
23 * questions. |
23 * questions. |
24 */ |
24 */ |
25 |
25 |
|
26 #include "jni.h" |
26 #include "dither.h" |
27 #include "dither.h" |
27 |
28 |
28 sgn_ordered_dither_array std_img_oda_red; |
29 JNIEXPORT sgn_ordered_dither_array std_img_oda_red; |
29 sgn_ordered_dither_array std_img_oda_green; |
30 JNIEXPORT sgn_ordered_dither_array std_img_oda_green; |
30 sgn_ordered_dither_array std_img_oda_blue; |
31 JNIEXPORT sgn_ordered_dither_array std_img_oda_blue; |
31 int std_odas_computed = 0; |
32 JNIEXPORT int std_odas_computed = 0; |
32 |
33 |
33 void initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) { |
34 JNIEXPORT void JNICALL |
|
35 initInverseGrayLut(int* prgb, int rgbsize, ColorData *cData) { |
34 int *inverse; |
36 int *inverse; |
35 int lastindex, lastgray, missing, i; |
37 int lastindex, lastgray, missing, i; |
36 |
38 |
37 if (!cData) { |
39 if (!cData) { |
38 return; |
40 return; |
265 std_odas_computed = 1; |
267 std_odas_computed = 1; |
266 } |
268 } |
267 |
269 |
268 } |
270 } |
269 |
271 |
270 void make_dither_arrays(int cmapsize, ColorData *cData) { |
272 JNIEXPORT void JNICALL |
|
273 make_dither_arrays(int cmapsize, ColorData *cData) { |
271 int i, j, k; |
274 int i, j, k; |
272 |
275 |
273 /* |
276 /* |
274 * Initialize the per-component ordered dithering arrays |
277 * Initialize the per-component ordered dithering arrays |
275 * Choose a size based on how far between elements in the |
278 * Choose a size based on how far between elements in the |