static inline void xan_wc3_copy_pixel_run(XanContext *s,

    int x, int y, int pixel_count, int motion_x, int motion_y)

{

    int stride;

    int line_inc;

    int curframe_index, prevframe_index;

    int curframe_x, prevframe_x;

    int width = s->avctx->width;

    unsigned char *palette_plane, *prev_palette_plane;



    palette_plane = s->current_frame.data[0];

    prev_palette_plane = s->last_frame.data[0];



    stride = s->current_frame.linesize[0];

    line_inc = stride - width;

    curframe_index = y * stride + x;

    curframe_x = x;

    prevframe_index = (y + motion_y) * stride + x + motion_x;

    prevframe_x = x + motion_x;

    while(pixel_count && (curframe_index < s->frame_size)) {

        int count = FFMIN3(pixel_count, width - curframe_x, width - prevframe_x);



        memcpy(palette_plane + curframe_index, prev_palette_plane + prevframe_index, count);

        pixel_count     -= count;

        curframe_index  += count;

        prevframe_index += count;

        curframe_x      += count;

        prevframe_x     += count;



        if (curframe_x >= width) {

            curframe_index += line_inc;

            curframe_x = 0;

        }



        if (prevframe_x >= width) {

            prevframe_index += line_inc;

            prevframe_x = 0;

        }

    }

}
static inline void xan_wc3_copy_pixel_run(XanContext *s,

    int x, int y, int pixel_count, int motion_x, int motion_y)

{

    int stride;

    int line_inc;

    int curframe_index, prevframe_index;

    int curframe_x, prevframe_x;

    int width = s->avctx->width;

    unsigned char *palette_plane, *prev_palette_plane;



    palette_plane = s->current_frame.data[0];

    prev_palette_plane = s->last_frame.data[0];



    stride = s->current_frame.linesize[0];

    line_inc = stride - width;

    curframe_index = y * stride + x;

    curframe_x = x;

    prevframe_index = (y + motion_y) * stride + x + motion_x;

    prevframe_x = x + motion_x;

    while(pixel_count && (curframe_index < s->frame_size)) {

        int count = FFMIN3(pixel_count, width - curframe_x, width - prevframe_x);



        memcpy(palette_plane + curframe_index, prev_palette_plane + prevframe_index, count);

        pixel_count     -= count;

        curframe_index  += count;

        prevframe_index += count;

        curframe_x      += count;

        prevframe_x     += count;



        if (curframe_x >= width) {

            curframe_index += line_inc;

            curframe_x = 0;

        }



        if (prevframe_x >= width) {

            prevframe_index += line_inc;

            prevframe_x = 0;

        }

    }

}
static inline void FUNC_0(XanContext *VAR_0,

    int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)

{

    int VAR_6;

    int VAR_7;

    int VAR_8, VAR_9;

    int VAR_10, VAR_11;

    int VAR_12 = VAR_0->avctx->VAR_12;

    unsigned char *VAR_13, *VAR_14;



    VAR_13 = VAR_0->current_frame.data[0];

    VAR_14 = VAR_0->last_frame.data[0];



    VAR_6 = VAR_0->current_frame.linesize[0];

    VAR_7 = VAR_6 - VAR_12;

    VAR_8 = VAR_2 * VAR_6 + VAR_1;

    VAR_10 = VAR_1;

    VAR_9 = (VAR_2 + VAR_5) * VAR_6 + VAR_1 + VAR_4;

    VAR_11 = VAR_1 + VAR_4;

    while(VAR_3 && (VAR_8 < VAR_0->frame_size)) {

        int VAR_15 = FFMIN3(VAR_3, VAR_12 - VAR_10, VAR_12 - VAR_11);



        memcpy(VAR_13 + VAR_8, VAR_14 + VAR_9, VAR_15);

        VAR_3     -= VAR_15;

        VAR_8  += VAR_15;

        VAR_9 += VAR_15;

        VAR_10      += VAR_15;

        VAR_11     += VAR_15;



        if (VAR_10 >= VAR_12) {

            VAR_8 += VAR_7;

            VAR_10 = 0;

        }



        if (VAR_11 >= VAR_12) {

            VAR_9 += VAR_7;

            VAR_11 = 0;

        }

    }

}
static inline void FUNC_0(XanContext *VAR_0,
int VAR_1, int VAR_2, int VAR_3, int VAR_4, int VAR_5)
{ int VAR_6; int VAR_7; int VAR_8, VAR_9; int VAR_10, VAR_11; int VAR_12 = VAR_0->avctx->VAR_12; unsigned char *VAR_13, *VAR_14; VAR_13 = VAR_0->current_frame.data[0]; VAR_14 = VAR_0->last_frame.data[0]; VAR_6 = VAR_0->current_frame.linesize[0]; VAR_7 = VAR_6 - VAR_12; VAR_8 = VAR_2 * VAR_6 + VAR_1; VAR_10 = VAR_1; VAR_9 = (VAR_2 + VAR_5) * VAR_6 + VAR_1 + VAR_4; VAR_11 = VAR_1 + VAR_4; while(VAR_3 && (VAR_8 < VAR_0->frame_size)) { int VAR_15 = FFMIN3(VAR_3, VAR_12 - VAR_10, VAR_12 - VAR_11); memcpy(VAR_13 + VAR_8, VAR_14 + VAR_9, VAR_15); VAR_3     -= VAR_15; VAR_8  += VAR_15; VAR_9 += VAR_15; VAR_10      += VAR_15; VAR_11     += VAR_15; if (VAR_10 >= VAR_12) { VAR_8 += VAR_7; VAR_10 = 0; } if (VAR_11 >= VAR_12) { VAR_9 += VAR_7; VAR_11 = 0; } } }