summaryrefslogtreecommitdiff
path: root/libavcodec/ac3dec.c
diff options
context:
space:
mode:
authorJustin Ruggles <justin.ruggles@gmail.com>2007-12-20 00:55:08 +0000
committerJustin Ruggles <justin.ruggles@gmail.com>2007-12-20 00:55:08 +0000
commit1408352ada60d5a174b48d547114bb086812fcdb (patch)
tree5fc703d20a2a6d9226684deec3fb2749ea570e5f /libavcodec/ac3dec.c
parentcd31f8dc23649fc61658fadee302ce20f761303b (diff)
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. Originally committed as revision 11280 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/ac3dec.c')
-rw-r--r--libavcodec/ac3dec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 468723f285..c06edc46e5 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -792,7 +792,8 @@ static int ac3_parse_audio_block(AC3DecodeContext *ctx, int blk)
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;
}