futher option reduction and ifdef removal.
authorCarsten Haitzler <raster@rasterman.com>
Tue, 16 Oct 2012 03:15:40 +0000 (03:15 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Tue, 16 Oct 2012 03:15:40 +0000 (03:15 +0000)
SVN revision: 78029

legacy/evas/configure.ac
legacy/evas/src/lib/engines/common/evas_convert_yuv.c
legacy/evas/src/lib/engines/common/evas_image_main.c
legacy/evas/src/lib/engines/common/evas_map_image.c
legacy/evas/src/lib/engines/common/evas_scale_sample.c
legacy/evas/src/lib/engines/common/evas_scale_smooth.c
legacy/evas/src/lib/engines/common/evas_scale_smooth.h
legacy/evas/src/lib/include/evas_options.h

index 2be005f..6dea202 100644 (file)
@@ -1181,9 +1181,6 @@ EVAS_CHECK_DITHER([no-dither-mask], [conversion to 16bpp without dither mask], [
 #####################################################################
 ## no longer options - turn on.
 
-AC_DEFINE(BUILD_SCALE_SAMPLE, 1, [YUV])
-AC_DEFINE(BUILD_SCALE_SMOOTH, 1, [YUV])
-AC_DEFINE(BUILD_CONVERT_YUV, 1, [YUV])
 AC_DEFINE(BUILD_CONVERT_8_RGB_332, 1, [8bpp RGB 332])
 AC_DEFINE(BUILD_CONVERT_8_RGB_666, 1, [8bpp RGB 666])
 AC_DEFINE(BUILD_CONVERT_8_RGB_232, 1, [8bpp RGB 232])
index 000cb01..eada664 100644 (file)
@@ -1,7 +1,7 @@
 #include "evas_common.h"
 #include "evas_convert_yuv.h"
 
-#if defined BUILD_MMX || defined BUILD_SSE
+#if defined BUILD_MMX
 # include "evas_mmx.h"
 #endif
 
@@ -15,8 +15,6 @@
 
 #endif
 
-#ifdef BUILD_CONVERT_YUV
-
 static void _evas_yuv_init         (void);
 static void _evas_yv12torgb_sse    (unsigned char **yuv, unsigned char *rgb, int w, int h);
 static void _evas_yv12torgb_mmx    (unsigned char **yuv, unsigned char *rgb, int w, int h);
@@ -108,8 +106,6 @@ const vector unsigned char pickrgb2 = AVV(0x3, 0x1, 0x2, 0x19,
 #endif
 #endif
 
-#ifdef BUILD_C
-
 /* shortcut speedup lookup-tables */
 static short _v1164[256];
 static short _v1596[256];
@@ -124,8 +120,6 @@ static unsigned char _clip_lut[1024];
 
 static int initted = 0;
 
-#endif
-
 void
 evas_common_convert_yuv_420p_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
 {
@@ -151,12 +145,10 @@ evas_common_convert_yuv_420p_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
 #endif
    else
      {
-#ifdef BUILD_C
        if (!initted) _evas_yuv_init();
        initted = 1;
        /* FIXME: diz may be faster sometimes */
        _evas_yv12torgb_raster(src, dst, w, h);
-#endif
      }
 }
 
@@ -724,7 +716,6 @@ _evas_yv12torgb_altivec(unsigned char **yuv, unsigned char *rgb, int w, int h)
 static void
 _evas_yuv_init(void)
 {
-#ifdef BUILD_C
    int i;
 
    for (i = 0; i < 256; i++)
@@ -742,14 +733,12 @@ _evas_yuv_init(void)
      {
        _clip_lut[i+384] = i < 0 ? 0 : (i > 255) ? 255 : i;
      }
-#endif
 }
 
 #ifdef BUILD_ALTIVEC
 static void
 _evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h)
 {
-#ifdef BUILD_C
    int xx, yy;
    int y, u, v, r, g, b;
    unsigned char *yp1, *yp2, *up, *vp;
@@ -820,14 +809,12 @@ _evas_yv12torgb_diz(unsigned char **yuv, unsigned char *rgb, int w, int h)
        dp1 += (w * 4);
        dp2 += (w * 4);
      }
-#endif
 }
 #endif
 
 static void
 _evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
 {
-#ifdef BUILD_C
    int xx, yy;
    int y, u, v;
    unsigned char *yp1, *yp2, *up, *vp;
@@ -887,43 +874,35 @@ _evas_yv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
        dp1 += (w * 4);
        dp2 += (w * 4);
      }
-#endif
 }
 
 void
 evas_common_convert_yuv_422_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
 {
-#ifdef BUILD_C
    if (!initted) _evas_yuv_init();
    initted = 1;
    _evas_yuy2torgb_raster(src, dst, w, h);
-#endif
 }
 
 void
 evas_common_convert_yuv_420_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
 {
-#ifdef BUILD_C
    if (!initted) _evas_yuv_init();
    initted = 1;
    _evas_nv12torgb_raster(src, dst, w, h);
-#endif
 }
 
 void
 evas_common_convert_yuv_420T_601_rgba(DATA8 **src, DATA8 *dst, int w, int h)
 {
-#ifdef BUILD_C
    if (initted) _evas_yuv_init();
    initted = 1;
    _evas_nv12tiledtorgb_raster(src, dst, w, h);
-#endif
 }
 
 static void
 _evas_yuy2torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
 {
-#ifdef BUILD_C
    int xx, yy;
    int y, u, v;
    unsigned char *yp1, *yp2, *up, *vp;
@@ -972,10 +951,8 @@ _evas_yuy2torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
             yp1 += 4; yp2 += 4; up += 4; vp += 4;
          }
      }
-#endif
 }
 
-#ifdef BUILD_C
 static inline void
 _evas_yuv2rgb_420_raster(unsigned char *yp1, unsigned char *yp2, unsigned char *up, unsigned char *vp,
                          unsigned char *dp1, unsigned char *dp2)
@@ -1055,13 +1032,10 @@ _evas_yuv2rgb_420_raster(unsigned char *yp1, unsigned char *yp2, unsigned char *
 #endif
    *((DATA32 *) dp2) = 0xff000000 + rgb;
 }
-#endif
 
 static void
 _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
 {
-#ifdef BUILD_C
-
 #define HANDLE_MACROBLOCK(YP1, YP2, UP, VP, DP1, DP2)                   \
    {                                                                    \
      int i;                                                             \
@@ -1211,13 +1185,11 @@ _evas_nv12tiledtorgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int
              HANDLE_MACROBLOCK(yp1, yp2, up, vp, dp1, dp2);
           }
      }
-#endif
 }
 
 static void
 _evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
 {
-#ifdef BUILD_C
    int xx, yy;
    unsigned char *yp1, *yp2, *up, *vp;
    unsigned char *dp1;
@@ -1251,8 +1223,5 @@ _evas_nv12torgb_raster(unsigned char **yuv, unsigned char *rgb, int w, int h)
         yp1 += w;
         yp2 += w;
      }
-#endif
 }
 
-#endif
-
index fffe524..e47cc96 100644 (file)
@@ -736,32 +736,24 @@ evas_common_image_colorspace_normalize(RGBA_Image *im)
          }
        break;
       case EVAS_COLORSPACE_YCBCR422P601_PL:
-#ifdef BUILD_CONVERT_YUV
        if ((im->image.data) && (*((unsigned char **)im->cs.data)))
          evas_common_convert_yuv_420p_601_rgba(im->cs.data, (DATA8*) im->image.data,
                                                im->cache_entry.w, im->cache_entry.h);
-#endif
        break;
       case EVAS_COLORSPACE_YCBCR422601_PL:
-#ifdef BUILD_CONVERT_YUV
         if ((im->image.data) && (*((unsigned char **)im->cs.data)))
           evas_common_convert_yuv_422_601_rgba(im->cs.data, (DATA8*) im->image.data,
                                                im->cache_entry.w, im->cache_entry.h);
-#endif
         break;
       case EVAS_COLORSPACE_YCBCR420NV12601_PL:
-#ifdef BUILD_CONVERT_YUV
         if ((im->image.data) && (*((unsigned char **)im->cs.data)))
           evas_common_convert_yuv_420_601_rgba(im->cs.data, (DATA8*) im->image.data,
                                                im->cache_entry.w, im->cache_entry.h);
-#endif
         break;
       case EVAS_COLORSPACE_YCBCR420TM12601_PL:
-#ifdef BUILD_CONVERT_YUV
         if ((im->image.data) && (*((unsigned char **)im->cs.data)))
           evas_common_convert_yuv_420T_601_rgba(im->cs.data, (DATA8*) im->image.data,
                                                 im->cache_entry.w, im->cache_entry.h);
-#endif
          break;
       default:
        break;
index 776820f..bc2d5a1 100644 (file)
@@ -5,11 +5,9 @@
 #include "evas_cs2_private.h"
 #endif
 
-#ifdef BUILD_SCALE_SMOOTH
-# ifdef BUILD_MMX
-#  undef SCALE_USING_MMX
-#  define SCALE_USING_MMX
-# endif
+#ifdef BUILD_MMX
+# undef SCALE_USING_MMX
+# define SCALE_USING_MMX
 #endif
 
 #define FPI 8
@@ -630,26 +628,23 @@ evas_common_map_rgba_prepare(RGBA_Image *src, RGBA_Image *dst,
    return EINA_TRUE;
 }
 
-#ifdef BUILD_SCALE_SMOOTH
-# ifdef BUILD_MMX
-#  undef FUNC_NAME
-#  undef FUNC_NAME_DO
-#  define FUNC_NAME evas_common_map_rgba_internal_mmx
-#  define FUNC_NAME_DO evas_common_map_rgba_internal_mmx_do
-#  undef SCALE_USING_MMX
-#  define SCALE_USING_MMX
-#  include "evas_map_image_internal.c"
-# endif
-# ifdef BUILD_C
-#  undef FUNC_NAME
-#  undef FUNC_NAME_DO
-#  define FUNC_NAME evas_common_map_rgba_internal
-#  define FUNC_NAME_DO evas_common_map_rgba_internal_do
-#  undef SCALE_USING_MMX
-#  include "evas_map_image_internal.c"
-# endif
+#ifdef BUILD_MMX
+# undef FUNC_NAME
+# undef FUNC_NAME_DO
+# define FUNC_NAME evas_common_map_rgba_internal_mmx
+# define FUNC_NAME_DO evas_common_map_rgba_internal_mmx_do
+# undef SCALE_USING_MMX
+# define SCALE_USING_MMX
+# include "evas_map_image_internal.c"
 #endif
 
+#undef FUNC_NAME
+#undef FUNC_NAME_DO
+#define FUNC_NAME evas_common_map_rgba_internal
+#define FUNC_NAME_DO evas_common_map_rgba_internal_do
+#undef SCALE_USING_MMX
+#include "evas_map_image_internal.c"
+
 EAPI void
 evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
                       RGBA_Draw_Context *dc,
@@ -685,9 +680,7 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
           evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level);
         else
 #endif
-#ifdef BUILD_C
           evas_common_map_rgba_internal(src, dst, dc, p, smooth, level);
-#endif
         return;
      }
    /* save out clip info */
@@ -709,9 +702,7 @@ evas_common_map_rgba(RGBA_Image *src, RGBA_Image *dst,
           evas_common_map_rgba_internal_mmx(src, dst, dc, p, smooth, level);
         else
 #endif
-#ifdef BUILD_C
           evas_common_map_rgba_internal(src, dst, dc, p, smooth, level);
-#endif        
      }
    /* restore clip info */
    dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
@@ -749,11 +740,9 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
                                                &spans->spans[0], smooth, level);
         else
 #endif
-#ifdef BUILD_C
           evas_common_map_rgba_internal_do(src, dst, dc,
                                            &spans->spans[0], smooth, level);
-#endif
-        return ;                                         
+        return;
      }
 
    for (i = 0; i < rects->active; ++i)
@@ -769,9 +758,7 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
                                                &spans->spans[i], smooth, level);
         else
 #endif
-#ifdef BUILD_C
           evas_common_map_rgba_internal_do(src, dst, dc,
                                            &spans->spans[i], smooth, level);
-#endif
      }
 }
index 5e34a37..f78aad3 100644 (file)
@@ -3,43 +3,6 @@
 
 static void scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
 
-#ifndef BUILD_SCALE_SMOOTH
-#ifdef BUILD_SCALE_SAMPLE
-EAPI void
-evas_common_scale_rgba_in_to_out_clip_smooth_do(const Cutout_Rects *reuse,
-                                                const Eina_Rectangle *clip,
-                                                RGBA_Image *src, RGBA_Image *dst,
-                                                RGBA_Draw_Context *dc,
-                                                int src_region_x, int src_region_y,
-                                                int src_region_w, int src_region_h,
-                                                int dst_region_x, int dst_region_y,
-                                                int dst_region_w, int dst_region_h)
-{
-   evas_common_scale_rgba_in_to_out_clip_sample_do(reuse, clip, src, dst, dc,
-                                   src_region_x, src_region_y,
-                                   src_region_w, src_region_h,
-                                   dst_region_x, dst_region_y,
-                                   dst_region_w, dst_region_h);
-}
-
-EAPI void
-evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
-                                RGBA_Draw_Context *dc,
-                                int src_region_x, int src_region_y,
-                                int src_region_w, int src_region_h,
-                                int dst_region_x, int dst_region_y,
-                                int dst_region_w, int dst_region_h)
-{
-   evas_common_scale_rgba_in_to_out_clip_sample(src, dst, dc,
-                                   src_region_x, src_region_y,
-                                   src_region_w, src_region_h,
-                                   dst_region_x, dst_region_y,
-                                   dst_region_w, dst_region_h);
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SAMPLE
 EAPI void
 evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
                                 RGBA_Draw_Context *dc,
@@ -443,38 +406,3 @@ scale_rgba_in_to_out_clip_sample_internal(RGBA_Image *src, RGBA_Image *dst,
          }
      }
 }
-#else
-#ifdef BUILD_SCALE_SMOOTH
-EAPI void
-evas_common_scale_rgba_in_to_out_clip_sample(RGBA_Image *src, RGBA_Image *dst,
-                                RGBA_Draw_Context *dc,
-                                int src_region_x, int src_region_y,
-                                int src_region_w, int src_region_h,
-                                int dst_region_x, int dst_region_y,
-                                int dst_region_w, int dst_region_h)
-{
-   evas_common_scale_rgba_in_to_out_clip_smooth(src, dst, dc,
-                                   src_region_x, src_region_y,
-                                   src_region_w, src_region_h,
-                                   dst_region_x, dst_region_y,
-                                   dst_region_w, dst_region_h);
-}
-
-EAPI void
-evas_common_scale_rgba_in_to_out_clip_sample_do(const Cutout_Rects *reuse,
-                                                const Eina_Rectangle *clip,
-                                                RGBA_Image *src, RGBA_Image *dst,
-                                                RGBA_Draw_Context *dc,
-                                                int src_region_x, int src_region_y,
-                                                int src_region_w, int src_region_h,
-                                                int dst_region_x, int dst_region_y,
-                                                int dst_region_w, int dst_region_h)
-{
-   evas_common_scale_rgba_in_to_out_clip_smooth_do(reuse, clip, src, dst, dc,
-                                   src_region_x, src_region_y,
-                                   src_region_w, src_region_h,
-                                   dst_region_x, dst_region_y,
-                                   dst_region_w, dst_region_h);
-}
-#endif
-#endif
index a3cb379..5cb1c68 100644 (file)
@@ -89,373 +89,26 @@ scale_calc_a_points(int *p, int s, int d, int c, int cc)
      }
 }
 
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_C
-EAPI void
-evas_common_scale_rgba_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *src_ptr2, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   src_ptr = src;
-   src_ptr2 = src + src_w;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       src_ptr = src + (y * src_w * 2);
-       src_ptr2 = src_ptr + src_w;
-       for (x = 0; x < dst_w; x++)
-         {
-            R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2;
-            G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2;
-            B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2;
-            A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1) + A_VAL(src_ptr2) + A_VAL(src_ptr2 + 1)) >> 2;
-
-            src_ptr+=2;
-            src_ptr2+=2;
-            dst_ptr++;
-         }
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_C
-EAPI void
-evas_common_scale_rgba_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   src_ptr = src;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       src_ptr = src + (y * src_w * 2);
-       for (x = 0; x < dst_w; x++)
-         {
-            R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1;
-            G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1;
-            B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1;
-            A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr + 1)) >> 1;
-
-            src_ptr+=2;
-            dst_ptr++;
-         }
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_C
-EAPI void
-evas_common_scale_rgba_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *src_ptr2, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   src_ptr = src;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       src_ptr = src + (y * src_w * 2);
-       src_ptr2 = src_ptr + src_w;
-       for (x = 0; x < dst_w; x++)
-         {
-            R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1;
-            G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1;
-            B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1;
-            A_VAL(dst_ptr) = (A_VAL(src_ptr) + A_VAL(src_ptr2)) >> 1;
-
-            src_ptr+=2;
-            src_ptr2+=2;
-            dst_ptr++;
-         }
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_C
-EAPI void
-evas_common_scale_rgb_mipmap_down_2x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *src_ptr2, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   src_ptr = src;
-   src_ptr2 = src + src_w;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       for (x = 0; x < dst_w; x++)
-         {
-            R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1) + R_VAL(src_ptr2) + R_VAL(src_ptr2 + 1)) >> 2;
-            G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1) + G_VAL(src_ptr2) + G_VAL(src_ptr2 + 1)) >> 2;
-            B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1) + B_VAL(src_ptr2) + B_VAL(src_ptr2 + 1)) >> 2;
-            A_VAL(dst_ptr) = 0xff;
-
-            src_ptr+=2;
-            src_ptr2+=2;
-            dst_ptr++;
-         }
-       src_ptr += src_w;
-       src_ptr2 += src_w;
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_C
-EAPI void
-evas_common_scale_rgb_mipmap_down_2x1_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   src_ptr = src;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       for (x = 0; x < dst_w; x++)
-         {
-            R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr + 1)) >> 1;
-            G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr + 1)) >> 1;
-            B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr + 1)) >> 1;
-            A_VAL(dst_ptr) = 0xff;
-
-            src_ptr+=2;
-            dst_ptr++;
-         }
-       src_ptr += src_w;
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_C
-EAPI void
-evas_common_scale_rgb_mipmap_down_1x2_c(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *src_ptr2, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   src_ptr = src;
-   src_ptr2 = src + src_w;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       for (x = 0; x < dst_w; x++)
-         {
-            R_VAL(dst_ptr) = (R_VAL(src_ptr) + R_VAL(src_ptr2)) >> 1;
-            G_VAL(dst_ptr) = (G_VAL(src_ptr) + G_VAL(src_ptr2)) >> 1;
-            B_VAL(dst_ptr) = (B_VAL(src_ptr) + B_VAL(src_ptr2)) >> 1;
-            A_VAL(dst_ptr) = 0xff;
-
-            src_ptr+=2;
-            src_ptr2+=2;
-            dst_ptr++;
-         }
-       src_ptr += src_w;
-       src_ptr2 += src_w;
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
 #ifdef BUILD_MMX
-EAPI void
-evas_common_scale_rgba_mipmap_down_2x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *src_ptr2, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   /* NB: Dead assignments (reassigned to different values below)
-   src_ptr = src;
-   src_ptr2 = src + src_w;
-    */
-
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       src_ptr = src + (y * src_w * 2);
-       src_ptr2 = src_ptr + src_w;
-       for (x = 0; x < dst_w; x++)
-         {
-            punpcklbw_m2r(src_ptr[0], mm0);
-            punpcklbw_m2r(src_ptr[1], mm1);
-            punpcklbw_m2r(src_ptr2[0], mm2);
-            punpcklbw_m2r(src_ptr2[1], mm3);
-            psrlw_i2r(8, mm0);
-            psrlw_i2r(8, mm1);
-            psrlw_i2r(8, mm2);
-            psrlw_i2r(8, mm3);
-            paddw_r2r(mm1, mm0);
-            paddw_r2r(mm2, mm0);
-            paddw_r2r(mm3, mm0);
-            psrlw_i2r(2, mm0);
-            packuswb_r2r(mm0, mm0);
-            movd_r2m(mm0, dst_ptr[0]);
-
-            src_ptr+=2;
-            src_ptr2+=2;
-            dst_ptr++;
-         }
-     }
-}
-#endif
+# undef SCALE_FUNC
+# define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx
+# undef SCALE_USING_MMX
+# define SCALE_USING_MMX
+# include "evas_scale_smooth_scaler.c"
 #endif
 
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_MMX
-EAPI void
-evas_common_scale_rgba_mipmap_down_2x1_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   src_ptr = src;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       src_ptr = src + (y * src_w * 2);
-       for (x = 0; x < dst_w; x++)
-         {
-            punpcklbw_m2r(src_ptr[0], mm0);
-            punpcklbw_m2r(src_ptr[1], mm1);
-            psrlw_i2r(8, mm0);
-            psrlw_i2r(8, mm1);
-            paddw_r2r(mm1, mm0);
-            psrlw_i2r(1, mm0);
-            packuswb_r2r(mm0, mm0);
-            movd_r2m(mm0, dst_ptr[0]);
+#undef SCALE_FUNC
+#define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c
+#undef SCALE_USING_MMX
+#include "evas_scale_smooth_scaler.c"
 
-            src_ptr+=2;
-            dst_ptr++;
-         }
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
-#ifdef BUILD_MMX
-EAPI void
-evas_common_scale_rgba_mipmap_down_1x2_mmx(DATA32 *src, DATA32 *dst, int src_w, int src_h)
-{
-   int x, y, dst_w, dst_h;
-   DATA32 *src_ptr, *src_ptr2, *dst_ptr;
-
-   dst_w = src_w >> 1;
-   dst_h = src_h >> 1;
-
-   if (dst_w < 1) dst_w = 1;
-   if (dst_h < 1) dst_h = 1;
-
-   /* NB: Dead assignment (gets reassigned later) */
-//   src_ptr = src;
-
-   src_ptr2 = src + src_w;
-   dst_ptr = dst;
-   for (y = 0; y < dst_h; y++)
-     {
-       src_ptr = src + (y * src_w * 2);
-       src_ptr2 = src_ptr + src_w;
-       for (x = 0; x < dst_w; x++)
-         {
-            punpcklbw_m2r(src_ptr[0], mm0);
-            punpcklbw_m2r(src_ptr2[0], mm1);
-            psrlw_i2r(8, mm0);
-            psrlw_i2r(8, mm1);
-            paddw_r2r(mm1, mm0);
-            psrlw_i2r(1, mm0);
-            packuswb_r2r(mm0, mm0);
-            movd_r2m(mm0, dst_ptr[0]);
-
-            src_ptr+=2;
-            src_ptr2+=2;
-            dst_ptr++;
-         }
-     }
-}
-#endif
-#endif
-
-#ifdef BUILD_SCALE_SMOOTH
-# ifdef BUILD_MMX
-#  undef SCALE_FUNC
-#  define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_mmx
-#  undef SCALE_USING_MMX
-#  define SCALE_USING_MMX
-#  include "evas_scale_smooth_scaler.c"
-# endif
-# ifdef BUILD_C
-#  undef SCALE_FUNC
-#  define SCALE_FUNC evas_common_scale_rgba_in_to_out_clip_smooth_c
-#  undef SCALE_USING_MMX
-#  include "evas_scale_smooth_scaler.c"
-# endif
 EAPI void
 evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
-                                RGBA_Draw_Context *dc,
-                                int src_region_x, int src_region_y,
-                                int src_region_w, int src_region_h,
-                                int dst_region_x, int dst_region_y,
-                                int dst_region_w, int dst_region_h)
+                                             RGBA_Draw_Context *dc,
+                                             int src_region_x, int src_region_y,
+                                             int src_region_w, int src_region_h,
+                                             int dst_region_x, int dst_region_y,
+                                             int dst_region_w, int dst_region_h)
 {
 # ifdef BUILD_MMX
    int mmx, sse, sse2;
@@ -517,13 +170,11 @@ evas_common_scale_rgba_in_to_out_clip_smooth(RGBA_Image *src, RGBA_Image *dst,
                                               dst_region_w, dst_region_h);
        else
 # endif
-# ifdef BUILD_C
          evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc,
-                                            src_region_x, src_region_y,
-                                            src_region_w, src_region_h,
-                                            dst_region_x, dst_region_y,
-                                            dst_region_w, dst_region_h);
-# endif
+                                                         src_region_x, src_region_y,
+                                                         src_region_w, src_region_h,
+                                                         dst_region_x, dst_region_y,
+                                                         dst_region_w, dst_region_h);
      }
    /* restore clip info */
    dc->clip.use = c; dc->clip.x = cx; dc->clip.y = cy; dc->clip.w = cw; dc->clip.h = ch;
@@ -561,14 +212,12 @@ evas_common_scale_rgba_in_to_out_clip_smooth_do(const Cutout_Rects *reuse,
                                               dst_region_w, dst_region_h);
        else
 # endif
-# ifdef BUILD_C
          evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc,
-                                            src_region_x, src_region_y,
-                                            src_region_w, src_region_h,
-                                            dst_region_x, dst_region_y,
-                                            dst_region_w, dst_region_h);
-# endif
-        return ;
+                                                         src_region_x, src_region_y,
+                                                         src_region_w, src_region_h,
+                                                         dst_region_x, dst_region_y,
+                                                         dst_region_w, dst_region_h);
+        return;
      }
 
    for (i = 0; i < reuse->active; ++i)
@@ -587,14 +236,10 @@ evas_common_scale_rgba_in_to_out_clip_smooth_do(const Cutout_Rects *reuse,
                                               dst_region_w, dst_region_h);
        else
 # endif
-# ifdef BUILD_C
          evas_common_scale_rgba_in_to_out_clip_smooth_c(src, dst, dc,
-                                            src_region_x, src_region_y,
-                                            src_region_w, src_region_h,
-                                            dst_region_x, dst_region_y,
-                                            dst_region_w, dst_region_h);
-# endif
+                                                         src_region_x, src_region_y,
+                                                         src_region_w, src_region_h,
+                                                         dst_region_x, dst_region_y,
+                                                         dst_region_w, dst_region_h);
      }
 }
-
-#endif
index 63ced50..913190f 100644 (file)
@@ -1,19 +1,7 @@
 #ifndef _EVAS_SCALE_SMOOTH_H
 #define _EVAS_SCALE_SMOOTH_H
 
-EAPI void evas_common_scale_rgba_mipmap_down_2x2_c          (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-EAPI void evas_common_scale_rgba_mipmap_down_2x1_c          (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-EAPI void evas_common_scale_rgba_mipmap_down_1x2_c          (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-EAPI void evas_common_scale_rgb_mipmap_down_2x2_c           (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-EAPI void evas_common_scale_rgb_mipmap_down_2x1_c           (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-EAPI void evas_common_scale_rgb_mipmap_down_1x2_c           (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-
-EAPI void evas_common_scale_rgba_mipmap_down_2x2_mmx        (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-EAPI void evas_common_scale_rgba_mipmap_down_2x1_mmx        (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-EAPI void evas_common_scale_rgba_mipmap_down_1x2_mmx        (DATA32 *src, DATA32 *dst, int src_w, int src_h);
-
 EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_mmx  (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
 EAPI void evas_common_scale_rgba_in_to_out_clip_smooth_c    (RGBA_Image *src, RGBA_Image *dst, RGBA_Draw_Context *dc, int src_region_x, int src_region_y, int src_region_w, int src_region_h, int dst_region_x, int dst_region_y, int dst_region_w, int dst_region_h);
 
-
 #endif /* _EVAS_SCALE_SMOOTH_H */
index f6739c0..b15221c 100644 (file)
 /*#define BUILD_CONVERT_32_RGB_ROT0*/
 /*#define BUILD_CONVERT_32_RGB_ROT270*/
 
-/*#define BUILD_SCALE_SAMPLE*/
-/*#define BUILD_SCALE_SMOOTH*/
-/*#define BUILD_SCALE_TRILINEAR*/
-
 /*#define BUILD_MMX*/
-/*#define BUILD_SSE*/
 /*#define BUILD_SSE3*/
-/*#define BUILD_C*/
 
 /*#define BUILD_LOADER_PNG*/
 /*#define BUILD_LOADER_JPEG*/
 /*#define BUILD_LOADER_EET*/
-/*#define BUILD_LOADER_EDB*/
 
 /*#define BUILD_FMEMOPEN*/
 
-/* check in that the user configured it right */
-#ifndef BUILD_MMX
-# ifndef BUILD_SSE3
-#  ifndef BUILD_SSE
-#   ifndef BUILD_C
-#   error "Please Read the README"
-    #endif
-#  endif
-# endif
-#endif
-
 #define DIRECT_SCALE
 
 #endif