1 CONVERTFUNC(XRGB32
,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
, ARGB32
, RGB16
);
17 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
18 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
26 CONVERTFUNC(XRGB32
,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
, ARGB32
, BGR16
);
42 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
43 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
51 CONVERTFUNC(XRGB32
,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
, ARGB32
, RGB15
);
67 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
68 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
76 CONVERTFUNC(XRGB32
,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
, ARGB32
, BGR15
);
92 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
93 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
101 CONVERTFUNC(XRGB32
,ARGB32
) /* 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
& 0x00FFFFFF;
117 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
118 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
126 CONVERTFUNC(XRGB32
,BGRA32
) /* Untested */
130 ULONG
*src
= (ULONG
*)srcPixels
;
131 ULONG
*dst
= (ULONG
*)dstPixels
;
134 for(y
= 0; y
< height
; y
++)
136 for(x
= 0; x
< width
; x
++)
140 dst
[x
] = SHUFFLE24(s
, ARGB32
, BGRA32
);
142 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
143 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
151 CONVERTFUNC(XRGB32
,RGBA32
) /* Untested */
155 ULONG
*src
= (ULONG
*)srcPixels
;
156 ULONG
*dst
= (ULONG
*)dstPixels
;
159 for(y
= 0; y
< height
; y
++)
161 for(x
= 0; x
< width
; x
++)
165 dst
[x
] = SHUFFLE24(s
, ARGB32
, RGBA32
);
167 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
168 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
177 CONVERTFUNC(XRGB32
,ABGR32
) /* Untested */
181 ULONG
*src
= (ULONG
*)srcPixels
;
182 ULONG
*dst
= (ULONG
*)dstPixels
;
185 for(y
= 0; y
< height
; y
++)
187 for(x
= 0; x
< width
; x
++)
191 dst
[x
] = SHUFFLE24(s
, ARGB32
, ABGR32
);
193 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
194 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
202 CONVERTFUNC(XRGB32
,RGB24
) /* Untested */
206 ULONG
*src
= (ULONG
*)srcPixels
;
207 UBYTE
*dst
= (UBYTE
*)dstPixels
;
210 for(y
= 0; y
< height
; y
++)
212 for(x
= 0; x
< width
; x
++)
216 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
218 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
219 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
227 CONVERTFUNC(XRGB32
,BGR24
) /* Untested */
231 ULONG
*src
= (ULONG
*)srcPixels
;
232 UBYTE
*dst
= (UBYTE
*)dstPixels
;
235 for(y
= 0; y
< height
; y
++)
237 for(x
= 0; x
< width
; x
++)
241 PUT24(dst
, COMP8(s
, 3), COMP8(s
, 2), COMP8(s
, 1))
243 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
244 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
252 CONVERTFUNC(XRGB32
,RGB16OE
) /* Untested */
256 ULONG
*src
= (ULONG
*)srcPixels
;
257 UWORD
*dst
= (UWORD
*)dstPixels
;
260 for(y
= 0; y
< height
; y
++)
262 for(x
= 0; x
< width
; x
++)
266 s
= DOWNSHIFT16(s
, ARGB32
, RGB16
);
269 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
270 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
278 CONVERTFUNC(XRGB32
,BGR16OE
) /* Untested */
282 ULONG
*src
= (ULONG
*)srcPixels
;
283 UWORD
*dst
= (UWORD
*)dstPixels
;
286 for(y
= 0; y
< height
; y
++)
288 for(x
= 0; x
< width
; x
++)
292 s
= DOWNSHIFT16(s
, ARGB32
, BGR16
);
295 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
296 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
304 CONVERTFUNC(XRGB32
,RGB15OE
) /* Untested */
308 ULONG
*src
= (ULONG
*)srcPixels
;
309 UWORD
*dst
= (UWORD
*)dstPixels
;
312 for(y
= 0; y
< height
; y
++)
314 for(x
= 0; x
< width
; x
++)
318 s
= DOWNSHIFT16(s
, ARGB32
, RGB15
);
321 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
322 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
330 CONVERTFUNC(XRGB32
,BGR15OE
) /* Untested */
334 ULONG
*src
= (ULONG
*)srcPixels
;
335 UWORD
*dst
= (UWORD
*)dstPixels
;
338 for(y
= 0; y
< height
; y
++)
340 for(x
= 0; x
< width
; x
++)
344 s
= DOWNSHIFT16(s
, ARGB32
, BGR15
);
347 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
348 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
356 CONVERTFUNC(XRGB32
,BGRX32
) /* Untested */
365 CONVERTFUNC(XRGB32
,RGBX32
) /* 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
, ARGB32
, RGBA32
);
381 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
382 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
391 CONVERTFUNC(XRGB32
,XBGR32
) /* 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
, ARGB32
, ABGR32
);
407 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
408 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);