55 #define HUFFMAN_TABLE_SIZE 64 * 1024
56 #define HUF_TOKENS 256
57 #define PALETTE_COUNT 256
70 const unsigned char *
buf;
91 for(i = 0; i < num_hnodes; i++) {
96 if(hnodes[i].count < best) {
97 best = hnodes[i].
count;
104 hnodes[best_node].
used = 1;
118 hnode *node, *hnodes;
127 node = &hnodes[num_hnodes];
150 int i, j, histogram_index = 0;
151 unsigned char *histograms;
164 for (i = 0; i < 256; i++) {
179 int bit_pos, node_num, dat_pos;
181 prev = bit_pos = dat_pos = 0;
190 if(dat_pos >= s->
size) {
195 v = s->
buf[dat_pos++];
198 node_num = hnodes[node_num].
children[v & 0x01];
203 frame->
data[0][x] = node_num;
212 void *
data,
int *got_frame,
216 int buf_size = avpkt->
size;
245 .
name =
"idcinvideo",