1 CONVERTFUNC(RGB15
,RGB16
)
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
& (RGB15_RMASK
| RGB15_GMASK
)) << 1) | (s
& RGB15_BMASK
);
17 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
18 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
26 CONVERTFUNC(RGB15
,BGR16
)
35 CONVERTFUNC(RGB15
,BGR15
)
46 CONVERTFUNC(RGB15
,ARGB32
)
50 UWORD
*src
= (UWORD
*)srcPixels
;
51 ULONG
*dst
= (ULONG
*)dstPixels
;
54 for(y
= 0; y
< height
; y
++)
56 for(x
= 0; x
< width
; x
++)
60 dst
[x
] = UPSHIFT16(s
, RGB15
, ARGB32
);
62 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
63 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
71 CONVERTFUNC(RGB15
,BGRA32
)
75 UWORD
*src
= (UWORD
*)srcPixels
;
76 ULONG
*dst
= (ULONG
*)dstPixels
;
79 for(y
= 0; y
< height
; y
++)
81 for(x
= 0; x
< width
; x
++)
85 dst
[x
] = UPSHIFT16(s
, RGB15
, BGRA32
);
87 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
88 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
96 CONVERTFUNC(RGB15
,RGBA32
)
100 UWORD
*src
= (UWORD
*)srcPixels
;
101 ULONG
*dst
= (ULONG
*)dstPixels
;
104 for(y
= 0; y
< height
; y
++)
106 for(x
= 0; x
< width
; x
++)
110 dst
[x
] = UPSHIFT16(s
, RGB15
, RGBA32
);
112 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
113 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
122 CONVERTFUNC(RGB15
,ABGR32
)
126 UWORD
*src
= (UWORD
*)srcPixels
;
127 ULONG
*dst
= (ULONG
*)dstPixels
;
130 for(y
= 0; y
< height
; y
++)
132 for(x
= 0; x
< width
; x
++)
136 dst
[x
] = UPSHIFT16(s
, RGB15
, ABGR32
);
138 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
139 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
147 CONVERTFUNC(RGB15
,RGB24
)
151 UWORD
*src
= (UWORD
*)srcPixels
;
152 UBYTE
*dst
= (UBYTE
*)dstPixels
;
155 for(y
= 0; y
< height
; y
++)
157 for(x
= 0; x
< width
; x
++)
161 s
= UPSHIFT16(s
, RGB15
, RGB24
);
163 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
165 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
166 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
174 CONVERTFUNC(RGB15
,BGR24
)
178 UWORD
*src
= (UWORD
*)srcPixels
;
179 UBYTE
*dst
= (UBYTE
*)dstPixels
;
182 for(y
= 0; y
< height
; y
++)
184 for(x
= 0; x
< width
; x
++)
188 s
= UPSHIFT16(s
, RGB15
, BGR24
);
190 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
192 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
193 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
201 CONVERTFUNC(RGB15
,RGB16OE
)
205 UWORD
*src
= (UWORD
*)srcPixels
;
206 UWORD
*dst
= (UWORD
*)dstPixels
;
209 for(y
= 0; y
< height
; y
++)
211 for(x
= 0; x
< width
; x
++)
215 s
= ((s
& (RGB15_RMASK
| RGB15_GMASK
)) << 1) | (s
& RGB15_BMASK
);
218 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
219 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
227 CONVERTFUNC(RGB15
,BGR16OE
)
236 CONVERTFUNC(RGB15
,BGR15OE
)
247 CONVERTFUNC(RGB15
,RGB15OE
)
258 CONVERTFUNC(RGB15
,XRGB32
)
262 UWORD
*src
= (UWORD
*)srcPixels
;
263 ULONG
*dst
= (ULONG
*)dstPixels
;
266 for(y
= 0; y
< height
; y
++)
268 for(x
= 0; x
< width
; x
++)
272 dst
[x
] = UPSHIFT16(s
, RGB15
, ARGB32
);
274 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
275 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
283 CONVERTFUNC(RGB15
,BGRX32
)
287 UWORD
*src
= (UWORD
*)srcPixels
;
288 ULONG
*dst
= (ULONG
*)dstPixels
;
291 for(y
= 0; y
< height
; y
++)
293 for(x
= 0; x
< width
; x
++)
297 dst
[x
] = UPSHIFT16(s
, RGB15
, BGRA32
);
299 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
300 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
308 CONVERTFUNC(RGB15
,RGBX32
)
312 UWORD
*src
= (UWORD
*)srcPixels
;
313 ULONG
*dst
= (ULONG
*)dstPixels
;
316 for(y
= 0; y
< height
; y
++)
318 for(x
= 0; x
< width
; x
++)
322 dst
[x
] = UPSHIFT16(s
, RGB15
, RGBA32
);
324 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
325 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
334 CONVERTFUNC(RGB15
,XBGR32
)
338 UWORD
*src
= (UWORD
*)srcPixels
;
339 ULONG
*dst
= (ULONG
*)dstPixels
;
342 for(y
= 0; y
< height
; y
++)
344 for(x
= 0; x
< width
; x
++)
348 dst
[x
] = UPSHIFT16(s
, RGB15
, ABGR32
);
350 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
351 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);