|
|
@ -786,7 +786,6 @@ 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; |
|
|
@ -807,8 +806,7 @@ 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; |
|
|
@ -829,7 +827,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; |
|
|
@ -853,7 +851,6 @@ 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++){ |
|
|
@ -878,7 +875,6 @@ void ff_er_frame_end(MpegEncContext *s){ |
|
|
|
distance= 9999999; |
|
|
|
distance= 9999999; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* forward mark errors */ |
|
|
|
/* forward mark errors */ |
|
|
|
error=0; |
|
|
|
error=0; |
|
|
@ -893,7 +889,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++){ |
|
|
@ -904,7 +900,6 @@ 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++){ |
|
|
@ -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; |
|
|
|
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++){ |
|
|
@ -1094,7 +1088,6 @@ 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 */ |
|
|
|