static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)

{

    AVFilterContext *ctx  = inlink->dst;

    TileContext *tile    = ctx->priv;

    AVFilterLink *outlink = ctx->outputs[0];

    unsigned x0, y0;



    get_current_tile_pos(ctx, &x0, &y0);

    ff_copy_rectangle2(&tile->draw,

                       outlink->out_buf->data, outlink->out_buf->linesize,

                       inlink ->cur_buf->data, inlink ->cur_buf->linesize,

                       x0, y0 + y, 0, y, inlink->cur_buf->video->w, h);

    /* TODO if tile->w == 1 && slice_dir is always 1, we could draw_slice

     * immediately. */

    return 0;

}

static int draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)

{

    AVFilterContext *ctx  = inlink->dst;

    TileContext *tile    = ctx->priv;

    AVFilterLink *outlink = ctx->outputs[0];

    unsigned x0, y0;



    get_current_tile_pos(ctx, &x0, &y0);

    ff_copy_rectangle2(&tile->draw,

                       outlink->out_buf->data, outlink->out_buf->linesize,

                       inlink ->cur_buf->data, inlink ->cur_buf->linesize,

                       x0, y0 + y, 0, y, inlink->cur_buf->video->w, h);

    



    return 0;

}

static int FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3)

{

    AVFilterContext *ctx  = VAR_0->dst;

    TileContext *tile    = ctx->priv;

    AVFilterLink *outlink = ctx->outputs[0];

    unsigned VAR_4, VAR_5;



    get_current_tile_pos(ctx, &VAR_4, &VAR_5);

    ff_copy_rectangle2(&tile->draw,

                       outlink->out_buf->data, outlink->out_buf->linesize,

                       VAR_0 ->cur_buf->data, VAR_0 ->cur_buf->linesize,

                       VAR_4, VAR_5 + VAR_1, 0, VAR_1, VAR_0->cur_buf->video->w, VAR_2);

    



    return 0;

}

static int FUNC_0(AVFilterLink *VAR_0, int VAR_1, int VAR_2, int VAR_3)
{ AVFilterContext *ctx  = VAR_0->dst; TileContext *tile    = ctx->priv; AVFilterLink *outlink = ctx->outputs[0]; unsigned VAR_4, VAR_5; get_current_tile_pos(ctx, &VAR_4, &VAR_5); ff_copy_rectangle2(&tile->draw,
outlink->out_buf->data, outlink->out_buf->linesize,
VAR_0 ->cur_buf->data, VAR_0 ->cur_buf->linesize,
VAR_4, VAR_5 + VAR_1, 0, VAR_1, VAR_0->cur_buf->video->w, VAR_2); return 0; }