diff mbox

[v2,3/3] exynos: fix scaling factor computation in g2d_copy_with_scale

Message ID 1401638646-4039-3-git-send-email-tjakobi@math.uni-bielefeld.de (mailing list archive)
State New, archived
Headers show

Commit Message

Tobias Jakobi June 1, 2014, 4:04 p.m. UTC
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>
---
 exynos/exynos_fimg2d.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Inki Dae June 13, 2014, 5:06 a.m. UTC | #1
On 2014? 06? 02? 01:04, Tobias Jakobi wrote:
> 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: Inki Dae <inki.dae@samsung.com>

Thanks,
Inki Dae

> 
> Signed-off-by: Tobias Jakobi <tjakobi@math.uni-bielefeld.de>
> ---
>  exynos/exynos_fimg2d.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
> index a565910..fc281b6 100644
> --- a/exynos/exynos_fimg2d.c
> +++ b/exynos/exynos_fimg2d.c
> @@ -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)
>
diff mbox

Patch

diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c
index a565910..fc281b6 100644
--- a/exynos/exynos_fimg2d.c
+++ b/exynos/exynos_fimg2d.c
@@ -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)