mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-08-28 20:26:14 +02:00
count errors instead of printing 2^31
Originally committed as revision 3857 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
0fbc6961eb
commit
4cfbbbde42
@ -661,7 +661,7 @@ void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int en
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ff_er_frame_end(MpegEncContext *s){
|
void ff_er_frame_end(MpegEncContext *s){
|
||||||
int i, mb_x, mb_y, error, error_type;
|
int i, mb_x, mb_y, error, error_type, dc_error, mv_error, ac_error;
|
||||||
int distance;
|
int distance;
|
||||||
int threshold_part[4]= {100,100,100};
|
int threshold_part[4]= {100,100,100};
|
||||||
int threshold= 50;
|
int threshold= 50;
|
||||||
@ -672,8 +672,6 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
if(!s->error_resilience || s->error_count==0 ||
|
if(!s->error_resilience || s->error_count==0 ||
|
||||||
s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
|
s->error_count==3*s->mb_width*(s->avctx->skip_top + s->avctx->skip_bottom)) return;
|
||||||
|
|
||||||
av_log(s->avctx, AV_LOG_INFO, "concealing %d errors\n", s->error_count);
|
|
||||||
|
|
||||||
if(s->current_picture.motion_val[0] == NULL){
|
if(s->current_picture.motion_val[0] == NULL){
|
||||||
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
|
av_log(s->avctx, AV_LOG_ERROR, "Warning MVs not available\n");
|
||||||
|
|
||||||
@ -821,6 +819,17 @@ void ff_er_frame_end(MpegEncContext *s){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
dc_error= ac_error= mv_error=0;
|
||||||
|
for(i=0; i<s->mb_num; i++){
|
||||||
|
const int mb_xy= s->mb_index2xy[i];
|
||||||
|
error= s->error_status_table[mb_xy];
|
||||||
|
if(error&DC_ERROR) dc_error ++;
|
||||||
|
if(error&AC_ERROR) ac_error ++;
|
||||||
|
if(error&MV_ERROR) mv_error ++;
|
||||||
|
}
|
||||||
|
av_log(s->avctx, AV_LOG_INFO, "concealing %d DC, %d AC, %d MV errors\n", dc_error, ac_error, mv_error);
|
||||||
|
|
||||||
is_intra_likely= is_intra_more_likely(s);
|
is_intra_likely= is_intra_more_likely(s);
|
||||||
|
|
||||||
/* set unknown mb-type to most likely */
|
/* set unknown mb-type to most likely */
|
||||||
|
Loading…
Reference in New Issue
Block a user