if(start_xy > 0){ int prev_status= s->error_status_table[ s->mb_index2xy[start_i - 1] ];  prev_status &= ~ VP_START; if(prev_status != (MV_END|DC_END|AC_END)) s->error_count= INT_MAX; }
void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int endy, int status){    const int start_xy= clip(startx + starty * s->mb_width, 0, s->mb_num-1);    const int end_xy  = clip(endx   + endy   * s->mb_width, 0, s->mb_num);    const int mb_count= end_xy - start_xy;    int mask= -1;        if(!s->error_resilience) return;    mask &= ~VP_START;    if(status & (AC_ERROR|AC_END)) mask &= ~(AC_ERROR|AC_END);    if(status & (DC_ERROR|DC_END)) mask &= ~(DC_ERROR|DC_END);    if(status & (MV_ERROR|MV_END)) mask &= ~(MV_ERROR|MV_END);        if(mask == ~0x7F){        memset(&s->error_status_table[start_xy], 0, mb_count * sizeof(uint8_t));    }else{        int i;        for(i=start_xy; i<end_xy; i++){            s->error_status_table[i] &= mask;        }    }       if(end_xy < s->mb_num){        s->error_status_table[end_xy] &= mask;        s->error_status_table[end_xy] |= status;    }     s->error_status_table[start_xy] |= VP_START;}