Merge remote-tracking branch 'ubitux/shorthand-cleanup'
* ubitux/shorthand-cleanup: lavfi/setfield: switch to an AVOptions-based system. lavfi/asettb: switch to an AVOptions-based system. lavfi/aselect: switch to an AVOptions-based system. lavfi/sine: switch to an AVOptions-based system. lavfi/deshake: switch to an AVOptions-based system. lavfi/tinterlace: switch to an AVOptions-based system. lavfi/tile: switch to an AVOptions-based system. lavfi/concat: switch to an AVOptions-based system. Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
a87e85fa72
@ -1688,11 +1688,7 @@ Generate an audio signal made of a sine wave with amplitude 1/8.
|
||||
|
||||
The audio signal is bit-exact.
|
||||
|
||||
It accepts a list of options in the form of @var{key}=@var{value} pairs
|
||||
separated by ":". If the option name is omitted, the first option is the
|
||||
frequency and the second option is the beep factor.
|
||||
|
||||
The supported options are:
|
||||
The filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@ -2529,16 +2525,14 @@ Attempt to fix small changes in horizontal and/or vertical shift. This
|
||||
filter helps remove camera shake from hand-holding a camera, bumping a
|
||||
tripod, moving on a vehicle, etc.
|
||||
|
||||
The filter accepts parameters as a list of @var{key}=@var{value}
|
||||
pairs, separated by ":". If the key of the first options is omitted,
|
||||
the arguments are interpreted according to the syntax
|
||||
@var{x}:@var{y}:@var{w}:@var{h}:@var{rx}:@var{ry}:@var{edge}:@var{blocksize}:@var{contrast}:@var{search}:@var{filename}:@var{opencl}.
|
||||
|
||||
A description of the accepted parameters follows.
|
||||
The filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@item x, y, w, h
|
||||
@item x
|
||||
@item y
|
||||
@item w
|
||||
@item h
|
||||
Specify a rectangular area where to limit the search for motion
|
||||
vectors.
|
||||
If desired the search for motion vectors can be limited to a
|
||||
@ -2556,7 +2550,8 @@ without specifying the bounding box for the motion vector search.
|
||||
|
||||
Default - search the whole frame.
|
||||
|
||||
@item rx, ry
|
||||
@item rx
|
||||
@item ry
|
||||
Specify the maximum extent of movement in x and y directions in the
|
||||
range 0-64 pixels. Default 16.
|
||||
|
||||
@ -5062,9 +5057,12 @@ output frames. It does not change the input frame, but only sets the
|
||||
corresponding property, which affects how the frame is treated by
|
||||
following filters (e.g. @code{fieldorder} or @code{yadif}).
|
||||
|
||||
This filter accepts a single option @option{mode}, which can be
|
||||
specified either by setting @code{mode=VALUE} or setting the value
|
||||
alone. Available values are:
|
||||
The filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@item mode
|
||||
Available values are:
|
||||
|
||||
@table @samp
|
||||
@item auto
|
||||
@ -5079,6 +5077,7 @@ Mark the frame as top-field-first.
|
||||
@item prog
|
||||
Mark the frame as progressive.
|
||||
@end table
|
||||
@end table
|
||||
|
||||
@section showinfo
|
||||
|
||||
@ -5414,8 +5413,7 @@ ffmpeg -i in.avi -vf thumbnail,scale=300:200 -frames:v 1 out.png
|
||||
|
||||
Tile several successive frames together.
|
||||
|
||||
It accepts a list of options in the form of @var{key}=@var{value} pairs
|
||||
separated by ":". A description of the accepted options follows.
|
||||
The filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@ -5423,6 +5421,11 @@ separated by ":". A description of the accepted options follows.
|
||||
Set the grid size (i.e. the number of lines and columns) in the form
|
||||
"@var{w}x@var{h}".
|
||||
|
||||
@item nb_frames
|
||||
Set the maximum number of frames to render in the given area. It must be less
|
||||
than or equal to @var{w}x@var{h}. The default value is @code{0}, meaning all
|
||||
the area will be used.
|
||||
|
||||
@item margin
|
||||
Set the outer border margin in pixels.
|
||||
|
||||
@ -5431,19 +5434,13 @@ Set the inner border thickness (i.e. the number of pixels between frames). For
|
||||
more advanced padding options (such as having different values for the edges),
|
||||
refer to the pad video filter.
|
||||
|
||||
@item nb_frames
|
||||
Set the maximum number of frames to render in the given area. It must be less
|
||||
than or equal to @var{w}x@var{h}. The default value is @code{0}, meaning all
|
||||
the area will be used.
|
||||
|
||||
@end table
|
||||
|
||||
Alternatively, the options can be specified as a flat string:
|
||||
@subsection Examples
|
||||
|
||||
@var{layout}[:@var{nb_frames}[:@var{margin}[:@var{padding}]]]
|
||||
|
||||
For example, produce 8x8 PNG tiles of all keyframes (@option{-skip_frame
|
||||
nokey}) in a movie:
|
||||
@itemize
|
||||
@item
|
||||
Produce 8x8 PNG tiles of all keyframes (@option{-skip_frame nokey}) in a movie:
|
||||
@example
|
||||
ffmpeg -skip_frame nokey -i file.avi -vf 'scale=128:72,tile=8x8' -an -vsync 0 keyframes%03d.png
|
||||
@end example
|
||||
@ -5451,12 +5448,14 @@ The @option{-vsync 0} is necessary to prevent @command{ffmpeg} from
|
||||
duplicating each output frame to accomodate the originally detected frame
|
||||
rate.
|
||||
|
||||
Another example to display @code{5} pictures in an area of @code{3x2} frames,
|
||||
@item
|
||||
Display @code{5} pictures in an area of @code{3x2} frames,
|
||||
with @code{7} pixels between them, and @code{2} pixels of initial margin, using
|
||||
mixed flat and named options:
|
||||
@example
|
||||
tile=3x2:nb_frames=5:padding=7:margin=2
|
||||
@end example
|
||||
@end itemize
|
||||
|
||||
@section tinterlace
|
||||
|
||||
@ -5465,13 +5464,7 @@ Perform various types of temporal field interlacing.
|
||||
Frames are counted starting from 1, so the first input frame is
|
||||
considered odd.
|
||||
|
||||
This filter accepts options in the form of @var{key}=@var{value} pairs
|
||||
separated by ":".
|
||||
Alternatively, the @var{mode} option can be specified as a value alone,
|
||||
optionally followed by a ":" and further ":" separated @var{key}=@var{value}
|
||||
pairs.
|
||||
|
||||
A description of the accepted options follows.
|
||||
The filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@ -6387,7 +6380,7 @@ This filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@item expr
|
||||
@item expr, e
|
||||
An expression, which is evaluated for each input frame. If the expression is
|
||||
evaluated to a non-zero value, the frame is selected and passed to the output,
|
||||
otherwise it is discarded.
|
||||
@ -6884,7 +6877,7 @@ This filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@item expr
|
||||
@item expr, tb
|
||||
The expression which is evaluated into the output timebase.
|
||||
|
||||
@end table
|
||||
@ -6937,7 +6930,8 @@ The filter works on segments of synchronized video and audio streams. All
|
||||
segments must have the same number of streams of each type, and that will
|
||||
also be the number of streams at output.
|
||||
|
||||
The filter accepts the following named parameters:
|
||||
The filter accepts the following options:
|
||||
|
||||
@table @option
|
||||
|
||||
@item n
|
||||
|
@ -210,8 +210,6 @@ static const AVFilterPad sine_outputs[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const char *const shorthand[] = { "frequency", "beep_factor", NULL };
|
||||
|
||||
AVFilter avfilter_asrc_sine = {
|
||||
.name = "sine",
|
||||
.description = NULL_IF_CONFIG_SMALL("Generate sine wave audio signal."),
|
||||
@ -222,5 +220,4 @@ AVFilter avfilter_asrc_sine = {
|
||||
.inputs = NULL,
|
||||
.outputs = sine_outputs,
|
||||
.priv_class = &sine_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
|
@ -409,8 +409,6 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||
av_free(cat->in);
|
||||
}
|
||||
|
||||
static const char *const shorthand[] = { NULL };
|
||||
|
||||
AVFilter avfilter_avf_concat = {
|
||||
.name = "concat",
|
||||
.description = NULL_IF_CONFIG_SMALL("Concatenate audio and video streams."),
|
||||
@ -421,5 +419,4 @@ AVFilter avfilter_avf_concat = {
|
||||
.inputs = NULL,
|
||||
.outputs = NULL,
|
||||
.priv_class = &concat_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
|
@ -697,11 +697,13 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
|
||||
!strcmp(filter->filter->name, "channelsplit") ||
|
||||
!strcmp(filter->filter->name, "color" ) ||
|
||||
!strcmp(filter->filter->name, "colormatrix") ||
|
||||
!strcmp(filter->filter->name, "concat" ) ||
|
||||
!strcmp(filter->filter->name, "crop" ) ||
|
||||
!strcmp(filter->filter->name, "cropdetect") ||
|
||||
!strcmp(filter->filter->name, "curves" ) ||
|
||||
!strcmp(filter->filter->name, "decimate" ) ||
|
||||
!strcmp(filter->filter->name, "delogo" ) ||
|
||||
!strcmp(filter->filter->name, "deshake" ) ||
|
||||
!strcmp(filter->filter->name, "drawbox" ) ||
|
||||
!strcmp(filter->filter->name, "drawtext" ) ||
|
||||
!strcmp(filter->filter->name, "ebur128" ) ||
|
||||
@ -748,19 +750,25 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque
|
||||
!strcmp(filter->filter->name, "rgbtestsrc") ||
|
||||
!strcmp(filter->filter->name, "setpts" ) ||
|
||||
!strcmp(filter->filter->name, "settb" ) ||
|
||||
!strcmp(filter->filter->name, "asettb" ) ||
|
||||
!strcmp(filter->filter->name, "setfield") ||
|
||||
!strcmp(filter->filter->name, "showspectrum") ||
|
||||
!strcmp(filter->filter->name, "silencedetect") ||
|
||||
!strcmp(filter->filter->name, "sine" ) ||
|
||||
!strcmp(filter->filter->name, "smartblur") ||
|
||||
!strcmp(filter->filter->name, "split" ) ||
|
||||
!strcmp(filter->filter->name, "stereo3d" ) ||
|
||||
!strcmp(filter->filter->name, "subtitles") ||
|
||||
!strcmp(filter->filter->name, "testsrc" ) ||
|
||||
!strcmp(filter->filter->name, "thumbnail") ||
|
||||
!strcmp(filter->filter->name, "tile") ||
|
||||
!strcmp(filter->filter->name, "tinterlace") ||
|
||||
!strcmp(filter->filter->name, "transpose") ||
|
||||
!strcmp(filter->filter->name, "treble" ) ||
|
||||
!strcmp(filter->filter->name, "unsharp" ) ||
|
||||
// !strcmp(filter->filter->name, "scale" ) ||
|
||||
!strcmp(filter->filter->name, "select") ||
|
||||
!strcmp(filter->filter->name, "aselect" ) ||
|
||||
!strcmp(filter->filter->name, "volume" ) ||
|
||||
!strcmp(filter->filter->name, "yadif" ) ||
|
||||
0
|
||||
|
@ -388,8 +388,6 @@ static int query_formats(AVFilterContext *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char *const shorthand[] = { "expr", NULL };
|
||||
|
||||
#if CONFIG_ASELECT_FILTER
|
||||
|
||||
#define OFFSET(x) offsetof(SelectContext, x)
|
||||
@ -445,7 +443,6 @@ AVFilter avfilter_af_aselect = {
|
||||
.inputs = avfilter_af_aselect_inputs,
|
||||
.outputs = avfilter_af_aselect_outputs,
|
||||
.priv_class = &aselect_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
#endif /* CONFIG_ASELECT_FILTER */
|
||||
|
||||
|
@ -60,7 +60,9 @@ typedef struct {
|
||||
#define OFFSET(x) offsetof(SetTBContext, x)
|
||||
#define DEFINE_OPTIONS(filt_name, filt_type) \
|
||||
static const AVOption filt_name##_options[] = { \
|
||||
{ "tb", "Expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
|
||||
{ "expr", "set expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
|
||||
.flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \
|
||||
{ "tb", "set expression determining the output timebase", OFFSET(tb_expr), AV_OPT_TYPE_STRING, {.str="intb"}, \
|
||||
.flags=AV_OPT_FLAG_##filt_type##_PARAM|AV_OPT_FLAG_FILTERING_PARAM }, \
|
||||
{ NULL } \
|
||||
}
|
||||
@ -118,8 +120,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
|
||||
return ff_filter_frame(outlink, frame);
|
||||
}
|
||||
|
||||
static const char *const shorthand[] = { "tb", NULL };
|
||||
|
||||
#if CONFIG_SETTB_FILTER
|
||||
|
||||
DEFINE_OPTIONS(settb, VIDEO);
|
||||
@ -188,6 +188,5 @@ AVFilter avfilter_af_asettb = {
|
||||
.inputs = avfilter_af_asettb_inputs,
|
||||
.outputs = avfilter_af_asettb_outputs,
|
||||
.priv_class = &asettb_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
#endif
|
||||
|
@ -560,12 +560,6 @@ static const AVFilterPad deshake_outputs[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const char *const shorthand[] = {
|
||||
"x", "y", "w", "h", "rx", "ry", "edge",
|
||||
"blocksize", "contrast", "search", "filename",
|
||||
NULL
|
||||
};
|
||||
|
||||
AVFilter avfilter_vf_deshake = {
|
||||
.name = "deshake",
|
||||
.description = NULL_IF_CONFIG_SMALL("Stabilize shaky video."),
|
||||
@ -576,5 +570,4 @@ AVFilter avfilter_vf_deshake = {
|
||||
.inputs = deshake_inputs,
|
||||
.outputs = deshake_outputs,
|
||||
.priv_class = &deshake_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
|
@ -85,8 +85,6 @@ static const AVFilterPad setfield_outputs[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const char *const shorthand[] = { "mode", NULL };
|
||||
|
||||
AVFilter avfilter_vf_setfield = {
|
||||
.name = "setfield",
|
||||
.description = NULL_IF_CONFIG_SMALL("Force field for the output video frame."),
|
||||
@ -94,5 +92,4 @@ AVFilter avfilter_vf_setfield = {
|
||||
.inputs = setfield_inputs,
|
||||
.outputs = setfield_outputs,
|
||||
.priv_class = &setfield_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
|
@ -51,12 +51,12 @@ typedef struct {
|
||||
static const AVOption tile_options[] = {
|
||||
{ "layout", "set grid size", OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE,
|
||||
{.str = "6x5"}, 0, 0, FLAGS },
|
||||
{ "nb_frames", "set maximum number of frame to render", OFFSET(nb_frames),
|
||||
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
|
||||
{ "margin", "set outer border margin in pixels", OFFSET(margin),
|
||||
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1024, FLAGS },
|
||||
{ "padding", "set inner border thickness in pixels", OFFSET(padding),
|
||||
AV_OPT_TYPE_INT, {.i64 = 0}, 0, 1024, FLAGS },
|
||||
{ "nb_frames", "set maximum number of frame to render", OFFSET(nb_frames),
|
||||
AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, FLAGS },
|
||||
{NULL},
|
||||
};
|
||||
|
||||
@ -230,9 +230,6 @@ static const AVFilterPad tile_outputs[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const char *const shorthand[] =
|
||||
{ "layout", "nb_frames", "margin", "padding", NULL };
|
||||
|
||||
AVFilter avfilter_vf_tile = {
|
||||
.name = "tile",
|
||||
.description = NULL_IF_CONFIG_SMALL("Tile several successive frames together."),
|
||||
@ -242,5 +239,4 @@ AVFilter avfilter_vf_tile = {
|
||||
.inputs = tile_inputs,
|
||||
.outputs = tile_outputs,
|
||||
.priv_class = &tile_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
|
@ -385,8 +385,6 @@ static const AVFilterPad tinterlace_outputs[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
static const char *const shorthand[] = { "mode", NULL };
|
||||
|
||||
AVFilter avfilter_vf_tinterlace = {
|
||||
.name = "tinterlace",
|
||||
.description = NULL_IF_CONFIG_SMALL("Perform temporal field interlacing."),
|
||||
@ -396,5 +394,4 @@ AVFilter avfilter_vf_tinterlace = {
|
||||
.inputs = tinterlace_inputs,
|
||||
.outputs = tinterlace_outputs,
|
||||
.priv_class = &tinterlace_class,
|
||||
.shorthand = shorthand,
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user