aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2011-08-26 13:02:29 -0400
committerJustin Ruggles <justin.ruggles@gmail.com>2011-09-05 09:24:59 -0400
commit3e5722a8cadd8b4a7f92110b9a0b2f48883f1243 (patch)
tree39392e29e948307ee52f120c0f97ed5068c79e20 /libavcodec
parentbcd4aa8bec19a17bd633e3db13357784c05b6ca5 (diff)
downloadffmpeg-3e5722a8cadd8b4a7f92110b9a0b2f48883f1243.tar.gz
ac3enc: fix encoding of stereo ac3 files when rematrixing is disabled.
The number of rematrixing bands still needs to be calculated.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/ac3enc_template.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/ac3enc_template.c b/libavcodec/ac3enc_template.c
index dd759a732b..3db49debbb 100644
--- a/libavcodec/ac3enc_template.c
+++ b/libavcodec/ac3enc_template.c
@@ -352,11 +352,6 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
block = &s->blocks[blk];
block->new_rematrixing_strategy = !blk;
- if (!s->rematrixing_enabled) {
- block0 = block;
- continue;
- }
-
block->num_rematrixing_bands = 4;
if (block->cpl_in_use) {
block->num_rematrixing_bands -= (s->start_freq[CPL_CH] <= 61);
@@ -366,6 +361,11 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
}
nb_coefs = FFMIN(block->end_freq[1], block->end_freq[2]);
+ if (!s->rematrixing_enabled) {
+ block0 = block;
+ continue;
+ }
+
for (bnd = 0; bnd < block->num_rematrixing_bands; bnd++) {
/* calculate calculate sum of squared coeffs for one band in one block */
int start = ff_ac3_rematrix_band_tab[bnd];