static av_cold int init(AVFilterContext *ctx, const char *args)
{
BoxBlurContext *boxblur = ctx->priv;
- static const char *shorthand[] = {
- "luma_radius", "luma_power",
- "chroma_radius", "chroma_power",
- "alpha_radius", "alpha_power",
- NULL
- };
- int ret;
-
- boxblur->class = &boxblur_class;
- av_opt_set_defaults(boxblur);
-
- if ((ret = av_opt_set_from_string(boxblur, args, shorthand, "=", ":")) < 0)
- return ret;
/* fill missing params */
if (!boxblur->chroma_param.radius_expr) {
av_freep(&boxblur->temp[0]);
av_freep(&boxblur->temp[1]);
- av_opt_free(boxblur);
}
static int query_formats(AVFilterContext *ctx)
{ NULL }
};
+static const char *const shorthand[] = {
+ "luma_radius", "luma_power",
+ "chroma_radius", "chroma_power",
+ "alpha_radius", "alpha_power",
+ NULL
+};
+
AVFilter avfilter_vf_boxblur = {
.name = "boxblur",
.description = NULL_IF_CONFIG_SMALL("Blur the input."),
.outputs = avfilter_vf_boxblur_outputs,
.priv_class = &boxblur_class,
+ .shorthand = shorthand,
};