static int svq1_decode_delta_block(MpegEncContext *s, GetBitContext *bitbuf,

                                   uint8_t *current, uint8_t *previous,

                                   int pitch, svq1_pmv *motion, int x, int y)

{

    uint32_t block_type;

    int result = 0;



    /* get block type */

    block_type = get_vlc2(bitbuf, svq1_block_type.table, 2, 2);



    /* reset motion vectors */

    if (block_type == SVQ1_BLOCK_SKIP || block_type == SVQ1_BLOCK_INTRA) {

        motion[0].x         =

        motion[0].y         =

        motion[x / 8 + 2].x =

        motion[x / 8 + 2].y =

        motion[x / 8 + 3].x =

        motion[x / 8 + 3].y = 0;

    }



    switch (block_type) {

    case SVQ1_BLOCK_SKIP:

        svq1_skip_block(current, previous, pitch, x, y);

        break;



    case SVQ1_BLOCK_INTER:

        result = svq1_motion_inter_block(s, bitbuf, current, previous,

                                         pitch, motion, x, y);



        if (result != 0) {

            av_dlog(s->avctx, "Error in svq1_motion_inter_block %i\n", result);

            break;

        }

        result = svq1_decode_block_non_intra(bitbuf, current, pitch);

        break;



    case SVQ1_BLOCK_INTER_4V:

        result = svq1_motion_inter_4v_block(s, bitbuf, current, previous,

                                            pitch, motion, x, y);



        if (result != 0) {

            av_dlog(s->avctx,

                    "Error in svq1_motion_inter_4v_block %i\n", result);

            break;

        }

        result = svq1_decode_block_non_intra(bitbuf, current, pitch);

        break;



    case SVQ1_BLOCK_INTRA:

        result = svq1_decode_block_intra(bitbuf, current, pitch);

        break;

    }



    return result;

}

static int svq1_decode_delta_block(MpegEncContext *s, GetBitContext *bitbuf,

                                   uint8_t *current, uint8_t *previous,

                                   int pitch, svq1_pmv *motion, int x, int y)

{

    uint32_t block_type;

    int result = 0;



    

    block_type = get_vlc2(bitbuf, svq1_block_type.table, 2, 2);



    

    if (block_type == SVQ1_BLOCK_SKIP || block_type == SVQ1_BLOCK_INTRA) {

        motion[0].x         =

        motion[0].y         =

        motion[x / 8 + 2].x =

        motion[x / 8 + 2].y =

        motion[x / 8 + 3].x =

        motion[x / 8 + 3].y = 0;

    }



    switch (block_type) {

    case SVQ1_BLOCK_SKIP:

        svq1_skip_block(current, previous, pitch, x, y);

        break;



    case SVQ1_BLOCK_INTER:

        result = svq1_motion_inter_block(s, bitbuf, current, previous,

                                         pitch, motion, x, y);



        if (result != 0) {

            av_dlog(s->avctx, "Error in svq1_motion_inter_block %i\n", result);

            break;

        }

        result = svq1_decode_block_non_intra(bitbuf, current, pitch);

        break;



    case SVQ1_BLOCK_INTER_4V:

        result = svq1_motion_inter_4v_block(s, bitbuf, current, previous,

                                            pitch, motion, x, y);



        if (result != 0) {

            av_dlog(s->avctx,

                    "Error in svq1_motion_inter_4v_block %i\n", result);

            break;

        }

        result = svq1_decode_block_non_intra(bitbuf, current, pitch);

        break;



    case SVQ1_BLOCK_INTRA:

        result = svq1_decode_block_intra(bitbuf, current, pitch);

        break;

    }



    return result;

}

static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1,

                                   uint8_t *VAR_2, uint8_t *VAR_3,

                                   int VAR_4, svq1_pmv *VAR_5, int VAR_6, int VAR_7)

{

    uint32_t block_type;

    int VAR_8 = 0;



    

    block_type = get_vlc2(VAR_1, svq1_block_type.table, 2, 2);



    

    if (block_type == SVQ1_BLOCK_SKIP || block_type == SVQ1_BLOCK_INTRA) {

        VAR_5[0].VAR_6         =

        VAR_5[0].VAR_7         =

        VAR_5[VAR_6 / 8 + 2].VAR_6 =

        VAR_5[VAR_6 / 8 + 2].VAR_7 =

        VAR_5[VAR_6 / 8 + 3].VAR_6 =

        VAR_5[VAR_6 / 8 + 3].VAR_7 = 0;

    }



    switch (block_type) {

    case SVQ1_BLOCK_SKIP:

        svq1_skip_block(VAR_2, VAR_3, VAR_4, VAR_6, VAR_7);

        break;



    case SVQ1_BLOCK_INTER:

        VAR_8 = svq1_motion_inter_block(VAR_0, VAR_1, VAR_2, VAR_3,

                                         VAR_4, VAR_5, VAR_6, VAR_7);



        if (VAR_8 != 0) {

            av_dlog(VAR_0->avctx, "Error in svq1_motion_inter_block %i\n", VAR_8);

            break;

        }

        VAR_8 = svq1_decode_block_non_intra(VAR_1, VAR_2, VAR_4);

        break;



    case SVQ1_BLOCK_INTER_4V:

        VAR_8 = svq1_motion_inter_4v_block(VAR_0, VAR_1, VAR_2, VAR_3,

                                            VAR_4, VAR_5, VAR_6, VAR_7);



        if (VAR_8 != 0) {

            av_dlog(VAR_0->avctx,

                    "Error in svq1_motion_inter_4v_block %i\n", VAR_8);

            break;

        }

        VAR_8 = svq1_decode_block_non_intra(VAR_1, VAR_2, VAR_4);

        break;



    case SVQ1_BLOCK_INTRA:

        VAR_8 = svq1_decode_block_intra(VAR_1, VAR_2, VAR_4);

        break;

    }



    return VAR_8;

}

static int FUNC_0(MpegEncContext *VAR_0, GetBitContext *VAR_1,
uint8_t *VAR_2, uint8_t *VAR_3,
int VAR_4, svq1_pmv *VAR_5, int VAR_6, int VAR_7)
{ uint32_t block_type; int VAR_8 = 0; block_type = get_vlc2(VAR_1, svq1_block_type.table, 2, 2); if (block_type == SVQ1_BLOCK_SKIP || block_type == SVQ1_BLOCK_INTRA) { VAR_5[0].VAR_6         =
VAR_5[0].VAR_7         =
VAR_5[VAR_6 / 8 + 2].VAR_6 =
VAR_5[VAR_6 / 8 + 2].VAR_7 =
VAR_5[VAR_6 / 8 + 3].VAR_6 =
VAR_5[VAR_6 / 8 + 3].VAR_7 = 0; } switch (block_type) { case SVQ1_BLOCK_SKIP:
svq1_skip_block(VAR_2, VAR_3, VAR_4, VAR_6, VAR_7); break; case SVQ1_BLOCK_INTER:
VAR_8 = svq1_motion_inter_block(VAR_0, VAR_1, VAR_2, VAR_3,
VAR_4, VAR_5, VAR_6, VAR_7); if (VAR_8 != 0) { av_dlog(VAR_0->avctx, "Error in svq1_motion_inter_block %i\n", VAR_8); break; } VAR_8 = svq1_decode_block_non_intra(VAR_1, VAR_2, VAR_4); break; case SVQ1_BLOCK_INTER_4V:
VAR_8 = svq1_motion_inter_4v_block(VAR_0, VAR_1, VAR_2, VAR_3,
VAR_4, VAR_5, VAR_6, VAR_7); if (VAR_8 != 0) { av_dlog(VAR_0->avctx,
"Error in svq1_motion_inter_4v_block %i\n", VAR_8); break; } VAR_8 = svq1_decode_block_non_intra(VAR_1, VAR_2, VAR_4); break; case SVQ1_BLOCK_INTRA:
VAR_8 = svq1_decode_block_intra(VAR_1, VAR_2, VAR_4); break; } return VAR_8; }