Lines Matching defs:hc
95 static int smacker_decode_tree(GetBitContext *gb, HuffContext *hc, uint32_t prefix, int length)
98 if(hc->current >= 256){
103 hc->bits[hc->current] = prefix;
104 hc->lengths[hc->current] = length;
106 hc->bits[hc->current] = 0;
107 hc->lengths[hc->current] = 0;
109 hc->values[hc->current] = get_bits(gb, 8);
110 hc->current++;
111 if(hc->maxlength < length)
112 hc->maxlength = length;
117 r = smacker_decode_tree(gb, hc, prefix, length);
120 return smacker_decode_tree(gb, hc, prefix | (1 << (length - 1)), length);
127 static int smacker_decode_bigtree(GetBitContext *gb, HuffContext *hc, DBCtx *ctx)
131 if(hc->current >= hc->length){
143 ctx->last[0] = hc->current;
146 ctx->last[1] = hc->current;
149 ctx->last[2] = hc->current;
153 hc->values[hc->current++] = val;
158 t = hc->current++;
159 r = smacker_decode_bigtree(gb, hc, ctx);
162 hc->values[t] = SMK_NODE | r;
164 r += smacker_decode_bigtree(gb, hc, ctx);