aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-04-27 04:09:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-04-27 04:13:28 +0200
commit7b9e98173ca7afea8dd76191f63ab6995ba01777 (patch)
tree74993c45afd648f0792b1287cae92a4d4a9b72a8
parentd7e5aebae7652ac766034f1d90e5a4f62677fb3c (diff)
downloadffmpeg-7b9e98173ca7afea8dd76191f63ab6995ba01777.tar.gz
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@gmx.at>
-rw-r--r--libavcodec/error_resilience.c17
-rw-r--r--libavcodec/motion_est_template.c2
-rw-r--r--libavformat/nutenc.c2
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; 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 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<<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 272072283b..47eaa2c81c 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;