mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
ac3enc: fix encoding of stereo ac3 files when rematrixing is disabled.
The number of rematrixing bands still needs to be calculated.
This commit is contained in:
parent
bcd4aa8bec
commit
3e5722a8ca
@ -352,11 +352,6 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
|
|||||||
block = &s->blocks[blk];
|
block = &s->blocks[blk];
|
||||||
block->new_rematrixing_strategy = !blk;
|
block->new_rematrixing_strategy = !blk;
|
||||||
|
|
||||||
if (!s->rematrixing_enabled) {
|
|
||||||
block0 = block;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
block->num_rematrixing_bands = 4;
|
block->num_rematrixing_bands = 4;
|
||||||
if (block->cpl_in_use) {
|
if (block->cpl_in_use) {
|
||||||
block->num_rematrixing_bands -= (s->start_freq[CPL_CH] <= 61);
|
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]);
|
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++) {
|
for (bnd = 0; bnd < block->num_rematrixing_bands; bnd++) {
|
||||||
/* calculate calculate sum of squared coeffs for one band in one block */
|
/* calculate calculate sum of squared coeffs for one band in one block */
|
||||||
int start = ff_ac3_rematrix_band_tab[bnd];
|
int start = ff_ac3_rematrix_band_tab[bnd];
|
||||||
|
Loading…
Reference in New Issue
Block a user