exynos: fix scaling factor computation in g2d_copy_with_scale
authorTobias Jakobi <tjakobi@math.uni-bielefeld.de>
Sun, 1 Jun 2014 16:04:06 +0000 (18:04 +0200)
committerRob Clark <robclark@freedesktop.org>
Fri, 20 Jun 2014 19:53:01 +0000 (15:53 -0400)
When division of source and destination width yields the
scaling factor for the x-coordinate, then it should be
source/destination _height_ for y.

Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
exynos/exynos_fimg2d.c

index a565910..fc281b6 100644 (file)
@@ -451,7 +451,7 @@ int g2d_copy_with_scale(struct g2d_context *ctx, struct g2d_image *src,
        else {
                scale = 1;
                scale_x = (double)src_w / (double)dst_w;
-               scale_y = (double)src_w / (double)dst_h;
+               scale_y = (double)src_h / (double)dst_h;
        }
 
        if (src_x + src_w > src->width)