From: Frank Plowman <post@frankplowman.com> To: ffmpeg-devel@ffmpeg.org Cc: Frank Plowman <post@frankplowman.com>, nuomi2021@gmail.com, toqsxw@outlook.com Subject: [FFmpeg-devel] [PATCH v1] lavc/vvc: Avoid UB in DB strength derivation for PLT CUs Date: Sat, 17 May 2025 21:52:48 +0100 Message-ID: <20250517205250.4975-1-post@frankplowman.com> (raw) When called for palette-predicted CUs, boundary_strength could cause undefined behaviour due to accessing uninitialised motion information. The spec doesn't include this, but in the reference software it seems the deblock strength is always set to 0 for palette CUs due to some implementation details: perhaps this is a spec issue? Signed-off-by: Frank Plowman <post@frankplowman.com> --- libavcodec/vvc/filter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/vvc/filter.c b/libavcodec/vvc/filter.c index e3886d008e..3815668bcf 100644 --- a/libavcodec/vvc/filter.c +++ b/libavcodec/vvc/filter.c @@ -385,6 +385,9 @@ static int boundary_strength(const VVCLocalContext *lc, const MvField *curr, con { RefPicList *rpl = lc->sc->rpl; + if (curr->pred_flag == PF_PLT) + return 0; + if (curr->pred_flag == PF_IBC) return FFABS(neigh->mv[0].x - curr->mv[0].x) >= 8 || FFABS(neigh->mv[0].y - curr->mv[0].y) >= 8; -- 2.47.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".
reply other threads:[~2025-05-17 20:53 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250517205250.4975-1-post@frankplowman.com \ --to=post@frankplowman.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=nuomi2021@gmail.com \ --cc=toqsxw@outlook.com \ /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