1 CONVERTFUNC(RGB16
,RGB15
) /* Untested */
5 UWORD
*src
= (UWORD
*)srcPixels
;
6 UWORD
*dst
= (UWORD
*)dstPixels
;
9 for(y
= 0; y
< height
; y
++)
11 for(x
= 0; x
< width
; x
++)
15 dst
[x
] = ((s
>> 1) & (RGB15_RMASK
| RGB15_GMASK
)) | (s
& RGB15_BMASK
);
17 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
18 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
26 CONVERTFUNC(RGB16
,BGR16
) /* Untested */
35 CONVERTFUNC(RGB16
,BGR15
) /* Untested */
44 CONVERTFUNC(RGB16
,ARGB32
) /* Untested */
48 UWORD
*src
= (UWORD
*)srcPixels
;
49 ULONG
*dst
= (ULONG
*)dstPixels
;
52 for(y
= 0; y
< height
; y
++)
54 for(x
= 0; x
< width
; x
++)
58 dst
[x
] = UPSHIFT16(s
, RGB16
, ARGB32
);
60 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
61 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
69 CONVERTFUNC(RGB16
,BGRA32
) /* Untested */
73 UWORD
*src
= (UWORD
*)srcPixels
;
74 ULONG
*dst
= (ULONG
*)dstPixels
;
77 for(y
= 0; y
< height
; y
++)
79 for(x
= 0; x
< width
; x
++)
83 dst
[x
] = UPSHIFT16(s
, RGB16
, BGRA32
);
85 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
86 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
94 CONVERTFUNC(RGB16
,RGBA32
) /* Untested */
98 UWORD
*src
= (UWORD
*)srcPixels
;
99 ULONG
*dst
= (ULONG
*)dstPixels
;
102 for(y
= 0; y
< height
; y
++)
104 for(x
= 0; x
< width
; x
++)
108 dst
[x
] = UPSHIFT16(s
, RGB16
, RGBA32
);
110 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
111 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
120 CONVERTFUNC(RGB16
,ABGR32
) /* Untested */
124 UWORD
*src
= (UWORD
*)srcPixels
;
125 ULONG
*dst
= (ULONG
*)dstPixels
;
128 for(y
= 0; y
< height
; y
++)
130 for(x
= 0; x
< width
; x
++)
134 dst
[x
] = UPSHIFT16(s
, RGB16
, ABGR32
);
136 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
137 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
145 CONVERTFUNC(RGB16
,RGB24
) /* Untested */
149 UWORD
*src
= (UWORD
*)srcPixels
;
150 UBYTE
*dst
= (UBYTE
*)dstPixels
;
153 for(y
= 0; y
< height
; y
++)
155 for(x
= 0; x
< width
; x
++)
159 s
= UPSHIFT16(s
, RGB16
, RGB24
);
161 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
163 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
164 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
172 CONVERTFUNC(RGB16
,BGR24
) /* Untested */
176 UWORD
*src
= (UWORD
*)srcPixels
;
177 UBYTE
*dst
= (UBYTE
*)dstPixels
;
180 for(y
= 0; y
< height
; y
++)
182 for(x
= 0; x
< width
; x
++)
186 s
= UPSHIFT16(s
, RGB16
, BGR24
);
188 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
190 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
191 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
200 CONVERTFUNC(RGB16
,RGB15OE
) /* Untested */
204 UWORD
*src
= (UWORD
*)srcPixels
;
205 UWORD
*dst
= (UWORD
*)dstPixels
;
208 for(y
= 0; y
< height
; y
++)
210 for(x
= 0; x
< width
; x
++)
214 s
= ((s
>> 1) & (RGB15_RMASK
| RGB15_GMASK
)) | (s
& RGB15_BMASK
);
217 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
218 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
226 CONVERTFUNC(RGB16
,BGR16OE
) /* Untested */
235 CONVERTFUNC(RGB16
,BGR15OE
) /* Untested */
244 CONVERTFUNC(RGB16
,RGB16OE
) /* Untested */
253 CONVERTFUNC(RGB16
,XRGB32
) /* Untested */
257 UWORD
*src
= (UWORD
*)srcPixels
;
258 ULONG
*dst
= (ULONG
*)dstPixels
;
261 for(y
= 0; y
< height
; y
++)
263 for(x
= 0; x
< width
; x
++)
267 dst
[x
] = UPSHIFT16(s
, RGB16
, ARGB32
);
269 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
270 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
278 CONVERTFUNC(RGB16
,BGRX32
) /* Untested */
282 UWORD
*src
= (UWORD
*)srcPixels
;
283 ULONG
*dst
= (ULONG
*)dstPixels
;
286 for(y
= 0; y
< height
; y
++)
288 for(x
= 0; x
< width
; x
++)
292 dst
[x
] = UPSHIFT16(s
, RGB16
, BGRA32
);
294 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
295 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
303 CONVERTFUNC(RGB16
,RGBX32
) /* Untested */
307 UWORD
*src
= (UWORD
*)srcPixels
;
308 ULONG
*dst
= (ULONG
*)dstPixels
;
311 for(y
= 0; y
< height
; y
++)
313 for(x
= 0; x
< width
; x
++)
317 dst
[x
] = UPSHIFT16(s
, RGB16
, RGBA32
);
319 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
320 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
329 CONVERTFUNC(RGB16
,XBGR32
) /* Untested */
333 UWORD
*src
= (UWORD
*)srcPixels
;
334 ULONG
*dst
= (ULONG
*)dstPixels
;
337 for(y
= 0; y
< height
; y
++)
339 for(x
= 0; x
< width
; x
++)
343 dst
[x
] = UPSHIFT16(s
, RGB16
, ABGR32
);
345 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
346 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);