X-Git-Url: http://plrg.eecs.uci.edu/git/?p=IRC.git;a=blobdiff_plain;f=Robust%2Fsrc%2FTests%2FssJava%2Fmp3decoder%2Fhuffcodetab.java;h=2f52c134f871a9516b45f9681414937b9ad758ca;hp=77be768e95ecdb0ae90fc8462820bd720bab644d;hb=2c4882eb5bb49314d697c83cfe3a5b5f68e9a29f;hpb=cbf149e6d6d5d28b8d0f7774958bef0b2e6eac5c diff --git a/Robust/src/Tests/ssJava/mp3decoder/huffcodetab.java b/Robust/src/Tests/ssJava/mp3decoder/huffcodetab.java index 77be768e..2f52c134 100644 --- a/Robust/src/Tests/ssJava/mp3decoder/huffcodetab.java +++ b/Robust/src/Tests/ssJava/mp3decoder/huffcodetab.java @@ -506,20 +506,21 @@ final class huffcodetab { * Do the huffman-decoding. note! for counta,countb -the 4 bit value is * returned in y, discard x. */ - @LATTICE("OUT>> 4; - data.y = ht[idx].val[point][1] & 0xf; - error = 0; - break; - } - - // hget1bit() is called thousands of times, and so needs to be - // ultra fast. - /* - * if (bitIndex==bitsAvailable) { bitsAvailable = br.readBits(bits, 32); - * bitIndex = 0; } - */ - // if (bits[bitIndex++]!=0) - if (data.br.hget1bit() != 0) { - while (ht[idx].val[point][1] >= MXOFF) - point += ht[idx].val[point][1]; - point += ht[idx].val[point][1]; - } else { - while (ht[idx].val[point][0] >= MXOFF) - point += ht[idx].val[point][0]; - point += ht[idx].val[point][0]; - } - level >>>= 1; - // MDM: ht[0] is always 0; - } while ((level != 0) || (point < 0 /* ht[0].treelen */)); - - // put back any bits not consumed - /* - * int unread = (bitsAvailable-bitIndex); if (unread>0) - * br.rewindNbits(unread); - */ - /* Process sign encodings for quadruples tables. */ - // System.out.println(h.tablename); - if (ht[idx].tablename0 == '3' && (ht[idx].tablename1 == '2' || ht[idx].tablename1 == '3')) { - data.v = (data.y >> 3) & 1; - data.w = (data.y >> 2) & 1; - data.x = (data.y >> 1) & 1; - data.y = data.y & 1; - - /* - * v, w, x and y are reversed in the bitstream. switch them around to make - * test bistream work. - */ - - if (data.v != 0) - if (data.br.hget1bit() != 0) - data.v = -data.v; - if (data.w != 0) - if (data.br.hget1bit() != 0) - data.w = -data.w; - if (data.x != 0) - if (data.br.hget1bit() != 0) - data.x = -data.x; - if (data.y != 0) - if (data.br.hget1bit() != 0) - data.y = -data.y; - } else { - // Process sign and escape encodings for dual tables. - // x and y are reversed in the test bitstream. - // Reverse x and y here to make test bitstream work. - - if (ht[idx].linbits != 0) - if ((ht[idx].xlen - 1) == data.x) - data.x += data.br.hgetbits(ht[idx].linbits); - if (data.x != 0) - if (data.br.hget1bit() != 0) - data.x = -data.x; - if (ht[idx].linbits != 0) - if ((ht[idx].ylen - 1) == data.y) - data.y += data.br.hgetbits(ht[idx].linbits); - if (data.y != 0) - if (data.br.hget1bit() != 0) - data.y = -data.y; - } - - return data; - // return error; - } - public static void inithuff() { if (ht != null)