static void copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)

{

    int     h, w, mv_x, mv_y, offset, offset_dst;

    uint8_t *src, *dst;



    /* setup output and reference pointers */

    offset_dst  = (cell->ypos << 2) * plane->pitch + (cell->xpos << 2);

    dst         = plane->pixels[ctx->buf_sel] + offset_dst;


    mv_y        = cell->mv_ptr[0];

    mv_x        = cell->mv_ptr[1];



    offset      = offset_dst + mv_y * plane->pitch + mv_x;

    src         = plane->pixels[ctx->buf_sel ^ 1] + offset;



    h = cell->height << 2;



    for (w = cell->width; w > 0;) {

        /* copy using 16xH blocks */

        if (!((cell->xpos << 2) & 15) && w >= 4) {

            for (; w >= 4; src += 16, dst += 16, w -= 4)

                ctx->dsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h);

        }



        /* copy using 8xH blocks */

        if (!((cell->xpos << 2) & 7) && w >= 2) {

            ctx->dsp.put_no_rnd_pixels_tab[1][0](dst, src, plane->pitch, h);

            w -= 2;

            src += 8;

            dst += 8;

        }



        if (w >= 1) {

            copy_block4(dst, src, plane->pitch, plane->pitch, h);

            w--;

            src += 4;

            dst += 4;

        }

    }

}
static void copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)

{

    int     h, w, mv_x, mv_y, offset, offset_dst;

    uint8_t *src, *dst;



    

    offset_dst  = (cell->ypos << 2) * plane->pitch + (cell->xpos << 2);

    dst         = plane->pixels[ctx->buf_sel] + offset_dst;


    mv_y        = cell->mv_ptr[0];

    mv_x        = cell->mv_ptr[1];



    offset      = offset_dst + mv_y * plane->pitch + mv_x;

    src         = plane->pixels[ctx->buf_sel ^ 1] + offset;



    h = cell->height << 2;



    for (w = cell->width; w > 0;) {

        

        if (!((cell->xpos << 2) & 15) && w >= 4) {

            for (; w >= 4; src += 16, dst += 16, w -= 4)

                ctx->dsp.put_no_rnd_pixels_tab[0][0](dst, src, plane->pitch, h);

        }



        

        if (!((cell->xpos << 2) & 7) && w >= 2) {

            ctx->dsp.put_no_rnd_pixels_tab[1][0](dst, src, plane->pitch, h);

            w -= 2;

            src += 8;

            dst += 8;

        }



        if (w >= 1) {

            copy_block4(dst, src, plane->pitch, plane->pitch, h);

            w--;

            src += 4;

            dst += 4;

        }

    }

}
static void FUNC_0(Indeo3DecodeContext *VAR_0, Plane *VAR_1, Cell *VAR_2)

{

    int     VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8;

    uint8_t *src, *dst;



    

    VAR_8  = (VAR_2->ypos << 2) * VAR_1->pitch + (VAR_2->xpos << 2);

    dst         = VAR_1->pixels[VAR_0->buf_sel] + VAR_8;


    VAR_6        = VAR_2->mv_ptr[0];

    VAR_5        = VAR_2->mv_ptr[1];



    VAR_7      = VAR_8 + VAR_6 * VAR_1->pitch + VAR_5;

    src         = VAR_1->pixels[VAR_0->buf_sel ^ 1] + VAR_7;



    VAR_3 = VAR_2->height << 2;



    for (VAR_4 = VAR_2->width; VAR_4 > 0;) {

        

        if (!((VAR_2->xpos << 2) & 15) && VAR_4 >= 4) {

            for (; VAR_4 >= 4; src += 16, dst += 16, VAR_4 -= 4)

                VAR_0->dsp.put_no_rnd_pixels_tab[0][0](dst, src, VAR_1->pitch, VAR_3);

        }



        

        if (!((VAR_2->xpos << 2) & 7) && VAR_4 >= 2) {

            VAR_0->dsp.put_no_rnd_pixels_tab[1][0](dst, src, VAR_1->pitch, VAR_3);

            VAR_4 -= 2;

            src += 8;

            dst += 8;

        }



        if (VAR_4 >= 1) {

            copy_block4(dst, src, VAR_1->pitch, VAR_1->pitch, VAR_3);

            VAR_4--;

            src += 4;

            dst += 4;

        }

    }

}
static void FUNC_0(Indeo3DecodeContext *VAR_0, Plane *VAR_1, Cell *VAR_2)
{ int     VAR_3, VAR_4, VAR_5, VAR_6, VAR_7, VAR_8; uint8_t *src, *dst; VAR_8  = (VAR_2->ypos << 2) * VAR_1->pitch + (VAR_2->xpos << 2); dst         = VAR_1->pixels[VAR_0->buf_sel] + VAR_8; VAR_6        = VAR_2->mv_ptr[0]; VAR_5        = VAR_2->mv_ptr[1]; VAR_7      = VAR_8 + VAR_6 * VAR_1->pitch + VAR_5; src         = VAR_1->pixels[VAR_0->buf_sel ^ 1] + VAR_7; VAR_3 = VAR_2->height << 2; for (VAR_4 = VAR_2->width; VAR_4 > 0;) { if (!((VAR_2->xpos << 2) & 15) && VAR_4 >= 4) { for (; VAR_4 >= 4; src += 16, dst += 16, VAR_4 -= 4) VAR_0->dsp.put_no_rnd_pixels_tab[0][0](dst, src, VAR_1->pitch, VAR_3); } if (!((VAR_2->xpos << 2) & 7) && VAR_4 >= 2) { VAR_0->dsp.put_no_rnd_pixels_tab[1][0](dst, src, VAR_1->pitch, VAR_3); VAR_4 -= 2; src += 8; dst += 8; } if (VAR_4 >= 1) { copy_block4(dst, src, VAR_1->pitch, VAR_1->pitch, VAR_3); VAR_4--; src += 4; dst += 4; } } }