From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 4EE3545D4F for ; Thu, 6 Jul 2023 15:06:30 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3B75668C713; Thu, 6 Jul 2023 18:06:27 +0300 (EEST) Received: from mail-oo1-f50.google.com (mail-oo1-f50.google.com [209.85.161.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6223B68C5F5 for ; Thu, 6 Jul 2023 18:06:21 +0300 (EEST) Received: by mail-oo1-f50.google.com with SMTP id 006d021491bc7-5636426c1b3so545361eaf.1 for ; Thu, 06 Jul 2023 08:06:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688655979; x=1691247979; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=68D1zEMkDAvr0cgjQwRHV2MdbH/ScHQ2jZpBboIOtmU=; b=NQ9vNjWM7enKABhdn+x6r9lLq+C0xu+plDspCmXPQOcFhv6K4Kewf87Ctufn6YUiRD HYT/JMb2QoO7YNENtVP1TUxXEyeZVT7k+KuxmRVPWA+s0A8KTDHPETsHWPX6hJEyruYI iNDOmZ8FF+iAkUG4rLWIIG3Ienc7BddNmjOg9491a/I4ooPeZWQ312331asWiazw458A GtPJhgSIxUygHFbwxsqukgYFOUHQ3Z7urP34/fMYhqnGT0rlnbfXYVagwmlw77YnLWPE jvIPC84d+05Kf4vQRul850wS9dUY5w4FAvOPneA/LFQ7Qi/DrK1EySzEHdIJNU++rXhE noXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688655979; x=1691247979; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=68D1zEMkDAvr0cgjQwRHV2MdbH/ScHQ2jZpBboIOtmU=; b=VN8seUSCaF2M+QDwZToyY8NN367VOyjM9YJQ5vzeSKVGyWiHHSwqqgY5UTvuR1k9mo Xkpaupx7pzHGG+tv5+ReCmm2mfISZiXKbSSzA+8PrMcFo8Yw7AQTDkV1gJ1YL4LhtYaY 4yWZb2/svmV7/MDE1lq5tvk1Fb0SgUr/swwGKXmrCyEHen0KLrwPIPyViv0JZGbymCwS hqhs5eCXDcR2Bb0DE7C+dkYpJuu12rYA2+6d8tXeszJjF0+ivRCyuXIf7iSmAuA8Z2As PHhqNRZJuiPqdo8HNlyrQOuRr2PBhQTy4y9HYJRW0iJIfsV2wrGK4DhMUbOF18YYcAbA sqJg== X-Gm-Message-State: ABy/qLZRxgE4arOVO3dcltSJGsjwJWm4IvihKHEhalmL7VJNRQxg6tPj ACT680N9U2Ag7UGDylQMX3QVj35wWxo= X-Google-Smtp-Source: APBJJlF7/t6m+sbfU/CNrD3CuHB6kJXxhGTS+eSi2JdUvAs3yOeLP2lDGpN8dtLnnlFikd9Q/gWvrg== X-Received: by 2002:a4a:4955:0:b0:566:65a4:8a5a with SMTP id z82-20020a4a4955000000b0056665a48a5amr1494738ooa.4.1688655979295; Thu, 06 Jul 2023 08:06:19 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id w4-20020a056830110400b006b87f593877sm755139otq.37.2023.07.06.08.06.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 08:06:18 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Jul 2023 12:06:07 -0300 Message-ID: <20230706150608.1265-1-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/cbs_h266: fix use of uninitialized value X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: And fix the allowed range for ph_log2_diff_max_bt_min_qt_intra_slice_luma while at it. Signed-off-by: James Almer --- libavcodec/cbs_h266_syntax_template.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c index b984a12d8f..f6aae3ac51 100644 --- a/libavcodec/cbs_h266_syntax_template.c +++ b/libavcodec/cbs_h266_syntax_template.c @@ -2730,9 +2730,14 @@ 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_luma, 0, 2 * (ctb_log2_size_y - min_cb_log2_size_y)); + min_qt_log2_size_intra_y = + current->ph_log2_diff_min_qt_min_cb_intra_slice_luma + + min_cb_log2_size_y; if (current->ph_max_mtt_hierarchy_depth_intra_slice_luma != 0) { ue(ph_log2_diff_max_bt_min_qt_intra_slice_luma, - 0, ctb_log2_size_y - min_qt_log2_size_intra_y); + 0, (sps->sps_qtbtt_dual_tree_intra_flag ? + FFMIN(6, ctb_log2_size_y) : + ctb_log2_size_y) - min_qt_log2_size_intra_y); ue(ph_log2_diff_max_tt_min_qt_intra_slice_luma, 0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_y); } else { @@ -2780,9 +2785,6 @@ static int FUNC(picture_header) (CodedBitstreamContext *ctx, RWContext *rw, sps->sps_log2_diff_max_tt_min_qt_intra_slice_chroma); } - min_qt_log2_size_intra_y = - current->ph_log2_diff_min_qt_min_cb_intra_slice_luma + - min_cb_log2_size_y; if (pps->pps_cu_qp_delta_enabled_flag) ue(ph_cu_qp_delta_subdiv_intra_slice, 0, 2 * (ctb_log2_size_y - min_qt_log2_size_intra_y + -- 2.41.0 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".