[FFmpeg-cvslog] ac3dec: make drc_scale exponentially

John Stebbins git at videolan.org
Mon Dec 9 20:05:00 CET 2013


ffmpeg | branch: master | John Stebbins <stebbins at jetheaddev.com> | Wed Nov 20 09:26:45 2013 -0800| [c9ca220ef26e36abd22085e6fa156c0dbc43bbf0] | committer: Anton Khirnov

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 <anton at khirnov.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c9ca220ef26e36abd22085e6fa156c0dbc43bbf0
---

 libavcodec/ac3dec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 7172e63..e1c6962 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;
         }



More information about the ffmpeg-cvslog mailing list