Evas: Fixed the compilation warning with sw8 engine. This is not just to beautify the compilation output (which is a good enough cause on it's own behalf), right shift with negative values is not defined in the standard which means everything can happen.
SVN revision: 50954
This commit is contained in:
parent
f0a716f970
commit
7615995cc2
|
@ -21,8 +21,8 @@ void evas_common_convert_rgba_to_8bpp_rgb_332_dith (DATA32 *src, DATA8 *dst,
|
|||
|
||||
CONVERT_LOOP_START_ROT_0();
|
||||
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(3);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(2);
|
||||
dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3);
|
||||
dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
|
||||
/* r = (R_VAL(src_ptr)) >> (8 - 3);*/
|
||||
/* g = (G_VAL(src_ptr)) >> (8 - 3);*/
|
||||
/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
|
||||
|
@ -94,8 +94,8 @@ void evas_common_convert_rgba_to_8bpp_rgb_232_dith (DATA32 *src, DATA8 *dst,
|
|||
|
||||
CONVERT_LOOP_START_ROT_0();
|
||||
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(3);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(2);
|
||||
dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 3);
|
||||
dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
|
||||
/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
|
||||
/* g = (G_VAL(src_ptr)) >> (8 - 3);*/
|
||||
/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
|
||||
|
@ -127,7 +127,7 @@ void evas_common_convert_rgba_to_8bpp_rgb_222_dith (DATA32 *src, DATA8 *dst,
|
|||
|
||||
CONVERT_LOOP_START_ROT_0();
|
||||
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(2);
|
||||
dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
|
||||
/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
|
||||
/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
|
||||
/* b = (B_VAL(src_ptr)) >> (8 - 2);*/
|
||||
|
@ -159,8 +159,8 @@ void evas_common_convert_rgba_to_8bpp_rgb_221_dith (DATA32 *src, DATA8 *dst,
|
|||
|
||||
CONVERT_LOOP_START_ROT_0();
|
||||
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(2);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(1);
|
||||
dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
|
||||
dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
|
||||
/* r = (R_VAL(src_ptr)) >> (8 - 2);*/
|
||||
/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
|
||||
/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
|
||||
|
@ -192,8 +192,8 @@ void evas_common_convert_rgba_to_8bpp_rgb_121_dith (DATA32 *src, DATA8 *dst,
|
|||
|
||||
CONVERT_LOOP_START_ROT_0();
|
||||
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(2);
|
||||
dith2 = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(1);
|
||||
dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 2);
|
||||
dith2 = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
|
||||
/* r = (R_VAL(src_ptr)) >> (8 - 1);*/
|
||||
/* g = (G_VAL(src_ptr)) >> (8 - 2);*/
|
||||
/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
|
||||
|
@ -226,7 +226,7 @@ void evas_common_convert_rgba_to_8bpp_rgb_111_dith (DATA32 *src, DATA8 *dst,
|
|||
|
||||
CONVERT_LOOP_START_ROT_0();
|
||||
|
||||
dith = DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK] >> DM_SHF(1);
|
||||
dith = DM_SHR(DM_TABLE[(x + dith_x) & DM_MSK][(y + dith_y) & DM_MSK], 1);
|
||||
/* r = (R_VAL(src_ptr)) >> (8 - 1);*/
|
||||
/* g = (G_VAL(src_ptr)) >> (8 - 1);*/
|
||||
/* b = (B_VAL(src_ptr)) >> (8 - 1);*/
|
||||
|
|
|
@ -248,18 +248,20 @@ void *alloca (size_t);
|
|||
# define DM_BITS 4
|
||||
# define DM_DIV 16
|
||||
# define USE_DITHER_44 1
|
||||
# define DM_MSK (DM_SIZE - 1)
|
||||
# define DM_SHF(_b) (DM_BITS - (8 - _b))
|
||||
#else
|
||||
# define DM_TABLE _evas_dither_128128
|
||||
# define DM_SIZE 128
|
||||
# define DM_BITS 6
|
||||
# define DM_DIV 64
|
||||
# define USE_DITHER_128128 1
|
||||
# define DM_MSK (DM_SIZE - 1)
|
||||
# define DM_SHF(_b) (DM_BITS - (8 - _b))
|
||||
#endif
|
||||
|
||||
#define DM_MSK (DM_SIZE - 1)
|
||||
#define DM_SHF(_b) (DM_BITS - (8 - _b))
|
||||
/* Supports negative right shifts */
|
||||
#define DM_SHR(x, _b) ((DM_SHF(_b) >= 0) ? \
|
||||
((x) >> DM_SHF(_b)) : ((x) << -DM_SHF(_b)))
|
||||
|
||||
/* if more than 1/ALPHA_SPARSE_INV_FRACTION is "alpha" (1-254) then sparse
|
||||
* alpha flag gets set */
|
||||
#define ALPHA_SPARSE_INV_FRACTION 3
|
||||
|
|
Loading…
Reference in New Issue