static av_cold int init(AVFilterContext *ctx, const char *args)
{
UnsharpContext *unsharp = ctx->priv;
- static const char *shorthand[] = {
- "luma_msize_x", "luma_msize_y", "luma_amount",
- "chroma_msize_x", "chroma_msize_y", "chroma_amount",
- NULL
- };
- int ret;
-
- unsharp->class = &unsharp_class;
- av_opt_set_defaults(unsharp);
-
- if ((ret = av_opt_set_from_string(unsharp, args, shorthand, "=", ":")) < 0)
- return ret;
set_filter_param(&unsharp->luma, unsharp->luma_msize_x, unsharp->luma_msize_y, unsharp->luma_amount);
set_filter_param(&unsharp->chroma, unsharp->chroma_msize_x, unsharp->chroma_msize_y, unsharp->chroma_amount);
free_filter_param(&unsharp->luma);
free_filter_param(&unsharp->chroma);
- av_opt_free(unsharp);
}
static int filter_frame(AVFilterLink *link, AVFrame *in)
{ NULL }
};
+static const char *const shorthand[] = {
+ "luma_msize_x", "luma_msize_y", "luma_amount",
+ "chroma_msize_x", "chroma_msize_y", "chroma_amount",
+ NULL
+};
+
AVFilter avfilter_vf_unsharp = {
.name = "unsharp",
.description = NULL_IF_CONFIG_SMALL("Sharpen or blur the input video."),
.outputs = avfilter_vf_unsharp_outputs,
.priv_class = &unsharp_class,
+ .shorthand = shorthand,
};