Revision ce5e49b0 libavcodec/error_resilience.c
libavcodec/error_resilience.c | ||
---|---|---|
639 | 639 |
if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction |
640 | 640 |
|
641 | 641 |
//prevent dsp.sad() check, that requires access to the image |
642 |
if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == FF_I_TYPE)
|
|
642 |
if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == AV_PICTURE_TYPE_I)
|
|
643 | 643 |
return 1; |
644 | 644 |
|
645 | 645 |
skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs |
... | ... | |
658 | 658 |
j++; |
659 | 659 |
if((j%skip_amount) != 0) continue; //skip a few to speed things up |
660 | 660 |
|
661 |
if(s->pict_type==FF_I_TYPE){
|
|
661 |
if(s->pict_type==AV_PICTURE_TYPE_I){
|
|
662 | 662 |
uint8_t *mb_ptr = s->current_picture.data[0] + mb_x*16 + mb_y*16*s->linesize; |
663 | 663 |
uint8_t *last_mb_ptr= s->last_picture.data [0] + mb_x*16 + mb_y*16*s->linesize; |
664 | 664 |
|
... | ... | |
977 | 977 |
} |
978 | 978 |
|
979 | 979 |
/* guess MVs */ |
980 |
if(s->pict_type==FF_B_TYPE){
|
|
980 |
if(s->pict_type==AV_PICTURE_TYPE_B){
|
|
981 | 981 |
for(mb_y=0; mb_y<s->mb_height; mb_y++){ |
982 | 982 |
for(mb_x=0; mb_x<s->mb_width; mb_x++){ |
983 | 983 |
int xy= mb_x*2 + mb_y*2*s->b8_stride; |
... | ... | |
1114 | 1114 |
const int mb_xy= s->mb_index2xy[i]; |
1115 | 1115 |
int error= s->error_status_table[mb_xy]; |
1116 | 1116 |
|
1117 |
if(s->pict_type!=FF_B_TYPE && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){
|
|
1117 |
if(s->pict_type!=AV_PICTURE_TYPE_B && (error&(DC_ERROR|MV_ERROR|AC_ERROR))){
|
|
1118 | 1118 |
s->mbskip_table[mb_xy]=0; |
1119 | 1119 |
} |
1120 | 1120 |
s->mbintra_table[mb_xy]=1; |
Also available in: Unified diff