From 8326dff1cbad02c5d660696648e15a0f575c9afd Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 1 Jun 2009 20:20:20 +0200 Subject: [PATCH] Get rid of AC_SIXTEEN_ZEROS. --- dehuff.c | 2 +- dehuff.h | 1 - driver.c | 3 --- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/dehuff.c b/dehuff.c index 8cdc2c8..f08dd88 100644 --- 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; diff --git a/dehuff.h b/dehuff.h index 0f86c3b..92c2aff 100644 --- 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 diff --git a/driver.c b/driver.c index e8a78e0..f24b0f5 100644 --- 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; } } -- 2.39.2