static int nppscale_resize(AVFilterContext *ctx, NPPScaleStageContext *stage,

                           AVFrame *out, AVFrame *in)

{

    NPPScaleContext *s = ctx->priv;

    NppStatus err;

    int i;



    for (i = 0; i < FF_ARRAY_ELEMS(in->data) && in->data[i]; i++) {

        int iw = stage->planes_in[i].width;

        int ih = stage->planes_in[i].height;

        int ow = stage->planes_out[i].width;

        int oh = stage->planes_out[i].height;



        err = nppiResizeSqrPixel_8u_C1R(in->data[i], (NppiSize){ iw, ih },

                                        in->linesize[i], (NppiRect){ 0, 0, iw, ih },

                                        out->data[i], out->linesize[i],

                                        (NppiRect){ 0, 0, ow, oh },

                                        (double)ow / iw, (double)oh / ih,

                                        0.0, 0.0, s->interp_algo);

        if (err != NPP_SUCCESS) {

            av_log(ctx, AV_LOG_ERROR, "NPP resize error: %d\n", err);

            return AVERROR_UNKNOWN;

        }

    }



    return 0;

}

static int nppscale_resize(AVFilterContext *ctx, NPPScaleStageContext *stage,

                           AVFrame *out, AVFrame *in)

{

    NPPScaleContext *s = ctx->priv;

    NppStatus err;

    int i;



    for (i = 0; i < FF_ARRAY_ELEMS(in->data) && in->data[i]; i++) {

        int iw = stage->planes_in[i].width;

        int ih = stage->planes_in[i].height;

        int ow = stage->planes_out[i].width;

        int oh = stage->planes_out[i].height;



        err = nppiResizeSqrPixel_8u_C1R(in->data[i], (NppiSize){ iw, ih },

                                        in->linesize[i], (NppiRect){ 0, 0, iw, ih },

                                        out->data[i], out->linesize[i],

                                        (NppiRect){ 0, 0, ow, oh },

                                        (double)ow / iw, (double)oh / ih,

                                        0.0, 0.0, s->interp_algo);

        if (err != NPP_SUCCESS) {

            av_log(ctx, AV_LOG_ERROR, "NPP resize error: %d\n", err);

            return AVERROR_UNKNOWN;

        }

    }



    return 0;

}

    for (i = 0; i < FF_ARRAY_ELEMS(in->data) && in->data[i]; i++) {
static int FUNC_0(AVFilterContext *VAR_0, NPPScaleStageContext *VAR_1,

                           AVFrame *VAR_2, AVFrame *VAR_3)

{

    NPPScaleContext *s = VAR_0->priv;

    NppStatus err;

    int VAR_4;



    for (VAR_4 = 0; VAR_4 < FF_ARRAY_ELEMS(VAR_3->data) && VAR_3->data[VAR_4]; VAR_4++) {

        int iw = VAR_1->planes_in[VAR_4].width;

        int ih = VAR_1->planes_in[VAR_4].height;

        int ow = VAR_1->planes_out[VAR_4].width;

        int oh = VAR_1->planes_out[VAR_4].height;



        err = nppiResizeSqrPixel_8u_C1R(VAR_3->data[VAR_4], (NppiSize){ iw, ih },

                                        VAR_3->linesize[VAR_4], (NppiRect){ 0, 0, iw, ih },

                                        VAR_2->data[VAR_4], VAR_2->linesize[VAR_4],

                                        (NppiRect){ 0, 0, ow, oh },

                                        (double)ow / iw, (double)oh / ih,

                                        0.0, 0.0, s->interp_algo);

        if (err != NPP_SUCCESS) {

            av_log(VAR_0, AV_LOG_ERROR, "NPP resize error: %d\n", err);

            return AVERROR_UNKNOWN;

        }

    }



    return 0;

}

static int FUNC_0(AVFilterContext *VAR_0, NPPScaleStageContext *VAR_1,
AVFrame *VAR_2, AVFrame *VAR_3)
{ NPPScaleContext *s = VAR_0->priv; NppStatus err; int VAR_4; for (VAR_4 = 0; VAR_4 < FF_ARRAY_ELEMS(VAR_3->data) && VAR_3->data[VAR_4]; VAR_4++) { int iw = VAR_1->planes_in[VAR_4].width; int ih = VAR_1->planes_in[VAR_4].height; int ow = VAR_1->planes_out[VAR_4].width; int oh = VAR_1->planes_out[VAR_4].height; err = nppiResizeSqrPixel_8u_C1R(VAR_3->data[VAR_4], (NppiSize){ iw, ih }, VAR_3->linesize[VAR_4], (NppiRect){ 0, 0, iw, ih }, VAR_2->data[VAR_4], VAR_2->linesize[VAR_4],
(NppiRect){ 0, 0, ow, oh }, (double)ow / iw, (double)oh / ih,
0.0, 0.0, s->interp_algo); if (err != NPP_SUCCESS) { av_log(VAR_0, AV_LOG_ERROR, "NPP resize error: %d\n", err); return AVERROR_UNKNOWN; } } return 0; }