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>
This commit is contained in:
parent
d7e5aebae7
commit
7b9e98173c
@ -786,6 +786,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 1
|
||||||
/* handle overlapping slices */
|
/* handle overlapping slices */
|
||||||
for(error_type=1; error_type<=3; error_type++){
|
for(error_type=1; error_type<=3; error_type++){
|
||||||
int end_ok=0;
|
int end_ok=0;
|
||||||
@ -806,7 +807,8 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
end_ok=0;
|
end_ok=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#if 1
|
||||||
/* handle slices with partitions of different length */
|
/* handle slices with partitions of different length */
|
||||||
if(s->partitioned_frame){
|
if(s->partitioned_frame){
|
||||||
int end_ok=0;
|
int end_ok=0;
|
||||||
@ -827,7 +829,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
end_ok=0;
|
end_ok=0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
/* handle missing slices */
|
/* handle missing slices */
|
||||||
if(s->error_recognition>=4){
|
if(s->error_recognition>=4){
|
||||||
int end_ok=1;
|
int end_ok=1;
|
||||||
@ -851,6 +853,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 1
|
||||||
/* backward mark errors */
|
/* backward mark errors */
|
||||||
distance=9999999;
|
distance=9999999;
|
||||||
for(error_type=1; error_type<=3; error_type++){
|
for(error_type=1; error_type<=3; error_type++){
|
||||||
@ -875,6 +878,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
distance= 9999999;
|
distance= 9999999;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* forward mark errors */
|
/* forward mark errors */
|
||||||
error=0;
|
error=0;
|
||||||
@ -889,7 +893,7 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
s->error_status_table[mb_xy]|= error;
|
s->error_status_table[mb_xy]|= error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if 1
|
||||||
/* handle not partitioned case */
|
/* handle not partitioned case */
|
||||||
if(!s->partitioned_frame){
|
if(!s->partitioned_frame){
|
||||||
for(i=0; i<s->mb_num; i++){
|
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;
|
s->error_status_table[mb_xy]= error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
dc_error= ac_error= mv_error=0;
|
dc_error= ac_error= mv_error=0;
|
||||||
for(i=0; i<s->mb_num; i++){
|
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;
|
s->dc_val[2][mb_x + mb_y*s->mb_stride]= (dcv+4)>>3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if 1
|
||||||
/* guess DC for damaged blocks */
|
/* 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[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[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);
|
guess_dc(s, s->dc_val[2], s->mb_width , s->mb_height , s->mb_stride, 0);
|
||||||
|
#endif
|
||||||
/* filter luma DC */
|
/* filter luma DC */
|
||||||
filter181(s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride);
|
filter181(s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride);
|
||||||
|
|
||||||
|
#if 1
|
||||||
/* render DC only intra */
|
/* render DC only intra */
|
||||||
for(mb_y=0; mb_y<s->mb_height; mb_y++){
|
for(mb_y=0; mb_y<s->mb_height; mb_y++){
|
||||||
for(mb_x=0; mb_x<s->mb_width; mb_x++){
|
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);
|
put_dc(s, dest_y, dest_cb, dest_cr, mb_x, mb_y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(s->avctx->error_concealment&FF_EC_DEBLOCK){
|
if(s->avctx->error_concealment&FF_EC_DEBLOCK){
|
||||||
/* filter horizontal block boundaries */
|
/* filter horizontal block boundaries */
|
||||||
|
@ -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)]
|
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;
|
+ (mv_penalty[bx - pred_x] + mv_penalty[by+2 - pred_y])*c->penalty_factor;
|
||||||
|
|
||||||
|
#if 1
|
||||||
int key;
|
int key;
|
||||||
int map_generation= c->map_generation;
|
int map_generation= c->map_generation;
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
@ -171,6 +172,7 @@ static int hpel_motion_search(MpegEncContext * s,
|
|||||||
assert(map[(index+1)&(ME_MAP_SIZE-1)] == key);
|
assert(map[(index+1)&(ME_MAP_SIZE-1)] == key);
|
||||||
key= ((my)<<ME_MAP_MV_BITS) + (mx-1) + map_generation;
|
key= ((my)<<ME_MAP_MV_BITS) + (mx-1) + map_generation;
|
||||||
assert(map[(index-1)&(ME_MAP_SIZE-1)] == key);
|
assert(map[(index-1)&(ME_MAP_SIZE-1)] == key);
|
||||||
|
#endif
|
||||||
if(t<=b){
|
if(t<=b){
|
||||||
CHECK_HALF_MV(0, 1, mx ,my-1)
|
CHECK_HALF_MV(0, 1, mx ,my-1)
|
||||||
if(l<=r){
|
if(l<=r){
|
||||||
|
@ -175,6 +175,7 @@ static void build_frame_code(AVFormatContext *s){
|
|||||||
}
|
}
|
||||||
|
|
||||||
key_frame= intra_only;
|
key_frame= intra_only;
|
||||||
|
#if 1
|
||||||
if(is_audio){
|
if(is_audio){
|
||||||
int frame_bytes= codec->frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate);
|
int frame_bytes= codec->frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate);
|
||||||
int pts;
|
int pts;
|
||||||
@ -198,6 +199,7 @@ static void build_frame_code(AVFormatContext *s){
|
|||||||
ft->pts_delta=1;
|
ft->pts_delta=1;
|
||||||
start2++;
|
start2++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if(codec->has_b_frames){
|
if(codec->has_b_frames){
|
||||||
pred_count=5;
|
pred_count=5;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user