1 CONVERTFUNC(BGRA32
,RGB16
)
5 ULONG
*src
= (ULONG
*)srcPixels
;
6 UWORD
*dst
= (UWORD
*)dstPixels
;
9 for(y
= 0; y
< height
; y
++)
11 for(x
= 0; x
< width
; x
++)
14 dst
[x
] = DOWNSHIFT16(s
, BGRA32
, RGB16
);
16 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
17 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
25 CONVERTFUNC(BGRA32
,BGR16
)
29 ULONG
*src
= (ULONG
*)srcPixels
;
30 UWORD
*dst
= (UWORD
*)dstPixels
;
33 for(y
= 0; y
< height
; y
++)
35 for(x
= 0; x
< width
; x
++)
39 dst
[x
] = DOWNSHIFT16(s
, BGRA32
, BGR16
);
41 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
42 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
50 CONVERTFUNC(BGRA32
,RGB15
)
54 ULONG
*src
= (ULONG
*)srcPixels
;
55 UWORD
*dst
= (UWORD
*)dstPixels
;
58 for(y
= 0; y
< height
; y
++)
60 for(x
= 0; x
< width
; x
++)
64 dst
[x
] = DOWNSHIFT16(s
, BGRA32
, RGB15
);
66 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
67 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
75 CONVERTFUNC(BGRA32
,BGR15
)
79 ULONG
*src
= (ULONG
*)srcPixels
;
80 UWORD
*dst
= (UWORD
*)dstPixels
;
83 for(y
= 0; y
< height
; y
++)
85 for(x
= 0; x
< width
; x
++)
89 dst
[x
] = DOWNSHIFT16(s
, BGRA32
, BGR15
);
91 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
92 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
100 CONVERTFUNC(BGRA32
,ARGB32
)
109 CONVERTFUNC(BGRA32
,RGBA32
)
113 ULONG
*src
= (ULONG
*)srcPixels
;
114 ULONG
*dst
= (ULONG
*)dstPixels
;
117 for(y
= 0; y
< height
; y
++)
119 for(x
= 0; x
< width
; x
++)
123 dst
[x
] = SHUFFLE32(s
, BGRA32
, RGBA32
);
125 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
126 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
135 CONVERTFUNC(BGRA32
,ABGR32
)
139 ULONG
*src
= (ULONG
*)srcPixels
;
140 ULONG
*dst
= (ULONG
*)dstPixels
;
143 for(y
= 0; y
< height
; y
++)
145 for(x
= 0; x
< width
; x
++)
149 dst
[x
] = SHUFFLE32(s
, BGRA32
, ABGR32
);
151 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
152 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
160 CONVERTFUNC(BGRA32
,RGB24
)
164 ULONG
*src
= (ULONG
*)srcPixels
;
165 UBYTE
*dst
= (UBYTE
*)dstPixels
;
168 for(y
= 0; y
< height
; y
++)
170 for(x
= 0; x
< width
; x
++)
174 PUT24(dst
, COMP8(s
, 2), COMP8(s
, 1), COMP8(s
, 0))
176 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
177 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
185 CONVERTFUNC(BGRA32
,BGR24
)
189 ULONG
*src
= (ULONG
*)srcPixels
;
190 UBYTE
*dst
= (UBYTE
*)dstPixels
;
193 for(y
= 0; y
< height
; y
++)
195 for(x
= 0; x
< width
; x
++)
199 PUT24(dst
, COMP8(s
, 0), COMP8(s
, 1), COMP8(s
, 2))
201 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
202 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
210 CONVERTFUNC(BGRA32
,RGB16OE
)
214 ULONG
*src
= (ULONG
*)srcPixels
;
215 UWORD
*dst
= (UWORD
*)dstPixels
;
218 for(y
= 0; y
< height
; y
++)
220 for(x
= 0; x
< width
; x
++)
224 s
= DOWNSHIFT16(s
, BGRA32
, RGB16
);
227 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
228 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
236 CONVERTFUNC(BGRA32
,BGR16OE
)
240 ULONG
*src
= (ULONG
*)srcPixels
;
241 UWORD
*dst
= (UWORD
*)dstPixels
;
244 for(y
= 0; y
< height
; y
++)
246 for(x
= 0; x
< width
; x
++)
250 s
= DOWNSHIFT16(s
, BGRA32
, BGR16
);
253 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
254 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
262 CONVERTFUNC(BGRA32
,RGB15OE
)
266 ULONG
*src
= (ULONG
*)srcPixels
;
267 UWORD
*dst
= (UWORD
*)dstPixels
;
270 for(y
= 0; y
< height
; y
++)
272 for(x
= 0; x
< width
; x
++)
276 s
= DOWNSHIFT16(s
, BGRA32
, RGB15
);
279 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
280 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
288 CONVERTFUNC(BGRA32
,BGR15OE
)
292 ULONG
*src
= (ULONG
*)srcPixels
;
293 UWORD
*dst
= (UWORD
*)dstPixels
;
296 for(y
= 0; y
< height
; y
++)
298 for(x
= 0; x
< width
; x
++)
302 s
= DOWNSHIFT16(s
, BGRA32
, BGR15
);
305 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
306 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
314 CONVERTFUNC(BGRA32
,BGRX32
)
318 ULONG
*src
= (ULONG
*)srcPixels
;
319 ULONG
*dst
= (ULONG
*)dstPixels
;
322 for(y
= 0; y
< height
; y
++)
324 for(x
= 0; x
< width
; x
++)
328 dst
[x
] = s
& 0xFFFFFF00;
330 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
331 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
339 CONVERTFUNC(BGRA32
,XRGB32
)
343 ULONG
*src
= (ULONG
*)srcPixels
;
344 ULONG
*dst
= (ULONG
*)dstPixels
;
347 for(y
= 0; y
< height
; y
++)
349 for(x
= 0; x
< width
; x
++)
353 dst
[x
] = SHUFFLE24(s
, BGRA32
, ARGB32
);
355 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
356 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
364 CONVERTFUNC(BGRA32
,RGBX32
)
368 ULONG
*src
= (ULONG
*)srcPixels
;
369 ULONG
*dst
= (ULONG
*)dstPixels
;
372 for(y
= 0; y
< height
; y
++)
374 for(x
= 0; x
< width
; x
++)
378 dst
[x
] = SHUFFLE24(s
, BGRA32
, RGBA32
);
380 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
381 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
390 CONVERTFUNC(BGRA32
,XBGR32
)
394 ULONG
*src
= (ULONG
*)srcPixels
;
395 ULONG
*dst
= (ULONG
*)dstPixels
;
398 for(y
= 0; y
< height
; y
++)
400 for(x
= 0; x
< width
; x
++)
404 dst
[x
] = SHUFFLE24(s
, BGRA32
, ABGR32
);
406 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
407 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);