rev 374 - trunk

[email protected] Thu, 23 Dec 2004 04:53:49 -0800 (PST)
Newsgroups gmane.comp.printing.ghostscript.jbig2dec.cvs
Message-ID <[email protected]>
Author: giles
Date: 2004-12-23 04:53:49 -0800 (Thu, 23 Dec 2004)
New Revision: 374

Modified:
   trunk/CHANGES
   trunk/jbig2_image.c
Log:
Properly mask the last row byte in the shift =3D=3D 0 compositor=20
case. Fixes bug 687843.


Modified: trunk/CHANGES
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/CHANGES	2004-12-23 12:07:53 UTC (rev 373)
+++ trunk/CHANGES	2004-12-23 12:53:49 UTC (rev 374)
@@ -1,7 +1,9 @@
 Version 0.8 (unreleased)
=20
+ * Fix an allocation error in the page array
  * properly handle non-OR image composition operators
- * Fix an allocation error in the page array
+ * Fix a UMR bug in the compositor
+ * successfully decodes ubc test streams 042_12,15,16,17,18
=20
 Version 0.7 (2004 December 8)
=20
@@ -9,7 +11,7 @@
  * refinement region handling
  * successfully decodes ubc test streams 042_21, 042_22 and 042_23
  * generic region template 3 handling with arbitrary AT locations
- * successfully decodes ubc test stream 042_6 and 042_7
+ * successfully decodes ubc test streams 042_6 and 042_7
 =20
 Version 0.6 (2003 December 31)
=20

Modified: trunk/jbig2_image.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/jbig2_image.c	2004-12-23 12:07:53 UTC (rev 373)
+++ trunk/jbig2_image.c	2004-12-23 12:53:49 UTC (rev 374)
@@ -198,9 +198,11 @@
             s +=3D src->stride;
         }
     } else if (shift =3D=3D 0) {
+	rightmask =3D (w & 7) ? 0x100 - (1 << (8 - (w & 7))) : 0xFF;
         for (j =3D 0; j < h; j++) {
-	    for (i =3D leftbyte; i <=3D rightbyte; i++)
+	    for (i =3D leftbyte; i < rightbyte; i++)
 		*d++ |=3D *s++;
+	    *d |=3D *s & rightmask;
             d =3D (dd +=3D dst->stride);
             s =3D (ss +=3D src->stride);
 	}