Commit 4d7a4215 authored by Justin Ruggles's avatar Justin Ruggles
Browse files

ac3enc: put the counting of stereo rematrixing bits in the same place to

make the code easier to understand.
parent 257de756
...@@ -838,10 +838,6 @@ static void count_frame_bits_fixed(AC3EncodeContext *s) ...@@ -838,10 +838,6 @@ static void count_frame_bits_fixed(AC3EncodeContext *s)
if (!blk) if (!blk)
frame_bits++; frame_bits++;
/* stereo rematrixing */
if (s->channel_mode == AC3_CHMODE_STEREO)
frame_bits++;
/* exponent strategy */ /* exponent strategy */
frame_bits += 2 * s->fbw_channels; frame_bits += 2 * s->fbw_channels;
if (s->lfe_on) if (s->lfe_on)
...@@ -931,9 +927,10 @@ static void count_frame_bits(AC3EncodeContext *s) ...@@ -931,9 +927,10 @@ static void count_frame_bits(AC3EncodeContext *s)
/* audio blocks */ /* audio blocks */
for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) { for (blk = 0; blk < AC3_MAX_BLOCKS; blk++) {
/* stereo rematrixing */ /* stereo rematrixing */
if (s->channel_mode == AC3_CHMODE_STEREO && if (s->channel_mode == AC3_CHMODE_STEREO) {
s->blocks[blk].new_rematrixing_strategy) { frame_bits++;
frame_bits += s->num_rematrixing_bands; if (s->blocks[blk].new_rematrixing_strategy)
frame_bits += s->num_rematrixing_bands;
} }
/* bandwidth codes & gain range */ /* bandwidth codes & gain range */
......
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