Mercurial > libavcodec.hg
comparison error_resilience.c @ 6481:493dc59d469a libavcodec
add FF_ prefix to all (frame)_TYPE usage
author | aurel |
---|---|
date | Sun, 09 Mar 2008 23:31:02 +0000 |
parents | 8e63d869a904 |
children | 01647ac078a7 |
comparison
equal
deleted
inserted
replaced
6480:6f01a499e785 | 6481:493dc59d469a |
---|---|
563 | 563 |
564 if(undamaged_count < 5) return 0; //allmost all MBs damaged -> use temporal prediction | 564 if(undamaged_count < 5) return 0; //allmost all MBs damaged -> use temporal prediction |
565 | 565 |
566 #ifdef HAVE_XVMC | 566 #ifdef HAVE_XVMC |
567 //prevent dsp.sad() check, that requires access to the image | 567 //prevent dsp.sad() check, that requires access to the image |
568 if(s->avctx->xvmc_acceleration && s->pict_type==I_TYPE) return 1; | 568 if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1; |
569 #endif | 569 #endif |
570 | 570 |
571 skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs | 571 skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs |
572 is_intra_likely=0; | 572 is_intra_likely=0; |
573 | 573 |
582 continue; //skip damaged | 582 continue; //skip damaged |
583 | 583 |
584 j++; | 584 j++; |
585 if((j%skip_amount) != 0) continue; //skip a few to speed things up | 585 if((j%skip_amount) != 0) continue; //skip a few to speed things up |
586 | 586 |
587 if(s->pict_type==I_TYPE){ | 587 if(s->pict_type==FF_I_TYPE){ |
588 uint8_t *mb_ptr = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; | 588 uint8_t *mb_ptr = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; |
589 uint8_t *last_mb_ptr= s->last_picture.data [0] + mb_x*16 + mb_y*16*s->linesize; | 589 uint8_t *last_mb_ptr= s->last_picture.data [0] + mb_x*16 + mb_y*16*s->linesize; |
590 | 590 |
591 is_intra_likely += s->dsp.sad[0](NULL, last_mb_ptr, mb_ptr , s->linesize, 16); | 591 is_intra_likely += s->dsp.sad[0](NULL, last_mb_ptr, mb_ptr , s->linesize, 16); |
592 is_intra_likely -= s->dsp.sad[0](NULL, last_mb_ptr, last_mb_ptr+s->linesize*16, s->linesize, 16); | 592 is_intra_likely -= s->dsp.sad[0](NULL, last_mb_ptr, last_mb_ptr+s->linesize*16, s->linesize, 16); |
891 decode_mb(s); | 891 decode_mb(s); |
892 } | 892 } |
893 } | 893 } |
894 | 894 |
895 /* guess MVs */ | 895 /* guess MVs */ |
896 if(s->pict_type==B_TYPE){ | 896 if(s->pict_type==FF_B_TYPE){ |
897 for(mb_y=0; mb_y<s->mb_height; mb_y++){ | 897 for(mb_y=0; mb_y<s->mb_height; mb_y++){ |
898 for(mb_x=0; mb_x<s->mb_width; mb_x++){ | 898 for(mb_x=0; mb_x<s->mb_width; mb_x++){ |
899 int xy= mb_x*2 + mb_y*2*s->b8_stride; | 899 int xy= mb_x*2 + mb_y*2*s->b8_stride; |
900 const int mb_xy= mb_x + mb_y * s->mb_stride; | 900 const int mb_xy= mb_x + mb_y * s->mb_stride; |
901 const int mb_type= s->current_picture.mb_type[mb_xy]; | 901 const int mb_type= s->current_picture.mb_type[mb_xy]; |
1029 /* clean a few tables */ | 1029 /* clean a few tables */ |
1030 for(i=0; i<s->mb_num; i++){ | 1030 for(i=0; i<s->mb_num; i++){ |
1031 const int mb_xy= s->mb_index2xy[i]; | 1031 const int mb_xy= s->mb_index2xy[i]; |
1032 int error= s->error_status_table[mb_xy]; | 1032 int error= s->error_status_table[mb_xy]; |
1033 | 1033 |
1034 if(s->pict_type!=B_TYPE && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){ | 1034 if(s->pict_type!=FF_B_TYPE && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){ |
1035 s->mbskip_table[mb_xy]=0; | 1035 s->mbskip_table[mb_xy]=0; |
1036 } | 1036 } |
1037 s->mbintra_table[mb_xy]=1; | 1037 s->mbintra_table[mb_xy]=1; |
1038 } | 1038 } |
1039 } | 1039 } |