1 CONVERTFUNC(RGBA32
,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(RGBA32
,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(RGBA32
,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(RGBA32
,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(RGBA32
,ABGR32
) /* Untested */
110 CONVERTFUNC(RGBA32
,ARGB32
) /* Untested */
114 ULONG
*src
= (ULONG
*)srcPixels
;
115 ULONG
*dst
= (ULONG
*)dstPixels
;
118 for(y
= 0; y
< height
; y
++)
120 for(x
= 0; x
< width
; x
++)
124 dst
[x
] = SHUFFLE32(s
, RGBA32
, ARGB32
);
126 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
127 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
136 CONVERTFUNC(RGBA32
,BGRA32
) /* Untested */
140 ULONG
*src
= (ULONG
*)srcPixels
;
141 ULONG
*dst
= (ULONG
*)dstPixels
;
144 for(y
= 0; y
< height
; y
++)
146 for(x
= 0; x
< width
; x
++)
150 dst
[x
] = SHUFFLE32(s
, RGBA32
, BGRA32
);
152 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
153 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
161 CONVERTFUNC(RGBA32
,RGB24
) /* Untested */
165 ULONG
*src
= (ULONG
*)srcPixels
;
166 UBYTE
*dst
= (UBYTE
*)dstPixels
;
169 for(y
= 0; y
< height
; y
++)
171 for(x
= 0; x
< width
; x
++)
175 PUT24(dst
, COMP8(s
, 0), COMP8(s
, 1), COMP8(s
, 2))
177 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
178 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
186 CONVERTFUNC(RGBA32
,BGR24
) /* Untested */
190 ULONG
*src
= (ULONG
*)srcPixels
;
191 UBYTE
*dst
= (UBYTE
*)dstPixels
;
194 for(y
= 0; y
< height
; y
++)
196 for(x
= 0; x
< width
; x
++)
200 PUT24(dst
, COMP8(s
, 2), COMP8(s
, 1), COMP8(s
, 0))
202 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
203 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
211 CONVERTFUNC(RGBA32
,RGB16OE
) /* Untested */
215 ULONG
*src
= (ULONG
*)srcPixels
;
216 UWORD
*dst
= (UWORD
*)dstPixels
;
219 for(y
= 0; y
< height
; y
++)
221 for(x
= 0; x
< width
; x
++)
225 s
= DOWNSHIFT16(s
, RGBA32
, RGB16
);
228 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
229 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
237 CONVERTFUNC(RGBA32
,BGR16OE
) /* Untested */
241 ULONG
*src
= (ULONG
*)srcPixels
;
242 UWORD
*dst
= (UWORD
*)dstPixels
;
245 for(y
= 0; y
< height
; y
++)
247 for(x
= 0; x
< width
; x
++)
251 s
= DOWNSHIFT16(s
, RGBA32
, BGR16
);
254 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
255 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
263 CONVERTFUNC(RGBA32
,RGB15OE
) /* Untested */
267 ULONG
*src
= (ULONG
*)srcPixels
;
268 UWORD
*dst
= (UWORD
*)dstPixels
;
271 for(y
= 0; y
< height
; y
++)
273 for(x
= 0; x
< width
; x
++)
277 s
= DOWNSHIFT16(s
, RGBA32
, RGB15
);
280 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
281 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
289 CONVERTFUNC(RGBA32
,BGR15OE
) /* Untested */
293 ULONG
*src
= (ULONG
*)srcPixels
;
294 UWORD
*dst
= (UWORD
*)dstPixels
;
297 for(y
= 0; y
< height
; y
++)
299 for(x
= 0; x
< width
; x
++)
303 s
= DOWNSHIFT16(s
, RGBA32
, BGR15
);
306 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
307 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
315 CONVERTFUNC(RGBA32
,RGBX32
) /* Untested */
319 ULONG
*src
= (ULONG
*)srcPixels
;
320 ULONG
*dst
= (ULONG
*)dstPixels
;
323 for(y
= 0; y
< height
; y
++)
325 for(x
= 0; x
< width
; x
++)
329 dst
[x
] = s
& 0xFFFFFF00;
331 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
332 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
340 CONVERTFUNC(RGBA32
,BGRX32
) /* Untested */
344 ULONG
*src
= (ULONG
*)srcPixels
;
345 ULONG
*dst
= (ULONG
*)dstPixels
;
348 for(y
= 0; y
< height
; y
++)
350 for(x
= 0; x
< width
; x
++)
354 dst
[x
] = SHUFFLE24(s
, RGBA32
, BGRA32
);
356 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
357 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
365 CONVERTFUNC(RGBA32
,XBGR32
) /* Untested */
369 ULONG
*src
= (ULONG
*)srcPixels
;
370 ULONG
*dst
= (ULONG
*)dstPixels
;
373 for(y
= 0; y
< height
; y
++)
375 for(x
= 0; x
< width
; x
++)
379 dst
[x
] = SHUFFLE24(s
, RGBA32
, ABGR32
);
381 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
382 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
391 CONVERTFUNC(RGBA32
,XRGB32
) /* Untested */
395 ULONG
*src
= (ULONG
*)srcPixels
;
396 ULONG
*dst
= (ULONG
*)dstPixels
;
399 for(y
= 0; y
< height
; y
++)
401 for(x
= 0; x
< width
; x
++)
405 dst
[x
] = SHUFFLE24(s
, RGBA32
, ARGB32
);
407 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
408 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);