[FFmpeg-devel] [PATCH] Dolby Digital dynamic range compression (drc_scale) is now 0 by default

Michael Niedermayer michaelni at gmx.at
Mon Mar 30 14:04:34 CEST 2015


On Sun, Mar 29, 2015 at 07:01:08PM +0200, Wiebe Cazemier wrote:
> Signed-off-by: Wiebe Cazemier <wiebe at halfgaar.net>
> ---
>  Changelog                 | 1 +
>  doc/decoders.texi         | 2 +-
>  libavcodec/ac3dec_fixed.c | 2 +-
>  libavcodec/ac3dec_float.c | 2 +-
>  libavutil/version.h       | 2 +-
>  5 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/Changelog b/Changelog
> index 109a1b8..0bd9875 100644
> --- a/Changelog
> +++ b/Changelog
> @@ -11,6 +11,7 @@ version <next>:
>  - nvenc H265 encoder
>  - Detelecine filter
>  - Intel QSV-accelerated H.264 encoding
> +- Dolby Digital dynamic range compression disabled by default
>  
>  
>  version 2.6:
> diff --git a/doc/decoders.texi b/doc/decoders.texi
> index 01fca9f..ba78a31 100644
> --- a/doc/decoders.texi
> +++ b/doc/decoders.texi
> @@ -72,7 +72,7 @@ from the AC-3 stream. This factor is applied exponentially.
>  There are 3 notable scale factor ranges:
>  @table @option
>  @item drc_scale == 0
> -DRC disabled. Produces full range audio.
> +DRC disabled. Produces full range audio. Default value.
>  @item 0 < drc_scale <= 1
>  DRC enabled.  Applies a fraction of the stream DRC value.
>  Audio reproduction is between full range and full compression.
> diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c
> index b4beee6..e3c8ce8 100644
> --- a/libavcodec/ac3dec_fixed.c
> +++ b/libavcodec/ac3dec_fixed.c
> @@ -168,7 +168,7 @@ static void ac3_downmix_c_fixed16(int16_t **samples, int16_t (*matrix)[2],
>  #include "ac3dec.c"
>  
>  static const AVOption options[] = {
> -    { "drc_scale", "percentage of dynamic range compression to apply", OFFSET(drc_scale), AV_OPT_TYPE_FLOAT, {.dbl = 1.0}, 0.0, 6.0, PAR },
> +    { "drc_scale", "percentage of dynamic range compression to apply", OFFSET(drc_scale), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, 0.0, 6.0, PAR },
>      { "heavy_compr", "heavy dynamic range compression enabled", OFFSET(heavy_compression), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1, PAR },
>      { NULL},

it might make sense to add a "-1" value to drc_scale with the
meaining "do what the spec says"
this way if 2 decoders in the future support the drc_scale option
it would be possible for a user to set them to use the defaults
from their specs even if these defaults differ

but this should be a seperate patch of course, so arguable that isnt
a comment about this patch

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150330/1cbf2b8b/attachment.asc>


More information about the ffmpeg-devel mailing list