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 ESMTPS id D12174BA54 for ; Thu, 1 May 2025 14:45:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3032368B8C9; Thu, 1 May 2025 17:44:04 +0300 (EEST) Received: from mail-pf1-f170.google.com (mail-pf1-f170.google.com [209.85.210.170]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 31D2B68B7CC for ; Thu, 1 May 2025 17:43:58 +0300 (EEST) Received: by mail-pf1-f170.google.com with SMTP id d2e1a72fcca58-7396f13b750so1344359b3a.1 for ; Thu, 01 May 2025 07:43:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1746110636; x=1746715436; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ReiUjDF6SIb/71YAZMD46CyWCLjvw1M0BscWSSfXaKU=; b=YTPNzcIZfpBV6Ovn0Iqmq2cFFir30PCkQJ+pJP45nvpJCw2qHQJHpe+zgXAhVwUyXv hb3zUrJDD5tYhllJzNcDt6K1fAzQkApU4dhMEAyHDK36I1DVeNu4bLFSrpQALrXEvQDS K3eIkgv9PdzF2vDEtg6SCZ1HsOJpxTFwZjxaLqZBD2dTtz/nKN6CLVAWqMjL1hLQwuI0 45xpQQRYTXKEfEnA1AqNKxwaiI8Hq6G/Kk5Qusd4Gb8UdyQflJ8xolZjyhrl4dWcCXVg 17msL7tx8+NPb24RmvbJGqpIXnC1SHFGsVUfrJMtTInIv/n9HF7Efxbp/X7wNmH9kBn8 9zxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746110636; x=1746715436; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ReiUjDF6SIb/71YAZMD46CyWCLjvw1M0BscWSSfXaKU=; b=uFyHOfJ6wKsR2gJ96+TPeBHFLMM5fS4TqsBbYuVzFc8bqbi2wwvJd7kWhR7izT6t49 zx6BsAbQrAQYdKTDOwalEFfvW61O/1xFP5Fkj6mTEeQPaFOUT5m1MpKbSsNN58mSW+Rm 4ywtUzipvVi/hDdvLFMRda4GEM1fpQANKZu+pkQzQYH2lUCwvUm6jJs9UK0uw9/l+cfh u4AsZ5X//3ofXnJDaxvNVm/vHt0Y2iEdhAtse2WueR34g4NAaqAG+cuT2wcY1OfInNT/ j7DIALAMmfmGFibP3I1YkdeW+o9BdUZQaVupnK+N2LIxlYJZrv7KoG6QwEF2nlbZYsG8 h9mw== X-Gm-Message-State: AOJu0YyicN0lR/OqBhW3/gUKHqnCocaW78qmkzqxPqR/YhgNzL34qtP8 uxyEKqGsEo/N4zZ9ghlHPoAQCpBwvEWAO8EgcKb6J4oOtOGczfzWPvV++g== X-Gm-Gg: ASbGncvfmEGAYDAd4mUGcGpNB7gkWODgV3yuJPHLdH33eJ0n9Rrvz5nO0RtTWT9fcqL jBGGy7Hb91AqS0LMBW//bRySxhdMoB6K1DQv0ylCOoKOcOXBMROhkkcUePLsOGpOmIp5sP2U4/l BwzjnPBxwnvdEsJCEvL6WSTHwnocMT996JLS9G95eM7MEzc41RpJFzUxNPm0NBgZQH8RxoBZ6ap NxL1HSF9cnysUK+2X22OiDSd99hO63vHyg7HmXUZqB6mSxk207cpzpm7HvNES9KH3irrPvmY+0n M9T94cuIE0VEoVnXT4t9dIYUsR/eRfl6GxS4BvDtWRjFW5WJ+HPmZc2iH9ggjg== X-Google-Smtp-Source: AGHT+IET1IC9DIAACFHn7zouPgb4VNXjVd/LpxmBfJw40O0ku35YpuFaHR/QumlQwQyQM7PVl0gZlg== X-Received: by 2002:a05:6a21:101b:b0:1f5:8e39:9470 with SMTP id adf61e73a8af0-20ba869336cmr5574945637.31.1746110636301; Thu, 01 May 2025 07:43:56 -0700 (PDT) Received: from localhost.localdomain ([124.79.129.75]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b1f9d4b68e8sm807271a12.27.2025.05.01.07.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 May 2025 07:43:55 -0700 (PDT) From: toqsxw@gmail.com X-Google-Original-From: toqsxw@outlook.com To: ffmpeg-devel@ffmpeg.org Date: Thu, 1 May 2025 22:43:09 +0800 Message-ID: <20250501144324.958-11-toqsxw@outlook.com> X-Mailer: git-send-email 2.44.0.windows.1 In-Reply-To: <20250501144324.958-1-toqsxw@outlook.com> References: <20250501144324.958-1-toqsxw@outlook.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH v1 11/23] avcodec/vvc/filter: skip deblocking filter for palette 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 Cc: Wu Jianhua 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: From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/vvc/filter.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/libavcodec/vvc/filter.c b/libavcodec/vvc/filter.c index a7f102bc64..e3886d008e 100644 --- a/libavcodec/vvc/filter.c +++ b/libavcodec/vvc/filter.c @@ -772,17 +772,15 @@ static int get_qp(const VVCFrameContext *fc, const uint8_t *src, const int x, co static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs, const int vertical) { - VVCFrameContext *fc = lc->fc; - const VVCSPS *sps = fc->ps.sps; - const int c_end = sps->r->sps_chroma_format_idc ? VVC_MAX_SAMPLE_ARRAYS : 1; - const int ctb_size = fc->ps.sps->ctb_size_y; - const DBParams *params = fc->tab.deblock + rs; - int x_end = FFMIN(x0 + ctb_size, fc->ps.pps->width); - int y_end = FFMIN(y0 + ctb_size, fc->ps.pps->height); - - //not use this yet, may needed by plt. - const uint8_t no_p[4] = { 0 }; - const uint8_t no_q[4] = { 0 } ; + VVCFrameContext *fc = lc->fc; + const VVCSPS *sps = fc->ps.sps; + const int c_end = sps->r->sps_chroma_format_idc ? VVC_MAX_SAMPLE_ARRAYS : 1; + const int ctb_size = fc->ps.sps->ctb_size_y; + const DBParams *params = fc->tab.deblock + rs; + int x_end = FFMIN(x0 + ctb_size, fc->ps.pps->width); + int y_end = FFMIN(y0 + ctb_size, fc->ps.pps->height); + const int log2_min_cb_size = fc->ps.sps->min_cb_log2_size_y; + const int min_cb_width = fc->ps.pps->min_cb_width; if (!vertical) { FFSWAP(int, x_end, y_end); @@ -802,6 +800,8 @@ static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs, const uint8_t horizontal_ctu_edge = !vertical && !(x % ctb_size); int32_t bs[4], beta[4], tc[4] = { 0 }, all_zero_bs = 1; uint8_t max_len_p[4], max_len_q[4]; + uint8_t no_p[4] = { 0 }; + uint8_t no_q[4] = { 0 }; for (int i = 0; i < DEBLOCK_STEP >> (2 - vs); i++) { int tx = x; @@ -818,6 +818,13 @@ static void vvc_deblock(const VVCLocalContext *lc, int x0, int y0, const int rs, tc[i] = TC_CALC(qp, bs[i]) ; max_filter_length(fc, tx, ty, c_idx, vertical, horizontal_ctu_edge, bs[i], &max_len_p[i], &max_len_q[i]); all_zero_bs = 0; + + if (sps->r->sps_palette_enabled_flag) { + const int cu_q = (ty >> log2_min_cb_size) * min_cb_width + (tx >> log2_min_cb_size); + const int cu_p = (ty - !vertical >> log2_min_cb_size) * min_cb_width + (tx - vertical >> log2_min_cb_size); + no_q[i] = fc->tab.cpm[!!c_idx][cu_q] == MODE_PLT; + no_p[i] = cu_p >= 0 && fc->tab.cpm[!!c_idx][cu_p] == MODE_PLT; + } } } -- 2.44.0.windows.1 _______________________________________________ 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".