Commit 1a5e63f9 authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi: port mp test source

parent 961e8f31
......@@ -1507,6 +1507,7 @@ frei0r_src_filter_deps="frei0r dlopen strtok_r"
hqdn3d_filter_deps="gpl"
movie_filter_deps="avcodec avformat"
mp_filter_deps="gpl avcodec"
mptestsrc_filter_deps="gpl"
negate_filter_deps="lut_filter"
ocv_filter_deps="libopencv"
scale_filter_deps="swscale"
......
......@@ -2034,6 +2034,63 @@ movie=/dev/video0:f=video4linux2, scale=180:-1, setpts=PTS-STARTPTS [movie];
@end example
@section mptestsrc
Generate various test patterns, as generated by the MPlayer test filter.
The size of the generated video is fixed, and is 256x256.
This source is useful in particular for testing encoding features.
This source accepts an optional sequence of @var{key}=@var{value} pairs,
separated by ":". The description of the accepted options follows.
@table @option
@item rate, r
Specify the frame rate of the sourced video, as the number of frames
generated per second. It has to be a string in the format
@var{frame_rate_num}/@var{frame_rate_den}, an integer number, a float
number or a valid video frame rate abbreviation. The default value is
"25".
@item duration, d
Set the video duration of the sourced video. The accepted syntax is:
@example
[-]HH[:MM[:SS[.m...]]]
[-]S+[.m...]
@end example
See also the function @code{av_parse_time()}.
If not specified, or the expressed duration is negative, the video is
supposed to be generated forever.
@item test, t
Set the number or the name of the test to perform. Supported tests are:
@table @option
@item dc_luma
@item dc_chroma
@item freq_luma
@item freq_chroma
@item amp_luma
@item amp_chroma
@item cbp
@item mv
@item ring1
@item ring2
@item all
@end table
Default value is "all", which will cycle through the list of all tests.
@end table
For example the following:
@example
testsrc=t=dc_luma
@end example
will generate a "dc_luma" test pattern.
@section nullsrc
Null video source, never return images. It is mainly useful as a
......
......@@ -69,6 +69,7 @@ OBJS-$(CONFIG_BUFFER_FILTER) += vsrc_buffer.o
OBJS-$(CONFIG_COLOR_FILTER) += vsrc_color.o
OBJS-$(CONFIG_FREI0R_SRC_FILTER) += vf_frei0r.o
OBJS-$(CONFIG_MOVIE_FILTER) += vsrc_movie.o
OBJS-$(CONFIG_MPTESTSRC_FILTER) += vsrc_mptestsrc.o
OBJS-$(CONFIG_NULLSRC_FILTER) += vsrc_nullsrc.o
OBJS-$(CONFIG_RGBTESTSRC_FILTER) += vsrc_testsrc.o
OBJS-$(CONFIG_TESTSRC_FILTER) += vsrc_testsrc.o
......
......@@ -85,6 +85,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (COLOR, color, vsrc);
REGISTER_FILTER (FREI0R, frei0r_src, vsrc);
REGISTER_FILTER (MOVIE, movie, vsrc);
REGISTER_FILTER (MPTESTSRC, mptestsrc, vsrc);
REGISTER_FILTER (NULLSRC, nullsrc, vsrc);
REGISTER_FILTER (RGBTESTSRC, rgbtestsrc, vsrc);
REGISTER_FILTER (TESTSRC, testsrc, vsrc);
......
......@@ -29,8 +29,8 @@
#include "libavutil/rational.h"
#define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 28
#define LIBAVFILTER_VERSION_MICRO 1
#define LIBAVFILTER_VERSION_MINOR 29
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
......
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