diff ac3dec.c @ 6047:2f9c17454842 libavcodec

Add option for user to scale the amount of dynamic range compression which is applied by the audio decoder, and use that option in the AC3 decoder.
author jbr
date Thu, 20 Dec 2007 00:55:08 +0000
parents f74202e7e896
children 2b84971fb4f1
line wrap: on
line diff
--- a/ac3dec.c	Wed Dec 19 23:03:52 2007 +0000
+++ b/ac3dec.c	Thu Dec 20 00:55:08 2007 +0000
@@ -792,7 +792,8 @@
     i = !(ctx->channel_mode);
     do {
         if(get_bits1(gb)) {
-            ctx->dynamic_range[i] = dynamic_range_tab[get_bits(gb, 8)];
+            ctx->dynamic_range[i] = ((dynamic_range_tab[get_bits(gb, 8)]-1.0) *
+                                    ctx->avctx->drc_scale)+1.0;
         } else if(blk == 0) {
             ctx->dynamic_range[i] = 1.0f;
         }