1 CONVERTFUNC(RGB15OE
,RGB15
)
10 CONVERTFUNC(RGB15OE
,RGB16
)
14 UWORD
*src
= (UWORD
*)srcPixels
;
15 UWORD
*dst
= (UWORD
*)dstPixels
;
18 for(y
= 0; y
< height
; y
++)
20 for(x
= 0; x
< width
; x
++)
22 UWORD s
= INV16(src
[x
]);
24 dst
[x
] = ((s
& (RGB15_RMASK
| RGB15_GMASK
)) << 1) | (s
& RGB15_BMASK
);
26 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
27 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
35 CONVERTFUNC(RGB15OE
,BGR16
)
44 CONVERTFUNC(RGB15OE
,BGR15
)
55 CONVERTFUNC(RGB15OE
,ARGB32
)
59 UWORD
*src
= (UWORD
*)srcPixels
;
60 ULONG
*dst
= (ULONG
*)dstPixels
;
63 for(y
= 0; y
< height
; y
++)
65 for(x
= 0; x
< width
; x
++)
67 ULONG s
= INV16(src
[x
]);
69 dst
[x
] = UPSHIFT16(s
, RGB15
, ARGB32
);
71 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
72 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
80 CONVERTFUNC(RGB15OE
,BGRA32
)
84 UWORD
*src
= (UWORD
*)srcPixels
;
85 ULONG
*dst
= (ULONG
*)dstPixels
;
88 for(y
= 0; y
< height
; y
++)
90 for(x
= 0; x
< width
; x
++)
92 ULONG s
= INV16(src
[x
]);
94 dst
[x
] = UPSHIFT16(s
, RGB15
, BGRA32
);
96 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
97 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
105 CONVERTFUNC(RGB15OE
,RGBA32
)
109 UWORD
*src
= (UWORD
*)srcPixels
;
110 ULONG
*dst
= (ULONG
*)dstPixels
;
113 for(y
= 0; y
< height
; y
++)
115 for(x
= 0; x
< width
; x
++)
117 ULONG s
= INV16(src
[x
]);
119 dst
[x
] = UPSHIFT16(s
, RGB15
, RGBA32
);
121 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
122 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
131 CONVERTFUNC(RGB15OE
,ABGR32
)
135 UWORD
*src
= (UWORD
*)srcPixels
;
136 ULONG
*dst
= (ULONG
*)dstPixels
;
139 for(y
= 0; y
< height
; y
++)
141 for(x
= 0; x
< width
; x
++)
143 ULONG s
= INV16(src
[x
]);
145 dst
[x
] = UPSHIFT16(s
, RGB15
, ABGR32
);
147 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
148 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
156 CONVERTFUNC(RGB15OE
,RGB24
)
160 UWORD
*src
= (UWORD
*)srcPixels
;
161 UBYTE
*dst
= (UBYTE
*)dstPixels
;
164 for(y
= 0; y
< height
; y
++)
166 for(x
= 0; x
< width
; x
++)
168 ULONG s
= INV16(src
[x
]);
170 s
= UPSHIFT16(s
, RGB15
, RGB24
);
172 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
174 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
175 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
183 CONVERTFUNC(RGB15OE
,BGR24
)
187 UWORD
*src
= (UWORD
*)srcPixels
;
188 UBYTE
*dst
= (UBYTE
*)dstPixels
;
191 for(y
= 0; y
< height
; y
++)
193 for(x
= 0; x
< width
; x
++)
195 ULONG s
= INV16(src
[x
]);
197 s
= UPSHIFT16(s
, RGB15
, BGR24
);
199 PUT24(dst
, COMP8(s
, 1), COMP8(s
, 2), COMP8(s
, 3))
201 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
202 dst
= (UBYTE
*)(((UBYTE
*)dst
) + dstMod
);
210 CONVERTFUNC(RGB15OE
,RGB16OE
)
214 UWORD
*src
= (UWORD
*)srcPixels
;
215 UWORD
*dst
= (UWORD
*)dstPixels
;
218 for(y
= 0; y
< height
; y
++)
220 for(x
= 0; x
< width
; x
++)
222 UWORD s
= INV16(src
[x
]);
224 s
= ((s
& (RGB15_RMASK
| RGB15_GMASK
)) << 1) | (s
& RGB15_BMASK
);
227 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
228 dst
= (UWORD
*)(((UBYTE
*)dst
) + dstMod
);
236 CONVERTFUNC(RGB15OE
,BGR16OE
)
245 CONVERTFUNC(RGB15OE
,BGR15OE
)
257 CONVERTFUNC(RGB15OE
,XRGB32
)
261 UWORD
*src
= (UWORD
*)srcPixels
;
262 ULONG
*dst
= (ULONG
*)dstPixels
;
265 for(y
= 0; y
< height
; y
++)
267 for(x
= 0; x
< width
; x
++)
269 ULONG s
= INV16(src
[x
]);
271 dst
[x
] = UPSHIFT16(s
, RGB15
, ARGB32
);
273 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
274 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
282 CONVERTFUNC(RGB15OE
,BGRX32
)
286 UWORD
*src
= (UWORD
*)srcPixels
;
287 ULONG
*dst
= (ULONG
*)dstPixels
;
290 for(y
= 0; y
< height
; y
++)
292 for(x
= 0; x
< width
; x
++)
294 ULONG s
= INV16(src
[x
]);
296 dst
[x
] = UPSHIFT16(s
, RGB15
, BGRA32
);
298 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
299 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
307 CONVERTFUNC(RGB15OE
,RGBX32
)
311 UWORD
*src
= (UWORD
*)srcPixels
;
312 ULONG
*dst
= (ULONG
*)dstPixels
;
315 for(y
= 0; y
< height
; y
++)
317 for(x
= 0; x
< width
; x
++)
319 ULONG s
= INV16(src
[x
]);
321 dst
[x
] = UPSHIFT16(s
, RGB15
, RGBA32
);
323 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
324 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);
333 CONVERTFUNC(RGB15OE
,XBGR32
)
337 UWORD
*src
= (UWORD
*)srcPixels
;
338 ULONG
*dst
= (ULONG
*)dstPixels
;
341 for(y
= 0; y
< height
; y
++)
343 for(x
= 0; x
< width
; x
++)
345 ULONG s
= INV16(src
[x
]);
347 dst
[x
] = UPSHIFT16(s
, RGB15
, ABGR32
);
349 src
= (UWORD
*)(((UBYTE
*)src
) + srcMod
);
350 dst
= (ULONG
*)(((UBYTE
*)dst
) + dstMod
);