[x264-devel] commit: continue instead of crash when the threading mv constraint is violated. ( Jason Garrett-Glaser )
git version control
git at videolan.org
Wed Mar 19 03:37:45 CET 2008
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Tue Mar 18 19:17:22 2008 -0600| [09499759acc0adc246a63a72099fc85ca1746235]
continue instead of crash when the threading mv constraint is violated.
doesn't fix the underlying bug, but hopefully less annoying until we find it.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=09499759acc0adc246a63a72099fc85ca1746235
---
encoder/analyse.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/encoder/analyse.c b/encoder/analyse.c
index cdfd08e..741ab1e 100644
--- a/encoder/analyse.c
+++ b/encoder/analyse.c
@@ -2713,6 +2713,7 @@ static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a )
completed = (l ? h->fref1 : h->fref0)[ ref >> h->mb.b_interlaced ]->i_lines_completed;
if( (h->mb.cache.mv[l][x264_scan8[15]][1] >> (2 - h->mb.b_interlaced)) + h->mb.i_mb_y*16 > completed )
{
+ x264_log( h, X264_LOG_WARNING, "internal error (MV out of thread range)\n");
fprintf(stderr, "mb type: %d \n", h->mb.i_type);
fprintf(stderr, "mv: l%dr%d (%d,%d) \n", l, ref,
h->mb.cache.mv[l][x264_scan8[15]][0],
@@ -2720,7 +2721,11 @@ static void x264_analyse_update_cache( x264_t *h, x264_mb_analysis_t *a )
fprintf(stderr, "limit: %d \n", h->mb.mv_max_spel[1]);
fprintf(stderr, "mb_xy: %d,%d \n", h->mb.i_mb_x, h->mb.i_mb_y);
fprintf(stderr, "completed: %d \n", completed );
- assert(0);
+ x264_log( h, X264_LOG_WARNING, "recovering by using intra mode\n");
+ x264_mb_analyse_intra( h, a, COST_MAX );
+ h->mb.i_type = I_16x16;
+ h->mb.i_intra16x16_pred_mode = a->i_predict16x16;
+ x264_mb_analyse_intra_chroma( h, a );
}
}
}
More information about the x264-devel
mailing list