2 * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
5 #include "evas_common.h"
6 #include "evas_convert_rgb_32.h"
8 #ifdef BUILD_CONVERT_32_RGB_8888
9 #ifdef BUILD_CONVERT_32_RGB_ROT0
11 evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
18 dst_ptr = (DATA32 *)dst;
21 func = evas_common_draw_func_copy_get(w, 0);
23 for (y = 0; y < h; y++)
25 func(src_ptr, dst_ptr, w);
26 src_ptr += w + src_jump;
27 dst_ptr += w + dst_jump;
37 #ifdef BUILD_CONVERT_32_RGB_8888
38 #ifdef BUILD_CONVERT_32_RGB_ROT180
40 evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
46 dst_ptr = (DATA32 *)dst;
48 CONVERT_LOOP_START_ROT_180();
52 CONVERT_LOOP_END_ROT_180();
61 #ifdef BUILD_CONVERT_32_RGB_8888
62 #ifdef BUILD_CONVERT_32_RGB_ROT270
64 evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
70 dst_ptr = (DATA32 *)dst;
72 CONVERT_LOOP_START_ROT_270();
76 CONVERT_LOOP_END_ROT_270();
85 #ifdef BUILD_CONVERT_32_RGB_8888
86 #ifdef BUILD_CONVERT_32_RGB_ROT90
88 evas_common_convert_rgba_to_32bpp_rgb_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
94 dst_ptr = (DATA32 *)dst;
96 CONVERT_LOOP_START_ROT_90();
100 CONVERT_LOOP_END_ROT_90();
109 #ifdef BUILD_CONVERT_32_RGBX_8888
110 #ifdef BUILD_CONVERT_32_RGB_ROT0
112 evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
118 dst_ptr = (DATA32 *)dst;
120 CONVERT_LOOP_START_ROT_0();
122 // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
123 *dst_ptr = (*src_ptr << 8);
125 CONVERT_LOOP_END_ROT_0();
134 #ifdef BUILD_CONVERT_32_RGBX_8888
135 #ifdef BUILD_CONVERT_32_RGB_ROT180
137 evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
143 dst_ptr = (DATA32 *)dst;
145 CONVERT_LOOP_START_ROT_180();
147 // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
148 *dst_ptr = (*src_ptr << 8);
150 CONVERT_LOOP_END_ROT_180();
159 #ifdef BUILD_CONVERT_32_RGBX_8888
160 #ifdef BUILD_CONVERT_32_RGB_ROT270
162 evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
168 dst_ptr = (DATA32 *)dst;
170 CONVERT_LOOP_START_ROT_270();
172 // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
173 *dst_ptr = (*src_ptr << 8);
175 CONVERT_LOOP_END_ROT_270();
184 #ifdef BUILD_CONVERT_32_RGBX_8888
185 #ifdef BUILD_CONVERT_32_RGB_ROT90
187 evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
193 dst_ptr = (DATA32 *)dst;
195 CONVERT_LOOP_START_ROT_90();
197 // *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (B_VAL(src_ptr) << 8);
198 *dst_ptr = (*src_ptr << 8);
200 CONVERT_LOOP_END_ROT_90();
209 #ifdef BUILD_CONVERT_32_BGR_8888
210 #ifdef BUILD_CONVERT_32_RGB_ROT0
212 evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
218 dst_ptr = (DATA32 *)dst;
220 CONVERT_LOOP_START_ROT_0();
222 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
224 CONVERT_LOOP_END_ROT_0();
233 #ifdef BUILD_CONVERT_32_BGR_8888
234 #ifdef BUILD_CONVERT_32_RGB_ROT180
236 evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
242 dst_ptr = (DATA32 *)dst;
244 CONVERT_LOOP_START_ROT_180();
246 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
248 CONVERT_LOOP_END_ROT_180();
257 #ifdef BUILD_CONVERT_32_BGR_8888
258 #ifdef BUILD_CONVERT_32_RGB_ROT270
260 evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
266 dst_ptr = (DATA32 *)dst;
268 CONVERT_LOOP_START_ROT_270();
270 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
272 CONVERT_LOOP_END_ROT_270();
281 #ifdef BUILD_CONVERT_32_BGR_8888
282 #ifdef BUILD_CONVERT_32_RGB_ROT90
284 evas_common_convert_rgba_to_32bpp_bgr_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
290 dst_ptr = (DATA32 *)dst;
292 CONVERT_LOOP_START_ROT_90();
294 *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) | (R_VAL(src_ptr));
296 CONVERT_LOOP_END_ROT_90();
305 #ifdef BUILD_CONVERT_32_BGRX_8888
306 #ifdef BUILD_CONVERT_32_RGB_ROT0
308 evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
314 dst_ptr = (DATA32 *)dst;
316 CONVERT_LOOP_START_ROT_0();
318 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
320 CONVERT_LOOP_END_ROT_0();
329 #ifdef BUILD_CONVERT_32_BGRX_8888
330 #ifdef BUILD_CONVERT_32_RGB_ROT180
332 evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
338 dst_ptr = (DATA32 *)dst;
340 CONVERT_LOOP_START_ROT_180();
342 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
344 CONVERT_LOOP_END_ROT_180();
353 #ifdef BUILD_CONVERT_32_BGRX_8888
354 #ifdef BUILD_CONVERT_32_RGB_ROT270
356 evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
362 dst_ptr = (DATA32 *)dst;
364 CONVERT_LOOP_START_ROT_270();
366 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
368 CONVERT_LOOP_END_ROT_270();
377 #ifdef BUILD_CONVERT_32_BGRX_8888
378 #ifdef BUILD_CONVERT_32_RGB_ROT90
380 evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_90 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal)
386 dst_ptr = (DATA32 *)dst;
388 CONVERT_LOOP_START_ROT_90();
390 *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) | (R_VAL(src_ptr) << 8);
392 CONVERT_LOOP_END_ROT_90();