static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)

{

    PixdescTestContext *priv = inlink->dst->priv;

    AVFilterLink *outlink    = inlink->dst->outputs[0];

    AVFilterBufferRef *outpicref;

    int i;



    outlink->out_buf = avfilter_get_video_buffer(outlink, AV_PERM_WRITE,

                                                outlink->w, outlink->h);

    outpicref = outlink->out_buf;

    avfilter_copy_buffer_ref_props(outpicref, picref);



    for (i = 0; i < 4; i++) {

        int h = outlink->h;

        h = i == 1 || i == 2 ? h>>priv->pix_desc->log2_chroma_h : h;

        if (outpicref->data[i]) {

            uint8_t *data = outpicref->data[i] +

                (outpicref->linesize[i] > 0 ? 0 : outpicref->linesize[i] * (h-1));

            memset(data, 0, FFABS(outpicref->linesize[i]) * h);

        }

    }



    /* copy palette */

    if (priv->pix_desc->flags & PIX_FMT_PAL)

        memcpy(outpicref->data[1], outpicref->data[1], 256*4);



    avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0));

}

static void start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref)

{

    PixdescTestContext *priv = inlink->dst->priv;

    AVFilterLink *outlink    = inlink->dst->outputs[0];

    AVFilterBufferRef *outpicref;

    int i;



    outlink->out_buf = avfilter_get_video_buffer(outlink, AV_PERM_WRITE,

                                                outlink->w, outlink->h);

    outpicref = outlink->out_buf;

    avfilter_copy_buffer_ref_props(outpicref, picref);



    for (i = 0; i < 4; i++) {

        int h = outlink->h;

        h = i == 1 || i == 2 ? h>>priv->pix_desc->log2_chroma_h : h;

        if (outpicref->data[i]) {

            uint8_t *data = outpicref->data[i] +

                (outpicref->linesize[i] > 0 ? 0 : outpicref->linesize[i] * (h-1));

            memset(data, 0, FFABS(outpicref->linesize[i]) * h);

        }

    }



    

    if (priv->pix_desc->flags & PIX_FMT_PAL)

        memcpy(outpicref->data[1], outpicref->data[1], 256*4);



    avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0));

}

    if (priv->pix_desc->flags & PIX_FMT_PAL)
static void FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)

{

    PixdescTestContext *priv = VAR_0->dst->priv;

    AVFilterLink *outlink    = VAR_0->dst->outputs[0];

    AVFilterBufferRef *outpicref;

    int VAR_2;



    outlink->out_buf = avfilter_get_video_buffer(outlink, AV_PERM_WRITE,

                                                outlink->w, outlink->VAR_3);

    outpicref = outlink->out_buf;

    avfilter_copy_buffer_ref_props(outpicref, VAR_1);



    for (VAR_2 = 0; VAR_2 < 4; VAR_2++) {

        int VAR_3 = outlink->VAR_3;

        VAR_3 = VAR_2 == 1 || VAR_2 == 2 ? VAR_3>>priv->pix_desc->log2_chroma_h : VAR_3;

        if (outpicref->data[VAR_2]) {

            uint8_t *data = outpicref->data[VAR_2] +

                (outpicref->linesize[VAR_2] > 0 ? 0 : outpicref->linesize[VAR_2] * (VAR_3-1));

            memset(data, 0, FFABS(outpicref->linesize[VAR_2]) * VAR_3);

        }

    }



    

    if (priv->pix_desc->flags & PIX_FMT_PAL)

        memcpy(outpicref->data[1], outpicref->data[1], 256*4);



    avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0));

}

static void FUNC_0(AVFilterLink *VAR_0, AVFilterBufferRef *VAR_1)
{ PixdescTestContext *priv = VAR_0->dst->priv; AVFilterLink *outlink    = VAR_0->dst->outputs[0]; AVFilterBufferRef *outpicref; int VAR_2; outlink->out_buf = avfilter_get_video_buffer(outlink, AV_PERM_WRITE,
outlink->w, outlink->VAR_3); outpicref = outlink->out_buf; avfilter_copy_buffer_ref_props(outpicref, VAR_1); for (VAR_2 = 0; VAR_2 < 4; VAR_2++) { int VAR_3 = outlink->VAR_3; VAR_3 = VAR_2 == 1 || VAR_2 == 2 ? VAR_3>>priv->pix_desc->log2_chroma_h : VAR_3; if (outpicref->data[VAR_2]) { uint8_t *data = outpicref->data[VAR_2] +
(outpicref->linesize[VAR_2] > 0 ? 0 : outpicref->linesize[VAR_2] * (VAR_3-1)); memset(data, 0, FFABS(outpicref->linesize[VAR_2]) * VAR_3); } } if (priv->pix_desc->flags & PIX_FMT_PAL)
memcpy(outpicref->data[1], outpicref->data[1], 256*4); avfilter_start_frame(outlink, avfilter_ref_buffer(outpicref, ~0)); }