From patchwork Sun May 19 02:49:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 48998 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6a21:3a48:b0:1af:fc2d:ff5a with SMTP id zu8csp3719436pzb; Sat, 18 May 2024 19:49:40 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVwE8FXLJojQHBC4tF3Ly3IDXdafixyuRBz41MMmwN5Khhl1GCLau+4HCm060DqVqmagEU7RhLvfzapLh5e3mTipzr630XZ8o2/Lg== X-Google-Smtp-Source: AGHT+IEaGMQGIAWqweTy6cKxwtsgsyHY6JUGnnrutMj9UMGFoRAnpB/fOqKCmZNMQmXha9iuynSC X-Received: by 2002:a17:907:7f08:b0:a5a:743b:20d2 with SMTP id a640c23a62f3a-a5a743b2175mr1458096766b.38.1716086980325; Sat, 18 May 2024 19:49:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1716086980; cv=none; d=google.com; s=arc-20160816; b=UzvcpvyyhGsnofkeC9tlW3Nvqyxxa4klRKK0CM2eKJNV4SiUo+4ROebn9CXVi8ZukB YqP5b5OBaBuK0lZdJLiZtjPYUD/W1hlCGLsHWjQRg8HaOHyH6B1AI71fQq+j85rKzaSX pOTIkyfS/9H2KD4b5t19S9JmkMZNN1yN80s0sYNUVUEISi36ufpfe6n99ehm07JGwX3W XNEPxxm6rBpYt0y8Tf46o3fpUaBBsUQjwlSVZoKO3nogjJAxHamWHVLiPsKNK/4FvNNu 02Ond2oqeeMDHhjFQI1JK0WzUHg6n94jKI4xzQJYPtSOCm+sWCT21pJHcNHP8XLmjcLa /oZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=2E6DYS8/sZLUaeAlf7HzH5Y4ryrvqnGsPHq192+vaM4=; fh=e5zN9xSzcxLA6bGo3lF+CqTbY/oLwzApV03EO/RBfgQ=; b=kz8c5SIWGHcgIgW50dGG0NVcuIjzcDdzG3ml5UaeM6w4s4hrAQflnrP9CBy5IaivPq 3p/Ld+/Yew4Thmu0foYYbrF14S8V1DCErI4Cspj6e5IhQEEzIbdavmd+VrW8A790vXv/ Tn8/QwtnFkHoEBGbIzZWwIB3f2Oe5g6FZC1eOfCmUAatdsf2/iqbiBlebrASAiKIfGRn 5EC+RsEwI7LFKQpEXX9ZI3c952ItBWJicUtFFtvASPF3dA5Jvnq7qckJn4jCa+u0a3gv im7UkU5fsL/L0eWPnulgVHMm7YAqNzOn3Dn8N/FqlOyBmbl+E+ibtmAXwx1FWU/reJ9K +Jbw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=EvkClkB5; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id a640c23a62f3a-a5a17bb1aedsi1181325566b.552.2024.05.18.19.49.39; Sat, 18 May 2024 19:49:40 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@niedermayer.cc header.s=gm1 header.b=EvkClkB5; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E5AFE68D212; Sun, 19 May 2024 05:49:25 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2D2BE68D16C for ; Sun, 19 May 2024 05:49:19 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 2FC041BF205 for ; Sun, 19 May 2024 02:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716086958; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dew8ZjhtHCoc8+FzxjJBYtL9mUq63eoACGEc++1XYZs=; b=EvkClkB540jOvBNmbLQpSVi8omrwIg5XJJUxj9Mmt6JW0qEZyfrMNRW/UOms9dVEEFqfzy XsTjE6nzRVinjIDROnAu4F3jBmUFeZUE2gnm0Fs5l5wQTKvMORDIV4yzR2IL7nD2sLF+JZ ckjxWe3BvimJo90MzuqTpADb+wtV/VJjTwOLB14Shn5FatxkR/utB+qaxQgnA9Q9kaiLTL 43IKUeqW+T8zzGVBCbMTFSmBmu/LpEjH4xSyS+bCoaHjqRcSXsPGnBEWL0xh3ssTYg9pf4 kuHkZRqkO4rHciuk+B+54FZTolGqXsWkEmFU4qCbn30MBQAO9HPHG32kor2Uig== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sun, 19 May 2024 04:49:08 +0200 Message-ID: <20240519024915.1944150-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.1 In-Reply-To: <20240519024915.1944150-1-michael@niedermayer.cc> References: <20240519024915.1944150-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/9] avcodec/vvc/ctu: Simplify code at the end of pred_mode_decode() 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: DwtylmkK2UO/ This simplification assumes that the code is correct Fixes: CID1560036 Logically dead code Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/vvc/ctu.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c index 53f92ca10f7..7495ced0d5a 100644 --- a/libavcodec/vvc/ctu.c +++ b/libavcodec/vvc/ctu.c @@ -1080,12 +1080,10 @@ static PredMode pred_mode_decode(VVCLocalContext *lc, } if (pred_mode_ibc_flag) pred_mode = MODE_IBC; + return pred_mode; } else { - pred_mode_flag = is_4x4 || mode_type == MODE_TYPE_INTRA || - mode_type != MODE_TYPE_INTER || IS_I(rsh); - pred_mode = pred_mode_flag ? MODE_INTRA : MODE_INTER; + return MODE_INTRA; } - return pred_mode; } static void sbt_info(VVCLocalContext *lc, const VVCSPS *sps)