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

This commit is contained in:
Diego Biurrun 2011-04-26 13:52:12 +02:00
parent 9d35fa520e
commit e6ff064845
11 changed files with 10 additions and 36 deletions

View File

@ -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;

View File

@ -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];

View File

@ -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

View File

@ -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 */

View File

@ -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]);
}

View File

@ -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){

View File

@ -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) {

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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]);