1 CONVERTFUNC(ABGR32
,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
++)
15 dst
[x
] = DOWNSHIFT16(s
, ABGR32
, RGB16
);
17 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
18 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
26 CONVERTFUNC(ABGR32
,BGR16
)
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
, ABGR32
, BGR16
);
42 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
43 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
51 CONVERTFUNC(ABGR32
,RGB15
)
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
, ABGR32
, RGB15
);
67 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
68 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
76 CONVERTFUNC(ABGR32
,BGR15
)
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
, ABGR32
, BGR15
);
92 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
93 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
101 CONVERTFUNC(ABGR32
,RGBA32
)
110 CONVERTFUNC(ABGR32
,ARGB32
)
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
, ABGR32
, ARGB32
);
126 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
127 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
136 CONVERTFUNC(ABGR32
,BGRA32
)
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
, ABGR32
, BGRA32
);
152 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
153 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
161 CONVERTFUNC(ABGR32
,RGB24
)
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
,3), COMP8(s
, 2), COMP8(s
, 1))
177 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
178 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
186 CONVERTFUNC(ABGR32
,BGR24
)
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
, 1), COMP8(s
, 2), COMP8(s
, 3))
202 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
203 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
211 CONVERTFUNC(ABGR32
,RGB16OE
)
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
, ABGR32
, RGB16
);
228 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
229 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
237 CONVERTFUNC(ABGR32
,BGR16OE
)
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
, ABGR32
, BGR16
);
254 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
255 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
263 CONVERTFUNC(ABGR32
,RGB15OE
)
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
, ABGR32
, RGB15
);
280 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
281 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
289 CONVERTFUNC(ABGR32
,BGR15OE
)
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
, ABGR32
, BGR15
);
306 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
307 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
315 CONVERTFUNC(ABGR32
,XBGR32
)
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
& 0x00FFFFFF;
331 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
332 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
340 CONVERTFUNC(ABGR32
,BGRX32
)
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
, ABGR32
, BGRA32
);
356 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
357 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
365 CONVERTFUNC(ABGR32
,RGBX32
)
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
, ABGR32
, RGBA32
);
381 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
382 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
391 CONVERTFUNC(ABGR32
,XRGB32
)
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
, ABGR32
, ARGB32
);
407 src
= (ULONG
*)(((UBYTE
*)src
) + srcMod
);
408 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);