You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavfi/kerndeint: use standard options parsing.
This commit is contained in:
@@ -59,23 +59,11 @@ static const AVOption kerndeint_options[] = {
|
|||||||
|
|
||||||
AVFILTER_DEFINE_CLASS(kerndeint);
|
AVFILTER_DEFINE_CLASS(kerndeint);
|
||||||
|
|
||||||
static av_cold int init(AVFilterContext *ctx, const char *args)
|
|
||||||
{
|
|
||||||
KerndeintContext *kerndeint = ctx->priv;
|
|
||||||
const char const * shorthand[] = { "thresh", "map", "order", "sharp", "twoway", NULL };
|
|
||||||
|
|
||||||
kerndeint->class = &kerndeint_class;
|
|
||||||
av_opt_set_defaults(kerndeint);
|
|
||||||
|
|
||||||
return av_opt_set_from_string(kerndeint, args, shorthand, "=", ":");
|
|
||||||
}
|
|
||||||
|
|
||||||
static av_cold void uninit(AVFilterContext *ctx)
|
static av_cold void uninit(AVFilterContext *ctx)
|
||||||
{
|
{
|
||||||
KerndeintContext *kerndeint = ctx->priv;
|
KerndeintContext *kerndeint = ctx->priv;
|
||||||
|
|
||||||
av_free(kerndeint->tmp_data[0]);
|
av_free(kerndeint->tmp_data[0]);
|
||||||
av_opt_free(kerndeint);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int query_formats(AVFilterContext *ctx)
|
static int query_formats(AVFilterContext *ctx)
|
||||||
@@ -317,11 +305,12 @@ static const AVFilterPad kerndeint_outputs[] = {
|
|||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static const char *const shorthand[] = { "thresh", "map", "order", "sharp", "twoway", NULL };
|
||||||
|
|
||||||
AVFilter avfilter_vf_kerndeint = {
|
AVFilter avfilter_vf_kerndeint = {
|
||||||
.name = "kerndeint",
|
.name = "kerndeint",
|
||||||
.description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."),
|
.description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."),
|
||||||
.priv_size = sizeof(KerndeintContext),
|
.priv_size = sizeof(KerndeintContext),
|
||||||
.init = init,
|
|
||||||
.uninit = uninit,
|
.uninit = uninit,
|
||||||
.query_formats = query_formats,
|
.query_formats = query_formats,
|
||||||
|
|
||||||
@@ -329,4 +318,5 @@ AVFilter avfilter_vf_kerndeint = {
|
|||||||
.outputs = kerndeint_outputs,
|
.outputs = kerndeint_outputs,
|
||||||
|
|
||||||
.priv_class = &kerndeint_class,
|
.priv_class = &kerndeint_class,
|
||||||
|
.shorthand = shorthand,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user