Mercurial > libavcodec.hg
comparison error_resilience.c @ 11557:53822d92c3f7 libavcodec
Make sure the EC code does not attempt to use inter based concealment if there
is no reference frame available. (this can happen because the EC code will attempt
to use reference frames even for I/IDR frames)
author | michael |
---|---|
date | Tue, 30 Mar 2010 20:46:46 +0000 |
parents | 31033caa5344 |
children | 48d8c672b2d8 |
comparison
equal
deleted
inserted
replaced
11556:b94e1810ce4c | 11557:53822d92c3f7 |
---|---|
627 const int error= s->error_status_table[mb_xy]; | 627 const int error= s->error_status_table[mb_xy]; |
628 if(!((error&DC_ERROR) && (error&MV_ERROR))) | 628 if(!((error&DC_ERROR) && (error&MV_ERROR))) |
629 undamaged_count++; | 629 undamaged_count++; |
630 } | 630 } |
631 | 631 |
632 if(s->codec_id == CODEC_ID_H264){ | |
633 H264Context *h= (void*)s; | |
634 if(h->ref_count[0] <= 0 || !h->ref_list[0][0].data[0]) | |
635 return 1; | |
636 } | |
637 | |
632 if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction | 638 if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction |
633 | 639 |
634 //prevent dsp.sad() check, that requires access to the image | 640 //prevent dsp.sad() check, that requires access to the image |
635 if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == FF_I_TYPE) | 641 if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == FF_I_TYPE) |
636 return 1; | 642 return 1; |