1 CONVERTFUNC(BGR16OE
,BGR16
) /* Untested */
10 CONVERTFUNC(BGR16OE
,RGB16
) /* Untested */
19 CONVERTFUNC(BGR16OE
,BGR15
) /* Untested */
23 UWORD
*src
= (UWORD
*)srcPixels
;
24 UWORD
*dst
= (UWORD
*)dstPixels
;
27 for(y
= 0; y
< height
; y
++)
29 for(x
= 0; x
< width
; x
++)
31 UWORD s
= INV16(src
[x
]);
33 dst
[x
] = ((s
>> 1) & (BGR15_BMASK
| BGR15_GMASK
)) | (s
& BGR15_RMASK
);
35 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
36 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
44 CONVERTFUNC(BGR16OE
,RGB15
) /* Untested */
53 CONVERTFUNC(BGR16OE
,ARGB32
) /* Untested */
57 UWORD
*src
= (UWORD
*)srcPixels
;
58 ULONG
*dst
= (ULONG
*)dstPixels
;
61 for(y
= 0; y
< height
; y
++)
63 for(x
= 0; x
< width
; x
++)
65 ULONG s
= INV16(src
[x
]);
67 dst
[x
] = UPSHIFT16(s
, BGR16
, ARGB32
);
69 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
70 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
78 CONVERTFUNC(BGR16OE
,BGRA32
) /* Untested */
82 UWORD
*src
= (UWORD
*)srcPixels
;
83 ULONG
*dst
= (ULONG
*)dstPixels
;
86 for(y
= 0; y
< height
; y
++)
88 for(x
= 0; x
< width
; x
++)
90 ULONG s
= INV16(src
[x
]);
92 dst
[x
] = UPSHIFT16(s
, BGR16
, BGRA32
);
94 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
95 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
103 CONVERTFUNC(BGR16OE
,RGBA32
) /* Untested */
107 UWORD
*src
= (UWORD
*)srcPixels
;
108 ULONG
*dst
= (ULONG
*)dstPixels
;
111 for(y
= 0; y
< height
; y
++)
113 for(x
= 0; x
< width
; x
++)
115 ULONG s
= INV16(src
[x
]);
117 dst
[x
] = UPSHIFT16(s
, BGR16
, RGBA32
);
119 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
120 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
129 CONVERTFUNC(BGR16OE
,ABGR32
) /* Untested */
133 UWORD
*src
= (UWORD
*)srcPixels
;
134 ULONG
*dst
= (ULONG
*)dstPixels
;
137 for(y
= 0; y
< height
; y
++)
139 for(x
= 0; x
< width
; x
++)
141 ULONG s
= INV16(src
[x
]);
143 dst
[x
] = UPSHIFT16(s
, BGR16
, ABGR32
);
145 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
146 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
154 CONVERTFUNC(BGR16OE
,RGB24
) /* Untested */
158 UWORD
*src
= (UWORD
*)srcPixels
;
159 UBYTE
*dst
= (UBYTE
*)dstPixels
;
162 for(y
= 0; y
< height
; y
++)
164 for(x
= 0; x
< width
; x
++)
166 ULONG s
= INV16(src
[x
]);
168 s
= UPSHIFT16(s
, BGR16
, RGB24
);
170 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
172 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
173 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
181 CONVERTFUNC(BGR16OE
,BGR24
) /* Untested */
185 UWORD
*src
= (UWORD
*)srcPixels
;
186 UBYTE
*dst
= (UBYTE
*)dstPixels
;
189 for(y
= 0; y
< height
; y
++)
191 for(x
= 0; x
< width
; x
++)
193 ULONG s
= INV16(src
[x
]);
195 s
= UPSHIFT16(s
, BGR16
, BGR24
);
197 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
199 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
200 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
208 CONVERTFUNC(BGR16OE
,RGB16OE
) /* Untested */
217 CONVERTFUNC(BGR16OE
,BGR15OE
) /* Untested */
221 UWORD
*src
= (UWORD
*)srcPixels
;
222 UWORD
*dst
= (UWORD
*)dstPixels
;
225 for(y
= 0; y
< height
; y
++)
227 for(x
= 0; x
< width
; x
++)
229 UWORD s
= INV16(src
[x
]);
231 s
= ((s
>> 1) & (BGR15_BMASK
| BGR15_GMASK
)) | (s
& BGR15_RMASK
);
235 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
236 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
244 CONVERTFUNC(BGR16OE
,RGB15OE
) /* Untested */
253 CONVERTFUNC(BGR16OE
,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
++)
265 ULONG s
= INV16(src
[x
]);
267 dst
[x
] = UPSHIFT16(s
, BGR16
, ARGB32
);
269 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
270 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
278 CONVERTFUNC(BGR16OE
,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
++)
290 ULONG s
= INV16(src
[x
]);
292 dst
[x
] = UPSHIFT16(s
, BGR16
, BGRA32
);
294 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
295 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
303 CONVERTFUNC(BGR16OE
,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
++)
315 ULONG s
= INV16(src
[x
]);
317 dst
[x
] = UPSHIFT16(s
, BGR16
, RGBA32
);
319 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
320 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
329 CONVERTFUNC(BGR16OE
,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
++)
341 ULONG s
= INV16(src
[x
]);
343 dst
[x
] = UPSHIFT16(s
, BGR16
, ABGR32
);
345 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
346 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);