Better bit allocation for all frame sizes that are not equal to 256.

This commit is contained in:
Jean-Marc Valin 2008-07-24 08:49:34 -04:00
parent 1d27ef8b2c
commit 5c0d486fe1
3 changed files with 10 additions and 10 deletions

View file

@ -208,11 +208,14 @@ static void compute_allocation_table(CELTMode *mode, int res)
eband = 0;
for (j=0;j<BARK_BANDS;j++)
{
int edge, low, alloc;
int edge, low;
celt_int32_t alloc;
edge = mode->eBands[eband+1]*res;
alloc = band_allocation[i*BARK_BANDS+j];
if (mode->nbChannels == 2)
alloc += alloc/2;
alloc = alloc*3*mode->mdctSize/512;
else
alloc = alloc*mode->mdctSize/256;
if (edge < bark_freq[j+1])
{
int num, den;