From 7b9e98173ca7afea8dd76191f63ab6995ba01777 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 27 Apr 2011 04:09:35 +0200 Subject: [PATCH] Revert "Eliminate pointless '#if 1' statements without matching '#else'." no comment This reverts commit e6ff064845d02c43526c8a56dab121c219f16659. Conflicts: libavcodec/dsputil.c Signed-off-by: Michael Niedermayer --- libavcodec/error_resilience.c | 17 ++++++++++++----- libavcodec/motion_est_template.c | 2 ++ libavformat/nutenc.c | 2 ++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c index ed31582199..dc015b9f6a 100644 --- a/libavcodec/error_resilience.c +++ b/libavcodec/error_resilience.c @@ -786,6 +786,7 @@ void ff_er_frame_end(MpegEncContext *s){ } } +#if 1 /* handle overlapping slices */ for(error_type=1; error_type<=3; error_type++){ int end_ok=0; @@ -806,7 +807,8 @@ void ff_er_frame_end(MpegEncContext *s){ end_ok=0; } } - +#endif +#if 1 /* handle slices with partitions of different length */ if(s->partitioned_frame){ int end_ok=0; @@ -827,7 +829,7 @@ void ff_er_frame_end(MpegEncContext *s){ end_ok=0; } } - +#endif /* handle missing slices */ if(s->error_recognition>=4){ int end_ok=1; @@ -851,6 +853,7 @@ void ff_er_frame_end(MpegEncContext *s){ } } +#if 1 /* backward mark errors */ distance=9999999; for(error_type=1; error_type<=3; error_type++){ @@ -875,6 +878,7 @@ void ff_er_frame_end(MpegEncContext *s){ distance= 9999999; } } +#endif /* forward mark errors */ error=0; @@ -889,7 +893,7 @@ void ff_er_frame_end(MpegEncContext *s){ s->error_status_table[mb_xy]|= error; } } - +#if 1 /* handle not partitioned case */ if(!s->partitioned_frame){ for(i=0; imb_num; i++){ @@ -900,6 +904,7 @@ void ff_er_frame_end(MpegEncContext *s){ s->error_status_table[mb_xy]= error; } } +#endif dc_error= ac_error= mv_error=0; for(i=0; imb_num; i++){ @@ -1060,15 +1065,16 @@ void ff_er_frame_end(MpegEncContext *s){ s->dc_val[2][mb_x + mb_y*s->mb_stride]= (dcv+4)>>3; } } - +#if 1 /* guess DC for damaged blocks */ guess_dc(s, s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride, 1); guess_dc(s, s->dc_val[1], s->mb_width , s->mb_height , s->mb_stride, 0); guess_dc(s, s->dc_val[2], s->mb_width , s->mb_height , s->mb_stride, 0); - +#endif /* filter luma DC */ filter181(s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride); +#if 1 /* render DC only intra */ for(mb_y=0; mb_ymb_height; mb_y++){ for(mb_x=0; mb_xmb_width; mb_x++){ @@ -1088,6 +1094,7 @@ void ff_er_frame_end(MpegEncContext *s){ put_dc(s, dest_y, dest_cb, dest_cr, mb_x, mb_y); } } +#endif if(s->avctx->error_concealment&FF_EC_DEBLOCK){ /* filter horizontal block boundaries */ diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c index 3a37bde063..8f730ef14f 100644 --- a/libavcodec/motion_est_template.c +++ b/libavcodec/motion_est_template.c @@ -158,6 +158,7 @@ static int hpel_motion_search(MpegEncContext * s, const int b= score_map[(index+(1<penalty_factor; +#if 1 int key; int map_generation= c->map_generation; #ifndef NDEBUG @@ -171,6 +172,7 @@ static int hpel_motion_search(MpegEncContext * s, assert(map[(index+1)&(ME_MAP_SIZE-1)] == key); key= ((my)<frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate); int pts; @@ -198,6 +199,7 @@ static void build_frame_code(AVFormatContext *s){ ft->pts_delta=1; start2++; } +#endif if(codec->has_b_frames){ pred_count=5;