summaryrefslogtreecommitdiffstats
path: root/libavcodec/ac3enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-10-22 11:11:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-10-22 11:11:08 +0200
commitd8cae42d72092501be880348ae0c223d2ea220a2 (patch)
tree9f5cd163810d5e7babd864637b10968c99814ab8 /libavcodec/ac3enc.c
parentd3d97d43d51840086d86728bbfcd072eea7a5b85 (diff)
parent9d4bbf6d4f3a0b78c4ec7a1f366adf5c3cc8ea1a (diff)
downloadffmpeg-streaming-d8cae42d72092501be880348ae0c223d2ea220a2.zip
ffmpeg-streaming-d8cae42d72092501be880348ae0c223d2ea220a2.tar.gz
Merge remote-tracking branch 'mans/ac3'
* mans/ac3: ac3enc: slightly faster quantize_mantissas_blk_ch() ac3enc: NEON optimised sum_square_butterfly_float ac3enc: neon optimised sum_square_butterfly_int32 ac3enc: move inner loop of compute_rematrixing_strategy to ac3dsp Conflicts: libavcodec/ac3enc_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r--libavcodec/ac3enc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 44c1607..48cafd2 100644
--- a/libavcodec/ac3enc.c
+++ b/libavcodec/ac3enc.c
@@ -1163,14 +1163,11 @@ static void quantize_mantissas_blk_ch(AC3Mant *s, int32_t *fixed_coef,
int i;
for (i = start_freq; i < end_freq; i++) {
- int v;
int c = fixed_coef[i];
int e = exp[i];
- int b = bap[i];
- switch (b) {
- case 0:
- v = 0;
- break;
+ int v = bap[i];
+ if (v)
+ switch (v) {
case 1:
v = sym_quant(c, e, 3);
switch (s->mant1_cnt) {
@@ -1239,7 +1236,7 @@ static void quantize_mantissas_blk_ch(AC3Mant *s, int32_t *fixed_coef,
v = asym_quant(c, e, 16);
break;
default:
- v = asym_quant(c, e, b - 1);
+ v = asym_quant(c, e, v - 1);
break;
}
qmant[i] = v;
OpenPOWER on IntegriCloud