[FFmpeg-devel] [PATCH] avfilter: add signalstats filter

Michael Niedermayer michaelni at gmx.at
Sun Jun 8 01:18:54 CEST 2014


On Sat, Jun 07, 2014 at 11:23:47AM -0400, Dave Rice wrote:
> 
> On Jun 4, 2014, at 4:36 AM, Stefano Sabatini <stefasab at gmail.com> wrote:
> > On date Monday 2014-06-02 23:50:27 +0200, Clément Bœsch encoded:
> >> Signed-off-by: Mark Heath <mjpeg0 at silicontrip.net>
> >> Signed-off-by: Dave Rice <dericed at yahoo.com>
> >> Signed-off-by: Clément Bœsch <u at pkh.me>
> >> ---
> >> TODO: bump lavfi minor
> >> ---
> >> Changelog                    |   1 +
> >> doc/filters.texi             | 168 +++++++++++++++
> >> libavfilter/Makefile         |   1 +
> >> libavfilter/allfilters.c     |   1 +
> >> libavfilter/vf_signalstats.c | 479 +++++++++++++++++++++++++++++++++++++++++++
> >> 5 files changed, 650 insertions(+)
> >> create mode 100644 libavfilter/vf_signalstats.c
> >> 
> >> diff --git a/Changelog b/Changelog
> >> index 3d416c4..9c366ff 100644
> >> --- a/Changelog
> >> +++ b/Changelog
> >> @@ -26,6 +26,7 @@ version <next>:
> >> - native Opus decoder
> >> - display matrix export and rotation api
> >> - WebVTT encoder
> >> +- signalstats filter
> >> 
> >> 
> >> version 2.2:
> >> diff --git a/doc/filters.texi b/doc/filters.texi
> >> index e004c44..d30827a 100644
> >> --- a/doc/filters.texi
> >> +++ b/doc/filters.texi
> >> @@ -7532,6 +7532,174 @@ Swap the second and third planes of the input:
> >> ffmpeg -i INPUT -vf shuffleplanes=0:2:1:3 OUTPUT
> >> @end example
> >> 
> >> + at section signalstats
> >> +Evaluate various visual metrics that assist in determining issues associated
> >> +with the digitization of analog video media.
> >> +
> >> +By default the filter will log these metadata values:
> >> +
> >> + at table @option
> >> + at item YMIN
> >> +Display the minimal Y value contained within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item YLOW
> >> +Display the Y value at the 10% percentile within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item YAVG
> >> +Display the average Y value within the input frame. Expressed in range of
> >> +[0-255].
> >> +
> >> + at item YHIGH
> >> +Display the Y value at the 90% percentile within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item YMAX
> >> +Display the maximum Y value contained within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item UMIN
> >> +Display the minimal U value contained within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item ULOW
> >> +Display the U value at the 10% percentile within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item UAVG
> >> +Display the average U value within the input frame. Expressed in range of
> >> +[0-255].
> >> +
> >> + at item UHIGH
> >> +Display the U value at the 90% percentile within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item UMAX
> >> +Display the maximum U value contained within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item VMIN
> >> +Display the minimal V value contained within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item VLOW
> >> +Display the V value at the 10% percentile within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item VAVG
> >> +Display the average V value within the input frame. Expressed in range of
> >> +[0-255].
> >> +
> >> + at item VHIGH
> >> +Display the V value at the 90% percentile within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item VMAX
> >> +Display the maximum V value contained within the input frame. Expressed in
> >> +range of [0-255].
> >> +
> >> + at item SATMIN
> >> +Display the minimal saturation value contained within the input frame.
> >> +Expressed in range of [0-~181.02].
> >> +
> >> + at item SATLOW
> >> +Display the saturation value at the 10% percentile within the input frame.
> >> +Expressed in range of [0-~181.02].
> >> +
> >> + at item SATAVG
> >> +Display the average saturation value within the input frame. Expressed in range
> >> +of [0-~181.02].
> >> +
> >> + at item SATHIGH
> >> +Display the saturation value at the 90% percentile within the input frame.
> >> +Expressed in range of [0-~181.02].
> >> +
> >> + at item SATMAX
> >> +Display the maximum saturation value contained within the input frame.
> >> +Expressed in range of [0-~181.02].
> >> +
> >> + at item HUEMED
> >> +Display the median value for hue within the input frame. Expressed in range of
> >> +[0-360].
> >> +
> >> + at item HUEAVG
> >> +Display the average value for hue within the input frame. Expressed in range of
> >> +[0-360].
> >> +
> > 
> >> + at item YDIF
> >> +Display a quantification of the visual change on the Y plane between the input
> >> +frame and the previous input frame.
> >> +
> >> + at item UDIF
> >> +Display a quantification of the visual change on the U plane between the input
> >> +frame and the previous input frame.
> >> +
> >> + at item VDIF
> >> +Display a quantification of the visual change on the V plane between the input
> >> +frame and the previous input frame.
> >> + at end table
> > 
> > "a quantification" is a bit vague.
> 
> Reworded for clarity here: http://github.com/bavc/FFmpeg/commits/signalstats

this still fails to build with --enable-shared
libavfilter/libavfilter.so: undefined reference to `ff_inverse'
libavfilter/libavfilter.so: undefined reference to `ff_sqrt_tab'

look at */log2_tab.c and how its used for one way on how to solve this


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

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway
-------------- 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/20140608/f0462556/attachment.asc>


More information about the ffmpeg-devel mailing list