Get rid of AC_SIXTEEN_ZEROS.
authorSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 18:20:20 +0000 (20:20 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Mon, 1 Jun 2009 18:20:20 +0000 (20:20 +0200)
dehuff.c
dehuff.h
driver.c

index 8cdc2c8..f08dd88 100644 (file)
--- a/dehuff.c
+++ b/dehuff.c
@@ -140,7 +140,7 @@ void read_huffman_tables(huffman_tables_t* dst, input_func_t* input_func, void*
                        }
                        if (rs == 0xf0) {
                                // 16 zero coefficients.
-                               tbl->ac_table_codes[i] = AC_SIXTEEN_ZEROS;
+                               tbl->ac_table_codes[i] = 0;
                                tbl->ac_table_length[i] = length;
                                tbl->ac_table_skip[i] = 16;
                                continue;
index 0f86c3b..92c2aff 100644 (file)
--- a/dehuff.h
+++ b/dehuff.h
@@ -21,7 +21,6 @@ static const int DEHUF_SLOW_PATH = -1;
 #define DEHUF_AC_TABLE_SIZE (1 << DEHUF_AC_TABLE_BITS)
 static const int AC_DEHUF_SLOW_PATH = 0xf0000000;
 static const int AC_END_OF_BLOCK = 0xf0000001;
-static const int AC_SIXTEEN_ZEROS = 0xf0000002;
 
 struct huffman_table {
        unsigned num_codes[17];     // BITS
index e8a78e0..f24b0f5 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -148,9 +148,6 @@ void decode_ac_coefficients(const struct huffman_table* tbl, struct bit_source*
                        if (code == AC_END_OF_BLOCK) {
                                break;
                        }
-                       if (code == AC_SIXTEEN_ZEROS) {
-                               continue;
-                       }
                        coeff[unzigzag[i]] = code;
                }
        }