summaryrefslogtreecommitdiff
path: root/libavcodec/error_resilience.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2009-02-16 11:49:08 +0000
committerDiego Biurrun <diego@biurrun.de>2009-02-16 11:49:08 +0000
commit83344066d326e6bad20feb66825ace12708eb084 (patch)
tree381eb5df2e86efed445652d0c6f05389d933e975 /libavcodec/error_resilience.c
parent42dfc2bfa90d8496b343a322935bfd843162ffd6 (diff)
Get rid of some '#if CONFIG_MPEG_XVMC_DECODER' preprocessor checks around if
statements by merging the CONFIG_MPEG_XVMC_DECODER check into the if condition. Originally committed as revision 17369 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r--libavcodec/error_resilience.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index d97a96b334..a196326e01 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -563,10 +563,9 @@ static int is_intra_more_likely(MpegEncContext *s){
if(undamaged_count < 5) return 0; //almost all MBs damaged -> use temporal prediction
-#if CONFIG_MPEG_XVMC_DECODER
//prevent dsp.sad() check, that requires access to the image
- if(s->avctx->xvmc_acceleration && s->pict_type==FF_I_TYPE) return 1;
-#endif
+ if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == FF_I_TYPE)
+ return 1;
skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs
is_intra_likely=0;
@@ -935,10 +934,9 @@ void ff_er_frame_end(MpegEncContext *s){
}else
guess_mv(s);
-#if CONFIG_MPEG_XVMC_DECODER
/* the filters below are not XvMC compatible, skip them */
- if(s->avctx->xvmc_acceleration) goto ec_clean;
-#endif
+ if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration)
+ goto ec_clean;
/* fill DC for inter blocks */
for(mb_y=0; mb_y<s->mb_height; mb_y++){
for(mb_x=0; mb_x<s->mb_width; mb_x++){
@@ -1024,9 +1022,7 @@ void ff_er_frame_end(MpegEncContext *s){
v_block_filter(s, s->current_picture.data[2], s->mb_width , s->mb_height , s->uvlinesize, 0);
}
-#if CONFIG_MPEG_XVMC_DECODER
ec_clean:
-#endif
/* clean a few tables */
for(i=0; i<s->mb_num; i++){
const int mb_xy= s->mb_index2xy[i];