implement tight indexed rectangle; remove some debug code

This commit is contained in:
Mike Tinglof
2012-01-29 01:55:41 -05:00
parent 6fbc37489f
commit 5ca5e2d8cd
2 changed files with 46 additions and 18 deletions

View File

@@ -355,7 +355,7 @@ this.read_bits = function(d, num, base)
return base;
var val = 0;
while (d.bitcount < num) {
while (d.bitcount < 24) {
d.tag = d.tag | (d.source[d.sourceIndex++] & 0xff) << d.bitcount;
d.bitcount += 8;
}
@@ -368,7 +368,7 @@ this.read_bits = function(d, num, base)
/* given a data stream and a tree, decode a symbol */
this.decode_symbol = function(d, t)
{
while (d.bitcount < 10) {
while (d.bitcount < 16) {
d.tag = d.tag | (d.source[d.sourceIndex++] & 0xff) << d.bitcount;
d.bitcount += 8;
}