Commit 1f6bcb2f authored by ramiro's avatar ramiro

Add bias instead of -32 or 0, as is done in g.722.1

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@8957 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8456db73
...@@ -438,7 +438,7 @@ static void categorize(COOKContext *q, int* quant_index_table, ...@@ -438,7 +438,7 @@ static void categorize(COOKContext *q, int* quant_index_table,
index=-1; index=-1;
for (i=0 ; i<q->total_subbands ; i++){ for (i=0 ; i<q->total_subbands ; i++){
if (exp_index1[i] < 7) { if (exp_index1[i] < 7) {
v = (-2*exp_index1[i]) - quant_index_table[i] - 32; v = (-2*exp_index1[i]) - quant_index_table[i] + bias;
if ( v >= max) { if ( v >= max) {
max = v; max = v;
index = i; index = i;
...@@ -455,7 +455,7 @@ static void categorize(COOKContext *q, int* quant_index_table, ...@@ -455,7 +455,7 @@ static void categorize(COOKContext *q, int* quant_index_table,
index=-1; index=-1;
for (i=0 ; i<q->total_subbands ; i++){ for (i=0 ; i<q->total_subbands ; i++){
if(exp_index2[i] > 0){ if(exp_index2[i] > 0){
v = (-2*exp_index2[i])-quant_index_table[i]; v = (-2*exp_index2[i])-quant_index_table[i]+bias;
if ( v < min) { if ( v < min) {
min = v; min = v;
index = i; index = i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment