]> git.sesse.net Git - fjl/commitdiff
read_huffman_tables() takes in unstuffed data, not raw data.
authorSteinar H. Gunderson <sesse@debian.org>
Sat, 3 Jan 2009 10:12:41 +0000 (11:12 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Sat, 3 Jan 2009 10:12:41 +0000 (11:12 +0100)
dehuff.c
dehuff.h

index a7254692dd4f90deae10bc2fb571baf9952f26bb..9b296a798075bf6f6f01e2bd439c8c4b7da1bba2 100644 (file)
--- a/dehuff.c
+++ b/dehuff.c
@@ -35,7 +35,7 @@ uint16_t read_length(raw_input_func_t* input_func, void* userdata)
        return (buf[0] << 8) | buf[1];
 }
 
        return (buf[0] << 8) | buf[1];
 }
 
-void read_huffman_tables(huffman_tables_t* dst, raw_input_func_t* input_func, void* userdata)
+void read_huffman_tables(huffman_tables_t* dst, input_func_t* input_func, void* userdata)
 {
        size_t len = read_length(input_func, userdata);
        assert(len > 2);
 {
        size_t len = read_length(input_func, userdata);
        assert(len > 2);
index 6865dae0d7169bbe62b390e86c662d8c6439b13a..3d3d8c5b049b192bdb772355603c3ec4f92accc6 100644 (file)
--- a/dehuff.h
+++ b/dehuff.h
@@ -43,13 +43,11 @@ enum coefficient_class {
 typedef struct huffman_table huffman_tables_t[NUM_COEFF_CLASSES][4];
 
 // Read Huffman tables from a stream, and compute the derived values.
 typedef struct huffman_table huffman_tables_t[NUM_COEFF_CLASSES][4];
 
 // Read Huffman tables from a stream, and compute the derived values.
-void read_huffman_tables(huffman_tables_t* dst, raw_input_func_t* input_func, void* userdata);
+void read_huffman_tables(huffman_tables_t* dst, input_func_t* input_func, void* userdata);
 
 unsigned read_huffman_symbol_slow_path(const struct huffman_table* table,
                                        struct bit_source* source);
 
 
 unsigned read_huffman_symbol_slow_path(const struct huffman_table* table,
                                        struct bit_source* source);
 
-#include <stdio.h>
-
 static inline unsigned read_huffman_symbol(const struct huffman_table* table,
                                            struct bit_source* source)
 {
 static inline unsigned read_huffman_symbol(const struct huffman_table* table,
                                            struct bit_source* source)
 {