Revert "Upstream merge"
[framework/uifw/evas.git] / src / lib / engines / common / evas_scale_smooth_scaler_downx_downy.c
index f830187..73da3a0 100644 (file)
@@ -3,7 +3,7 @@
    DATA32 *dptr, *sptr, *pix, *pbuf;
    int a, r, g, b, rx, gx, bx, ax;
    int xap, yap, pos;
-   int dyy, dxx;
+   //int dyy, dxx;
 #ifdef EVAS_SLI
    int ysli = dst_clip_y;
 #endif
 
    dptr = dst_ptr;
    pos = (src_region_y * src_w) + src_region_x;
-   dyy = dst_clip_y - dst_region_y;
-   dxx = dst_clip_x - dst_region_x;
+   //dyy = dst_clip_y - dst_region_y;
+   //dxx = dst_clip_x - dst_region_x;
 
-   xp = xpoints + dxx;
-   yp = ypoints + dyy;
-   xapp = xapoints + dxx;
-   yapp = yapoints + dyy;
+   xp = xpoints;// + dxx;
+   yp = ypoints;// + dyy;
+   xapp = xapoints;// + dxx;
+   yapp = yapoints;// + dyy;
    pbuf = buf;
 /*#ifndef SCALE_USING_MMX */
 /* for now there's no mmx down scaling - so C only */
                            g += (gx * j) >> 14;
                            b += (bx * j) >> 14;
                         }
-                      *pbuf++ = ARGB_JOIN(a >> 5, r >> 5, g >> 5, b >> 5);
+                      *pbuf++ = ARGB_JOIN(((a + (1 << 4)) >> 5), 
+                                           ((r + (1 << 4)) >> 5), 
+                                           ((g + (1 << 4)) >> 5), 
+                                           ((b + (1 << 4)) >> 5));
                       xp++;  xapp++;
                    }
                  
 #endif
             pbuf = buf;
             dptr += dst_w;   dst_clip_w = w;
-            xp = xpoints + dxx;
-            xapp = xapoints + dxx;
+            xp = xpoints;// + dxx;
+            xapp = xapoints;// + dxx;
             yp++;  yapp++;
          }
      }
                                 g += (gx * j) >> 14;
                                 b += (bx * j) >> 14;
                              }
-                           *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5);
+                            *pbuf++ = ARGB_JOIN(0xff, 
+                                                ((r + (1 << 4)) >> 5), 
+                                                ((g + (1 << 4)) >> 5), 
+                                                ((b + (1 << 4)) >> 5));
                            xp++;  xapp++;
                         }
                    }
                  ysli++;
 #endif
                  dptr += dst_w;   dst_clip_w = w;
-                 xp = xpoints + dxx;
-                 xapp = xapoints + dxx;
+                 xp = xpoints;// + dxx;
+                 xapp = xapoints;// + dxx;
                  yp++;  yapp++;
               }
          }
                                 g += (gx * j) >> 14;
                                 b += (bx * j) >> 14;
                              }
-                           *pbuf++ = ARGB_JOIN(0xff, r >> 5, g >> 5, b >> 5);
+                            *pbuf++ = ARGB_JOIN(0xff, 
+                                                ((r + (1 << 4)) >> 5), 
+                                                ((g + (1 << 4)) >> 5), 
+                                                ((b + (1 << 4)) >> 5));
                            xp++;  xapp++;
                         }
                       
 #endif
                  pbuf = buf;
                  dptr += dst_w;   dst_clip_w = w;
-                 xp = xpoints + dxx;
-                 xapp = xapoints + dxx;
+                 xp = xpoints;// + dxx;
+                 xapp = xapoints;// + dxx;
                  yp++;  yapp++;
               }
          }