mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-06-19 19:03:00 +02:00
ac3enc: add channel coupling support
Channel coupling is an optional AC-3 feature that increases quality by combining high frequency information from multiple channels into a single channel. The per-channel high frequency information is sent with less accuracy in both the frequency and time domains. This allows more bits to be used for lower frequencies while preserving enough information to reconstruct the high frequencies.
This commit is contained in:
committed by
Reinhard Tartler
parent
a7a187a1be
commit
7f3a7b5c40
@@ -93,8 +93,10 @@ static int normalize_samples(AC3EncodeContext *s)
|
||||
*/
|
||||
static void scale_coefficients(AC3EncodeContext *s)
|
||||
{
|
||||
s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer, s->mdct_coef_buffer,
|
||||
AC3_MAX_COEFS * AC3_MAX_BLOCKS * s->channels);
|
||||
int chan_size = AC3_MAX_COEFS * AC3_MAX_BLOCKS;
|
||||
s->ac3dsp.float_to_fixed24(s->fixed_coef_buffer + chan_size,
|
||||
s->mdct_coef_buffer + chan_size,
|
||||
chan_size * s->channels);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user