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 5DA1046C5C for ; Thu, 6 Jul 2023 16:50:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 44ED468C715; Thu, 6 Jul 2023 19:50:56 +0300 (EEST) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.53]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3055768C6B5 for ; Thu, 6 Jul 2023 19:50:50 +0300 (EEST) Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-6b7279544edso835534a34.0 for ; Thu, 06 Jul 2023 09:50:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688662248; x=1691254248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=F60k/XcSTF3DE9nYGGCLj20ny/Nx4CMgl8MyFDe4KoY=; b=cuJdLsvUHZkocaN4wA3so+chs5JQsNE3nejKwrlCX3pRIG38xq7Bh//mIVqFE0xL0h Nb3kw8gPziBdu5fQLoW2qYHjSCpHlbfM+blgmijK/D7gho17Ej4W9fahuJBNMMjOmhfe Od190gTuwanmfiSnMt0PPGG7MjSq9AMsB/9sGUXIuKOUr5nOTV9pwNS9l6p0EzjIERfA qO8SNwOchSnyqoeCaBv7nlWSFmm/8gQrzbgURRD+LK7IPhOZWIe2NHZYztOx8mzJOEVt PQz8S9O5bFjw/3qxoSO8ZV9yfi5wJz3vvo1o0C1mgncr0at+Fwuo2j/MtuUCBHe3XD2z Z/qQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688662248; x=1691254248; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F60k/XcSTF3DE9nYGGCLj20ny/Nx4CMgl8MyFDe4KoY=; b=etclsMkgK2K/a0JRrjOih5bUikeoMu9McXVc0ClxRiw+o3IDljpwcS0RK9aiSEpWD3 CGf2vp1rny9Wd+mGSXBr0RNCXlx+NjBzk0er5nKdSmFgQM2E81xNiExAg+MK9dN1M1DB ky9j1cN1iFIAuXcPyH6g2lbLMIAJplTt9j0/DCsKHI8jn/GAEXAEpFqAQgqApk8Tg2p+ Jev6DK78m2ZgYaPaMs92OSaFuNzbQQSXBy/rBLQb2BciiNdp7ucnNsPiW5vFmyWE22x/ esaHOXuF3/dxrivMIxYux2M365mpRo6aFFVc8eiaUfl59aJiCt7CvMLvDSAVrgGVrp/d gusg== X-Gm-Message-State: ABy/qLavriH/R8UaJOqJnVOA+5Uk1ywjY7gLih1j1kePhP429AsO2Lbu CfSNEgBO5llLD+U1TSpaK0dwK5S5vOI= X-Google-Smtp-Source: APBJJlG12/z1MMoxQpSXKAgflQZ70jitFiEt/sjDUrGYVyBCzWE5u8X2W9kyP+ivpPkZ9vQR32DRYg== X-Received: by 2002:a05:6830:22f6:b0:6b7:4e25:4c08 with SMTP id t22-20020a05683022f600b006b74e254c08mr2575451otc.12.1688662247972; Thu, 06 Jul 2023 09:50:47 -0700 (PDT) Received: from localhost.localdomain (host197.190-225-105.telecom.net.ar. [190.225.105.197]) by smtp.gmail.com with ESMTPSA id l17-20020a056830155100b006b725dea64asm830153otp.63.2023.07.06.09.50.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jul 2023 09:50:47 -0700 (PDT) From: James Almer To: ffmpeg-devel@ffmpeg.org Date: Thu, 6 Jul 2023 13:50:36 -0300 Message-ID: <20230706165036.1635-1-jamrial@gmail.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706150608.1265-1-jamrial@gmail.com> References: <20230706150608.1265-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v2 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/cbs_h266_syntax_template.c b/libavcodec/cbs_h266_syntax_template.c index b984a12d8f..29eb9b70ed 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 { -- 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".