1 CONVERTFUNC(BGR16
,RGB16
) /* Untested */
10 CONVERTFUNC(BGR16
,BGR15
) /* Untested */
14 UWORD
*src
= (UWORD
*)srcPixels
;
15 UWORD
*dst
= (UWORD
*)dstPixels
;
18 for(y
= 0; y
< height
; y
++)
20 for(x
= 0; x
< width
; x
++)
24 dst
[x
] = ((s
>> 1) & (BGR15_BMASK
| BGR15_GMASK
)) | (s
& BGR15_RMASK
);
27 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
28 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
36 CONVERTFUNC(BGR16
,RGB15
) /* Untested */
45 CONVERTFUNC(BGR16
,ARGB32
) /* Untested */
49 UWORD
*src
= (UWORD
*)srcPixels
;
50 ULONG
*dst
= (ULONG
*)dstPixels
;
53 for(y
= 0; y
< height
; y
++)
55 for(x
= 0; x
< width
; x
++)
59 dst
[x
] = UPSHIFT16(s
, BGR16
, ARGB32
);
61 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
62 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
70 CONVERTFUNC(BGR16
,BGRA32
) /* Untested */
74 UWORD
*src
= (UWORD
*)srcPixels
;
75 ULONG
*dst
= (ULONG
*)dstPixels
;
78 for(y
= 0; y
< height
; y
++)
80 for(x
= 0; x
< width
; x
++)
84 dst
[x
] = UPSHIFT16(s
, BGR16
, BGRA32
);
86 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
87 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
95 CONVERTFUNC(BGR16
,RGBA32
) /* Untested */
99 UWORD
*src
= (UWORD
*)srcPixels
;
100 ULONG
*dst
= (ULONG
*)dstPixels
;
103 for(y
= 0; y
< height
; y
++)
105 for(x
= 0; x
< width
; x
++)
109 dst
[x
] = UPSHIFT16(s
, BGR16
, RGBA32
);
111 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
112 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
121 CONVERTFUNC(BGR16
,ABGR32
) /* Untested */
125 UWORD
*src
= (UWORD
*)srcPixels
;
126 ULONG
*dst
= (ULONG
*)dstPixels
;
129 for(y
= 0; y
< height
; y
++)
131 for(x
= 0; x
< width
; x
++)
135 dst
[x
] = UPSHIFT16(s
, BGR16
, ABGR32
);
137 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
138 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
146 CONVERTFUNC(BGR16
,RGB24
) /* Untested */
150 UWORD
*src
= (UWORD
*)srcPixels
;
151 UBYTE
*dst
= (UBYTE
*)dstPixels
;
154 for(y
= 0; y
< height
; y
++)
156 for(x
= 0; x
< width
; x
++)
160 s
= UPSHIFT16(s
, BGR16
, RGB24
);
162 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
164 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
165 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
173 CONVERTFUNC(BGR16
,BGR24
) /* Untested */
177 UWORD
*src
= (UWORD
*)srcPixels
;
178 UBYTE
*dst
= (UBYTE
*)dstPixels
;
181 for(y
= 0; y
< height
; y
++)
183 for(x
= 0; x
< width
; x
++)
187 s
= UPSHIFT16(s
, BGR16
, BGR24
);
189 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
191 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
192 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
200 CONVERTFUNC(BGR16
,RGB16OE
) /* Untested */
209 CONVERTFUNC(BGR16
,BGR15OE
) /* Untested */
213 UWORD
*src
= (UWORD
*)srcPixels
;
214 UWORD
*dst
= (UWORD
*)dstPixels
;
217 for(y
= 0; y
< height
; y
++)
219 for(x
= 0; x
< width
; x
++)
223 s
= ((s
>> 1) & (BGR15_BMASK
| BGR15_GMASK
)) | (s
& BGR15_RMASK
);
227 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
228 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
236 CONVERTFUNC(BGR16
,RGB15OE
) /* Untested */
245 CONVERTFUNC(BGR16
,BGR16OE
) /* Untested */
254 CONVERTFUNC(BGR16
,XRGB32
) /* Untested */
258 UWORD
*src
= (UWORD
*)srcPixels
;
259 ULONG
*dst
= (ULONG
*)dstPixels
;
262 for(y
= 0; y
< height
; y
++)
264 for(x
= 0; x
< width
; x
++)
268 dst
[x
] = UPSHIFT16(s
, BGR16
, ARGB32
);
270 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
271 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
279 CONVERTFUNC(BGR16
,BGRX32
) /* Untested */
283 UWORD
*src
= (UWORD
*)srcPixels
;
284 ULONG
*dst
= (ULONG
*)dstPixels
;
287 for(y
= 0; y
< height
; y
++)
289 for(x
= 0; x
< width
; x
++)
293 dst
[x
] = UPSHIFT16(s
, BGR16
, BGRA32
);
295 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
296 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
304 CONVERTFUNC(BGR16
,RGBX32
) /* Untested */
308 UWORD
*src
= (UWORD
*)srcPixels
;
309 ULONG
*dst
= (ULONG
*)dstPixels
;
312 for(y
= 0; y
< height
; y
++)
314 for(x
= 0; x
< width
; x
++)
318 dst
[x
] = UPSHIFT16(s
, BGR16
, RGBA32
);
320 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
321 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
330 CONVERTFUNC(BGR16
,XBGR32
) /* Untested */
334 UWORD
*src
= (UWORD
*)srcPixels
;
335 ULONG
*dst
= (ULONG
*)dstPixels
;
338 for(y
= 0; y
< height
; y
++)
340 for(x
= 0; x
< width
; x
++)
344 dst
[x
] = UPSHIFT16(s
, BGR16
, ABGR32
);
346 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
347 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);