[FFmpeg-cvslog] Revert "Eliminate pointless '#if 1' statements without matching '#else'."

Michael Niedermayer git at videolan.org
Wed Apr 27 04:14:01 CEST 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Apr 27 04:09:35 2011 +0200| [7b9e98173ca7afea8dd76191f63ab6995ba01777] | committer: Michael Niedermayer

Revert "Eliminate pointless '#if 1' statements without matching '#else'."

no comment

This reverts commit e6ff064845d02c43526c8a56dab121c219f16659.

Conflicts:

	libavcodec/dsputil.c

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=7b9e98173ca7afea8dd76191f63ab6995ba01777
---

 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 ed31582..dc015b9 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; i<s->mb_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; i<s->mb_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_y<s->mb_height; mb_y++){
         for(mb_x=0; mb_x<s->mb_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 3a37bde..8f730ef 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<<ME_MAP_SHIFT))&(ME_MAP_SIZE-1)]
                      + (mv_penalty[bx   - pred_x] + mv_penalty[by+2 - pred_y])*c->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)<<ME_MAP_MV_BITS) + (mx-1) + map_generation;
         assert(map[(index-1)&(ME_MAP_SIZE-1)] == key);
+#endif
         if(t<=b){
             CHECK_HALF_MV(0, 1, mx  ,my-1)
             if(l<=r){
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 2720722..47eaa2c 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -175,6 +175,7 @@ static void build_frame_code(AVFormatContext *s){
         }
 
         key_frame= intra_only;
+#if 1
         if(is_audio){
             int frame_bytes= codec->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;



More information about the ffmpeg-cvslog mailing list