55 #define HUFFMAN_TABLE_SIZE 64 * 1024
56 #define HUF_TOKENS 256
57 #define PALETTE_COUNT 256
69 const unsigned char *
buf;
90 for(i = 0; i < num_hnodes; i++) {
95 if(hnodes[i].count < best) {
96 best = hnodes[i].
count;
103 hnodes[best_node].
used = 1;
117 hnode *node, *hnodes;
126 node = &hnodes[num_hnodes];
149 int i, j, histogram_index = 0;
150 unsigned char *histograms;
163 for (i = 0; i < 256; i++) {
178 int bit_pos, node_num, dat_pos;
180 prev = bit_pos = dat_pos = 0;
189 if(dat_pos >= s->
size) {
194 v = s->
buf[dat_pos++];
197 node_num = hnodes[node_num].
children[v & 0x01];
202 frame->
data[0][x] = node_num;
211 void *
data,
int *got_frame,
215 int buf_size = avpkt->
size;
244 .
name =
"idcinvideo",