Increase verbosity required to warn about bit length overflow.
When debugging the Huffman coding would warn about resulting codes greater than 15 bits in length. This is handled properly, and is not uncommon. This increases the verbosity of the warning by one, so that it is not displayed by default.
This commit is contained in:
parent
37281ac222
commit
21c66cd5ac
4
trees.c
4
trees.c
@ -525,7 +525,7 @@ local void gen_bitlen(s, desc)
|
|||||||
}
|
}
|
||||||
if (overflow == 0) return;
|
if (overflow == 0) return;
|
||||||
|
|
||||||
Trace((stderr,"\nbit length overflow\n"));
|
Tracev((stderr,"\nbit length overflow\n"));
|
||||||
/* This happens for example on obj2 and pic of the Calgary corpus */
|
/* This happens for example on obj2 and pic of the Calgary corpus */
|
||||||
|
|
||||||
/* Find the first bit length which could increase: */
|
/* Find the first bit length which could increase: */
|
||||||
@ -552,7 +552,7 @@ local void gen_bitlen(s, desc)
|
|||||||
m = s->heap[--h];
|
m = s->heap[--h];
|
||||||
if (m > max_code) continue;
|
if (m > max_code) continue;
|
||||||
if ((unsigned) tree[m].Len != (unsigned) bits) {
|
if ((unsigned) tree[m].Len != (unsigned) bits) {
|
||||||
Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
|
Tracev((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
|
||||||
s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
|
s->opt_len += ((ulg)bits - tree[m].Len) * tree[m].Freq;
|
||||||
tree[m].Len = (ush)bits;
|
tree[m].Len = (ush)bits;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user