From: Nuo Mi <nuomi2021@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH 2/9] avcodec/vvc/ctu: Simplify code at the end of pred_mode_decode()
Date: Sat, 13 Jul 2024 10:06:29 +0800
Message-ID: <CAFXK13cpLhL_gt437Rca+VnqGX8bm-K2JMkgQHvbRbrCoGNv7A@mail.gmail.com> (raw)
In-Reply-To: <20240519024915.1944150-2-michael@niedermayer.cc>
On Sun, May 19, 2024 at 10:49 AM Michael Niedermayer <michael@niedermayer.cc>
wrote:
> This simplification assumes that the code is correct
>
> Fixes: CID1560036 Logically dead code
>
> Sponsored-by: Sovereign Tech Fund
> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
> ---
> 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;
> }
>
LGTM.
We can also remove the else branch since the if branch returns.
>
> static void sbt_info(VVCLocalContext *lc, const VVCSPS *sps)
> --
> 2.45.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".
>
_______________________________________________
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".
next prev parent reply other threads:[~2024-07-13 2:06 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-19 2:49 [FFmpeg-devel] [PATCH 1/9] avcodec/vqcdec: Check init_get_bits8() for failure Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 2/9] avcodec/vvc/ctu: Simplify code at the end of pred_mode_decode() Michael Niedermayer
2024-07-12 21:24 ` Michael Niedermayer
2024-07-13 2:06 ` Nuo Mi [this message]
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 3/9] avcodec/vvc/ctu: Simplify pred_mode_plt_flag Michael Niedermayer
2024-05-19 14:40 ` Nuo Mi
2024-05-19 19:27 ` Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 4/9] avcodec/vvc/ctu: Remove dead ret check Michael Niedermayer
2024-07-02 18:35 ` Michael Niedermayer
2024-07-03 12:44 ` Nuo Mi
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 5/9] avcodec/vvc/dec: Remove constant eos_at_start Michael Niedermayer
2024-07-02 18:34 ` Michael Niedermayer
2024-07-03 12:44 ` Nuo Mi
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 6/9] avcodec/vvc/dec: Check init_get_bits8() for failure Michael Niedermayer
2024-05-19 14:31 ` Nuo Mi
2024-05-19 19:39 ` Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 7/9] avcodec/vvc/mvs: Initialize mvf Michael Niedermayer
2024-05-19 14:28 ` Nuo Mi
2024-05-19 19:40 ` Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 8/9] avcodec/wavpack: Remove dead assignments Michael Niedermayer
2024-05-19 2:49 ` [FFmpeg-devel] [PATCH 9/9] avcodec/wavpackenc: Use unsigned for potential 31bit shift Michael Niedermayer
2024-06-02 19:08 ` Michael Niedermayer
2024-05-19 3:18 ` [FFmpeg-devel] [PATCH 1/9] avcodec/vqcdec: Check init_get_bits8() for failure Peter Ross
2024-05-19 19:37 ` Michael Niedermayer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAFXK13cpLhL_gt437Rca+VnqGX8bm-K2JMkgQHvbRbrCoGNv7A@mail.gmail.com \
--to=nuomi2021@gmail.com \
--cc=ffmpeg-devel@ffmpeg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git