[FFmpeg-devel] [PATCH] swresample/options: change rematrix_maxval default to 1.0

Ganesh Ajjanagadde gajjanagadde at gmail.com
Thu Nov 5 04:40:45 CET 2015


This changes the default to not clip, and thus matches libavresample as
well.

Documentation has been accordingly updated (with some typo fixes).

API users have complained about this, see e.g
https://github.com/mpv-player/mpv/commit/bf69edb1c2bac2ac11343d8e086f0540a0e4b5df.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
---
 doc/resampler.texi      | 5 +++--
 libswresample/options.c | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/doc/resampler.texi b/doc/resampler.texi
index 2c448ae..698b433 100644
--- a/doc/resampler.texi
+++ b/doc/resampler.texi
@@ -66,8 +66,9 @@ Set rematrix volume. Default value is 1.0.
 
 @item rematrix_maxval
 Set maximum output value for rematrixing.
-This can be used to prevent clipping vs. preventing volumn reduction
-A value of 1.0 prevents cliping.
+This can be used to prevent clipping vs. preventing volume reduction
+A value of 1.0 prevents clipping.
+Default is 1.0.
 
 @item flags, swr_flags
 Set flags used by the converter. Default value is 0.
diff --git a/libswresample/options.c b/libswresample/options.c
index 2bf8ab1..6b6fd96 100644
--- a/libswresample/options.c
+++ b/libswresample/options.c
@@ -62,7 +62,7 @@ static const AVOption options[]={
 {"lfe_mix_level"        , "set LFE mix level"           , OFFSET(lfe_mix_level  ), AV_OPT_TYPE_FLOAT, {.dbl=0                     }, -32    , 32        , PARAM},
 {"rmvol"                , "set rematrix volume"         , OFFSET(rematrix_volume), AV_OPT_TYPE_FLOAT, {.dbl=1.0                   }, -1000  , 1000      , PARAM},
 {"rematrix_volume"      , "set rematrix volume"         , OFFSET(rematrix_volume), AV_OPT_TYPE_FLOAT, {.dbl=1.0                   }, -1000  , 1000      , PARAM},
-{"rematrix_maxval"      , "set rematrix maxval"         , OFFSET(rematrix_maxval), AV_OPT_TYPE_FLOAT, {.dbl=0.0                   }, 0      , 1000      , PARAM},
+{"rematrix_maxval"      , "set rematrix maxval"         , OFFSET(rematrix_maxval), AV_OPT_TYPE_FLOAT, {.dbl=1.0                   }, 0      , 1000      , PARAM},
 
 {"flags"                , "set flags"                   , OFFSET(flags          ), AV_OPT_TYPE_FLAGS, {.i64=0                     }, 0      , UINT_MAX  , PARAM, "flags"},
 {"swr_flags"            , "set flags"                   , OFFSET(flags          ), AV_OPT_TYPE_FLAGS, {.i64=0                     }, 0      , UINT_MAX  , PARAM, "flags"},
-- 
2.6.2



More information about the ffmpeg-devel mailing list