1 CONVERTFUNC(RGB24
,RGB16
)
5 UBYTE
*src
= (UBYTE
*)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
, RGB24
, RGB16
);
17 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
18 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
26 CONVERTFUNC(RGB24
,BGR16
)
30 UBYTE
*src
= (UBYTE
*)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
, RGB24
, BGR16
);
42 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
43 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
51 CONVERTFUNC(RGB24
,RGB15
)
55 UBYTE
*src
= (UBYTE
*)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
, RGB24
, RGB15
);
67 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
68 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
76 CONVERTFUNC(RGB24
,BGR15
)
80 UBYTE
*src
= (UBYTE
*)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
, RGB24
, BGR15
);
92 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
93 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
101 CONVERTFUNC(RGB24
,ARGB32
)
105 UBYTE
*src
= (UBYTE
*)srcPixels
;
106 ULONG
*dst
= (ULONG
*)dstPixels
;
109 for(y
= 0; y
< height
; y
++)
111 for(x
= 0; x
< width
; x
++)
117 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
118 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
126 CONVERTFUNC(RGB24
,BGRA32
)
130 UBYTE
*src
= (UBYTE
*)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
, RGB24
, BGRA32
);
142 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
143 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
151 CONVERTFUNC(RGB24
,RGBA32
)
155 UBYTE
*src
= (UBYTE
*)srcPixels
;
156 ULONG
*dst
= (ULONG
*)dstPixels
;
159 for(y
= 0; y
< height
; y
++)
161 for(x
= 0; x
< width
; x
++)
167 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
168 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
177 CONVERTFUNC(RGB24
,ABGR32
)
186 CONVERTFUNC(RGB24
,BGR24
)
197 CONVERTFUNC(RGB24
,RGB16OE
)
201 UBYTE
*src
= (UBYTE
*)srcPixels
;
202 UWORD
*dst
= (UWORD
*)dstPixels
;
205 for(y
= 0; y
< height
; y
++)
207 for(x
= 0; x
< width
; x
++)
211 s
= DOWNSHIFT16(s
, RGB24
, RGB16
);
214 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
215 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
223 CONVERTFUNC(RGB24
,BGR16OE
)
227 UBYTE
*src
= (UBYTE
*)srcPixels
;
228 UWORD
*dst
= (UWORD
*)dstPixels
;
231 for(y
= 0; y
< height
; y
++)
233 for(x
= 0; x
< width
; x
++)
237 s
= DOWNSHIFT16(s
, RGB24
, BGR16
);
240 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
241 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
249 CONVERTFUNC(RGB24
,RGB15OE
)
253 UBYTE
*src
= (UBYTE
*)srcPixels
;
254 UWORD
*dst
= (UWORD
*)dstPixels
;
257 for(y
= 0; y
< height
; y
++)
259 for(x
= 0; x
< width
; x
++)
263 s
= DOWNSHIFT16(s
, RGB24
, RGB15
);
266 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
267 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
275 CONVERTFUNC(RGB24
,BGR15OE
)
279 UBYTE
*src
= (UBYTE
*)srcPixels
;
280 UWORD
*dst
= (UWORD
*)dstPixels
;
283 for(y
= 0; y
< height
; y
++)
285 for(x
= 0; x
< width
; x
++)
289 s
= DOWNSHIFT16(s
, RGB24
, BGR15
);
292 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
293 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
301 CONVERTFUNC(RGB24
,XRGB32
)
305 UBYTE
*src
= (UBYTE
*)srcPixels
;
306 ULONG
*dst
= (ULONG
*)dstPixels
;
309 for(y
= 0; y
< height
; y
++)
311 for(x
= 0; x
< width
; x
++)
317 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
318 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
326 CONVERTFUNC(RGB24
,BGRX32
)
330 UBYTE
*src
= (UBYTE
*)srcPixels
;
331 ULONG
*dst
= (ULONG
*)dstPixels
;
334 for(y
= 0; y
< height
; y
++)
336 for(x
= 0; x
< width
; x
++)
340 dst
[x
] = SHUFFLE24(s
, RGB24
, BGRA32
);
342 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
343 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
351 CONVERTFUNC(RGB24
,RGBX32
)
355 UBYTE
*src
= (UBYTE
*)srcPixels
;
356 ULONG
*dst
= (ULONG
*)dstPixels
;
359 for(y
= 0; y
< height
; y
++)
361 for(x
= 0; x
< width
; x
++)
367 src
= (UBYTE
*)(((UBYTE
*)src
) + srcMod
);
368 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
377 CONVERTFUNC(RGB24
,XBGR32
)