diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-08-05 16:28:39 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-08-09 16:44:34 -0400 |
commit | c3d63262fe61a8e219c4b69c61af6e0c9d49be2d (patch) | |
tree | b76585026b5f748453fe80c2ba8d2686b37dc172 /libavcodec/ac3enc.c | |
parent | d55ad59a8a67b73f3370ee01efd0051fbffe3577 (diff) | |
download | ffmpeg-c3d63262fe61a8e219c4b69c61af6e0c9d49be2d.tar.gz |
ac3enc: allow new coupling coordinates to be sent independently for each
channel.
Diffstat (limited to 'libavcodec/ac3enc.c')
-rw-r--r-- | libavcodec/ac3enc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index d454654c00..291a60d2da 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -864,9 +864,9 @@ static void count_frame_bits(AC3EncodeContext *s) if (block->cpl_in_use) { for (ch = 1; ch <= s->fbw_channels; ch++) { if (block->channel_in_cpl[ch]) { - if (!s->eac3 || block->new_cpl_coords != 2) + if (!s->eac3 || block->new_cpl_coords[ch] != 2) frame_bits++; - if (block->new_cpl_coords) { + if (block->new_cpl_coords[ch]) { frame_bits += 2; frame_bits += (4 + 4) * s->num_cpl_bands; } @@ -1394,9 +1394,9 @@ static void output_audio_block(AC3EncodeContext *s, int blk) if (block->cpl_in_use) { for (ch = 1; ch <= s->fbw_channels; ch++) { if (block->channel_in_cpl[ch]) { - if (!s->eac3 || block->new_cpl_coords != 2) - put_bits(&s->pb, 1, block->new_cpl_coords); - if (block->new_cpl_coords) { + if (!s->eac3 || block->new_cpl_coords[ch] != 2) + put_bits(&s->pb, 1, block->new_cpl_coords[ch]); + if (block->new_cpl_coords[ch]) { put_bits(&s->pb, 2, block->cpl_master_exp[ch]); for (bnd = 0; bnd < s->num_cpl_bands; bnd++) { put_bits(&s->pb, 4, block->cpl_coord_exp [ch][bnd]); |