aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/jpeg/tinyjpeg.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-08-09 14:35:08 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-08-09 14:35:08 -0700
commit4b9ef3210bfe249acc1b63dadf6cf009275a9eaa (patch)
tree1d0e76b4d251509cb6b9ca5e29842bf5deddfdb9 /com32/lib/jpeg/tinyjpeg.c
parentca49c72894c52d770bd7c2669337b32fe83c6c2e (diff)
downloadsyslinux.git-4b9ef3210bfe249acc1b63dadf6cf009275a9eaa.tar.gz
syslinux.git-4b9ef3210bfe249acc1b63dadf6cf009275a9eaa.tar.xz
syslinux.git-4b9ef3210bfe249acc1b63dadf6cf009275a9eaa.zip
tinyjpeg: fix yuv420p, correct some of the initalization code
Fix the yuv420p in the presence of partial pixels (if we have an odd number of pixels in this mode, we include the chroma pixel.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32/lib/jpeg/tinyjpeg.c')
-rw-r--r--com32/lib/jpeg/tinyjpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/com32/lib/jpeg/tinyjpeg.c b/com32/lib/jpeg/tinyjpeg.c
index a9395a5d..3c6070f4 100644
--- a/com32/lib/jpeg/tinyjpeg.c
+++ b/com32/lib/jpeg/tinyjpeg.c
@@ -917,9 +917,9 @@ int tinyjpeg_decode(struct jdec_private *priv,
resync(priv);
/* Don't forget to that block can be either 8 or 16 lines */
- bytes_per_blocklines[0] <<= yshift_by_mcu;
- bytes_per_blocklines[1] <<= yshift_by_mcu;
- bytes_per_blocklines[2] <<= yshift_by_mcu;
+ bytes_per_blocklines[0] <<= yshift_by_mcu-3;
+ bytes_per_blocklines[1] <<= yshift_by_mcu-3;
+ bytes_per_blocklines[2] <<= yshift_by_mcu-3;
bytes_per_mcu[0] <<= xshift_by_mcu-3;
bytes_per_mcu[1] <<= xshift_by_mcu-3;