Skip to content
Snippets Groups Projects
Commit c9ca220e authored by John Stebbins's avatar John Stebbins Committed by Anton Khirnov
Browse files

ac3dec: make drc_scale exponentially


The a52 spec suggests that "partial compression" should scale the
drc value in this manner.

Signed-off-by: default avatarAnton Khirnov <anton@khirnov.net>
parent 37a74901
No related branches found
No related tags found
No related merge requests found
...@@ -756,8 +756,8 @@ static int decode_audio_block(AC3DecodeContext *s, int blk) ...@@ -756,8 +756,8 @@ static int decode_audio_block(AC3DecodeContext *s, int blk)
i = !s->channel_mode; i = !s->channel_mode;
do { do {
if (get_bits1(gbc)) { if (get_bits1(gbc)) {
s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)] - 1.0) * s->dynamic_range[i] = powf(dynamic_range_tab[get_bits(gbc, 8)],
s->drc_scale) + 1.0; s->drc_scale);
} else if (blk == 0) { } else if (blk == 0) {
s->dynamic_range[i] = 1.0f; s->dynamic_range[i] = 1.0f;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment