1 CONVERTFUNC(BGR16
,RGB16
)
10 CONVERTFUNC(BGR16
,BGR15
)
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
)
45 CONVERTFUNC(BGR16
,ARGB32
)
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
)
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
)
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
)
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
)
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
)
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
)
209 CONVERTFUNC(BGR16
,BGR15OE
)
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
);
226 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
227 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
235 CONVERTFUNC(BGR16
,RGB15OE
)
244 CONVERTFUNC(BGR16
,BGR16OE
)
253 CONVERTFUNC(BGR16
,XRGB32
)
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
, BGR16
, ARGB32
);
269 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
270 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
278 CONVERTFUNC(BGR16
,BGRX32
)
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
, BGR16
, BGRA32
);
294 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
295 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
303 CONVERTFUNC(BGR16
,RGBX32
)
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
, BGR16
, RGBA32
);
319 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
320 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
329 CONVERTFUNC(BGR16
,XBGR32
)
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
, BGR16
, ABGR32
);
345 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
346 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);