1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

ac3enc: slightly faster quantize_mantissas_blk_ch()

This commit is contained in:
Mans Rullgard 2011-03-27 15:47:10 +01:00
parent 4a28e26ea4
commit 9d4bbf6d4f

View File

@ -1074,14 +1074,11 @@ static void quantize_mantissas_blk_ch(AC3Mant *s, int32_t *fixed_coef,
int i; int i;
for (i = start_freq; i < end_freq; i++) { for (i = start_freq; i < end_freq; i++) {
int v;
int c = fixed_coef[i]; int c = fixed_coef[i];
int e = exp[i]; int e = exp[i];
int b = bap[i]; int v = bap[i];
switch (b) { if (v)
case 0: switch (v) {
v = 0;
break;
case 1: case 1:
v = sym_quant(c, e, 3); v = sym_quant(c, e, 3);
switch (s->mant1_cnt) { switch (s->mant1_cnt) {
@ -1150,7 +1147,7 @@ static void quantize_mantissas_blk_ch(AC3Mant *s, int32_t *fixed_coef,
v = asym_quant(c, e, 16); v = asym_quant(c, e, 16);
break; break;
default: default:
v = asym_quant(c, e, b - 1); v = asym_quant(c, e, v - 1);
break; break;
} }
qmant[i] = v; qmant[i] = v;