Commit 14f97bb2 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add waveform monitor filter

parent e95193f5
......@@ -33,6 +33,7 @@ version <next>:
- aphasemeter filter
- showfreqs filter
- vectorscope filter
- waveform filter
version 2.7:
......
......@@ -10927,6 +10927,82 @@ Only deinterlace frames marked as interlaced.
Default value is @samp{all}.
@end table
@section waveform
Video waveform monitor.
The waveform monitor plots color component intensity. By default luminance
only. Each column of the waveform corresponds to a column of pixels in the
source video.
It accepts the following options:
@table @option
@item mode, m
Can be either @code{row}, or @code{column}. Default is @code{column}.
In row mode, the graph on the left side represents color component value 0 and
the right side represents value = 255. In column mode, the top side represents
color component value = 0 and bottom side represents value = 255.
@item intensity, i
Set intensity. Smaller values are useful to find out how many values of the same
luminance are distributed across input rows/columns.
Default value is @code{10}. Allowed range is [1, 255].
@item mirror, r
Set mirroring mode. @code{0} means unmirrored, @code{1} means mirrored.
In mirrored mode, higher values will be represented on the left
side for @code{row} mode and at the top for @code{column} mode. Default is
@code{1} (mirrored).
@item display, d
Set display mode.
It accepts the following values:
@table @samp
@item overlay
Presents information identical to that in the @code{parade}, except
that the graphs representing color components are superimposed directly
over one another.
This display mode makes it easier to spot relative differences or similarities
in overlapping areas of the color components that are supposed to be identical,
such as neutral whites, grays, or blacks.
@item parade
Display separate graph for the color components side by side in
@code{row} mode or one below the other in @code{column} mode.
Using this display mode makes it easy to spot color casts in the highlights
and shadows of an image, by comparing the contours of the top and the bottom
graphs of each waveform. Since whites, grays, and blacks are characterized
by exactly equal amounts of red, green, and blue, neutral areas of the picture
should display three waveforms of roughly equal width/height. If not, the
correction is easy to perform by making level adjustments the three waveforms.
@end table
Default is @code{parade}.
@item components, c
Set which color components to display. Default is 1, which means only luminance
or red color component if input is in RGB colorspace. If is set for example to
7 it will display all 3 (if) available color components.
@item envelope, e
@table @samp
@item none
No envelope, this is default.
@item instant
Instant envelope, minimum and maximum values presented in graph will be easily
visible even with small @code{step} value.
@item peak
Hold minimum and maximum values presented in graph across time. This way you
can still spot out of range values without constantly looking at waveforms.
@item peak+instant
Peak and instant envelope combined together.
@end table
@end table
@section xbr
Apply the xBR high-quality magnification filter which is designed for pixel
art. It follows a set of edge-detection rules, see
......
......@@ -232,6 +232,7 @@ OBJS-$(CONFIG_VIDSTABDETECT_FILTER) += vidstabutils.o vf_vidstabdetect.
OBJS-$(CONFIG_VIDSTABTRANSFORM_FILTER) += vidstabutils.o vf_vidstabtransform.o
OBJS-$(CONFIG_VIGNETTE_FILTER) += vf_vignette.o
OBJS-$(CONFIG_W3FDIF_FILTER) += vf_w3fdif.o
OBJS-$(CONFIG_WAVEFORM_FILTER) += vf_waveform.o
OBJS-$(CONFIG_XBR_FILTER) += vf_xbr.o
OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o
OBJS-$(CONFIG_ZMQ_FILTER) += f_zmq.o
......
......@@ -247,6 +247,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(VIDSTABTRANSFORM, vidstabtransform, vf);
REGISTER_FILTER(VIGNETTE, vignette, vf);
REGISTER_FILTER(W3FDIF, w3fdif, vf);
REGISTER_FILTER(WAVEFORM, waveform, vf);
REGISTER_FILTER(XBR, xbr, vf);
REGISTER_FILTER(YADIF, yadif, vf);
REGISTER_FILTER(ZMQ, zmq, vf);
......
......@@ -30,7 +30,7 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 5
#define LIBAVFILTER_VERSION_MINOR 36
#define LIBAVFILTER_VERSION_MINOR 37
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
......@@ -172,6 +172,7 @@ static int config_output(AVFilterLink *outlink)
outlink->h = (h->level_height + h->scale_height) * FFMAX(ncomp * h->display_mode, 1);
break;
case MODE_WAVEFORM:
av_log(ctx, AV_LOG_WARNING, "This mode is deprecated, please use waveform filter instead.\n");
if (h->waveform_mode)
outlink->h = 256 * FFMAX(h->ncomp * h->display_mode, 1);
else
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment