int ret= mpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, 1);
int ret= mpeg4_decode_block(s, block[i], i, cbp&32, 1);
static int mpeg4_decode_partitioned_mb(MpegEncContext *s,                   DCTELEM block[6][64]){    int cbp, mb_type;    const int xy= s->mb_x + s->mb_y*s->mb_width;    if(s->mb_x==s->resync_mb_x && s->mb_y==s->resync_mb_y){ //Note resync_mb_{x,y}==0 at the start        int i;        int block_index_backup[6];        int qscale= s->qscale;                for(i=0; i<6; i++) block_index_backup[i]= s->block_index[i];                s->decoding_error= ff_mpeg4_decode_partitions(s);                for(i=0; i<6; i++) s->block_index[i]= block_index_backup[i];        s->first_slice_line=1;        s->mb_x= s->resync_mb_x;        s->mb_y= s->resync_mb_y;        s->qscale= qscale;        s->y_dc_scale= s->y_dc_scale_table[ s->qscale ];        s->c_dc_scale= s->c_dc_scale_table[ s->qscale ];        if(s->decoding_error==DECODING_DESYNC) return -1;    }        mb_type= s->mb_type[xy];    if(s->decoding_error)        cbp=0;    else         cbp = s->cbp_table[xy];    if(s->decoding_error!=DECODING_ACDC_LOST && s->qscale_table[xy] != s->qscale){        s->qscale= s->qscale_table[xy];        s->y_dc_scale= s->y_dc_scale_table[ s->qscale ];        s->c_dc_scale= s->c_dc_scale_table[ s->qscale ];    }    if (s->pict_type == P_TYPE || s->pict_type==S_TYPE) {        int i;        for(i=0; i<4; i++){            s->mv[0][i][0] = s->motion_val[ s->block_index[i] ][0];            s->mv[0][i][1] = s->motion_val[ s->block_index[i] ][1];        }        s->mb_intra = mb_type&MB_TYPE_INTRA;        if (mb_type&MB_TYPE_SKIPED) {            /* skip mb */            for(i=0;i<6;i++)                s->block_last_index[i] = -1;            s->mv_dir = MV_DIR_FORWARD;            s->mv_type = MV_TYPE_16X16;            if(s->pict_type==S_TYPE && s->vol_sprite_usage==GMC_SPRITE){                s->mcsel=1;                s->mb_skiped = 0;            }else{                s->mcsel=0;                s->mb_skiped = 1;            }            return 0;        }else if(s->mb_intra && s->decoding_error!=DECODING_ACDC_LOST){            s->ac_pred = s->pred_dir_table[xy]>>7;            /* decode each block */            for (i = 0; i < 6; i++) {                int ret= mpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, 1);                if(ret==DECODING_AC_LOST){                    fprintf(stderr, "texture corrupted at %d %d (trying to continue with mc/dc only)\n", s->mb_x, s->mb_y);                    s->decoding_error=DECODING_AC_LOST;                    cbp=0;                }else if(ret==DECODING_ACDC_LOST){                    fprintf(stderr, "dc corrupted at %d %d (trying to continue with mc only)\n", s->mb_x, s->mb_y);                    s->decoding_error=DECODING_ACDC_LOST;                    break;                }            }        }else if(!s->mb_intra){//            s->mcsel= 0; //FIXME do we need to init that                        s->mv_dir = MV_DIR_FORWARD;            if (mb_type&MB_TYPE_INTER4V) {                s->mv_type = MV_TYPE_8X8;            } else {                s->mv_type = MV_TYPE_16X16;            }            if(s->decoding_error==0 && cbp){                /* decode each block */                for (i = 0; i < 6; i++) {                    int ret= mpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, 0);                    if(ret==DECODING_AC_LOST){                        fprintf(stderr, "texture corrupted at %d %d (trying to continue with mc/dc only)\n", s->mb_x, s->mb_y);                        s->decoding_error=DECODING_AC_LOST;                        break;                    }                }            }        }    } else { /* I-Frame */        int i;        s->mb_intra = 1;        s->ac_pred = s->pred_dir_table[xy]>>7;                /* decode each block */        for (i = 0; i < 6; i++) {            int ret= mpeg4_decode_block(s, block[i], i, (cbp >> (5 - i)) & 1, 1);            if(ret==DECODING_AC_LOST){                fprintf(stderr, "texture corrupted at %d %d (trying to continue with dc only)\n", s->mb_x, s->mb_y);                s->decoding_error=DECODING_AC_LOST;                cbp=0;            }else if(ret==DECODING_ACDC_LOST){                fprintf(stderr, "dc corrupted at %d %d\n", s->mb_x, s->mb_y);                return -1;            }        }    }    return 0;}