rev 436 - trunk

[email protected] Mon, 5 Dec 2005 16:02:27 -0800 (PST)
Newsgroups gmane.comp.printing.ghostscript.jbig2dec.cvs
Message-ID <[email protected]>
Author: giles
Date: 2005-08-31 21:13:36 -0700 (Wed, 31 Aug 2005)
New Revision: 436

Modified:
   trunk/jbig2_symbol_dict.c
   trunk/jbig2_text.c
Log:
Some minor corrections and bug fixes.


Modified: trunk/jbig2_symbol_dict.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_symbol_dict.c	2005-08-31 16:41:42 UTC (rev 435)
+++ trunk/jbig2_symbol_dict.c	2005-09-01 04:13:36 UTC (rev 436)
@@ -74,7 +74,10 @@
     jbig2_error(ctx, JBIG2_SEVERITY_INFO, segment->number,
         "dumping symbol dict as %d individual png files\n", dict->n_symb=
ols);
     for (index =3D 0; index < dict->n_symbols; index++) {
-        snprintf(filename, sizeof(filename), "symbol_%04d.png", index);
+        snprintf(filename, sizeof(filename), "symbol_%02d-%04d.png",=20
+		segment->number, index);
+	jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
+	  "dumping symbol %d/%d as '%s'", index, dict->n_symbols, filename);
 #ifdef HAVE_LIBPNG
         jbig2_image_write_png_file(dict->glyphs[index], filename);
 #else
@@ -497,9 +500,9 @@
 	}
=20
 	jbig2_error(ctx, JBIG2_SEVERITY_DEBUG, segment->number,
-	  "reading %dx%d collective bitmap for %d symbols (%d bytes)",
+	  "reading %dx%d collective bitmap for %d symbols (%d bytes%s)",
 	  image->width, image->height, NSYMSDECODED - HCFIRSTSYM,
-	  BMSIZE);
+	  BMSIZE, BMSIZE ? "" : " uncompressed");
=20
 	if (BMSIZE =3D=3D 0) {
 	  /* if BMSIZE =3D=3D 0 bitmap is uncompressed */

Modified: trunk/jbig2_text.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_text.c	2005-08-31 16:41:42 UTC (rev 435)
+++ trunk/jbig2_text.c	2005-09-01 04:13:36 UTC (rev 436)
@@ -275,7 +275,7 @@
     while (NINSTANCES < params->SBNUMINSTANCES) {
         /* (3b) */
         if (params->SBHUFF) {
-            /* todo */
+            DT =3D jbig2_huffman_get(hs, params->SBHUFFDT, &code);
         } else {
             code =3D jbig2_arith_int_decode(IADT, as, &DT);
         }
@@ -535,7 +535,7 @@
    =20
     if (params.SBHUFF) {
         /* 7.4.3.1.5 - Symbol ID Huffman table */
-	/* todo: write the bloody thing */=09
+	/* ...this is handled in the segment body decoder */=09
=20
         /* 7.4.3.1.6 - Other Huffman table selection */
 	switch (huffman_flags & 0x0003) {