Browse Source

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@khirnov.net>
tags/n2.2-rc1
John Stebbins Anton Khirnov 11 years ago
parent
commit
c9ca220ef2
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/ac3dec.c

+ 2
- 2
libavcodec/ac3dec.c View File

@@ -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->drc_scale) + 1.0;
s->dynamic_range[i] = powf(dynamic_range_tab[get_bits(gbc, 8)],
s->drc_scale);
} else if (blk == 0) { } else if (blk == 0) {
s->dynamic_range[i] = 1.0f; s->dynamic_range[i] = 1.0f;
} }


Loading…
Cancel
Save