From e4bd1db88ec05ad389dd4443461ef50a6007b808 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 11 Apr 2013 00:40:33 +0200 Subject: [PATCH 1/5] lavfi/histeq: switch to an AVOptions-based system. --- doc/filters.texi | 7 +------ libavfilter/avfilter.c | 1 + libavfilter/vf_histeq.c | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 72bfce66ff..490bbb817b 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3445,12 +3445,7 @@ viewed as an "automatically adjusting contrast filter". This filter is useful only for correcting degraded or poorly captured source video. -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 syntax -@var{strength}:@var{intensity}:@var{antibanding}. - -This filter accepts the following named options: +The filter accepts the following options: @table @option @item strength diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 036949d467..23da5292c5 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -679,6 +679,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque !strcmp(filter->filter->name, "frei0r_src") || !strcmp(filter->filter->name, "geq" ) || !strcmp(filter->filter->name, "gradfun" ) || + !strcmp(filter->filter->name, "histeq" ) || !strcmp(filter->filter->name, "hqdn3d" ) || !strcmp(filter->filter->name, "ocv" ) || !strcmp(filter->filter->name, "life" ) || diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c index 05e1d59a66..f4d7795cbd 100644 --- a/libavfilter/vf_histeq.c +++ b/libavfilter/vf_histeq.c @@ -269,8 +269,6 @@ static const AVFilterPad histeq_outputs[] = { { NULL } }; -static const char *const shorthand[] = { "strength", "intensity", "antibanding", NULL }; - AVFilter avfilter_vf_histeq = { .name = "histeq", .description = NULL_IF_CONFIG_SMALL("Apply global color histogram equalization."), @@ -281,5 +279,4 @@ AVFilter avfilter_vf_histeq = { .inputs = histeq_inputs, .outputs = histeq_outputs, .priv_class = &histeq_class, - .shorthand = shorthand, }; From a689a6b698b9c6c97fb64208dc1a71b1f384eb9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 11 Apr 2013 00:52:39 +0200 Subject: [PATCH 2/5] lavfi/noise: switch to an AVOptions-based system. --- doc/filters.texi | 3 +-- libavfilter/avfilter.c | 1 + libavfilter/vf_noise.c | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 490bbb817b..e25a49adf1 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -4070,8 +4070,7 @@ noformat=yuv420p|yuv444p|yuv410p Add noise on video input frame. -This filter 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 @item all_seed diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 23da5292c5..5dff27adcd 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -689,6 +689,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque !strcmp(filter->filter->name, "mandelbrot" ) || !strcmp(filter->filter->name, "mptestsrc" ) || !strcmp(filter->filter->name, "negate" ) || + !strcmp(filter->filter->name, "noise" ) || !strcmp(filter->filter->name, "overlay" ) || !strcmp(filter->filter->name, "pad" ) || !strcmp(filter->filter->name, "format") || diff --git a/libavfilter/vf_noise.c b/libavfilter/vf_noise.c index 84205cbe1a..52e3963464 100644 --- a/libavfilter/vf_noise.c +++ b/libavfilter/vf_noise.c @@ -462,8 +462,6 @@ static const AVFilterPad noise_outputs[] = { { NULL } }; -static const char *const shorthand[] = { NULL }; - AVFilter avfilter_vf_noise = { .name = "noise", .description = NULL_IF_CONFIG_SMALL("Add noise."), @@ -474,5 +472,4 @@ AVFilter avfilter_vf_noise = { .inputs = noise_inputs, .outputs = noise_outputs, .priv_class = &noise_class, - .shorthand = shorthand, }; From d5226fc575781a8066a92f1b635d82b68e4bc9df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 11 Apr 2013 00:54:27 +0200 Subject: [PATCH 3/5] lavfi/stereo3d: switch to an AVOptions-based system. --- doc/filters.texi | 3 +-- libavfilter/avfilter.c | 1 + libavfilter/vf_stereo3d.c | 3 --- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index e25a49adf1..8616be76d0 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -5181,8 +5181,7 @@ is set. Convert between different stereoscopic image formats. -This filter accepts the following named options, expressed as a -sequence of @var{key}=@var{value} pairs, separated by ":". +The filters accept the following options: @table @option @item in diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 5dff27adcd..e6d7f05301 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -703,6 +703,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque !strcmp(filter->filter->name, "showspectrum") || !strcmp(filter->filter->name, "silencedetect") || !strcmp(filter->filter->name, "smartblur") || + !strcmp(filter->filter->name, "stereo3d" ) || !strcmp(filter->filter->name, "subtitles") || !strcmp(filter->filter->name, "thumbnail") || !strcmp(filter->filter->name, "transpose") || diff --git a/libavfilter/vf_stereo3d.c b/libavfilter/vf_stereo3d.c index 156470f0c0..c7f39e6683 100644 --- a/libavfilter/vf_stereo3d.c +++ b/libavfilter/vf_stereo3d.c @@ -440,8 +440,6 @@ static const AVFilterPad stereo3d_outputs[] = { { NULL } }; -static const char *const shorthand[] = { "in", "out", NULL }; - AVFilter avfilter_vf_stereo3d = { .name = "stereo3d", .description = NULL_IF_CONFIG_SMALL("Convert video stereoscopic 3D view."), @@ -450,5 +448,4 @@ AVFilter avfilter_vf_stereo3d = { .inputs = stereo3d_inputs, .outputs = stereo3d_outputs, .priv_class = &stereo3d_class, - .shorthand = shorthand, }; From b2d589188f36cc69ffb8148810dc706d82dcebf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 11 Apr 2013 00:57:35 +0200 Subject: [PATCH 4/5] lavfi/histogram: switch to an AVOptions-based system. --- doc/filters.texi | 2 +- libavfilter/avfilter.c | 1 + libavfilter/vf_histogram.c | 3 --- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 8616be76d0..001cd50a2e 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3474,7 +3474,7 @@ Compute and draw a color distribution histogram for the input video. The computed histogram is a representation of distribution of color components in an image. -The filter accepts the following named parameters: +The filter accepts the following options: @table @option @item mode diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index e6d7f05301..e8f836a9a6 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -680,6 +680,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque !strcmp(filter->filter->name, "geq" ) || !strcmp(filter->filter->name, "gradfun" ) || !strcmp(filter->filter->name, "histeq" ) || + !strcmp(filter->filter->name, "histogram" ) || !strcmp(filter->filter->name, "hqdn3d" ) || !strcmp(filter->filter->name, "ocv" ) || !strcmp(filter->filter->name, "life" ) || diff --git a/libavfilter/vf_histogram.c b/libavfilter/vf_histogram.c index b9cba6be1a..3c348858a6 100644 --- a/libavfilter/vf_histogram.c +++ b/libavfilter/vf_histogram.c @@ -311,8 +311,6 @@ static const AVFilterPad outputs[] = { { NULL } }; -static const char *const shorthand[] = { NULL }; - AVFilter avfilter_vf_histogram = { .name = "histogram", .description = NULL_IF_CONFIG_SMALL("Compute and draw a histogram."), @@ -321,5 +319,4 @@ AVFilter avfilter_vf_histogram = { .inputs = inputs, .outputs = outputs, .priv_class = &histogram_class, - .shorthand = shorthand, }; From 7668b6832d3c1fd5555be5f4cf6f8e9930dd9c4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Thu, 11 Apr 2013 01:01:49 +0200 Subject: [PATCH 5/5] lavfi/idet: switch to an AVOptions-based system. --- doc/filters.texi | 9 +++++++++ libavfilter/avfilter.c | 1 + libavfilter/vf_idet.c | 3 --- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 001cd50a2e..96682486ce 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -3730,6 +3730,15 @@ Detect video interlacing type. This filter tries to detect if the input is interlaced or progressive, top or bottom field first. +The filter accepts the following options: + +@table @option +@item intl_thres +Set interlacing threshold. +@item prog_thres +Set progressive threshold. +@end table + @section il Deinterleave or interleave fields. diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index e8f836a9a6..8db477cc58 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -682,6 +682,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque !strcmp(filter->filter->name, "histeq" ) || !strcmp(filter->filter->name, "histogram" ) || !strcmp(filter->filter->name, "hqdn3d" ) || + !strcmp(filter->filter->name, "idet" ) || !strcmp(filter->filter->name, "ocv" ) || !strcmp(filter->filter->name, "life" ) || !strcmp(filter->filter->name, "lut" ) || diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 275302f16c..bef7f3ee3d 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -304,8 +304,6 @@ static const AVFilterPad idet_outputs[] = { { NULL } }; -static const char *const shorthand[] = { "intl_thres", "prog_thres", NULL }; - AVFilter avfilter_vf_idet = { .name = "idet", .description = NULL_IF_CONFIG_SMALL("Interlace detect Filter."), @@ -317,5 +315,4 @@ AVFilter avfilter_vf_idet = { .inputs = idet_inputs, .outputs = idet_outputs, .priv_class = &idet_class, - .shorthand = shorthand, };