static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

{

    UnsharpContext *unsharp = ctx->priv;

    int lmsize_x = 5, cmsize_x = 0;

    int lmsize_y = 5, cmsize_y = 0;

    double lamount = 1.0f, camount = 0.0f;



    if (args)

        sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount,

                                            &cmsize_x, &cmsize_y, &camount);



    if ((lamount && (lmsize_x < 2 || lmsize_y < 2)) ||

        (camount && (cmsize_x < 2 || cmsize_y < 2))) {

        av_log(ctx, AV_LOG_ERROR,

               "Invalid value <2 for lmsize_x:%d or lmsize_y:%d or cmsize_x:%d or cmsize_y:%d\n",

               lmsize_x, lmsize_y, cmsize_x, cmsize_y);

        return AVERROR(EINVAL);

    }



    set_filter_param(&unsharp->luma,   lmsize_x, lmsize_y, lamount);

    set_filter_param(&unsharp->chroma, cmsize_x, cmsize_y, camount);



    return 0;

}

static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)

{

    UnsharpContext *unsharp = ctx->priv;

    int lmsize_x = 5, cmsize_x = 0;

    int lmsize_y = 5, cmsize_y = 0;

    double lamount = 1.0f, camount = 0.0f;



    if (args)

        sscanf(args, "%d:%d:%lf:%d:%d:%lf", &lmsize_x, &lmsize_y, &lamount,

                                            &cmsize_x, &cmsize_y, &camount);



    if ((lamount && (lmsize_x < 2 || lmsize_y < 2)) ||

        (camount && (cmsize_x < 2 || cmsize_y < 2))) {

        av_log(ctx, AV_LOG_ERROR,

               "Invalid value <2 for lmsize_x:%d or lmsize_y:%d or cmsize_x:%d or cmsize_y:%d\n",

               lmsize_x, lmsize_y, cmsize_x, cmsize_y);

        return AVERROR(EINVAL);

    }



    set_filter_param(&unsharp->luma,   lmsize_x, lmsize_y, lamount);

    set_filter_param(&unsharp->chroma, cmsize_x, cmsize_y, camount);



    return 0;

}

static av_cold int FUNC_0(AVFilterContext *ctx, const char *args, void *opaque)

{

    UnsharpContext *unsharp = ctx->priv;

    int VAR_0 = 5, VAR_1 = 0;

    int VAR_2 = 5, VAR_3 = 0;

    double VAR_4 = 1.0f, VAR_5 = 0.0f;



    if (args)

        sscanf(args, "%d:%d:%lf:%d:%d:%lf", &VAR_0, &VAR_2, &VAR_4,

                                            &VAR_1, &VAR_3, &VAR_5);



    if ((VAR_4 && (VAR_0 < 2 || VAR_2 < 2)) ||

        (VAR_5 && (VAR_1 < 2 || VAR_3 < 2))) {

        av_log(ctx, AV_LOG_ERROR,

               "Invalid value <2 for VAR_0:%d or VAR_2:%d or VAR_1:%d or VAR_3:%d\n",

               VAR_0, VAR_2, VAR_1, VAR_3);

        return AVERROR(EINVAL);

    }



    set_filter_param(&unsharp->luma,   VAR_0, VAR_2, VAR_4);

    set_filter_param(&unsharp->chroma, VAR_1, VAR_3, VAR_5);



    return 0;

}

static av_cold int FUNC_0(AVFilterContext *ctx, const char *args, void *opaque)
{ UnsharpContext *unsharp = ctx->priv; int VAR_0 = 5, VAR_1 = 0; int VAR_2 = 5, VAR_3 = 0; double VAR_4 = 1.0f, VAR_5 = 0.0f; if (args)
sscanf(args, "%d:%d:%lf:%d:%d:%lf", &VAR_0, &VAR_2, &VAR_4,
&VAR_1, &VAR_3, &VAR_5); if ((VAR_4 && (VAR_0 < 2 || VAR_2 < 2)) ||
(VAR_5 && (VAR_1 < 2 || VAR_3 < 2))) { av_log(ctx, AV_LOG_ERROR,
"Invalid value <2 for VAR_0:%d or VAR_2:%d or VAR_1:%d or VAR_3:%d\n",
VAR_0, VAR_2, VAR_1, VAR_3); return AVERROR(EINVAL); } set_filter_param(&unsharp->luma,   VAR_0, VAR_2, VAR_4); set_filter_param(&unsharp->chroma, VAR_1, VAR_3, VAR_5); return 0; }