Commit cc43c2f2 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add thistogram video filter

parent 755ad01d
......@@ -28,6 +28,7 @@ version <next>:
- mvdv decoder
- mvha decoder
- MPEG-H 3D Audio support in mp4
- thistogram filter
version 4.2:
......
......@@ -11694,6 +11694,7 @@ the histogram. Possible values are @code{none}, @code{weak} or
@code{strong}. It defaults to @code{none}.
@end table
@anchor{histogram}
@section histogram
Compute and draw a color distribution histogram for the input video.
......@@ -17745,6 +17746,55 @@ PAL output (25i):
16p: 33333334
@end example
@section thistogram
Compute and draw a color distribution histogram for the input video across time.
Unlike @ref{histogram} video filter which only shows histogram of single input frame
at certain time, this filter shows also past histograms of number of frames defined
by @code{width} option.
The computed histogram is a representation of the color component
distribution in an image.
The filter accepts the following options:
@table @option
@item width, w
Set width of single color component output. Default value is @code{0}.
Value of @code{0} means width will be picked from input video.
This also set number of passed histograms to keep.
Allowed range is [0, 8192].
@item display_mode, d
Set display mode.
It accepts the following values:
@table @samp
@item stack
Per color component graphs are placed below each other.
@item parade
Per color component graphs are placed side by side.
@item overlay
Presents information identical to that in the @code{parade}, except
that the graphs representing color components are superimposed directly
over one another.
@end table
Default is @code{stack}.
@item levels_mode, m
Set mode. Can be either @code{linear}, or @code{logarithmic}.
Default is @code{linear}.
@item components, c
Set what color components to display.
Default is @code{7}.
@item bgopacity, b
Set background opacity. Default is @code{0.5}.
@end table
@section threshold
Apply threshold effect to video stream.
......
......@@ -401,6 +401,7 @@ OBJS-$(CONFIG_SWAPRECT_FILTER) += vf_swaprect.o
OBJS-$(CONFIG_SWAPUV_FILTER) += vf_swapuv.o
OBJS-$(CONFIG_TBLEND_FILTER) += vf_blend.o framesync.o
OBJS-$(CONFIG_TELECINE_FILTER) += vf_telecine.o
OBJS-$(CONFIG_THISTOGRAM_FILTER) += vf_histogram.o
OBJS-$(CONFIG_THRESHOLD_FILTER) += vf_threshold.o framesync.o
OBJS-$(CONFIG_THUMBNAIL_FILTER) += vf_thumbnail.o
OBJS-$(CONFIG_THUMBNAIL_CUDA_FILTER) += vf_thumbnail_cuda.o vf_thumbnail_cuda.ptx.o
......
......@@ -382,6 +382,7 @@ extern AVFilter ff_vf_swaprect;
extern AVFilter ff_vf_swapuv;
extern AVFilter ff_vf_tblend;
extern AVFilter ff_vf_telecine;
extern AVFilter ff_vf_thistogram;
extern AVFilter ff_vf_threshold;
extern AVFilter ff_vf_thumbnail;
extern AVFilter ff_vf_thumbnail_cuda;
......
......@@ -30,8 +30,8 @@
#include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 7
#define LIBAVFILTER_VERSION_MINOR 69
#define LIBAVFILTER_VERSION_MICRO 101
#define LIBAVFILTER_VERSION_MINOR 70
#define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
......
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