1 | /* |
2 | * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. |
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 |
7 | * published by the Free Software Foundation. Oracle designates this |
8 | * particular file as subject to the "Classpath" exception as provided |
9 | * by Oracle in the LICENSE file that accompanied this code. |
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 | * |
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. |
24 | */ |
25 | |
26 | |
27 | #ifndef __MLIB_IMAGE_LOOKUP_FUNC_INTENAL_H |
28 | #define __MLIB_IMAGE_LOOKUP_FUNC_INTENAL_H |
29 | |
30 | #include "mlib_ImageCopy.h" |
31 | |
32 | #ifdef __cplusplus |
33 | extern "C" { |
34 | #endif /* __cplusplus */ |
35 | |
36 | #ifdef _MSC_VER |
37 | /* Microsoft VC 6.0 compiler assumes that pointer fit into long |
38 | and therefore array's index may not exceed MAX_INT/sizeof(data_type). |
39 | |
40 | TABLE_SHIFT_32 is used as index in arrays of types up to mlib_d64 |
41 | (see mlib_ImageLookUp_S32_D64 for instance) and therefore must not |
42 | exceed ((2^33/sizeof(mlib_d64)) - 1) */ |
43 | #define TABLE_SHIFT_S32 (mlib_u32) 536870911 |
44 | #else |
45 | #define TABLE_SHIFT_S32 536870911u |
46 | #endif /* _MSC_VER */ |
47 | |
48 | |
49 | /* mlib_ImageLookUp_64.c */ |
50 | |
51 | void mlib_ImageLookUp_U8_D64(const mlib_u8 *src, |
52 | mlib_s32 slb, |
53 | mlib_d64 *dst, |
54 | mlib_s32 dlb, |
55 | mlib_s32 xsize, |
56 | mlib_s32 ysize, |
57 | mlib_s32 csize, |
58 | const mlib_d64 **table); |
59 | |
60 | void mlib_ImageLookUp_S16_D64(const mlib_s16 *src, |
61 | mlib_s32 slb, |
62 | mlib_d64 *dst, |
63 | mlib_s32 dlb, |
64 | mlib_s32 xsize, |
65 | mlib_s32 ysize, |
66 | mlib_s32 csize, |
67 | const mlib_d64 **table); |
68 | |
69 | void mlib_ImageLookUp_U16_D64(const mlib_u16 *src, |
70 | mlib_s32 slb, |
71 | mlib_d64 *dst, |
72 | mlib_s32 dlb, |
73 | mlib_s32 xsize, |
74 | mlib_s32 ysize, |
75 | mlib_s32 csize, |
76 | const mlib_d64 **table); |
77 | |
78 | void mlib_ImageLookUp_S32_D64(const mlib_s32 *src, |
79 | mlib_s32 slb, |
80 | mlib_d64 *dst, |
81 | mlib_s32 dlb, |
82 | mlib_s32 xsize, |
83 | mlib_s32 ysize, |
84 | mlib_s32 csize, |
85 | const mlib_d64 **table); |
86 | |
87 | void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, |
88 | mlib_s32 slb, |
89 | mlib_d64 *dst, |
90 | mlib_s32 dlb, |
91 | mlib_s32 xsize, |
92 | mlib_s32 ysize, |
93 | mlib_s32 csize, |
94 | const mlib_d64 **table); |
95 | |
96 | void mlib_ImageLookUpSI_S16_D64(const mlib_s16 *src, |
97 | mlib_s32 slb, |
98 | mlib_d64 *dst, |
99 | mlib_s32 dlb, |
100 | mlib_s32 xsize, |
101 | mlib_s32 ysize, |
102 | mlib_s32 csize, |
103 | const mlib_d64 **table); |
104 | |
105 | void mlib_ImageLookUpSI_U16_D64(const mlib_u16 *src, |
106 | mlib_s32 slb, |
107 | mlib_d64 *dst, |
108 | mlib_s32 dlb, |
109 | mlib_s32 xsize, |
110 | mlib_s32 ysize, |
111 | mlib_s32 csize, |
112 | const mlib_d64 **table); |
113 | |
114 | void mlib_ImageLookUpSI_S32_D64(const mlib_s32 *src, |
115 | mlib_s32 slb, |
116 | mlib_d64 *dst, |
117 | mlib_s32 dlb, |
118 | mlib_s32 xsize, |
119 | mlib_s32 ysize, |
120 | mlib_s32 csize, |
121 | const mlib_d64 **table); |
122 | |
123 | /* mlib_ImageLookUp_Bit.c */ |
124 | |
125 | mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src, |
126 | mlib_s32 slb, |
127 | mlib_u8 *dst, |
128 | mlib_s32 dlb, |
129 | mlib_s32 xsize, |
130 | mlib_s32 ysize, |
131 | mlib_s32 nchan, |
132 | mlib_s32 bitoff, |
133 | const mlib_u8 **table); |
134 | |
135 | mlib_status mlib_ImageLookUp_Bit_U8_2(const mlib_u8 *src, |
136 | mlib_s32 slb, |
137 | mlib_u8 *dst, |
138 | mlib_s32 dlb, |
139 | mlib_s32 xsize, |
140 | mlib_s32 ysize, |
141 | mlib_s32 nchan, |
142 | mlib_s32 bitoff, |
143 | const mlib_u8 **table); |
144 | |
145 | mlib_status mlib_ImageLookUp_Bit_U8_3(const mlib_u8 *src, |
146 | mlib_s32 slb, |
147 | mlib_u8 *dst, |
148 | mlib_s32 dlb, |
149 | mlib_s32 xsize, |
150 | mlib_s32 ysize, |
151 | mlib_s32 nchan, |
152 | mlib_s32 bitoff, |
153 | const mlib_u8 **table); |
154 | |
155 | mlib_status mlib_ImageLookUp_Bit_U8_4(const mlib_u8 *src, |
156 | mlib_s32 slb, |
157 | mlib_u8 *dst, |
158 | mlib_s32 dlb, |
159 | mlib_s32 xsize, |
160 | mlib_s32 ysize, |
161 | mlib_s32 nchan, |
162 | mlib_s32 bitoff, |
163 | const mlib_u8 **table); |
164 | |
165 | #ifdef __cplusplus |
166 | } |
167 | #endif /* __cplusplus */ |
168 | #endif /* __MLIB_IMAGE_LOOKUP_FUNC_INTENAL_H */ |
169 | |