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 947CB4ACEE for ; Sun, 19 May 2024 19:27:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BAA8D68D01E; Sun, 19 May 2024 22:27:21 +0300 (EEST) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 33A5068BA2D for ; Sun, 19 May 2024 22:27:15 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 40E76E0004 for ; Sun, 19 May 2024 19:27:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1716146834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=G/kkvYct3LKFCl3lZCFzDP+wX6p3FgD+TO4Tx7j2FUI=; b=PIucHkHDeok3fvjABtMw6VdMuKQNxMceDGYUhrBuOciOCVOpyx568BTM2i7Fd93kftXquq EjEzxR5tkb4XVBijfsbE9/QTuSsznxiV/LHbHj5+US1vCjQ2aUdIR+HBRMecg0X8BOEkzJ 2RX2D7eGRvEVTDAKwUjI7Tvcu0ausJ9KK+d0XT3FVYXZd6Gu9XXouh2Nti1TdXECxITM/T oXNRuiTijAlDJxtQQGKvI5tFAl3wmMpYFQ1x4n/+AanI8735x3gaqOHvVewLVxQmKk1PbG /cK/ffNLlQDX3vj857kBIJehQbDdXatCjCgExoYu+4d3ycGSDAAtw1IWinf+8g== Date: Sun, 19 May 2024 21:27:13 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240519192713.GG2821752@pb2> References: <20240519024915.1944150-1-michael@niedermayer.cc> <20240519024915.1944150-3-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 3/9] avcodec/vvc/ctu: Simplify pred_mode_plt_flag 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: multipart/mixed; boundary="===============0493708431875493463==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0493708431875493463== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="j2AXaZ4YhVcLc+PQ" Content-Disposition: inline --j2AXaZ4YhVcLc+PQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 19, 2024 at 10:40:57PM +0800, Nuo Mi wrote: > On Sun, May 19, 2024 at 10:49=E2=80=AFAM Michael Niedermayer > wrote: >=20 > > Fixes: CID1560039 Logically dead code > > > > Sponsored-by: Sovereign Tech Fund > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/vvc/ctu.c | 23 ++++++----------------- > > 1 file changed, 6 insertions(+), 17 deletions(-) > > > > diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c > > index 7495ced0d5a..b7089b9a004 100644 > > --- a/libavcodec/vvc/ctu.c > > +++ b/libavcodec/vvc/ctu.c > > @@ -1793,7 +1793,6 @@ static int hls_coding_unit(VVCLocalContext *lc, i= nt > > x0, int y0, int cb_width, in > > const int hs =3D sps->hshift[CHROMA]; > > const int vs =3D sps->vshift[CHROMA]; > > const int is_128 =3D cb_width > 64 || cb_height > 6= 4; > > - int pred_mode_plt_flag =3D 0; > > int ret; > > > > CodingUnit *cu =3D add_cu(lc, x0, y0, cb_width, cb_height, cqt_dep= th, > > tree_type); > > @@ -1811,7 +1810,7 @@ static int hls_coding_unit(VVCLocalContext *lc, i= nt > > x0, int y0, int cb_width, in > > mode_type !=3D MODE_TYPE_INTER && ((cb_width * cb_height) > > > (tree_type !=3D DUAL_TREE_CHROMA ? 16 : (16 << hs << vs))) && > > (mode_type !=3D MODE_TYPE_INTRA || tree_type !=3D DUAL_TREE_CH= ROMA)) { > > - pred_mode_plt_flag =3D ff_vvc_pred_mode_plt_flag(lc); > > + int pred_mode_plt_flag =3D ff_vvc_pred_mode_plt_flag(lc); > > if (pred_mode_plt_flag) { > > avpriv_report_missing_feature(fc->log_ctx, "Palette"); > > return AVERROR_PATCHWELCOME; > > @@ -1823,31 +1822,21 @@ static int hls_coding_unit(VVCLocalContext *lc, > > int x0, int y0, int cb_width, in > > } > > if (cu->pred_mode =3D=3D MODE_INTRA || cu->pred_mode =3D=3D MODE_P= LT) { > > if (tree_type =3D=3D SINGLE_TREE || tree_type =3D=3D DUAL_TREE= _LUMA) { > > - if (pred_mode_plt_flag) { > > - avpriv_report_missing_feature(fc->log_ctx, "Palette"); > > - return AVERROR_PATCHWELCOME; > > - } else { > > - intra_luma_pred_modes(lc); > > - } > > + intra_luma_pred_modes(lc); > > ff_vvc_set_intra_mvf(lc, 0); > > } > > if ((tree_type =3D=3D SINGLE_TREE || tree_type =3D=3D DUAL_TRE= E_CHROMA) > > && sps->r->sps_chroma_format_idc) { > > - if (pred_mode_plt_flag && tree_type =3D=3D DUAL_TREE_CHROM= A) { > > - avpriv_report_missing_feature(fc->log_ctx, "Palette"); > > - return AVERROR_PATCHWELCOME; > > - } else if (!pred_mode_plt_flag) { > > - if (!cu->act_enabled_flag) > > - intra_chroma_pred_modes(lc); > > - } > > + if (!cu->act_enabled_flag) > > + intra_chroma_pred_modes(lc); > > } > > } else if (tree_type !=3D DUAL_TREE_CHROMA) { /* MODE_INTER or MOD= E_IBC > > */ > > if ((ret =3D inter_data(lc)) < 0) > > return ret; > > } > > - if (cu->pred_mode !=3D MODE_INTRA && !pred_mode_plt_flag && > > !lc->cu->pu.general_merge_flag) > > + if (cu->pred_mode !=3D MODE_INTRA && !lc->cu->pu.general_merge_fla= g) > > cu->coded_flag =3D ff_vvc_cu_coded_flag(lc); > > else > > - cu->coded_flag =3D !(cu->skip_flag || pred_mode_plt_flag); > > + cu->coded_flag =3D !(cu->skip_flag); > > > > if (cu->coded_flag) { > > sbt_info(lc, sps); > > -- > > 2.45.1 > > > Hi Michael, > Could we skip this one? > Thanks to Jianhua's help. We may have Palette support in the next month. of course, patch droped, issues marked as intentional in coverity thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting. --j2AXaZ4YhVcLc+PQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZkpSjgAKCRBhHseHBAsP qzy0AJ9kAXzGXxt1mECwluqPKjt9TKk7IwCfVOnrdqia6O1wSPI5fNjiXc9dPkE= =m5qq -----END PGP SIGNATURE----- --j2AXaZ4YhVcLc+PQ-- --===============0493708431875493463== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============0493708431875493463==--