This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch release/6.1 in repository ffmpeg.
commit a4f6f7588ed5f68ded49136b321a5ceb72671a63 Author: Kacper Michajłow <[email protected]> AuthorDate: Sat Aug 15 00:36:22 2026 +0200 Commit: ffmpeg-devel <[email protected]> CommitDate: Wed Aug 26 00:42:47 2026 +0000 avcodec/h264_direct: do not read the other field's rows of colocated mb_type To determine whether the colocated picture is field coded, the temporal and spatial direct setup peek at sl->ref_list[1][0].parent->mb_type[mb_xy] before mb_xy has been remapped to the colocated field's parity. That row belongs to the current field's parity, while await_reference_mb_row() above waited on the parity of the referenced field, so whenever the two differ the load is unsynchronised and with frame threading can observe macroblocks of a field that is still being decoded. Every macroblock of a field picture has MB_TYPE_INTERLACED set, so checking field_picture first gives the same result in all correctly synchronized cases without touching the mb_type array. This also fixes few TSAN reported warnings. Fixes: https://trac.ffmpeg.org/ticket/10891 Signed-off-by: Kacper Michajłow <[email protected]> (cherry picked from commit c3a8a223b29260dc170d41c62f9b3b33f6b97b2d) --- libavcodec/h264_direct.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c index be388ada3a..1bc4f911ba 100644 --- a/libavcodec/h264_direct.c +++ b/libavcodec/h264_direct.c @@ -292,7 +292,8 @@ static void pred_spatial_direct_motion(const H264Context *const h, H264SliceCont return; } - if (IS_INTERLACED(sl->ref_list[1][0].parent->mb_type[mb_xy])) { // AFL/AFR/FR/FL -> AFL/FL + if (sl->ref_list[1][0].parent->field_picture || + IS_INTERLACED(sl->ref_list[1][0].parent->mb_type[mb_xy])) { // AFL/AFR/FR/FL -> AFL/FL if (!IS_INTERLACED(*mb_type)) { // AFR/FR -> AFL/FL mb_y = (sl->mb_y & ~1) + sl->col_parity; mb_xy = sl->mb_x + @@ -510,7 +511,8 @@ static void pred_temp_direct_motion(const H264Context *const h, H264SliceContext await_reference_mb_row(h, &sl->ref_list[1][0], sl->mb_y + !!IS_INTERLACED(*mb_type)); - if (IS_INTERLACED(sl->ref_list[1][0].parent->mb_type[mb_xy])) { // AFL/AFR/FR/FL -> AFL/FL + if (sl->ref_list[1][0].parent->field_picture || + IS_INTERLACED(sl->ref_list[1][0].parent->mb_type[mb_xy])) { // AFL/AFR/FR/FL -> AFL/FL if (!IS_INTERLACED(*mb_type)) { // AFR/FR -> AFL/FL mb_y = (sl->mb_y & ~1) + sl->col_parity; mb_xy = sl->mb_x + -- To stop receiving notification emails like this one, please contact [email protected]. _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
