define __KERNEL_STRICT_NAMES to avoid inclusion of kernel types on systems that carry...
[cake.git] / test / patchrgbconv_verify.h
blobb9d29ccf2273eadc03358596b9f71154b0968d19
1 UWORD testpixels_RGB15[] =
3 DOWNSHIFT16(0, ARGB32, RGB15),
4 DOWNSHIFT16(0xFFFFFFFF, ARGB32, RGB15),
5 DOWNSHIFT16(0xFF000000, ARGB32, RGB15),
6 DOWNSHIFT16(0xFF00FF00, ARGB32, RGB15),
7 DOWNSHIFT16(0x00FF00FF, ARGB32, RGB15),
8 DOWNSHIFT16(0x00123456, ARGB32, RGB15),
9 DOWNSHIFT16(0x00FFFF00, ARGB32, RGB15),
10 DOWNSHIFT16(0x778899AA, ARGB32, RGB15),
13 const int NUMTESTPIXELS_RGB15 = ( sizeof(testpixels_RGB15) / sizeof(testpixels_RGB15[0]) );
15 UWORD testpixels_BGR15[] =
17 DOWNSHIFT16(0, ARGB32, BGR15),
18 DOWNSHIFT16(0xFFFFFFFF, ARGB32, BGR15),
19 DOWNSHIFT16(0xFF000000, ARGB32, BGR15),
20 DOWNSHIFT16(0xFF00FF00, ARGB32, BGR15),
21 DOWNSHIFT16(0x00FF00FF, ARGB32, BGR15),
22 DOWNSHIFT16(0x00123456, ARGB32, BGR15),
23 DOWNSHIFT16(0x00FFFF00, ARGB32, BGR15),
24 DOWNSHIFT16(0x778899AA, ARGB32, BGR15),
27 const int NUMTESTPIXELS_BGR15 = ( sizeof(testpixels_BGR15) / sizeof(testpixels_BGR15[0]) );
29 UWORD testpixels_RGB16[] =
31 DOWNSHIFT16(0, ARGB32, RGB16),
32 DOWNSHIFT16(0xFFFFFFFF, ARGB32, RGB16),
33 DOWNSHIFT16(0xFF000000, ARGB32, RGB16),
34 DOWNSHIFT16(0xFF00FF00, ARGB32, RGB16),
35 DOWNSHIFT16(0x00FF00FF, ARGB32, RGB16),
36 DOWNSHIFT16(0x00123456, ARGB32, RGB16),
37 DOWNSHIFT16(0x00FFFF00, ARGB32, RGB16),
38 DOWNSHIFT16(0x778899AA, ARGB32, RGB16),
41 const int NUMTESTPIXELS_RGB16 = ( sizeof(testpixels_RGB16) / sizeof(testpixels_RGB16[0]) );
43 UWORD testpixels_BGR16[] =
45 DOWNSHIFT16(0, ARGB32, BGR16),
46 DOWNSHIFT16(0xFFFFFFFF, ARGB32, BGR16),
47 DOWNSHIFT16(0xFF000000, ARGB32, BGR16),
48 DOWNSHIFT16(0xFF00FF00, ARGB32, BGR16),
49 DOWNSHIFT16(0x00FF00FF, ARGB32, BGR16),
50 DOWNSHIFT16(0x00123456, ARGB32, BGR16),
51 DOWNSHIFT16(0x00FFFF00, ARGB32, BGR16),
52 DOWNSHIFT16(0x778899AA, ARGB32, BGR16),
55 const int NUMTESTPIXELS_BGR16 = ( sizeof(testpixels_BGR16) / sizeof(testpixels_BGR16[0]) );
57 ULONG testpixels_ARGB32[] =
59 SHUFFLE32(0, ARGB32, ARGB32),
60 SHUFFLE32(0xFFFFFFFF, ARGB32, ARGB32),
61 SHUFFLE32(0xFF000000, ARGB32, ARGB32),
62 SHUFFLE32(0xFF00FF00, ARGB32, ARGB32),
63 SHUFFLE32(0x00FF00FF, ARGB32, ARGB32),
64 SHUFFLE32(0x00123456, ARGB32, ARGB32),
65 SHUFFLE32(0x00FFFF00, ARGB32, ARGB32),
66 SHUFFLE32(0x778899AA, ARGB32, ARGB32),
69 const int NUMTESTPIXELS_ARGB32 = ( sizeof(testpixels_ARGB32) / sizeof(testpixels_ARGB32[0]) );
71 ULONG testpixels_BGRA32[] =
73 SHUFFLE32(0, ARGB32, BGRA32),
74 SHUFFLE32(0xFFFFFFFF, ARGB32, BGRA32),
75 SHUFFLE32(0xFF000000, ARGB32, BGRA32),
76 SHUFFLE32(0xFF00FF00, ARGB32, BGRA32),
77 SHUFFLE32(0x00FF00FF, ARGB32, BGRA32),
78 SHUFFLE32(0x00123456, ARGB32, BGRA32),
79 SHUFFLE32(0x00FFFF00, ARGB32, BGRA32),
80 SHUFFLE32(0x778899AA, ARGB32, BGRA32),
83 const int NUMTESTPIXELS_BGRA32 = ( sizeof(testpixels_BGRA32) / sizeof(testpixels_BGRA32[0]) );
85 ULONG testpixels_RGBA32[] =
87 SHUFFLE32(0, ARGB32, RGBA32),
88 SHUFFLE32(0xFFFFFFFF, ARGB32, RGBA32),
89 SHUFFLE32(0xFF000000, ARGB32, RGBA32),
90 SHUFFLE32(0xFF00FF00, ARGB32, RGBA32),
91 SHUFFLE32(0x00FF00FF, ARGB32, RGBA32),
92 SHUFFLE32(0x00123456, ARGB32, RGBA32),
93 SHUFFLE32(0x00FFFF00, ARGB32, RGBA32),
94 SHUFFLE32(0x778899AA, ARGB32, RGBA32),
97 const int NUMTESTPIXELS_RGBA32 = ( sizeof(testpixels_RGBA32) / sizeof(testpixels_RGBA32[0]) );
99 ULONG testpixels_ABGR32[] =
101 SHUFFLE32(0, ARGB32, ABGR32),
102 SHUFFLE32(0xFFFFFFFF, ARGB32, ABGR32),
103 SHUFFLE32(0xFF000000, ARGB32, ABGR32),
104 SHUFFLE32(0xFF00FF00, ARGB32, ABGR32),
105 SHUFFLE32(0x00FF00FF, ARGB32, ABGR32),
106 SHUFFLE32(0x00123456, ARGB32, ABGR32),
107 SHUFFLE32(0x00FFFF00, ARGB32, ABGR32),
108 SHUFFLE32(0x778899AA, ARGB32, ABGR32),
111 const int NUMTESTPIXELS_ABGR32 = ( sizeof(testpixels_ABGR32) / sizeof(testpixels_ABGR32[0]) );
113 UBYTE testpixels_RGB24[] =
115 0, 0, 0,
116 0xFF, 0xFF, 0xFF,
117 0xFF, 0, 0,
118 0xFF, 0xFF, 0,
119 0xFF, 0x0, 0xFF,
120 0x12, 0x34, 0x56,
121 0x00, 0xFF, 0x77,
122 0x88, 0x99, 0xAA,
125 const int NUMTESTPIXELS_RGB24 = ( sizeof(testpixels_RGB24) / sizeof(testpixels_RGB24[0]) / 3);
127 #undef ACTFMT
128 #define ACTFMT BGR24
130 UBYTE testpixels_BGR24[] =
132 0, 0, 0,
133 0xFF, 0xFF, 0xFF,
134 0xFF, 0, 0,
135 0xFF, 0xFF, 0,
136 0xFF, 0x0, 0xFF,
137 0x12, 0x34, 0x56,
138 0x00, 0xFF, 0x77,
139 0x88, 0x99, 0xAA,
142 const int NUMTESTPIXELS_BGR24 = ( sizeof(testpixels_BGR24) / sizeof(testpixels_BGR24[0]) / 3);
144 #define SW(x) ( (((x) & 0xFF) << 8) | (((x) & 0xFF00) >> 8) )
146 UWORD testpixels_RGB16OE[] =
148 SW(DOWNSHIFT16(0, ARGB32, RGB16)),
149 SW(DOWNSHIFT16(0xFFFFFFFF, ARGB32, RGB16)),
150 SW(DOWNSHIFT16(0xFF000000, ARGB32, RGB16)),
151 SW(DOWNSHIFT16(0xFF00FF00, ARGB32, RGB16)),
152 SW(DOWNSHIFT16(0x00FF00FF, ARGB32, RGB16)),
153 SW(DOWNSHIFT16(0x00123456, ARGB32, RGB16)),
154 SW(DOWNSHIFT16(0x00FFFF00, ARGB32, RGB16)),
155 SW(DOWNSHIFT16(0x778899AA, ARGB32, RGB16)),
158 const int NUMTESTPIXELS_RGB16OE = ( sizeof(testpixels_RGB16OE) / sizeof(testpixels_RGB16OE[0]) );
160 UWORD testpixels_BGR16OE[] =
162 SW(DOWNSHIFT16(0, ARGB32, RGB16)),
163 SW(DOWNSHIFT16(0xFFFFFFFF, ARGB32, RGB16)),
164 SW(DOWNSHIFT16(0xFF000000, ARGB32, RGB16)),
165 SW(DOWNSHIFT16(0xFF00FF00, ARGB32, RGB16)),
166 SW(DOWNSHIFT16(0x00FF00FF, ARGB32, RGB16)),
167 SW(DOWNSHIFT16(0x00123456, ARGB32, RGB16)),
168 SW(DOWNSHIFT16(0x00FFFF00, ARGB32, RGB16)),
169 SW(DOWNSHIFT16(0x778899AA, ARGB32, RGB16)),
172 const int NUMTESTPIXELS_BGR16OE = ( sizeof(testpixels_BGR16OE) / sizeof(testpixels_BGR16OE[0]) );
174 UWORD testpixels_RGB15OE[] =
176 SW(DOWNSHIFT16(0, ARGB32, RGB15)),
177 SW(DOWNSHIFT16(0xFFFFFFFF, ARGB32, RGB15)),
178 SW(DOWNSHIFT16(0xFF000000, ARGB32, RGB15)),
179 SW(DOWNSHIFT16(0xFF00FF00, ARGB32, RGB15)),
180 SW(DOWNSHIFT16(0x00FF00FF, ARGB32, RGB15)),
181 SW(DOWNSHIFT16(0x00123456, ARGB32, RGB15)),
182 SW(DOWNSHIFT16(0x00FFFF00, ARGB32, RGB15)),
183 SW(DOWNSHIFT16(0x778899AA, ARGB32, RGB15)),
186 const int NUMTESTPIXELS_RGB15OE = ( sizeof(testpixels_RGB15OE) / sizeof(testpixels_RGB15OE[0]) );
188 UWORD testpixels_BGR15OE[] =
190 SW(DOWNSHIFT16(0, ARGB32, RGB15)),
191 SW(DOWNSHIFT16(0xFFFFFFFF, ARGB32, RGB15)),
192 SW(DOWNSHIFT16(0xFF000000, ARGB32, RGB15)),
193 SW(DOWNSHIFT16(0xFF00FF00, ARGB32, RGB15)),
194 SW(DOWNSHIFT16(0x00FF00FF, ARGB32, RGB15)),
195 SW(DOWNSHIFT16(0x00123456, ARGB32, RGB15)),
196 SW(DOWNSHIFT16(0x00FFFF00, ARGB32, RGB15)),
197 SW(DOWNSHIFT16(0x778899AA, ARGB32, RGB15)),
200 const int NUMTESTPIXELS_BGR15OE = ( sizeof(testpixels_BGR15OE) / sizeof(testpixels_BGR15OE[0]) );
202 ULONG testpixels_XRGB32[] =
204 SHUFFLE24(0, ARGB32, ARGB32),
205 SHUFFLE24(0xFFFFFFFF, ARGB32, ARGB32),
206 SHUFFLE24(0xFF000000, ARGB32, ARGB32),
207 SHUFFLE24(0xFF00FF00, ARGB32, ARGB32),
208 SHUFFLE24(0x00FF00FF, ARGB32, ARGB32),
209 SHUFFLE24(0x00123456, ARGB32, ARGB32),
210 SHUFFLE24(0x00FFFF00, ARGB32, ARGB32),
211 SHUFFLE24(0x778899AA, ARGB32, ARGB32),
214 const int NUMTESTPIXELS_XRGB32 = ( sizeof(testpixels_XRGB32) / sizeof(testpixels_XRGB32[0]) );
216 ULONG testpixels_BGRX32[] =
218 SHUFFLE24(0, ARGB32, BGRA32),
219 SHUFFLE24(0xFFFFFFFF, ARGB32, BGRA32),
220 SHUFFLE24(0xFF000000, ARGB32, BGRA32),
221 SHUFFLE24(0xFF00FF00, ARGB32, BGRA32),
222 SHUFFLE24(0x00FF00FF, ARGB32, BGRA32),
223 SHUFFLE24(0x00123456, ARGB32, BGRA32),
224 SHUFFLE24(0x00FFFF00, ARGB32, BGRA32),
225 SHUFFLE24(0x778899AA, ARGB32, BGRA32),
228 const int NUMTESTPIXELS_BGRX32 = ( sizeof(testpixels_BGRX32) / sizeof(testpixels_BGRX32[0]) );
230 ULONG testpixels_RGBX32[] =
232 SHUFFLE24(0, ARGB32, RGBA32),
233 SHUFFLE24(0xFFFFFFFF, ARGB32, RGBA32),
234 SHUFFLE24(0xFF000000, ARGB32, RGBA32),
235 SHUFFLE24(0xFF00FF00, ARGB32, RGBA32),
236 SHUFFLE24(0x00FF00FF, ARGB32, RGBA32),
237 SHUFFLE24(0x00123456, ARGB32, RGBA32),
238 SHUFFLE24(0x00FFFF00, ARGB32, RGBA32),
239 SHUFFLE24(0x778899AA, ARGB32, RGBA32),
242 const int NUMTESTPIXELS_RGBX32 = ( sizeof(testpixels_RGBX32) / sizeof(testpixels_RGBX32[0]) );
244 ULONG testpixels_XBGR32[] =
246 SHUFFLE24(0, ARGB32, ABGR32),
247 SHUFFLE24(0xFFFFFFFF, ARGB32, ABGR32),
248 SHUFFLE24(0xFF000000, ARGB32, ABGR32),
249 SHUFFLE24(0xFF00FF00, ARGB32, ABGR32),
250 SHUFFLE24(0x00FF00FF, ARGB32, ABGR32),
251 SHUFFLE24(0x00123456, ARGB32, ABGR32),
252 SHUFFLE24(0x00FFFF00, ARGB32, ABGR32),
253 SHUFFLE24(0x778899AA, ARGB32, ABGR32),
256 const int NUMTESTPIXELS_XBGR32 = ( sizeof(testpixels_XBGR32) / sizeof(testpixels_XBGR32[0]) );
259 #undef SW