summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2005-06-05 16:18:24 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2005-06-05 16:18:24 (GMT)
commitea147ec593169660f968e271e3d2d224fb33befa (patch)
tree666c2d05b06cbfcbe699d16ba8711be30947464d
parenteec71174e3181d68be405e69ed05b7d16f0e47fe (diff)
download5kk53-ea147ec593169660f968e271e3d2d224fb33befa.zip
5kk53-ea147ec593169660f968e271e3d2d224fb33befa.tar.gz
5kk53-ea147ec593169660f968e271e3d2d224fb33befa.tar.bz2
-rw-r--r--src/c_huffman.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/src/c_huffman.c b/src/c_huffman.c
index ec2943c..98e0f71 100644
--- a/src/c_huffman.c
+++ b/src/c_huffman.c
@@ -373,32 +373,7 @@ entropy->next_restart_num = 0;
}
-/*
- * jpeg_natural_order[i] is the natural-order position of the i'th element
- * of zigzag order.
- *
- * When reading corrupted data, the Huffman decoders could attempt
- * to reference an entry beyond the end of this array (if the decoded
- * zero run length reaches past the end of the block). To prevent
- * wild stores without adding an inner-loop test, we put some extra
- * "63"s after the real entries. This will cause the extra coefficient
- * to be stored in location 63 of the block, not somewhere random.
- * The worst case would be a run-length of 15, which means we need 16
- * fake entries.
- */
-
-const int jpeg_natural_order[DCTSIZE2+16] = {
- 0, 1, 8, 16, 9, 2, 3, 10,
- 17, 24, 32, 25, 18, 11, 4, 5,
- 12, 19, 26, 33, 40, 48, 41, 34,
- 27, 20, 13, 6, 7, 14, 21, 28,
- 35, 42, 49, 56, 57, 50, 43, 36,
- 29, 22, 15, 23, 30, 37, 44, 51,
- 58, 59, 52, 45, 38, 31, 39, 46,
- 53, 60, 61, 54, 47, 55, 62, 63,
- 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
- 63, 63, 63, 63, 63, 63, 63, 63
-};
+extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */
int bitCounter;