summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_channelmap.c7
-rw-r--r--libavfilter/af_join.c8
-rw-r--r--libavfilter/avfilter.c11
-rw-r--r--libavfilter/buffersrc.c8
-rw-r--r--libavfilter/version.h3
-rw-r--r--libavfilter/vf_aspect.c46
6 files changed, 1 insertions, 82 deletions
diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c
index 7c2be95..285d76a 100644
--- a/libavfilter/af_channelmap.c
+++ b/libavfilter/af_channelmap.c
@@ -149,13 +149,6 @@ static av_cold int channelmap_init(AVFilterContext *ctx)
else
mode = MAP_PAIR_STR_STR;
}
-#if FF_API_OLD_FILTER_OPTS
- if (strchr(mapping, ',')) {
- av_log(ctx, AV_LOG_WARNING, "This syntax is deprecated, use "
- "'|' to separate the mappings.\n");
- separator = ',';
- }
-#endif
}
if (mode != MAP_NONE) {
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index f8af0a1..33df685 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -112,14 +112,6 @@ static int parse_maps(AVFilterContext *ctx)
char separator = '|';
char *cur = s->map;
-#if FF_API_OLD_FILTER_OPTS
- if (cur && strchr(cur, ',')) {
- av_log(ctx, AV_LOG_WARNING, "This syntax is deprecated, use '|' to "
- "separate the mappings.\n");
- separator = ',';
- }
-#endif
-
while (cur && *cur) {
char *sep, *next, *p;
uint64_t in_channel = 0, out_channel = 0;
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index f0f849b..a08895d 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -996,7 +996,7 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
return AVERROR(EINVAL);
}
-#if FF_API_OLD_FILTER_OPTS || FF_API_OLD_FILTER_OPTS_ERROR
+#if FF_API_OLD_FILTER_OPTS_ERROR
if ( !strcmp(filter->filter->name, "format") ||
!strcmp(filter->filter->name, "noformat") ||
!strcmp(filter->filter->name, "frei0r") ||
@@ -1056,14 +1056,6 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
while ((p = strchr(p, ':')))
*p++ = '|';
-#if FF_API_OLD_FILTER_OPTS
- if (deprecated)
- av_log(filter, AV_LOG_WARNING, "This syntax is deprecated. Use "
- "'|' to separate the list items.\n");
-
- av_log(filter, AV_LOG_DEBUG, "compat: called with args=[%s]\n", copy);
- ret = process_options(filter, &options, copy);
-#else
if (deprecated) {
av_log(filter, AV_LOG_ERROR, "This syntax is deprecated. Use "
"'|' to separate the list items ('%s' instead of '%s')\n",
@@ -1072,7 +1064,6 @@ int avfilter_init_str(AVFilterContext *filter, const char *args)
} else {
ret = process_options(filter, &options, copy);
}
-#endif
av_freep(&copy);
if (ret < 0)
diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c
index ad5aedd..cd56f8c 100644
--- a/libavfilter/buffersrc.c
+++ b/libavfilter/buffersrc.c
@@ -304,14 +304,6 @@ static const AVOption buffer_options[] = {
{ "video_size", NULL, OFFSET(w), AV_OPT_TYPE_IMAGE_SIZE, .flags = V },
{ "height", NULL, OFFSET(h), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, V },
{ "pix_fmt", NULL, OFFSET(pix_fmt), AV_OPT_TYPE_PIXEL_FMT, { .i64 = AV_PIX_FMT_NONE }, .min = AV_PIX_FMT_NONE, .max = INT_MAX, .flags = V },
-#if FF_API_OLD_FILTER_OPTS
- /* those 4 are for compatibility with the old option passing system where each filter
- * did its own parsing */
- { "time_base_num", "deprecated, do not use", OFFSET(time_base.num), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, V },
- { "time_base_den", "deprecated, do not use", OFFSET(time_base.den), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, V },
- { "sar_num", "deprecated, do not use", OFFSET(pixel_aspect.num), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, V },
- { "sar_den", "deprecated, do not use", OFFSET(pixel_aspect.den), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, V },
-#endif
{ "sar", "sample aspect ratio", OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
{ "pixel_aspect", "sample aspect ratio", OFFSET(pixel_aspect), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
{ "time_base", NULL, OFFSET(time_base), AV_OPT_TYPE_RATIONAL, { .dbl = 0 }, 0, DBL_MAX, V },
diff --git a/libavfilter/version.h b/libavfilter/version.h
index a350f47..e3bdd02 100644
--- a/libavfilter/version.h
+++ b/libavfilter/version.h
@@ -49,9 +49,6 @@
* the public API and may change, break or disappear at any time.
*/
-#ifndef FF_API_OLD_FILTER_OPTS
-#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 7)
-#endif
#ifndef FF_API_OLD_FILTER_OPTS_ERROR
#define FF_API_OLD_FILTER_OPTS_ERROR (LIBAVFILTER_VERSION_MAJOR < 8)
#endif
diff --git a/libavfilter/vf_aspect.c b/libavfilter/vf_aspect.c
index bf30824..4c93639 100644
--- a/libavfilter/vf_aspect.c
+++ b/libavfilter/vf_aspect.c
@@ -61,35 +61,9 @@ typedef struct AspectContext {
AVRational dar;
AVRational sar;
int max;
-#if FF_API_OLD_FILTER_OPTS
- float aspect_den;
-#endif
char *ratio_expr;
} AspectContext;
-static av_cold int init(AVFilterContext *ctx)
-{
-#if FF_API_OLD_FILTER_OPTS
- AspectContext *s = ctx->priv;
- int ret;
-
- if (s->ratio_expr && s->aspect_den > 0) {
- double num;
- av_log(ctx, AV_LOG_WARNING,
- "num:den syntax is deprecated, please use num/den or named options instead\n");
- ret = av_expr_parse_and_eval(&num, s->ratio_expr, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, 0, ctx);
- if (ret < 0) {
- av_log(ctx, AV_LOG_ERROR, "Unable to parse ratio numerator \"%s\"\n", s->ratio_expr);
- return AVERROR(EINVAL);
- }
- s->sar = s->dar = av_d2q(num / s->aspect_den, s->max);
- }
-#endif
-
- return 0;
-}
-
static int filter_frame(AVFilterLink *link, AVFrame *frame)
{
AspectContext *s = link->dst->priv;
@@ -159,14 +133,8 @@ static int setdar_config_props(AVFilterLink *inlink)
AVRational old_sar = inlink->sample_aspect_ratio;
int ret;
-#if FF_API_OLD_FILTER_OPTS
- if (!(s->ratio_expr && s->aspect_den > 0)) {
-#endif
if ((ret = get_aspect_ratio(inlink, &s->dar)))
return ret;
-#if FF_API_OLD_FILTER_OPTS
- }
-#endif
if (s->dar.num && s->dar.den) {
av_reduce(&s->sar.num, &s->sar.den,
@@ -191,9 +159,6 @@ static const AVOption setdar_options[] = {
{ "dar", "set display aspect ratio", OFFSET(ratio_expr), AV_OPT_TYPE_STRING, { .str = "0" }, .flags = FLAGS },
{ "ratio", "set display aspect ratio", OFFSET(ratio_expr), AV_OPT_TYPE_STRING, { .str = "0" }, .flags = FLAGS },
{ "r", "set display aspect ratio", OFFSET(ratio_expr), AV_OPT_TYPE_STRING, { .str = "0" }, .flags = FLAGS },
-#if FF_API_OLD_FILTER_OPTS
- { "dar_den", NULL, OFFSET(aspect_den), AV_OPT_TYPE_FLOAT, { .dbl = 0 }, 0, FLT_MAX, FLAGS },
-#endif
{ "max", "set max value for nominator or denominator in the ratio", OFFSET(max), AV_OPT_TYPE_INT, {.i64=100}, 1, INT_MAX, FLAGS },
{ NULL }
};
@@ -221,7 +186,6 @@ static const AVFilterPad avfilter_vf_setdar_outputs[] = {
AVFilter ff_vf_setdar = {
.name = "setdar",
.description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."),
- .init = init,
.priv_size = sizeof(AspectContext),
.priv_class = &setdar_class,
.inputs = avfilter_vf_setdar_inputs,
@@ -239,14 +203,8 @@ static int setsar_config_props(AVFilterLink *inlink)
AVRational old_dar, dar;
int ret;
-#if FF_API_OLD_FILTER_OPTS
- if (!(s->ratio_expr && s->aspect_den > 0)) {
-#endif
if ((ret = get_aspect_ratio(inlink, &s->sar)))
return ret;
-#if FF_API_OLD_FILTER_OPTS
- }
-#endif
inlink->sample_aspect_ratio = s->sar;
@@ -263,9 +221,6 @@ static const AVOption setsar_options[] = {
{ "sar", "set sample (pixel) aspect ratio", OFFSET(ratio_expr), AV_OPT_TYPE_STRING, { .str = "0" }, .flags = FLAGS },
{ "ratio", "set sample (pixel) aspect ratio", OFFSET(ratio_expr), AV_OPT_TYPE_STRING, { .str = "0" }, .flags = FLAGS },
{ "r", "set sample (pixel) aspect ratio", OFFSET(ratio_expr), AV_OPT_TYPE_STRING, { .str = "0" }, .flags = FLAGS },
-#if FF_API_OLD_FILTER_OPTS
- { "sar_den", NULL, OFFSET(aspect_den), AV_OPT_TYPE_FLOAT, { .dbl = 0 }, 0, FLT_MAX, FLAGS },
-#endif
{ "max", "set max value for nominator or denominator in the ratio", OFFSET(max), AV_OPT_TYPE_INT, {.i64=100}, 1, INT_MAX, FLAGS },
{ NULL }
};
@@ -293,7 +248,6 @@ static const AVFilterPad avfilter_vf_setsar_outputs[] = {
AVFilter ff_vf_setsar = {
.name = "setsar",
.description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."),
- .init = init,
.priv_size = sizeof(AspectContext),
.priv_class = &setsar_class,
.inputs = avfilter_vf_setsar_inputs,
OpenPOWER on IntegriCloud