History

lavc/vvc: Avoid UB in DB strength derivation for PLT CUs

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?

Frank Plowman committed 1 year ago

Commit 67008931 parent a18b2c21 file · +3 −0Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/vvc/filter.c+3−0
@@ -385,6 +385,9 @@ static int boundary_strength(const VVCLocalContext *lc, const MvField *curr, con · 384 unmodified lines
385385 {
386386 RefPicList *rpl = lc->sc->rpl;
387387
388+ if (curr->pred_flag == PF_PLT)
389+ return 0;
390+
388391 if (curr->pred_flag == PF_IBC)
389392 return FFABS(neigh->mv[0].x - curr->mv[0].x) >= 8 || FFABS(neigh->mv[0].y - curr->mv[0].y) >= 8;
390393

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t