This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch release/7.1
in repository ffmpeg.

commit 72a46d7802717887ce7eccd569246ce7a03e41a3
Author:     牟凡 <[email protected]>
AuthorDate: Wed Apr 29 15:17:32 2026 +0800
Commit:     Frank Plowman <[email protected]>
CommitDate: Wed Jun 10 15:12:23 2026 +0100

    avcodec/cbs_h266: fix wrong condition for chroma MTT depth in PH
    
    In the picture header parser, the chroma branch incorrectly tested
    sps_max_mtt_hierarchy_depth_intra_slice_chroma to decide whether to
    parse ph_log2_diff_max_{bt,tt}_min_qt_intra_slice_chroma.
    
    Per ITU-T H.266 (V4, 01/2026) section 7.3.2.8 "Picture header
    structure syntax", the condition is on the just-parsed
    ph_max_mtt_hierarchy_depth_intra_slice_chroma, exactly mirroring the
    luma branch a few lines above and the inter-slice branch below.
    sps_partition_constraints_override_enabled_flag allows the picture
    header to override the SPS values, so testing the SPS field is
    incorrect and desynchronises the parser whenever the PH override
    changes the chroma MTT depth from/to zero.
    
    Signed-off-by: Mou Fan <[email protected]>
    
    (cherry-picked from commit 28ecb07e55eabb481082c869b4bef3e36e1e0621)
---
 libavcodec/cbs_h266_syntax_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/cbs_h266_syntax_template.c 
b/libavcodec/cbs_h266_syntax_template.c
index 505c28a833..fa2a6a6e3c 100644
--- a/libavcodec/cbs_h266_syntax_template.c
+++ b/libavcodec/cbs_h266_syntax_template.c
@@ -2808,7 +2808,7 @@ static int FUNC(picture_header) (CodedBitstreamContext 
*ctx, RWContext *rw,
                    0, FFMIN(6, ctb_log2_size_y) - min_cb_log2_size_y);
                 ue(ph_max_mtt_hierarchy_depth_intra_slice_chroma,
                    0, 2 * (ctb_log2_size_y - min_cb_log2_size_y));
-                if (sps->sps_max_mtt_hierarchy_depth_intra_slice_chroma != 0) {
+                if (current->ph_max_mtt_hierarchy_depth_intra_slice_chroma != 
0) {
                     unsigned int min_qt_log2_size_intra_c =
                         sps->sps_log2_diff_min_qt_min_cb_intra_slice_chroma +
                         min_cb_log2_size_y;

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to