[FFmpeg-cvslog] libavfilter/avf_showwaves: make sqrt and cbrt scale option values available to showwavespic by name

Moritz Barsnick git at videolan.org
Sat Mar 11 12:57:01 EET 2017


ffmpeg | branch: master | Moritz Barsnick <barsnick at gmx.net> | Thu Mar  9 10:23:28 2017 +0100| [114bbb0b74edd4c962095513117806c82ec06b61] | committer: Paul B Mahol

libavfilter/avf_showwaves: make sqrt and cbrt scale option values available to showwavespic by name

The 'sqrt' and 'cbrt' scalers were added in commit
80262d8c86e94ff9a4bb3a9e3c2d734e04ccb399, but their symbolic option values
only made available to the showwaves filter, not showwavespic, despite
the scalers working properly by their numerical option values.

Signed-off-by: Moritz Barsnick <barsnick at gmx.net>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=114bbb0b74edd4c962095513117806c82ec06b61
---

 doc/filters.texi            | 18 +++++++++++++++++-
 libavfilter/avf_showwaves.c |  2 ++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index b5265d9..192a81a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -17897,7 +17897,23 @@ Set if channels should be drawn separately or overlap. Default value is 0.
 Set colors separated by '|' which are going to be used for drawing of each channel.
 
 @item scale
-Set amplitude scale. Can be linear @code{lin} or logarithmic @code{log}.
+Set amplitude scale.
+
+Available values are:
+ at table @samp
+ at item lin
+Linear.
+
+ at item log
+Logarithmic.
+
+ at item sqrt
+Square root.
+
+ at item cbrt
+Cubic root.
+ at end table
+
 Default is linear.
 @end table
 
diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c
index 05aa995..aadc5c1 100644
--- a/libavfilter/avf_showwaves.c
+++ b/libavfilter/avf_showwaves.c
@@ -676,6 +676,8 @@ static const AVOption showwavespic_options[] = {
     { "scale", "set amplitude scale", OFFSET(scale), AV_OPT_TYPE_INT, {.i64 = 0 }, 0, SCALE_NB-1, FLAGS, .unit="scale" },
         { "lin", "linear",         0, AV_OPT_TYPE_CONST, {.i64=SCALE_LIN}, .flags=FLAGS, .unit="scale"},
         { "log", "logarithmic",    0, AV_OPT_TYPE_CONST, {.i64=SCALE_LOG}, .flags=FLAGS, .unit="scale"},
+        { "sqrt", "square root",   0, AV_OPT_TYPE_CONST, {.i64=SCALE_SQRT}, .flags=FLAGS, .unit="scale"},
+        { "cbrt", "cubic root",    0, AV_OPT_TYPE_CONST, {.i64=SCALE_CBRT}, .flags=FLAGS, .unit="scale"},
     { NULL }
 };
 



More information about the ffmpeg-cvslog mailing list