Commit 5602b24f43 for ffmpeg
commit 5602b24f43db05b358306fcb56b2b8b54ab8aa4a
Author: Phillip Blucas <pblucas@gmail.com>
Date: Thu Nov 5 20:10:16 2026 -0600
avcodec/hevc: decode tiles serially with constrained intra prediction
With constrained_intra_pred_flag set, intra sample substitution checks
whether neighbouring PUs are intra coded, for example the up-left one,
gated only on the block not being at the picture edge. At a tile edge
that PU belongs to another tile, which under tile-parallel slice
threading is being decoded by another thread at the same time, so the
read is a data race; TSan reports it on PPS_A_qualcomm_7.
Keep such pictures on the serial path.
Signed-off-by: Phillip Blucas <pblucas@gmail.com>
diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c
index faee53c509..bdcb1b0f85 100644
--- a/libavcodec/hevc/hevcdec.c
+++ b/libavcodec/hevc/hevcdec.c
@@ -3696,6 +3696,7 @@ static int decode_slice_data(HEVCContext *s, const HEVCLayerContext *l,
s->sh.num_entry_point_offsets > 0 &&
pps->tiles_enabled_flag &&
!pps->entropy_coding_sync_enabled_flag &&
+ !pps->constrained_intra_pred_flag &&
s->sh.first_slice_in_pic_flag &&
s->sh.num_entry_point_offsets + 1 == pps->num_tile_rows * pps->num_tile_columns)
return hls_slice_data_tiles(s, nal);