rev 430 - trunk
[email protected] Mon, 5 Dec 2005 15:50:47 -0800 (PST)
| Newsgroups | gmane.comp.printing.ghostscript.jbig2dec.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: giles
Date: 2005-08-17 13:03:18 -0700 (Wed, 17 Aug 2005)
New Revision: 430
Modified:
trunk/jbig2_huffman.c
Log:
Hack around the lack of subtree support in jbig2_huffman_table_build()=20
by allocating a bigger flat table. This should be fixed the correct
way at some point, but lets us proceed with huffman text region
decoding implementation in the meantime.
Modified: trunk/jbig2_huffman.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_huffman.c 2005-08-16 23:57:25 UTC (rev 429)
+++ trunk/jbig2_huffman.c 2005-08-17 20:03:18 UTC (rev 430)
@@ -262,7 +262,10 @@
return result;
}
=20
-#define LOG_TABLE_SIZE_MAX 8
+/* TODO: 10 bits here is wasteful of memory here. We have support
+ for sub-trees in jbig2_huffman_get() above, but don't use it here
+ we should, and then revert to 8 bits */
+#define LOG_TABLE_SIZE_MAX 10
=20
/** Build an in-memory representation of a Huffman table from the
* set of template params provided by the spec or a table segment
@@ -270,7 +273,7 @@
Jbig2HuffmanTable *
jbig2_build_huffman_table (Jbig2Ctx *ctx, const Jbig2HuffmanParams *para=
ms)
{
- int LENCOUNT[256];
+ int LENCOUNT[1 << LOG_TABLE_SIZE_MAX];
int LENMAX =3D -1;
const Jbig2HuffmanLine *lines =3D params->lines;
int n_lines =3D params->n_lines;