forked from enlightenment/efl
rotation patches for 180 degrees - thankyoooo! :)
SVN revision: 28527
This commit is contained in:
parent
e10fb8599e
commit
55c06e75ff
|
@ -1601,6 +1601,29 @@ AC_ARG_ENABLE(convert-16-rgb-rot-0,
|
|||
]
|
||||
)
|
||||
|
||||
#######################################
|
||||
## Convert to 16bpp RGB with rotation of 180
|
||||
conv_16_rgb_rot_180="no"
|
||||
conv_16_rgb_rot_180="yes"
|
||||
AC_MSG_CHECKING(whether to build 16bpp rotation 180 converter code)
|
||||
AC_ARG_ENABLE(convert-16-rgb-rot-180,
|
||||
[ --enable-convert-16-rgb-rot-180 enable 16bpp rotation 180 converter code], [
|
||||
if test x"$enableval" = x"yes" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BUILD_CONVERT_16_RGB_ROT180, 1, [16bpp Rotation 180 Converter Code])
|
||||
conv_16_rgb_rot_180="yes"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
conv_16_rgb_rot_180="no"
|
||||
fi
|
||||
], [
|
||||
AC_MSG_RESULT($conv_16_rgb_rot_180)
|
||||
if test x"$conv_16_rgb_rot_180" = x"yes" ; then
|
||||
AC_DEFINE(BUILD_CONVERT_16_RGB_ROT180, 1, [16bpp Rotation 180 Converter Code])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
#######################################
|
||||
## Convert to 16bpp RGB with rotation of 270
|
||||
conv_16_rgb_rot_270="no"
|
||||
|
@ -1808,6 +1831,29 @@ AC_ARG_ENABLE(convert-32-rgb-rot-0,
|
|||
]
|
||||
)
|
||||
|
||||
#######################################
|
||||
## Convert to 32bpp RGB with rotation of 180
|
||||
conv_32_rgb_rot_180="no"
|
||||
conv_32_rgb_rot_180="yes"
|
||||
AC_MSG_CHECKING(whether to build 32bpp rotation 180 converter code)
|
||||
AC_ARG_ENABLE(convert-32-rgb-rot-180,
|
||||
[ --enable-convert-32-rgb-rot-180 enable 32bpp rotation 180 converter code], [
|
||||
if test x"$enableval" = x"yes" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(BUILD_CONVERT_32_RGB_ROT180, 1, [32bpp Rotation 180 Converter Support])
|
||||
conv_32_rgb_rot_180="yes"
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
conv_32_rgb_rot_180="no"
|
||||
fi
|
||||
], [
|
||||
AC_MSG_RESULT($conv_32_rgb_rot_180)
|
||||
if test x"$conv_32_rgb_rot_180" = x"yes" ; then
|
||||
AC_DEFINE(BUILD_CONVERT_32_RGB_ROT180, 1, [32bpp Rotation 180 Converter Support])
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
||||
#######################################
|
||||
## Convert to 32bpp RGB with rotation of 270
|
||||
conv_32_rgb_rot_270="no"
|
||||
|
@ -2078,8 +2124,8 @@ echo " 16bpp RGB 565 (444 ipaq): $conv_16_rgb_ipq"
|
|||
# FIXME: add 8bpp and below rotation
|
||||
echo " 16bpp Rotation 0........: $conv_16_rgb_rot_0"
|
||||
echo " 16bpp Rotation 90.......: $conv_16_rgb_rot_90"
|
||||
echo " 16bpp Rotation 180......: $conv_16_rgb_rot_180"
|
||||
echo " 16bpp Rotation 270......: $conv_16_rgb_rot_270"
|
||||
# FIXME: add 180 rotation
|
||||
echo " 24bpp RGB 888...........: $conv_24_rgb_888"
|
||||
echo " 24bpp BGR 888...........: $conv_24_bgr_888"
|
||||
# FIXME: add 24bpp rotation
|
||||
|
@ -2089,8 +2135,8 @@ echo " 32bpp BGR 8888..........: $conv_32_bgr_8888"
|
|||
echo " 32bpp BGRX 8888.........: $conv_32_bgrx_8888"
|
||||
echo " 32bpp Rotation 0........: $conv_32_rgb_rot_0"
|
||||
echo " 32bpp Rotation 90.......: $conv_32_rgb_rot_90"
|
||||
echo " 32bpp Rotation 180......: $conv_32_rgb_rot_180"
|
||||
echo " 32bpp Rotation 270......: $conv_32_rgb_rot_270"
|
||||
# FIXME: add 180 rotation
|
||||
echo
|
||||
echo "------------------------------------------------------------------------"
|
||||
echo
|
||||
|
|
|
@ -208,6 +208,15 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
|
||||
}
|
||||
#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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
|
||||
}
|
||||
#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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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;
|
||||
|
@ -451,6 +517,10 @@ evas_common_convert_func_get(DATA8 *dest, int w, int h, int depth, DATA32 rmask,
|
|||
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)
|
||||
return evas_common_convert_rgba_to_32bpp_bgrx_8888_rot_270;
|
||||
|
|
|
@ -92,6 +92,92 @@ evas_common_convert_rgba_to_16bpp_rgb_565_dith (DATA32 *src, DATA8 *dst, int src
|
|||
#endif
|
||||
#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
|
||||
|
@ -288,6 +374,7 @@ evas_common_convert_rgba2_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int sr
|
|||
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;
|
||||
|
@ -349,6 +436,94 @@ evas_common_convert_rgba_to_16bpp_bgr_565_dith (DATA32 *src, DATA8 *dst, int src
|
|||
#endif
|
||||
#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
|
||||
|
@ -604,6 +779,89 @@ evas_common_convert_rgba_to_16bpp_rgb_444_dith (DATA32 *src, DATA8 *dst, int src
|
|||
#endif
|
||||
#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
|
||||
|
@ -853,6 +1111,90 @@ evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DATA8 *dst, int
|
|||
#endif
|
||||
#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
|
||||
|
@ -1102,6 +1444,89 @@ evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src
|
|||
#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;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_16_RGB_555
|
||||
#ifdef BUILD_CONVERT_16_RGB_ROT270
|
||||
void
|
||||
|
|
|
@ -29,6 +29,30 @@ evas_common_convert_rgba_to_32bpp_rgb_8888 (DATA32 *src, DATA8 *dst, int src_jum
|
|||
#endif
|
||||
#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
|
||||
|
@ -102,6 +126,31 @@ evas_common_convert_rgba_to_32bpp_rgbx_8888 (DATA32 *src, DATA8 *dst, int src_ju
|
|||
#endif
|
||||
#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
|
||||
|
@ -176,6 +225,30 @@ evas_common_convert_rgba_to_32bpp_bgr_8888 (DATA32 *src, DATA8 *dst, int src_jum
|
|||
#endif
|
||||
#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
|
||||
|
@ -248,6 +321,30 @@ evas_common_convert_rgba_to_32bpp_bgrx_8888 (DATA32 *src, DATA8 *dst, int src_ju
|
|||
#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;
|
||||
dith_y = 0;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_CONVERT_32_BGRX_8888
|
||||
#ifdef BUILD_CONVERT_32_RGB_ROT270
|
||||
void
|
||||
|
|
|
@ -709,6 +709,17 @@ void evas_common_convert_rgba_to_16bpp_rgb_454645_dith (DATA32 *src, DA
|
|||
void evas_common_convert_rgba2_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
void evas_common_convert_rgba_to_16bpp_rgb_555_dith (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
|
||||
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);
|
||||
void evas_common_convert_rgba_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);
|
||||
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);
|
||||
|
@ -735,15 +746,19 @@ void evas_common_convert_rgba_to_24bpp_rgb_888 (DATA32 *src, DAT
|
|||
void evas_common_convert_rgba_to_24bpp_bgr_888 (DATA32 *src, DATA8 *dst, int src_jump, int dst_jump, int w, int h, int dith_x, int dith_y, DATA8 *pal);
|
||||
|
||||
void 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);
|
||||
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);
|
||||
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);
|
||||
void 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);
|
||||
void 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);
|
||||
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);
|
||||
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);
|
||||
void 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);
|
||||
void 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);
|
||||
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);
|
||||
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);
|
||||
void 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);
|
||||
void 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);
|
||||
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);
|
||||
void 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);
|
||||
void 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);
|
||||
|
||||
|
|
|
@ -94,6 +94,21 @@
|
|||
dst_ptr += dst_jump; \
|
||||
}
|
||||
|
||||
#define CONVERT_LOOP_START_ROT_180() \
|
||||
src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \
|
||||
for (y = 0; y < h; y++) \
|
||||
{ \
|
||||
for (x = 0; x < w; x++) \
|
||||
{
|
||||
|
||||
#define CONVERT_LOOP_END_ROT_180() \
|
||||
dst_ptr++; \
|
||||
src_ptr--; \
|
||||
} \
|
||||
src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \
|
||||
dst_ptr += dst_jump; \
|
||||
}
|
||||
|
||||
#define CONVERT_LOOP_START_ROT_270() \
|
||||
src_ptr = src + ((w - 1) * (h + src_jump)); \
|
||||
for (y = 0; y < h; y++) \
|
||||
|
@ -143,6 +158,25 @@ x++;
|
|||
dst_ptr += dst_jump; \
|
||||
}
|
||||
|
||||
#define CONVERT_LOOP2_START_ROT_180() \
|
||||
src_ptr = src + (w - 1) + ((h - 1) * (w + src_jump)); \
|
||||
for (y = 0; y < h; y++) \
|
||||
{ \
|
||||
for (x = 0; x < w; x++) \
|
||||
{
|
||||
|
||||
#define CONVERT_LOOP2_INC_ROT_180() \
|
||||
src_ptr--; \
|
||||
x++;
|
||||
|
||||
#define CONVERT_LOOP2_END_ROT_180() \
|
||||
dst_ptr+=2; \
|
||||
src_ptr--; \
|
||||
} \
|
||||
src_ptr = src + (w - 1) + ((h - y - 2) * (w + src_jump)); \
|
||||
dst_ptr += dst_jump; \
|
||||
}
|
||||
|
||||
#define CONVERT_LOOP2_START_ROT_270() \
|
||||
src_ptr = src + ((w - 1) * (h + src_jump)); \
|
||||
for (y = 0; y < h; y++) \
|
||||
|
|
|
@ -40,11 +40,9 @@ evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no,
|
|||
return NULL;
|
||||
|
||||
fb_init(vt_no, dev_no);
|
||||
if (rot == 0)
|
||||
if (rot == 0 || rot == 180)
|
||||
buf->priv.fb.fb = fb_setmode(w, h, fb_depth, refresh);
|
||||
else if (rot == 270)
|
||||
buf->priv.fb.fb = fb_setmode(h, w, fb_depth, refresh);
|
||||
else if (rot == 90)
|
||||
else if (rot == 90 || rot == 270)
|
||||
buf->priv.fb.fb = fb_setmode(h, w, fb_depth, refresh);
|
||||
if (!buf->priv.fb.fb) buf->priv.fb.fb = fb_getmode();
|
||||
if (!buf->priv.fb.fb)
|
||||
|
@ -54,17 +52,12 @@ evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no,
|
|||
}
|
||||
fb_fd = fb_postinit(buf->priv.fb.fb);
|
||||
|
||||
if (rot == 0)
|
||||
if (rot == 0 || rot == 180)
|
||||
{
|
||||
buf->w = buf->priv.fb.fb->width;
|
||||
buf->h = buf->priv.fb.fb->height;
|
||||
}
|
||||
else if (rot == 270)
|
||||
{
|
||||
buf->w = buf->priv.fb.fb->height;
|
||||
buf->h = buf->priv.fb.fb->width;
|
||||
}
|
||||
else if (rot == 90)
|
||||
else if (rot == 90 || rot == 270)
|
||||
{
|
||||
buf->w = buf->priv.fb.fb->height;
|
||||
buf->h = buf->priv.fb.fb->width;
|
||||
|
@ -88,7 +81,7 @@ evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no,
|
|||
buf->priv.mask.b |= (1 << (buf->priv.fb.fb->fb_var.blue.offset + i));
|
||||
|
||||
conv_func = NULL;
|
||||
if (buf->rot == 0)
|
||||
if (buf->rot == 0 || buf->rot == 180)
|
||||
conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
|
||||
buf->priv.fb.fb->fb_var.bits_per_pixel,
|
||||
buf->priv.mask.r,
|
||||
|
@ -96,15 +89,7 @@ evas_fb_outbuf_fb_setup_fb(int w, int h, int rot, Outbuf_Depth depth, int vt_no,
|
|||
buf->priv.mask.b,
|
||||
PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
else if (buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
|
||||
buf->priv.fb.fb->fb_var.bits_per_pixel,
|
||||
buf->priv.mask.r,
|
||||
buf->priv.mask.g,
|
||||
buf->priv.mask.b,
|
||||
PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
else if (buf->rot == 90)
|
||||
else if (buf->rot == 90 || buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
|
||||
buf->priv.fb.fb->fb_var.bits_per_pixel,
|
||||
buf->priv.mask.r,
|
||||
|
@ -163,6 +148,16 @@ evas_fb_outbuf_fb_update(Outbuf *buf, int x, int y, int w, int h)
|
|||
buf->priv.mask.b, PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
}
|
||||
else if (buf->rot == 180)
|
||||
{
|
||||
data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset +
|
||||
buf->priv.fb.fb->bpp *
|
||||
(buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width));
|
||||
conv_func = evas_common_convert_func_get(data, w, h, buf->priv.fb.fb->fb_var.bits_per_pixel,
|
||||
buf->priv.mask.r, buf->priv.mask.g,
|
||||
buf->priv.mask.b, PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
}
|
||||
else if (buf->rot == 270)
|
||||
{
|
||||
data = (DATA8 *)buf->priv.fb.fb->mem + buf->priv.fb.fb->mem_offset +
|
||||
|
@ -188,7 +183,7 @@ evas_fb_outbuf_fb_update(Outbuf *buf, int x, int y, int w, int h)
|
|||
DATA32 *src_data;
|
||||
|
||||
src_data = buf->priv.back_buf->image->data + (y * buf->w) + x;
|
||||
if (buf->rot == 0)
|
||||
if (buf->rot == 0 || buf->rot == 180)
|
||||
{
|
||||
conv_func(src_data, data,
|
||||
buf->w - w,
|
||||
|
@ -196,15 +191,7 @@ evas_fb_outbuf_fb_update(Outbuf *buf, int x, int y, int w, int h)
|
|||
w, h,
|
||||
x, y, NULL);
|
||||
}
|
||||
else if (buf->rot == 270)
|
||||
{
|
||||
conv_func(src_data, data,
|
||||
buf->w - w,
|
||||
buf->priv.fb.fb->width - h,
|
||||
h, w,
|
||||
x, y, NULL);
|
||||
}
|
||||
else if (buf->rot == 90)
|
||||
else if (buf->rot == 90 || buf->rot == 270)
|
||||
{
|
||||
conv_func(src_data, data,
|
||||
buf->w - w,
|
||||
|
@ -277,6 +264,18 @@ evas_fb_outbuf_fb_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, in
|
|||
buf->priv.mask.b, PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
}
|
||||
else if (buf->rot == 180)
|
||||
{
|
||||
data = (DATA8 *)buf->priv.fb.fb->mem +
|
||||
buf->priv.fb.fb->mem_offset +
|
||||
buf->priv.fb.fb->bpp *
|
||||
(buf->w - x - w + ((buf->h - y - h) * buf->priv.fb.fb->width));
|
||||
conv_func = evas_common_convert_func_get(data, w, h,
|
||||
buf->priv.fb.fb->fb_var.bits_per_pixel,
|
||||
buf->priv.mask.r, buf->priv.mask.g,
|
||||
buf->priv.mask.b, PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
}
|
||||
else if (buf->rot == 270)
|
||||
{
|
||||
data = (DATA8 *)buf->priv.fb.fb->mem +
|
||||
|
@ -306,7 +305,7 @@ evas_fb_outbuf_fb_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, in
|
|||
DATA32 *src_data;
|
||||
|
||||
src_data = update->image->data;
|
||||
if (buf->rot == 0)
|
||||
if (buf->rot == 0 || buf->rot == 180)
|
||||
{
|
||||
conv_func(src_data, data,
|
||||
0,
|
||||
|
@ -314,15 +313,7 @@ evas_fb_outbuf_fb_push_updated_region(Outbuf *buf, RGBA_Image *update, int x, in
|
|||
w, h,
|
||||
x, y, NULL);
|
||||
}
|
||||
else if (buf->rot == 270)
|
||||
{
|
||||
conv_func(src_data, data,
|
||||
0,
|
||||
buf->priv.fb.fb->width - h,
|
||||
h, w,
|
||||
x, y, NULL);
|
||||
}
|
||||
else if (buf->rot == 90)
|
||||
else if (buf->rot == 90 || buf->rot == 270)
|
||||
{
|
||||
conv_func(src_data, data,
|
||||
0,
|
||||
|
|
|
@ -125,6 +125,10 @@ evas_qtopia_outbuf_software_qtopia_push_updated_region(Outbuf *buf, RGBA_Image *
|
|||
d->fb.mask.r, d->fb.mask.g, d->fb.mask.b,
|
||||
PAL_MODE_NONE, buf->rot);
|
||||
}
|
||||
else if (buf->rot == 180)
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
else if (buf->rot == 270)
|
||||
{
|
||||
fb_mem = d->fb.data +
|
||||
|
@ -161,6 +165,10 @@ evas_qtopia_outbuf_software_qtopia_push_updated_region(Outbuf *buf, RGBA_Image *
|
|||
w, h,
|
||||
x, y, NULL);
|
||||
}
|
||||
else if (buf->rot == 180)
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
else if (buf->rot == 270)
|
||||
{
|
||||
src_data = update->image->data +
|
||||
|
|
|
@ -147,7 +147,7 @@ evas_software_x11_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
|
|||
}
|
||||
if (buf->priv.pal)
|
||||
{
|
||||
if (buf->rot == 0)
|
||||
if (buf->rot == 0 || buf->rot == 180)
|
||||
conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
|
||||
evas_software_x11_x_output_buffer_depth
|
||||
(xob), buf->priv.mask.r,
|
||||
|
@ -155,15 +155,7 @@ evas_software_x11_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
|
|||
buf->priv.mask.b,
|
||||
buf->priv.pal->colors,
|
||||
buf->rot);
|
||||
else if (buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
|
||||
evas_software_x11_x_output_buffer_depth
|
||||
(xob), buf->priv.mask.r,
|
||||
buf->priv.mask.g,
|
||||
buf->priv.mask.b,
|
||||
buf->priv.pal->colors,
|
||||
buf->rot);
|
||||
else if (buf->rot == 90)
|
||||
else if (buf->rot == 90 || buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
|
||||
evas_software_x11_x_output_buffer_depth
|
||||
(xob), buf->priv.mask.r,
|
||||
|
@ -174,21 +166,14 @@ evas_software_x11_outbuf_setup_x(int w, int h, int rot, Outbuf_Depth depth,
|
|||
}
|
||||
else
|
||||
{
|
||||
if (buf->rot == 0)
|
||||
if (buf->rot == 0 || buf->rot == 180)
|
||||
conv_func = evas_common_convert_func_get(0, buf->w, buf->h,
|
||||
evas_software_x11_x_output_buffer_depth
|
||||
(xob), buf->priv.mask.r,
|
||||
buf->priv.mask.g,
|
||||
buf->priv.mask.b, PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
else if (buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
|
||||
evas_software_x11_x_output_buffer_depth
|
||||
(xob), buf->priv.mask.r,
|
||||
buf->priv.mask.g,
|
||||
buf->priv.mask.b, PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
else if (buf->rot == 90)
|
||||
else if (buf->rot == 90 || buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0, buf->h, buf->w,
|
||||
evas_software_x11_x_output_buffer_depth
|
||||
(xob), buf->priv.mask.r,
|
||||
|
|
|
@ -170,7 +170,7 @@ evas_software_xcb_outbuf_setup_x(int w,
|
|||
}
|
||||
if (buf->priv.pal)
|
||||
{
|
||||
if (buf->rot == 0)
|
||||
if (buf->rot == 0 || buf->rot == 180)
|
||||
conv_func = evas_common_convert_func_get(0,
|
||||
buf->w,
|
||||
buf->h,
|
||||
|
@ -180,7 +180,7 @@ evas_software_xcb_outbuf_setup_x(int w,
|
|||
buf->priv.mask.b,
|
||||
buf->priv.pal->colors,
|
||||
buf->rot);
|
||||
else if (buf->rot == 270)
|
||||
else if (buf->rot == 90 || buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0,
|
||||
buf->h,
|
||||
buf->w,
|
||||
|
@ -190,20 +190,10 @@ evas_software_xcb_outbuf_setup_x(int w,
|
|||
buf->priv.mask.b,
|
||||
buf->priv.pal->colors,
|
||||
buf->rot);
|
||||
else if (buf->rot == 90)
|
||||
conv_func = evas_common_convert_func_get(0,
|
||||
buf->h,
|
||||
buf->w,
|
||||
evas_software_xcb_x_output_buffer_depth(xcbob),
|
||||
buf->priv.mask.r,
|
||||
buf->priv.mask.g,
|
||||
buf->priv.mask.b,
|
||||
buf->priv.pal->colors,
|
||||
buf->rot);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (buf->rot == 0)
|
||||
if (buf->rot == 0 || buf->rot == 180)
|
||||
conv_func = evas_common_convert_func_get(0,
|
||||
buf->w,
|
||||
buf->h,
|
||||
|
@ -213,17 +203,7 @@ evas_software_xcb_outbuf_setup_x(int w,
|
|||
buf->priv.mask.b,
|
||||
PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
else if (buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0,
|
||||
buf->h,
|
||||
buf->w,
|
||||
evas_software_xcb_x_output_buffer_depth(xcbob),
|
||||
buf->priv.mask.r,
|
||||
buf->priv.mask.g,
|
||||
buf->priv.mask.b,
|
||||
PAL_MODE_NONE,
|
||||
buf->rot);
|
||||
else if (buf->rot == 90)
|
||||
else if (buf->rot == 90 || buf->rot == 270)
|
||||
conv_func = evas_common_convert_func_get(0,
|
||||
buf->h,
|
||||
buf->w,
|
||||
|
|
Loading…
Reference in New Issue