aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2011-04-26 13:52:12 +0200
committerDiego Biurrun <diego@biurrun.de>2011-04-26 20:18:27 +0200
commite6ff064845d02c43526c8a56dab121c219f16659 (patch)
tree2b2e1f7c601568d61cfdec616e0c7df0b5ea0f3b
parent9d35fa520e3b27f7dd9fe12c433eb596f1271515 (diff)
downloadffmpeg-e6ff064845d02c43526c8a56dab121c219f16659.tar.gz
Eliminate pointless '#if 1' statements without matching '#else'.
-rw-r--r--ffserver.c2
-rw-r--r--libavcodec/dct-test.c5
-rw-r--r--libavcodec/dsputil.c2
-rw-r--r--libavcodec/error_resilience.c17
-rw-r--r--libavcodec/h264.h2
-rw-r--r--libavcodec/motion_est_template.c2
-rw-r--r--libavcodec/msmpeg4.c7
-rw-r--r--libavcodec/sh4/qpel.c2
-rw-r--r--libavcodec/snow.c2
-rw-r--r--libavformat/nutenc.c2
-rw-r--r--libavutil/pca.c3
11 files changed, 10 insertions, 36 deletions
diff --git a/ffserver.c b/ffserver.c
index 829eb2ef7e..fe030b94c0 100644
--- a/ffserver.c
+++ b/ffserver.c
@@ -2185,10 +2185,8 @@ static int open_input_stream(HTTPContext *c, const char *info)
}
}
-#if 1
if (c->fmt_in->iformat->read_seek)
av_seek_frame(c->fmt_in, -1, stream_pos, 0);
-#endif
/* set the start time (needed for maxtime and RTP packet timing) */
c->start_time = cur_time;
c->first_pts = AV_NOPTS_VALUE;
diff --git a/libavcodec/dct-test.c b/libavcodec/dct-test.c
index e943d6a54f..c3c376e79f 100644
--- a/libavcodec/dct-test.c
+++ b/libavcodec/dct-test.c
@@ -312,18 +312,16 @@ static void dct_error(const char *name, int is_idct,
}
for(i=0; i<64; i++) sysErrMax= FFMAX(sysErrMax, FFABS(sysErr[i]));
-#if 1 // dump systematic errors
for(i=0; i<64; i++){
if(i%8==0) printf("\n");
printf("%7d ", (int)sysErr[i]);
}
printf("\n");
-#endif
printf("%s %s: err_inf=%d err2=%0.8f syserr=%0.8f maxout=%d blockSumErr=%d\n",
is_idct ? "IDCT" : "DCT",
name, err_inf, (double)err2 / NB_ITS / 64.0, (double)sysErrMax / NB_ITS, maxout, blockSumErrMax);
-#if 1 //Speed test
+
/* speed test */
for(i=0;i<64;i++)
block1[i] = 0;
@@ -376,7 +374,6 @@ static void dct_error(const char *name, int is_idct,
printf("%s %s: %0.1f kdct/s\n",
is_idct ? "IDCT" : "DCT",
name, (double)it1 * 1000.0 / (double)ti1);
-#endif
}
DECLARE_ALIGNED(8, static uint8_t, img_dest)[64];
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 215c1e4241..dbfc8ce162 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2100,7 +2100,6 @@ QPEL_MC(0, avg_ , _ , op_avg)
#define put_no_rnd_qpel8_mc00_c ff_put_pixels8x8_c
#define put_no_rnd_qpel16_mc00_c ff_put_pixels16x16_c
-#if 1
#define H264_LOWPASS(OPNAME, OP, OP2) \
static av_unused void OPNAME ## h264_qpel2_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\
const int h=2;\
@@ -2522,7 +2521,6 @@ H264_MC(avg_, 16)
#undef op_put
#undef op2_avg
#undef op2_put
-#endif
#define put_h264_qpel8_mc00_c ff_put_pixels8x8_c
#define avg_h264_qpel8_mc00_c ff_avg_pixels8x8_c
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index d4d5839fcf..e0b64b0336 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -786,7 +786,6 @@ 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;
@@ -807,8 +806,7 @@ 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;
@@ -829,7 +827,7 @@ void ff_er_frame_end(MpegEncContext *s){
end_ok=0;
}
}
-#endif
+
/* handle missing slices */
if(s->error_recognition>=4){
int end_ok=1;
@@ -853,7 +851,6 @@ void ff_er_frame_end(MpegEncContext *s){
}
}
-#if 1
/* backward mark errors */
distance=9999999;
for(error_type=1; error_type<=3; error_type++){
@@ -878,7 +875,6 @@ void ff_er_frame_end(MpegEncContext *s){
distance= 9999999;
}
}
-#endif
/* forward mark errors */
error=0;
@@ -893,7 +889,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++){
@@ -904,7 +900,6 @@ 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++){
@@ -1065,16 +1060,15 @@ 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++){
@@ -1094,7 +1088,6 @@ 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/h264.h b/libavcodec/h264.h
index 96720acf94..f22454b436 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -997,7 +997,6 @@ static void fill_decode_caches(H264Context *h, int mb_type){
}
}
-#if 1
if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){
int list;
for(list=0; list<h->list_count; list++){
@@ -1172,7 +1171,6 @@ static void fill_decode_caches(H264Context *h, int mb_type){
}
}
}
-#endif
h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]);
}
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index faf03d22d6..09ec9f79c4 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -158,7 +158,6 @@ 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
@@ -172,7 +171,6 @@ 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/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index 0dba8d9c35..85713b5d40 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -985,10 +985,9 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n)
if(level<=MAX_LEVEL && run<=MAX_RUN){
s->ac_stats[s->mb_intra][n>3][level][run][last]++;
}
-#if 0
-else
- s->ac_stats[s->mb_intra][n>3][40][63][0]++; //esc3 like
-#endif
+
+ s->ac_stats[s->mb_intra][n > 3][40][63][0]++; //esc3 like
+
code = get_rl_index(rl, last, run, level);
put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]);
if (code == rl->n) {
diff --git a/libavcodec/sh4/qpel.c b/libavcodec/sh4/qpel.c
index ff88b76faf..3242872e47 100644
--- a/libavcodec/sh4/qpel.c
+++ b/libavcodec/sh4/qpel.c
@@ -897,7 +897,6 @@ QPEL_MC(0, avg_ , _ , op_avg)
#undef op_put
#undef op_put_no_rnd
-#if 1
#define H264_LOWPASS(OPNAME, OP, OP2) \
static inline void OPNAME ## h264_qpel_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,int w,int h){\
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\
@@ -1298,7 +1297,6 @@ H264_MC(avg_, 16)
#undef op_put
#undef op2_avg
#undef op2_put
-#endif
static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
diff --git a/libavcodec/snow.c b/libavcodec/snow.c
index 42145f5ce3..7e862f24b0 100644
--- a/libavcodec/snow.c
+++ b/libavcodec/snow.c
@@ -3299,10 +3299,8 @@ static void iterative_me(SnowContext *s){
}
best_rd= ref_rd;
*block= ref_b;
-#if 1
check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd);
//FIXME RD style color selection
-#endif
if(!same_block(block, &backup)){
if(tb ) tb ->type &= ~BLOCK_OPT;
if(lb ) lb ->type &= ~BLOCK_OPT;
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index c17a15dbf3..df5dc6fdf7 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -175,7 +175,6 @@ 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;
@@ -199,7 +198,6 @@ static void build_frame_code(AVFormatContext *s){
ft->pts_delta=1;
start2++;
}
-#endif
if(codec->has_b_frames){
pred_count=5;
diff --git a/libavutil/pca.c b/libavutil/pca.c
index 770dc8dfd9..56bf707421 100644
--- a/libavutil/pca.c
+++ b/libavutil/pca.c
@@ -218,7 +218,6 @@ int main(void){
printf("\n");
}
-#if 1
for(i=0; i<LEN; i++){
double v[LEN];
double error=0;
@@ -233,7 +232,7 @@ int main(void){
printf("%f ", error);
}
printf("\n");
-#endif
+
for(i=0; i<LEN; i++){
for(j=0; j<LEN; j++){
printf("%9.6f ", eigenvector[i + j*LEN]);