1 CONVERTFUNC(RGB15
,RGB16
) /* Untested */
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
) /* Untested */
35 CONVERTFUNC(RGB15
,BGR15
) /* Untested */
46 CONVERTFUNC(RGB15
,ARGB32
) /* Untested */
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
) /* Untested */
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
) /* Untested */
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
) /* Untested */
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
) /* Untested */
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
) /* Untested */
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
) /* Untested */
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
) /* Untested */
236 CONVERTFUNC(RGB15
,BGR15OE
) /* Untested */
247 CONVERTFUNC(RGB15
,RGB15OE
) /* Untested */
258 CONVERTFUNC(RGB15
,XRGB32
) /* Untested */
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
) /* Untested */
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
) /* Untested */
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
) /* Untested */
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
);