summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch')
-rw-r--r--media-gfx/xli/files/xli-1.17.0-fix-scale-zoom.patch61
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);