[jbig2-cvs] rev 430 - trunk
giles at ghostscript.com
giles at ghostscript.com
Mon Dec 5 15:50:47 PST 2005
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()
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
===================================================================
--- 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;
}
-#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
/** 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 *params)
{
- int LENCOUNT[256];
+ int LENCOUNT[1 << LOG_TABLE_SIZE_MAX];
int LENMAX = -1;
const Jbig2HuffmanLine *lines = params->lines;
int n_lines = params->n_lines;
More information about the jbig2-cvs
mailing list