comparison error_resilience.c @ 2095:5ab35105671a libavcodec

support skiping of mb rows during decoding
author michael
date Sat, 26 Jun 2004 02:20:38 +0000
parents 2ede7cc1fe4e
children 30d8b99e00f3
comparison
equal deleted inserted replaced
2094:9c29987380e4 2095:5ab35105671a
650 s->error_status_table[end_xy] |= status; 650 s->error_status_table[end_xy] |= status;
651 } 651 }
652 652
653 s->error_status_table[start_xy] |= VP_START; 653 s->error_status_table[start_xy] |= VP_START;
654 654
655 if(start_xy > 0 && s->avctx->thread_count <= 1){ 655 if(start_xy > 0 && s->avctx->thread_count <= 1 && s->avctx->skip_top*s->mb_width < start_i){
656 int prev_status= s->error_status_table[ s->mb_index2xy[start_i - 1] ]; 656 int prev_status= s->error_status_table[ s->mb_index2xy[start_i - 1] ];
657 657
658 prev_status &= ~ VP_START; 658 prev_status &= ~ VP_START;
659 if(prev_status != (MV_END|DC_END|AC_END)) s->error_count= INT_MAX; 659 if(prev_status != (MV_END|DC_END|AC_END)) s->error_count= INT_MAX;
660 } 660 }
665 int distance; 665 int distance;
666 int threshold_part[4]= {100,100,100}; 666 int threshold_part[4]= {100,100,100};
667 int threshold= 50; 667 int threshold= 50;
668 int is_intra_likely; 668 int is_intra_likely;
669 669
670 if(!s->error_resilience || s->error_count==0) return; 670 if(!s->error_resilience || s->error_count==0 ||
671 671 s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
672 av_log(s->avctx, AV_LOG_INFO, "concealing errors\n"); 672
673 av_log(s->avctx, AV_LOG_INFO, "concealing %d errors\n", s->error_count);
673 674
674 if(s->current_picture.motion_val[0] == NULL){ 675 if(s->current_picture.motion_val[0] == NULL){
675 int size = s->b8_stride * 2 * s->mb_height; 676 int size = s->b8_stride * 2 * s->mb_height;
676 Picture *pic= s->current_picture_ptr; 677 Picture *pic= s->current_picture_ptr;
677 678