diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-09-05 22:11:46 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-09-05 22:11:46 +0000 |
commit | d395ffe765c51e294b16e2b05d8ed9fcf939b800 (patch) | |
tree | c440dfea6d4a1b961043b0c6ceb14185b8919980 /media-gfx/xli/files | |
parent | Added missing KDE-4.3 deps mask for this arch (ia64) to fix tree breakage (bu... (diff) | |
download | gentoo-2-d395ffe765c51e294b16e2b05d8ed9fcf939b800.tar.gz gentoo-2-d395ffe765c51e294b16e2b05d8ed9fcf939b800.tar.bz2 gentoo-2-d395ffe765c51e294b16e2b05d8ed9fcf939b800.zip |
Fix bug 282979: Broken -zoom in jpeg-7, so that we can stop restricting the jpeg-6 version.
(Portage version: 2.2_rc40/cvs/Linux x86_64)
Diffstat (limited to 'media-gfx/xli/files')
-rw-r--r-- | media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch b/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch new file mode 100644 index 000000000000..44ee262aee25 --- /dev/null +++ b/media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch @@ -0,0 +1,61 @@ +As of jpeg-7, the scale coefficents may be set to non-unitary values by the +initial DCT transform. This caused the original already-scale detection +algorithm in xli to break. + +To avoid this, set the already-scaled marker when we adjust the scale fraction +(that gets passed into the DCT). + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar -X x xli-2005-02-27.orig/jpeg.c xli-2005-02-27/jpeg.c +--- xli-2005-02-27.orig/jpeg.c 2005-02-27 16:42:39.000000000 -0800 ++++ xli-2005-02-27/jpeg.c 2009-09-05 15:02:12.462635389 -0700 +@@ -211,7 +211,7 @@ + xli_jpg_err jerr; + Image *image = 0; + byte **rows = 0; +- int i, rowbytes; ++ int i, rowbytes, flags; + + CURRFUNC("jpegLoad"); + zfp = zopen(fullname); +@@ -248,9 +248,13 @@ + if (verbose) + describe_jpeg(&cinfo, fullname); + ++ flags = 0; + if (image_ops->iscale > 0 && image_ops->iscale < 4) { +- cinfo.scale_num = 1; +- cinfo.scale_denom = 1 << image_ops->iscale; ++ flags |= FLAG_ISCALE; ++ //cinfo.scale_num = 1; ++ cinfo.scale_denom *= 1 << image_ops->iscale; ++ if (verbose) ++ printf("scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom); + } else if (image_ops->iscale_auto) { + image_ops->iscale = 0; + while (image_ops->iscale < 3 && (cinfo.image_width >> +@@ -258,9 +262,11 @@ + cinfo.image_height >> image_ops->iscale > + globals.dinfo.height * .9)) + image_ops->iscale += 1; +- cinfo.scale_denom = 1 << image_ops->iscale; ++ cinfo.scale_denom *= 1 << image_ops->iscale; ++ if(image_ops->iscale > 0) ++ flags |= FLAG_ISCALE; + if (verbose) +- printf("auto-scaling to 1/%d\n", cinfo.scale_denom); ++ printf("auto-scaling to %d/%d\n", cinfo.scale_num, cinfo.scale_denom); + } + znocache(zfp); + +@@ -288,8 +294,7 @@ + } + + image->gamma = RETURN_GAMMA; +- if (cinfo.scale_denom > 1) +- image->flags |= FLAG_ISCALE; ++ image->flags |= flags; + + rowbytes = cinfo.output_width * cinfo.output_components; + assert(image->pixlen * image->width == rowbytes); |