From 3dddf985fac209db78f3e2189f8285de80f8992b Mon Sep 17 00:00:00 2001 From: chenk Date: Mon, 3 Aug 2020 06:38:41 +0000 Subject: [PATCH] fix issue #24. --- src/Makefile | 0 src/jfif.c | 6 +++--- 2 files changed, 3 insertions(+), 3 deletions(-) mode change 100755 => 100644 src/Makefile diff --git a/src/Makefile b/src/Makefile old mode 100755 new mode 100644 diff --git a/src/jfif.c b/src/jfif.c index a77570c..0cad6d7 100644 --- a/src/jfif.c +++ b/src/jfif.c @@ -540,9 +540,9 @@ int jfif_decode(void *ctxt, BMP *pb) for (j=0; jwidth; j++) { int ux = j * jfif->comp_info[1].samp_factor_h / sfh_max; int vx = j * jfif->comp_info[2].samp_factor_h / sfh_max; - usrc = yuv_datbuf[2] + uy * yuv_stride[2] + ux; - vsrc = yuv_datbuf[1] + vy * yuv_stride[1] + vx; - yuv_to_rgb(*ysrc, *vsrc, *usrc, bdst + 2, bdst + 1, bdst + 0); + usrc = yuv_datbuf[1] + uy * yuv_stride[1] + ux; + vsrc = yuv_datbuf[2] + vy * yuv_stride[2] + vx; + yuv_to_rgb(*ysrc, *usrc, *vsrc, bdst + 2, bdst + 1, bdst + 0); bdst += 3; ysrc += 1; }