*mb_type_ptr = MB_TYPE_INTRA;
static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]){    int cbp, code, i;    uint8_t *coded_val;#ifdef PRINT_MBif(s->mb_x==0){    printf("\n");    if(s->mb_y==0) printf("\n");}#endif    if (s->pict_type == P_TYPE) {        set_stat(ST_INTER_MB);        if (s->use_skip_mb_code) {            if (get_bits1(&s->gb)) {                /* skip mb */                s->mb_intra = 0;                for(i=0;i<6;i++)                    s->block_last_index[i] = -1;                s->mv_dir = MV_DIR_FORWARD;                s->mv_type = MV_TYPE_16X16;                s->mv[0][0][0] = 0;                s->mv[0][0][1] = 0;                s->mb_skiped = 1;#ifdef PRINT_MBprintf("S ");#endif                return 0;            }        }                code = get_vlc2(&s->gb, mb_non_intra_vlc[DEFAULT_INTER_INDEX].table, MB_NON_INTRA_VLC_BITS, 3);        if (code < 0)            return -1;	//s->mb_intra = (code & 0x40) ? 0 : 1;	s->mb_intra = (~code & 0x40) >> 6;                    cbp = code & 0x3f;    } else {        set_stat(ST_INTRA_MB);        s->mb_intra = 1;        code = get_vlc2(&s->gb, mb_intra_vlc.table, MB_INTRA_VLC_BITS, 2);        if (code < 0)            return -1;        /* predict coded block pattern */        cbp = 0;        for(i=0;i<6;i++) {            int val = ((code >> (5 - i)) & 1);            if (i < 4) {                int pred = coded_block_pred(s, i, &coded_val);                val = val ^ pred;                *coded_val = val;            }            cbp |= val << (5 - i);        }    }    if (!s->mb_intra) {        int mx, my;//printf("P at %d %d\n", s->mb_x, s->mb_y);        if(s->per_mb_rl_table && cbp){            s->rl_table_index = decode012(&s->gb);            s->rl_chroma_table_index = s->rl_table_index;        }        set_stat(ST_MV);        h263_pred_motion(s, 0, &mx, &my);        if (msmpeg4_decode_motion(s, &mx, &my) < 0)            return -1;        s->mv_dir = MV_DIR_FORWARD;        s->mv_type = MV_TYPE_16X16;        s->mv[0][0][0] = mx;        s->mv[0][0][1] = my;#ifdef PRINT_MBprintf("P ");#endif    } else {//printf("I at %d %d %d %06X\n", s->mb_x, s->mb_y, ((cbp&3)? 1 : 0) +((cbp&0x3C)? 2 : 0), show_bits(&s->gb, 24));        set_stat(ST_INTRA_MB);        s->ac_pred = get_bits1(&s->gb);#ifdef PRINT_MBprintf("%c", s->ac_pred ? 'A' : 'I');#endif        if(s->inter_intra_pred){            s->h263_aic_dir= get_vlc2(&s->gb, inter_intra_vlc.table, INTER_INTRA_VLC_BITS, 1);//            printf("%d%d %d %d/", s->ac_pred, s->h263_aic_dir, s->mb_x, s->mb_y);        }        if(s->per_mb_rl_table && cbp){            s->rl_table_index = decode012(&s->gb);            s->rl_chroma_table_index = s->rl_table_index;        }    }    for (i = 0; i < 6; i++) {        if (msmpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, NULL) < 0)	{	    fprintf(stderr,"\nerror while decoding block: %d x %d (%d)\n", s->mb_x, s->mb_y, i);	    return -1;	}    }        return 0;}