]> git.sesse.net Git - fjl/commitdiff
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 8cdc2c8feb33fb675dcafb6bbb3ca8b64c98a204..f08dd881adee0bab2256f8b171f1423821a1f331 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 0f86c3b9c4f4e6703e13751dbb9d5306267ed264..92c2affb5a810eab89c214ce031482961b55a799 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 e8a78e021fcbf03016a340ebc54861158dfe3b37..f24b0f50964d18d4271fc1f104f59597f9928f4f 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;
                }
        }