From c9ca220ef26e36abd22085e6fa156c0dbc43bbf0 Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 20 Nov 2013 09:26:45 -0800 Subject: [PATCH] ac3dec: make drc_scale exponentially The a52 spec suggests that "partial compression" should scale the drc value in this manner. Signed-off-by: Anton Khirnov --- libavcodec/ac3dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c index 7172e6378d..e1c696269e 100644 --- a/libavcodec/ac3dec.c +++ b/libavcodec/ac3dec.c @@ -756,8 +756,8 @@ static int decode_audio_block(AC3DecodeContext *s, int blk) i = !s->channel_mode; do { if (get_bits1(gbc)) { - s->dynamic_range[i] = ((dynamic_range_tab[get_bits(gbc, 8)] - 1.0) * - s->drc_scale) + 1.0; + s->dynamic_range[i] = powf(dynamic_range_tab[get_bits(gbc, 8)], + s->drc_scale); } else if (blk == 0) { s->dynamic_range[i] = 1.0f; }