... | ... |
@@ -59,23 +59,11 @@ static const AVOption kerndeint_options[] = { |
59 | 59 |
|
60 | 60 |
AVFILTER_DEFINE_CLASS(kerndeint); |
61 | 61 |
|
62 |
-static av_cold int init(AVFilterContext *ctx, const char *args) |
|
63 |
-{ |
|
64 |
- KerndeintContext *kerndeint = ctx->priv; |
|
65 |
- const char const * shorthand[] = { "thresh", "map", "order", "sharp", "twoway", NULL }; |
|
66 |
- |
|
67 |
- kerndeint->class = &kerndeint_class; |
|
68 |
- av_opt_set_defaults(kerndeint); |
|
69 |
- |
|
70 |
- return av_opt_set_from_string(kerndeint, args, shorthand, "=", ":"); |
|
71 |
-} |
|
72 |
- |
|
73 | 62 |
static av_cold void uninit(AVFilterContext *ctx) |
74 | 63 |
{ |
75 | 64 |
KerndeintContext *kerndeint = ctx->priv; |
76 | 65 |
|
77 | 66 |
av_free(kerndeint->tmp_data[0]); |
78 |
- av_opt_free(kerndeint); |
|
79 | 67 |
} |
80 | 68 |
|
81 | 69 |
static int query_formats(AVFilterContext *ctx) |
... | ... |
@@ -317,16 +305,18 @@ static const AVFilterPad kerndeint_outputs[] = { |
317 | 317 |
{ NULL } |
318 | 318 |
}; |
319 | 319 |
|
320 |
+static const char *const shorthand[] = { "thresh", "map", "order", "sharp", "twoway", NULL }; |
|
321 |
+ |
|
320 | 322 |
AVFilter avfilter_vf_kerndeint = { |
321 | 323 |
.name = "kerndeint", |
322 | 324 |
.description = NULL_IF_CONFIG_SMALL("Apply kernel deinterlacing to the input."), |
323 | 325 |
.priv_size = sizeof(KerndeintContext), |
324 |
- .init = init, |
|
325 | 326 |
.uninit = uninit, |
326 | 327 |
.query_formats = query_formats, |
327 | 328 |
|
328 | 329 |
.inputs = kerndeint_inputs, |
329 | 330 |
.outputs = kerndeint_outputs, |
330 | 331 |
|
331 |
- .priv_class = &kerndeint_class, |
|
332 |
+ .priv_class = &kerndeint_class, |
|
333 |
+ .shorthand = shorthand, |
|
332 | 334 |
}; |