static void blend_frame(AVFilterContext *ctx,

                        AVFrame *top_buf,

                        AVFrame *bottom_buf,

                        AVFrame *dst_buf)

{

    BlendContext *b = ctx->priv;

    AVFilterLink *inlink = ctx->inputs[0];

    FilterParams *param;

    int plane;



    for (plane = 0; dst_buf->data[plane]; plane++) {

        int hsub = plane == 1 || plane == 2 ? b->hsub : 0;

        int vsub = plane == 1 || plane == 2 ? b->vsub : 0;

        int outw = dst_buf->width  >> hsub;

        int outh = dst_buf->height >> vsub;

        uint8_t *dst    = dst_buf->data[plane];

        uint8_t *top    = top_buf->data[plane];

        uint8_t *bottom = bottom_buf->data[plane];



        param = &b->params[plane];

        param->values[VAR_N]  = inlink->frame_count;

        param->values[VAR_T]  = dst_buf->pts == AV_NOPTS_VALUE ? NAN : dst_buf->pts * av_q2d(inlink->time_base);

        param->values[VAR_W]  = outw;

        param->values[VAR_H]  = outh;

        param->values[VAR_SW] = outw / dst_buf->width;

        param->values[VAR_SH] = outh / dst_buf->height;

        param->blend(top, top_buf->linesize[plane],

                     bottom, bottom_buf->linesize[plane],

                     dst, dst_buf->linesize[plane], outw, outh, param);

    }

}

static void blend_frame(AVFilterContext *ctx,

                        AVFrame *top_buf,

                        AVFrame *bottom_buf,

                        AVFrame *dst_buf)

{

    BlendContext *b = ctx->priv;

    AVFilterLink *inlink = ctx->inputs[0];

    FilterParams *param;

    int plane;



    for (plane = 0; dst_buf->data[plane]; plane++) {

        int hsub = plane == 1 || plane == 2 ? b->hsub : 0;

        int vsub = plane == 1 || plane == 2 ? b->vsub : 0;

        int outw = dst_buf->width  >> hsub;

        int outh = dst_buf->height >> vsub;

        uint8_t *dst    = dst_buf->data[plane];

        uint8_t *top    = top_buf->data[plane];

        uint8_t *bottom = bottom_buf->data[plane];



        param = &b->params[plane];

        param->values[VAR_N]  = inlink->frame_count;

        param->values[VAR_T]  = dst_buf->pts == AV_NOPTS_VALUE ? NAN : dst_buf->pts * av_q2d(inlink->time_base);

        param->values[VAR_W]  = outw;

        param->values[VAR_H]  = outh;

        param->values[VAR_SW] = outw / dst_buf->width;

        param->values[VAR_SH] = outh / dst_buf->height;

        param->blend(top, top_buf->linesize[plane],

                     bottom, bottom_buf->linesize[plane],

                     dst, dst_buf->linesize[plane], outw, outh, param);

    }

}

    for (plane = 0; dst_buf->data[plane]; plane++) {
static void FUNC_0(AVFilterContext *VAR_0,

                        AVFrame *VAR_1,

                        AVFrame *VAR_2,

                        AVFrame *VAR_3)

{

    BlendContext *b = VAR_0->priv;

    AVFilterLink *inlink = VAR_0->inputs[0];

    FilterParams *param;

    int VAR_4;



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

        int hsub = VAR_4 == 1 || VAR_4 == 2 ? b->hsub : 0;

        int vsub = VAR_4 == 1 || VAR_4 == 2 ? b->vsub : 0;

        int outw = VAR_3->width  >> hsub;

        int outh = VAR_3->height >> vsub;

        uint8_t *dst    = VAR_3->data[VAR_4];

        uint8_t *top    = VAR_1->data[VAR_4];

        uint8_t *bottom = VAR_2->data[VAR_4];



        param = &b->params[VAR_4];

        param->values[VAR_N]  = inlink->frame_count;

        param->values[VAR_T]  = VAR_3->pts == AV_NOPTS_VALUE ? NAN : VAR_3->pts * av_q2d(inlink->time_base);

        param->values[VAR_W]  = outw;

        param->values[VAR_H]  = outh;

        param->values[VAR_SW] = outw / VAR_3->width;

        param->values[VAR_SH] = outh / VAR_3->height;

        param->blend(top, VAR_1->linesize[VAR_4],

                     bottom, VAR_2->linesize[VAR_4],

                     dst, VAR_3->linesize[VAR_4], outw, outh, param);

    }

}

static void FUNC_0(AVFilterContext *VAR_0,
AVFrame *VAR_1,
AVFrame *VAR_2,
AVFrame *VAR_3)
{ BlendContext *b = VAR_0->priv; AVFilterLink *inlink = VAR_0->inputs[0]; FilterParams *param; int VAR_4; for (VAR_4 = 0; VAR_3->data[VAR_4]; VAR_4++) { int hsub = VAR_4 == 1 || VAR_4 == 2 ? b->hsub : 0; int vsub = VAR_4 == 1 || VAR_4 == 2 ? b->vsub : 0; int outw = VAR_3->width  >> hsub; int outh = VAR_3->height >> vsub; uint8_t *dst    = VAR_3->data[VAR_4]; uint8_t *top    = VAR_1->data[VAR_4]; uint8_t *bottom = VAR_2->data[VAR_4]; param = &b->params[VAR_4]; param->values[VAR_N]  = inlink->frame_count; param->values[VAR_T]  = VAR_3->pts == AV_NOPTS_VALUE ? NAN : VAR_3->pts * av_q2d(inlink->time_base); param->values[VAR_W]  = outw; param->values[VAR_H]  = outh; param->values[VAR_SW] = outw / VAR_3->width; param->values[VAR_SH] = outh / VAR_3->height; param->blend(top, VAR_1->linesize[VAR_4],
bottom, VAR_2->linesize[VAR_4],
dst, VAR_3->linesize[VAR_4], outw, outh, param); } }