1 CONVERTFUNC(BGR15
,RGB16
)
10 CONVERTFUNC(BGR15
,BGR16
)
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
& (BGR15_BMASK
| BGR15_GMASK
)) << 1) | (s
& BGR15_RMASK
);
26 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
27 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
35 CONVERTFUNC(BGR15
,RGB15
)
44 CONVERTFUNC(BGR15
,ARGB32
)
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
, BGR15
, ARGB32
);
60 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
61 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
69 CONVERTFUNC(BGR15
,BGRA32
)
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
, BGR15
, BGRA32
);
85 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
86 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
94 CONVERTFUNC(BGR15
,RGBA32
)
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
, BGR15
, RGBA32
);
110 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
111 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
120 CONVERTFUNC(BGR15
,ABGR32
)
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
, BGR15
, ABGR32
);
136 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
137 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
145 CONVERTFUNC(BGR15
,RGB24
)
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
, BGR15
, 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(BGR15
,BGR24
)
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
, BGR15
, 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
);
199 CONVERTFUNC(BGR15
,RGB16OE
)
208 CONVERTFUNC(BGR15
,BGR16OE
)
212 UWORD
*src
= (UWORD
*)srcPixels
;
213 UWORD
*dst
= (UWORD
*)dstPixels
;
216 for(y
= 0; y
< height
; y
++)
218 for(x
= 0; x
< width
; x
++)
222 s
= ((s
& (BGR15_BMASK
| BGR15_GMASK
)) << 1) | (s
& BGR15_RMASK
);
225 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
226 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
234 CONVERTFUNC(BGR15
,RGB15OE
)
243 CONVERTFUNC(BGR15
,BGR15OE
)
252 CONVERTFUNC(BGR15
,XRGB32
)
256 UWORD
*src
= (UWORD
*)srcPixels
;
257 ULONG
*dst
= (ULONG
*)dstPixels
;
260 for(y
= 0; y
< height
; y
++)
262 for(x
= 0; x
< width
; x
++)
266 dst
[x
] = UPSHIFT16(s
, BGR15
, ARGB32
);
268 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
269 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
277 CONVERTFUNC(BGR15
,BGRX32
)
281 UWORD
*src
= (UWORD
*)srcPixels
;
282 ULONG
*dst
= (ULONG
*)dstPixels
;
285 for(y
= 0; y
< height
; y
++)
287 for(x
= 0; x
< width
; x
++)
291 dst
[x
] = UPSHIFT16(s
, BGR15
, BGRA32
);
293 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
294 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
302 CONVERTFUNC(BGR15
,RGBX32
)
306 UWORD
*src
= (UWORD
*)srcPixels
;
307 ULONG
*dst
= (ULONG
*)dstPixels
;
310 for(y
= 0; y
< height
; y
++)
312 for(x
= 0; x
< width
; x
++)
316 dst
[x
] = UPSHIFT16(s
, BGR15
, RGBA32
);
318 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
319 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
328 CONVERTFUNC(BGR15
,XBGR32
)
332 UWORD
*src
= (UWORD
*)srcPixels
;
333 ULONG
*dst
= (ULONG
*)dstPixels
;
336 for(y
= 0; y
< height
; y
++)
338 for(x
= 0; x
< width
; x
++)
342 dst
[x
] = UPSHIFT16(s
, BGR15
, ABGR32
);
344 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
345 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);