ref: ad7d5e002f06c6f48983cbc6455e0e55fb170e6d
parent: a5ce03fe8ae871e14396fe0a152fcd3bf7d752ce
author: Jean-Marc Valin <[email protected]>
date: Mon Sep 13 13:44:48 EDT 2010
Allowing a max of 8 bits to qtheta
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -462,8 +462,8 @@
if (qb<0)
qb = 0;
- if (qb>14<<BITRES)
- qb = 14<<BITRES;
+ if (qb>8<<BITRES)
+ qb = 8<<BITRES;
if (qb<(1<<BITRES>>1)) {
qn = 1;
@@ -470,9 +470,8 @@
} else {
qn = exp2_table8[qb&0x7]>>(14-(qb>>BITRES));
qn = (qn+1)>>1<<1;
- if (qn>1024)
- qn = 1024;
}
+ celt_assert(qn <= 256);
return qn;
}
@@ -629,7 +628,7 @@
/* Entropy coding of the angle. We use a uniform pdf for the
first stereo split but a triangular one for the rest. */
- if (stereo || qn>256 || B>1)
+ if (stereo || B>1)
{
if (encode)
ec_enc_uint((ec_enc*)ec, itheta, qn+1);