1 CONVERTFUNC(RGBX32
,RGB16
) /* Untested */
5 ULONG
*src
= (ULONG
*)srcPixels
;
6 UWORD
*dst
= (UWORD
*)dstPixels
;
9 for(y
= 0; y
< height
; y
++)
11 for(x
= 0; x
< width
; x
++)
15 dst
[x
] = DOWNSHIFT16(s
, RGBA32
, RGB16
);
17 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
18 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
26 CONVERTFUNC(RGBX32
,BGR16
) /* Untested */
30 ULONG
*src
= (ULONG
*)srcPixels
;
31 UWORD
*dst
= (UWORD
*)dstPixels
;
34 for(y
= 0; y
< height
; y
++)
36 for(x
= 0; x
< width
; x
++)
40 dst
[x
] = DOWNSHIFT16(s
, RGBA32
, BGR16
);
42 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
43 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
51 CONVERTFUNC(RGBX32
,RGB15
) /* Untested */
55 ULONG
*src
= (ULONG
*)srcPixels
;
56 UWORD
*dst
= (UWORD
*)dstPixels
;
59 for(y
= 0; y
< height
; y
++)
61 for(x
= 0; x
< width
; x
++)
65 dst
[x
] = DOWNSHIFT16(s
, RGBA32
, RGB15
);
67 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
68 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
76 CONVERTFUNC(RGBX32
,BGR15
) /* Untested */
80 ULONG
*src
= (ULONG
*)srcPixels
;
81 UWORD
*dst
= (UWORD
*)dstPixels
;
84 for(y
= 0; y
< height
; y
++)
86 for(x
= 0; x
< width
; x
++)
90 dst
[x
] = DOWNSHIFT16(s
, RGBA32
, BGR15
);
92 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
93 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
101 CONVERTFUNC(RGBX32
,RGBA32
) /* Untested */
105 ULONG
*src
= (ULONG
*)srcPixels
;
106 ULONG
*dst
= (ULONG
*)dstPixels
;
109 for(y
= 0; y
< height
; y
++)
111 for(x
= 0; x
< width
; x
++)
115 dst
[x
] = s
& 0xFFFFFF00;
117 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
118 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
127 CONVERTFUNC(RGBX32
,ABGR32
) /* Untested */
131 ULONG
*src
= (ULONG
*)srcPixels
;
132 ULONG
*dst
= (ULONG
*)dstPixels
;
135 for(y
= 0; y
< height
; y
++)
137 for(x
= 0; x
< width
; x
++)
141 dst
[x
] = SHUFFLE24(s
, RGBA32
, ABGR32
);
143 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
144 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
152 CONVERTFUNC(RGBX32
,ARGB32
) /* Untested */
156 ULONG
*src
= (ULONG
*)srcPixels
;
157 ULONG
*dst
= (ULONG
*)dstPixels
;
160 for(y
= 0; y
< height
; y
++)
162 for(x
= 0; x
< width
; x
++)
166 dst
[x
] = SHUFFLE24(s
, RGBA32
, ARGB32
);
168 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
169 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
178 CONVERTFUNC(RGBX32
,BGRA32
) /* Untested */
182 ULONG
*src
= (ULONG
*)srcPixels
;
183 ULONG
*dst
= (ULONG
*)dstPixels
;
186 for(y
= 0; y
< height
; y
++)
188 for(x
= 0; x
< width
; x
++)
192 dst
[x
] = SHUFFLE24(s
, RGBA32
, BGRA32
);
194 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
195 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
203 CONVERTFUNC(RGBX32
,RGB24
) /* Untested */
207 ULONG
*src
= (ULONG
*)srcPixels
;
208 UBYTE
*dst
= (UBYTE
*)dstPixels
;
211 for(y
= 0; y
< height
; y
++)
213 for(x
= 0; x
< width
; x
++)
217 PUT24(dst
, COMP8(s
, 0), COMP8(s
, 1), COMP8(s
, 2))
219 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
220 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
228 CONVERTFUNC(RGBX32
,BGR24
) /* Untested */
232 ULONG
*src
= (ULONG
*)srcPixels
;
233 UBYTE
*dst
= (UBYTE
*)dstPixels
;
236 for(y
= 0; y
< height
; y
++)
238 for(x
= 0; x
< width
; x
++)
242 PUT24(dst
, COMP8(s
, 2), COMP8(s
, 1), COMP8(s
, 0))
244 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
245 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
253 CONVERTFUNC(RGBX32
,RGB16OE
) /* Untested */
257 ULONG
*src
= (ULONG
*)srcPixels
;
258 UWORD
*dst
= (UWORD
*)dstPixels
;
261 for(y
= 0; y
< height
; y
++)
263 for(x
= 0; x
< width
; x
++)
267 s
= DOWNSHIFT16(s
, RGBA32
, RGB16
);
270 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
271 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
279 CONVERTFUNC(RGBX32
,BGR16OE
) /* Untested */
283 ULONG
*src
= (ULONG
*)srcPixels
;
284 UWORD
*dst
= (UWORD
*)dstPixels
;
287 for(y
= 0; y
< height
; y
++)
289 for(x
= 0; x
< width
; x
++)
293 s
= DOWNSHIFT16(s
, RGBA32
, BGR16
);
296 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
297 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
305 CONVERTFUNC(RGBX32
,RGB15OE
) /* Untested */
309 ULONG
*src
= (ULONG
*)srcPixels
;
310 UWORD
*dst
= (UWORD
*)dstPixels
;
313 for(y
= 0; y
< height
; y
++)
315 for(x
= 0; x
< width
; x
++)
319 s
= DOWNSHIFT16(s
, RGBA32
, RGB15
);
322 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
323 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
331 CONVERTFUNC(RGBX32
,BGR15OE
) /* Untested */
335 ULONG
*src
= (ULONG
*)srcPixels
;
336 UWORD
*dst
= (UWORD
*)dstPixels
;
339 for(y
= 0; y
< height
; y
++)
341 for(x
= 0; x
< width
; x
++)
345 s
= DOWNSHIFT16(s
, RGBA32
, BGR15
);
348 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
349 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
357 CONVERTFUNC(RGBX32
,BGRX32
) /* Untested */
361 ULONG
*src
= (ULONG
*)srcPixels
;
362 ULONG
*dst
= (ULONG
*)dstPixels
;
365 for(y
= 0; y
< height
; y
++)
367 for(x
= 0; x
< width
; x
++)
371 dst
[x
] = SHUFFLE24(s
, RGBA32
, BGRA32
);
373 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
374 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
382 CONVERTFUNC(RGBX32
,XBGR32
) /* Untested */
392 CONVERTFUNC(RGBX32
,XRGB32
) /* Untested */
396 ULONG
*src
= (ULONG
*)srcPixels
;
397 ULONG
*dst
= (ULONG
*)dstPixels
;
400 for(y
= 0; y
< height
; y
++)
402 for(x
= 0; x
< width
; x
++)
406 dst
[x
] = SHUFFLE24(s
, RGBA32
, ARGB32
);
408 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
409 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);