Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/engines/common
Modified Files:
evas_convert_main.c evas_convert_rgb_16.c
evas_convert_rgb_32.c
Log Message:
rotation patches for 180 degrees - thankyoooo! :)
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_convert_main.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- evas_convert_main.c 10 Feb 2007 17:23:06 -0000 1.7
+++ evas_convert_main.c 2 Mar 2007 14:51:16 -0000 1.8
@@ -208,6 +208,15 @@
return evas_common_convert_rgba_to_16bpp_rgb_565_dith;
}
#endif
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+ if (rotation == 180)
+ {
+ if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+ return
evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180;
+ else
+ return
evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180;
+ }
+#endif
#ifdef BUILD_CONVERT_16_RGB_ROT270
if (rotation == 270)
{
@@ -240,6 +249,15 @@
return evas_common_convert_rgba_to_16bpp_bgr_565_dith;
}
#endif
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+ if (rotation == 180)
+ {
+ if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+ return
evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180;
+ else
+ return
evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180;
+ }
+#endif
#ifdef BUILD_CONVERT_16_RGB_ROT270
if (rotation == 270)
{
@@ -272,6 +290,15 @@
return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
}
#endif
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+ if (rotation == 180)
+ {
+ if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+ return
evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180;
+ else
+ return
evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180;
+ }
+#endif
#ifdef BUILD_CONVERT_16_RGB_ROT270
if (rotation == 270)
{
@@ -304,6 +331,15 @@
return evas_common_convert_rgba_to_16bpp_rgb_444_dith;
}
#endif
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+ if (rotation == 180)
+ {
+ if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+ return
evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180;
+ else
+ return
evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180;
+ }
+#endif
#ifdef BUILD_CONVERT_16_RGB_ROT270
if (rotation == 270)
{
@@ -337,6 +373,15 @@
}
#endif
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+ if (rotation == 180)
+ {
+ if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+ return
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
+ else
+ return
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
+ }
+#endif
#ifdef BUILD_CONVERT_16_RGB_ROT270
if (rotation == 270)
{
@@ -370,6 +415,15 @@
}
#endif
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+ if (rotation == 180)
+ {
+ if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+ return
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
+ else
+ return
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
+ }
+#endif
#ifdef BUILD_CONVERT_16_RGB_ROT270
if (rotation == 270)
{
@@ -400,6 +454,10 @@
if (rotation == 0)
return evas_common_convert_rgba_to_32bpp_rgb_8888;
#endif
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+ if (rotation == 180)
+ return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_180;
+#endif
#ifdef BUILD_CONVERT_32_RGB_ROT270
if (rotation == 270)
return evas_common_convert_rgba_to_32bpp_rgb_8888_rot_270;
@@ -417,6 +475,10 @@
if (rotation == 0)
return evas_common_convert_rgba_to_32bpp_rgbx_8888;
#endif
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+ if (rotation == 180)
+ return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_180;
+#endif
#ifdef BUILD_CONVERT_32_RGB_ROT270
if (rotation == 270)
return evas_common_convert_rgba_to_32bpp_rgbx_8888_rot_270;
@@ -434,6 +496,10 @@
if (rotation == 0)
return evas_common_convert_rgba_to_32bpp_bgr_8888;
#endif
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+ if (rotation == 180)
+ return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_180;
+#endif
#ifdef BUILD_CONVERT_32_RGB_ROT270
if (rotation == 270)
return evas_common_convert_rgba_to_32bpp_bgr_8888_rot_270;
@@ -450,6 +516,10 @@
#ifdef BUILD_CONVERT_32_RGB_ROT0
if (rotation == 0)
return evas_common_convert_rgba_to_32bpp_bgrx_8888;
+#endif
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+ if (rotation == 180)
+ return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_180;
#endif
#ifdef BUILD_CONVERT_32_RGB_ROT270
if (rotation == 270)
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_convert_rgb_16.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_convert_rgb_16.c 10 Feb 2007 17:23:06 -0000 1.5
+++ evas_convert_rgb_16.c 2 Mar 2007 14:51:16 -0000 1.6
@@ -93,6 +93,92 @@
#endif
#ifdef BUILD_CONVERT_16_RGB_565
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r1, g1, b1;
+ DATA8 r2, g2, b2;
+ DATA8 dith, dith2;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP2_START_ROT_180();
+
+ r1 = (R_VAL(src_ptr)) >> 3;
+ g1 = (G_VAL(src_ptr)) >> 2;
+ b1 = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
+ if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
+ if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
+ if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
+
+ CONVERT_LOOP2_INC_ROT_180();
+
+ r2 = (R_VAL(src_ptr)) >> 3;
+ g2 = (G_VAL(src_ptr)) >> 2;
+ b2 = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
+ if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
+ if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
+ if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
+
+#ifndef WORDS_BIGENDIAN
+ *((DATA32 *)dst_ptr) =
+ (r2 << 27) | (g2 << 21) | (b2 << 16) |
+ (r1 << 11) | (g1 << 5 ) | (b1 );
+#else
+ *((DATA32 *)dst_ptr) =
+ (r1 << 27) | (g1 << 21) | (b1 << 16) |
+ (r2 << 11) | (g2 << 5 ) | (b2 );
+#endif
+
+ CONVERT_LOOP2_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_RGB_565
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r, g, b;
+ DATA8 dith, dith2;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+ r = (R_VAL(src_ptr)) >> 3;
+ g = (G_VAL(src_ptr)) >> 2;
+ b = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
+ if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
+ if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
+ if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
+
+ *dst_ptr = (r << 11) | (g << 5) | (b);
+
+ CONVERT_LOOP_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_RGB_565
#ifdef BUILD_CONVERT_16_RGB_ROT270
void
evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
@@ -288,6 +374,7 @@
if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
+
CONVERT_LOOP2_INC_ROT_0();
r2 = (R_VAL(src_ptr)) >> 3;
@@ -350,6 +437,94 @@
#endif
#ifdef BUILD_CONVERT_16_BGR_565
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r1, g1, b1;
+ DATA8 r2, g2, b2;
+ DATA8 dith, dith2;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP2_START_ROT_180();
+
+ r1 = (R_VAL(src_ptr)) >> 3;
+ g1 = (G_VAL(src_ptr)) >> 2;
+ b1 = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
+ if (((R_VAL(src_ptr) - (r1 << 3)) >= dith ) && (r1 < 0x1f)) r1++;
+ if (((G_VAL(src_ptr) - (g1 << 2)) >= dith2) && (g1 < 0x3f)) g1++;
+ if (((B_VAL(src_ptr) - (b1 << 3)) >= dith ) && (b1 < 0x1f)) b1++;
+
+ CONVERT_LOOP2_INC_ROT_180();
+
+ r2 = (R_VAL(src_ptr)) >> 3;
+ g2 = (G_VAL(src_ptr)) >> 2;
+ b2 = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
+ if (((R_VAL(src_ptr) - (r2 << 3)) >= dith ) && (r2 < 0x1f)) r2++;
+ if (((G_VAL(src_ptr) - (g2 << 2)) >= dith2) && (g2 < 0x3f)) g2++;
+ if (((B_VAL(src_ptr) - (b2 << 3)) >= dith ) && (b2 < 0x1f)) b2++;
+
+#ifndef WORDS_BIGENDIAN
+ *((DATA32 *)dst_ptr) =
+ (b2 << 27) | (g2 << 21) | (r2 << 16) |
+ (b1 << 11) | (g1 << 5 ) | (r1 );
+#else
+ *((DATA32 *)dst_ptr) =
+ (b1 << 27) | (g1 << 21) | (r1 << 16) |
+ (b2 << 11) | (g2 << 5 ) | (r2 );
+#endif
+
+ CONVERT_LOOP2_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_BGR_565
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r, g, b;
+ DATA8 dith, dith2;
+
+ dst_ptr = (DATA16 *)dst;
+
+ fprintf(stderr, "evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180\n");
+
+ CONVERT_LOOP_START_ROT_180();
+
+ r = (R_VAL(src_ptr)) >> 3;
+ g = (G_VAL(src_ptr)) >> 2;
+ b = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(6);
+ if (((R_VAL(src_ptr) - (r << 3)) >= dith ) && (r < 0x1f)) r++;
+ if (((G_VAL(src_ptr) - (g << 2)) >= dith2) && (g < 0x3f)) g++;
+ if (((B_VAL(src_ptr) - (b << 3)) >= dith ) && (b < 0x1f)) b++;
+
+ *dst_ptr = (b << 11) | (g << 5) | (r);
+
+ CONVERT_LOOP_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_BGR_565
#ifdef BUILD_CONVERT_16_RGB_ROT270
void
evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
@@ -605,6 +780,89 @@
#endif
#ifdef BUILD_CONVERT_16_RGB_444
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r1, g1, b1;
+ DATA8 r2, g2, b2;
+ DATA8 dith;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP2_START_ROT_180();
+
+ r1 = (R_VAL(src_ptr)) >> 4;
+ g1 = (G_VAL(src_ptr)) >> 4;
+ b1 = (B_VAL(src_ptr)) >> 4;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
+ if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
+ if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
+ if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
+
+ CONVERT_LOOP2_INC_ROT_180();
+
+ r2 = (R_VAL(src_ptr)) >> 4;
+ g2 = (G_VAL(src_ptr)) >> 4;
+ b2 = (B_VAL(src_ptr)) >> 4;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
+ if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
+ if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
+ if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
+
+#ifndef WORDS_BIGENDIAN
+ *((DATA32 *)dst_ptr) =
+ (r2 << 24) | (g2 << 20) | (b2 << 16) |
+ (r1 << 8 ) | (g1 << 4 ) | (b1 );
+#else
+ *((DATA32 *)dst_ptr) =
+ (r1 << 24) | (g1 << 20) | (b1 << 16) |
+ (r2 << 8 ) | (g2 << 4 ) | (b2 );
+#endif
+
+ CONVERT_LOOP2_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_RGB_444
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r, g, b;
+ DATA8 dith;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+ r = (R_VAL(src_ptr)) >> 4;
+ g = (G_VAL(src_ptr)) >> 4;
+ b = (B_VAL(src_ptr)) >> 4;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
+ if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
+ if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
+ if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
+
+ *dst_ptr = (r << 8) | (g << 4) | (b);
+
+ CONVERT_LOOP_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_RGB_444
#ifdef BUILD_CONVERT_16_RGB_ROT270
void
evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
@@ -854,6 +1112,90 @@
#endif
#ifdef BUILD_CONVERT_16_RGB_454645
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r1, g1, b1;
+ DATA8 r2, g2, b2;
+ DATA8 dith;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP2_START_ROT_180();
+
+ r1 = (R_VAL(src_ptr)) >> 4;
+ g1 = (G_VAL(src_ptr)) >> 4;
+ b1 = (B_VAL(src_ptr)) >> 4;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
+ if (((R_VAL(src_ptr) - (r1 << 4)) >= dith ) && (r1 < 0x0f)) r1++;
+ if (((G_VAL(src_ptr) - (g1 << 4)) >= dith ) && (g1 < 0x0f)) g1++;
+ if (((B_VAL(src_ptr) - (b1 << 4)) >= dith ) && (b1 < 0x0f)) b1++;
+
+ CONVERT_LOOP2_INC_ROT_180();
+
+ r2 = (R_VAL(src_ptr)) >> 4;
+ g2 = (G_VAL(src_ptr)) >> 4;
+ b2 = (B_VAL(src_ptr)) >> 4;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
+ if (((R_VAL(src_ptr) - (r2 << 4)) >= dith ) && (r2 < 0x0f)) r2++;
+ if (((G_VAL(src_ptr) - (g2 << 4)) >= dith ) && (g2 < 0x0f)) g2++;
+ if (((B_VAL(src_ptr) - (b2 << 4)) >= dith ) && (b2 < 0x0f)) b2++;
+
+#ifndef WORDS_BIGENDIAN
+ *((DATA32 *)dst_ptr) =
+ (r2 << 28) | (g2 << 23) | (b2 << 17) |
+ (r1 << 12) | (g1 << 7 ) | (b1 << 1 );
+#else
+ *((DATA32 *)dst_ptr) =
+ (r1 << 28) | (g1 << 23) | (b1 << 17) |
+ (r2 << 12) | (g2 << 7 ) | (b2 << 1 );
+#endif
+
+ CONVERT_LOOP2_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_RGB_454645
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r, g, b;
+ DATA8 dith;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+ r = (R_VAL(src_ptr)) >> 4;
+ g = (G_VAL(src_ptr)) >> 4;
+ b = (B_VAL(src_ptr)) >> 4;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(4);
+ if (((R_VAL(src_ptr) - (r << 4)) >= dith ) && (r < 0x0f)) r++;
+ if (((G_VAL(src_ptr) - (g << 4)) >= dith ) && (g < 0x0f)) g++;
+ if (((B_VAL(src_ptr) - (b << 4)) >= dith ) && (b < 0x0f)) b++;
+
+ *dst_ptr = (r << 12) | (g << 7) | (b << 1);
+
+ CONVERT_LOOP_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+
+#ifdef BUILD_CONVERT_16_RGB_454645
#ifdef BUILD_CONVERT_16_RGB_ROT270
void
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
@@ -1096,6 +1438,89 @@
*dst_ptr = (r << 10) | (g << 5) | (b);
CONVERT_LOOP_END_ROT_0();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_RGB_555
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r1, g1, b1;
+ DATA8 r2, g2, b2;
+ DATA8 dith;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP2_START_ROT_180();
+
+ r1 = (R_VAL(src_ptr)) >> 3;
+ g1 = (G_VAL(src_ptr)) >> 3;
+ b1 = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ if (((R_VAL(src_ptr) - (r1 << 3)) >= dith) && (r1 < 0x1f)) r1++;
+ if (((G_VAL(src_ptr) - (g1 << 3)) >= dith) && (g1 < 0x1f)) g1++;
+ if (((B_VAL(src_ptr) - (b1 << 3)) >= dith) && (b1 < 0x1f)) b1++;
+
+ CONVERT_LOOP2_INC_ROT_180();
+
+ r2 = (R_VAL(src_ptr)) >> 3;
+ g2 = (G_VAL(src_ptr)) >> 3;
+ b2 = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ if (((R_VAL(src_ptr) - (r2 << 3)) >= dith) && (r2 < 0x1f)) r2++;
+ if (((G_VAL(src_ptr) - (g2 << 3)) >= dith) && (g2 < 0x1f)) g2++;
+ if (((B_VAL(src_ptr) - (b2 << 3)) >= dith) && (b2 < 0x1f)) b2++;
+
+#ifndef WORDS_BIGENDIAN
+ *((DATA32 *)dst_ptr) =
+ (r2 << 26) | (g2 << 21) | (b2 << 16) |
+ (r1 << 10) | (g1 << 5 ) | (b1 );
+#else
+ *((DATA32 *)dst_ptr) =
+ (r1 << 26) | (g1 << 21) | (b1 << 16) |
+ (r2 << 10) | (g2 << 5 ) | (b2 );
+#endif
+
+ CONVERT_LOOP2_END_ROT_180();
+ return;
+ pal = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_16_RGB_555
+#ifdef BUILD_CONVERT_16_RGB_ROT180
+void
+evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180 (DATA32 *src, DATA8
*dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8
*pal)
+{
+ DATA32 *src_ptr;
+ DATA16 *dst_ptr;
+ int x, y;
+ DATA8 r, g, b;
+ DATA8 dith;
+
+ dst_ptr = (DATA16 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+ r = (R_VAL(src_ptr)) >> 3;
+ g = (G_VAL(src_ptr)) >> 3;
+ b = (B_VAL(src_ptr)) >> 3;
+ dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(5);
+ if (((R_VAL(src_ptr) - (r << 3)) >= dith) && (r < 0x1f)) r++;
+ if (((G_VAL(src_ptr) - (g << 3)) >= dith) && (g < 0x1f)) g++;
+ if (((B_VAL(src_ptr) - (b << 3)) >= dith) && (b < 0x1f)) b++;
+
+ *dst_ptr = (r << 10) | (g << 5) | (b);
+
+ CONVERT_LOOP_END_ROT_180();
return;
pal = 0;
}
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_convert_rgb_32.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- evas_convert_rgb_32.c 30 Sep 2006 10:18:32 -0000 1.5
+++ evas_convert_rgb_32.c 2 Mar 2007 14:51:16 -0000 1.6
@@ -30,6 +30,30 @@
#endif
#ifdef BUILD_CONVERT_32_RGB_8888
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+void
+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)
+{
+ DATA32 *src_ptr;
+ DATA32 *dst_ptr;
+ int x, y;
+
+ dst_ptr = (DATA32 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+ *dst_ptr = *src_ptr;
+
+ CONVERT_LOOP_END_ROT_180();
+ return;
+ pal = 0;
+ dith_x = 0;
+ dith_y = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_32_RGB_8888
#ifdef BUILD_CONVERT_32_RGB_ROT270
void
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)
@@ -103,6 +127,31 @@
#endif
#ifdef BUILD_CONVERT_32_RGBX_8888
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+void
+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)
+{
+ DATA32 *src_ptr;
+ DATA32 *dst_ptr;
+ int x, y;
+
+ dst_ptr = (DATA32 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+// *dst_ptr = (R_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) |
(B_VAL(src_ptr) << 8);
+ *dst_ptr = (*src_ptr << 8);
+
+ CONVERT_LOOP_END_ROT_180();
+ return;
+ pal = 0;
+ dith_x = 0;
+ dith_y = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_32_RGBX_8888
#ifdef BUILD_CONVERT_32_RGB_ROT270
void
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)
@@ -177,6 +226,30 @@
#endif
#ifdef BUILD_CONVERT_32_BGR_8888
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+void
+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)
+{
+ DATA32 *src_ptr;
+ DATA32 *dst_ptr;
+ int x, y;
+
+ dst_ptr = (DATA32 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+ *dst_ptr = (B_VAL(src_ptr) << 16) | (G_VAL(src_ptr) << 8) |
(R_VAL(src_ptr));
+
+ CONVERT_LOOP_END_ROT_180();
+ return;
+ pal = 0;
+ dith_x = 0;
+ dith_y = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_32_BGR_8888
#ifdef BUILD_CONVERT_32_RGB_ROT270
void
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)
@@ -240,6 +313,30 @@
*dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) |
(R_VAL(src_ptr) << 8);
CONVERT_LOOP_END_ROT_0();
+ return;
+ pal = 0;
+ dith_x = 0;
+ dith_y = 0;
+}
+#endif
+#endif
+
+#ifdef BUILD_CONVERT_32_BGRX_8888
+#ifdef BUILD_CONVERT_32_RGB_ROT180
+void
+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)
+{
+ DATA32 *src_ptr;
+ DATA32 *dst_ptr;
+ int x, y;
+
+ dst_ptr = (DATA32 *)dst;
+
+ CONVERT_LOOP_START_ROT_180();
+
+ *dst_ptr = (B_VAL(src_ptr) << 24) | (G_VAL(src_ptr) << 16) |
(R_VAL(src_ptr) << 8);
+
+ CONVERT_LOOP_END_ROT_180();
return;
pal = 0;
dith_x = 0;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs