static void decode_mb(MpegEncContext *s, int ref)

{

    s->dest[0] = s->current_picture.f.data[0] + (s->mb_y *  16                       * s->linesize)   + s->mb_x *  16;

    s->dest[1] = s->current_picture.f.data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);

    s->dest[2] = s->current_picture.f.data[2] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);



    ff_init_block_index(s);

    ff_update_block_index(s);

    s->dest[1] += (16 >> s->chroma_x_shift) - 8;

    s->dest[2] += (16 >> s->chroma_x_shift) - 8;



    if (CONFIG_H264_DECODER && s->codec_id == AV_CODEC_ID_H264) {

        H264Context *h = (void*)s;

        h->mb_xy = s->mb_x + s->mb_y * s->mb_stride;

        memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));

        av_assert1(ref >= 0);

        /* FIXME: It is possible albeit uncommon that slice references

         * differ between slices. We take the easy approach and ignore

         * it for now. If this turns out to have any relevance in

         * practice then correct remapping should be added. */

        if (ref >= h->ref_count[0])

            ref = 0;

        if (!h->ref_list[0][ref].f.data[0]) {

            av_log(s->avctx, AV_LOG_DEBUG, "Reference not available for error concealing\n");

            ref = 0;






        fill_rectangle(&s->current_picture.f.ref_index[0][4 * h->mb_xy],

                       2, 2, 2, ref, 1);

        fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1);

        fill_rectangle(h->mv_cache[0][scan8[0]], 4, 4, 8,

                       pack16to32(s->mv[0][0][0], s->mv[0][0][1]), 4);

        h->mb_mbaff =

        h->mb_field_decoding_flag = 0;

        ff_h264_hl_decode_mb(h);

    } else {

        assert(ref == 0);

        ff_MPV_decode_mb(s, s->block);


static void decode_mb(MpegEncContext *s, int ref)

{

    s->dest[0] = s->current_picture.f.data[0] + (s->mb_y *  16                       * s->linesize)   + s->mb_x *  16;

    s->dest[1] = s->current_picture.f.data[1] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);

    s->dest[2] = s->current_picture.f.data[2] + (s->mb_y * (16 >> s->chroma_y_shift) * s->uvlinesize) + s->mb_x * (16 >> s->chroma_x_shift);



    ff_init_block_index(s);

    ff_update_block_index(s);

    s->dest[1] += (16 >> s->chroma_x_shift) - 8;

    s->dest[2] += (16 >> s->chroma_x_shift) - 8;



    if (CONFIG_H264_DECODER && s->codec_id == AV_CODEC_ID_H264) {

        H264Context *h = (void*)s;

        h->mb_xy = s->mb_x + s->mb_y * s->mb_stride;

        memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));

        av_assert1(ref >= 0);

        







        if (ref >= h->ref_count[0])

            ref = 0;

        if (!h->ref_list[0][ref].f.data[0]) {

            av_log(s->avctx, AV_LOG_DEBUG, "Reference not available for error concealing\n");

            ref = 0;






        fill_rectangle(&s->current_picture.f.ref_index[0][4 * h->mb_xy],

                       2, 2, 2, ref, 1);

        fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1);

        fill_rectangle(h->mv_cache[0][scan8[0]], 4, 4, 8,

                       pack16to32(s->mv[0][0][0], s->mv[0][0][1]), 4);

        h->mb_mbaff =

        h->mb_field_decoding_flag = 0;

        ff_h264_hl_decode_mb(h);

    } else {

        assert(ref == 0);

        ff_MPV_decode_mb(s, s->block);


static void FUNC_0(MpegEncContext *VAR_0, int VAR_1)

{

    VAR_0->dest[0] = VAR_0->current_picture.f.data[0] + (VAR_0->mb_y *  16                       * VAR_0->linesize)   + VAR_0->mb_x *  16;

    VAR_0->dest[1] = VAR_0->current_picture.f.data[1] + (VAR_0->mb_y * (16 >> VAR_0->chroma_y_shift) * VAR_0->uvlinesize) + VAR_0->mb_x * (16 >> VAR_0->chroma_x_shift);

    VAR_0->dest[2] = VAR_0->current_picture.f.data[2] + (VAR_0->mb_y * (16 >> VAR_0->chroma_y_shift) * VAR_0->uvlinesize) + VAR_0->mb_x * (16 >> VAR_0->chroma_x_shift);



    ff_init_block_index(VAR_0);

    ff_update_block_index(VAR_0);

    VAR_0->dest[1] += (16 >> VAR_0->chroma_x_shift) - 8;

    VAR_0->dest[2] += (16 >> VAR_0->chroma_x_shift) - 8;



    if (CONFIG_H264_DECODER && VAR_0->codec_id == AV_CODEC_ID_H264) {

        H264Context *h = (void*)VAR_0;

        h->mb_xy = VAR_0->mb_x + VAR_0->mb_y * VAR_0->mb_stride;

        memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));

        av_assert1(VAR_1 >= 0);

        







        if (VAR_1 >= h->ref_count[0])

            VAR_1 = 0;

        if (!h->ref_list[0][VAR_1].f.data[0]) {

            av_log(VAR_0->avctx, AV_LOG_DEBUG, "Reference not available for error concealing\n");

            VAR_1 = 0;






        fill_rectangle(&VAR_0->current_picture.f.ref_index[0][4 * h->mb_xy],

                       2, 2, 2, VAR_1, 1);

        fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, VAR_1, 1);

        fill_rectangle(h->mv_cache[0][scan8[0]], 4, 4, 8,

                       pack16to32(VAR_0->mv[0][0][0], VAR_0->mv[0][0][1]), 4);

        h->mb_mbaff =

        h->mb_field_decoding_flag = 0;

        ff_h264_hl_decode_mb(h);

    } else {

        assert(VAR_1 == 0);

        ff_MPV_decode_mb(VAR_0, VAR_0->block);


static void FUNC_0(MpegEncContext *VAR_0, int VAR_1)
{ VAR_0->dest[0] = VAR_0->current_picture.f.data[0] + (VAR_0->mb_y *  16                       * VAR_0->linesize)   + VAR_0->mb_x *  16; VAR_0->dest[1] = VAR_0->current_picture.f.data[1] + (VAR_0->mb_y * (16 >> VAR_0->chroma_y_shift) * VAR_0->uvlinesize) + VAR_0->mb_x * (16 >> VAR_0->chroma_x_shift); VAR_0->dest[2] = VAR_0->current_picture.f.data[2] + (VAR_0->mb_y * (16 >> VAR_0->chroma_y_shift) * VAR_0->uvlinesize) + VAR_0->mb_x * (16 >> VAR_0->chroma_x_shift); ff_init_block_index(VAR_0); ff_update_block_index(VAR_0); VAR_0->dest[1] += (16 >> VAR_0->chroma_x_shift) - 8; VAR_0->dest[2] += (16 >> VAR_0->chroma_x_shift) - 8; if (CONFIG_H264_DECODER && VAR_0->codec_id == AV_CODEC_ID_H264) { H264Context *h = (void*)VAR_0; h->mb_xy = VAR_0->mb_x + VAR_0->mb_y * VAR_0->mb_stride; memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache)); av_assert1(VAR_1 >= 0); if (VAR_1 >= h->ref_count[0])
VAR_1 = 0; if (!h->ref_list[0][VAR_1].f.data[0]) { av_log(VAR_0->avctx, AV_LOG_DEBUG, "Reference not available for error concealing\n"); VAR_1 = 0; fill_rectangle(&VAR_0->current_picture.f.ref_index[0][4 * h->mb_xy],
2, 2, 2, VAR_1, 1); fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, VAR_1, 1); fill_rectangle(h->mv_cache[0][scan8[0]], 4, 4, 8,
pack16to32(VAR_0->mv[0][0][0], VAR_0->mv[0][0][1]), 4); h->mb_mbaff =
h->mb_field_decoding_flag = 0; ff_h264_hl_decode_mb(h); } else { assert(VAR_1 == 0); ff_MPV_decode_mb(VAR_0, VAR_0->block);