History

lavc/vvc: Fix check whether QG is in first tile col

The second part of this condition is intended to check whether the current quantisation group is in the first CTU column of the current tile. The issue is that ctb_to_col_bd gives the x-ordinate of the first column of the current tile *in CTUs*, while xQg gives the x-ordinate of the quantisation group *in samples*. Rectify this by shifting xQg by ctb_log2_size to get xQg in CTUs before comparing. Fixes FFVVC issues #201 and #203.

Frank Plowman committed 2 years ago

Commit dfcf5f81 parent 0b7d4fc1 file · +1 −1Browse files

Unified · Split

libavcodec/vvc/vvc_ctu.c+1−1
@@ -96,7 +96,7 @@ static int get_qp_y_pred(const VVCLocalContext *lc) · 95 unmodified lines
9696 if (lc->na.cand_up) {
9797 const int first_qg_in_ctu = !(xQg & ctb_size_mask) && !(yQg & ctb_size_mask);
9898 const int qPy_up = fc->tab.qp[LUMA][x_cb + (y_cb - 1) * min_cb_width];
99− if (first_qg_in_ctu && pps->ctb_to_col_bd[xQg >> ctb_log2_size] == xQg)
99+ if (first_qg_in_ctu && pps->ctb_to_col_bd[xQg >> ctb_log2_size] == xQg >> ctb_log2_size)
100100 return qPy_up;
101101 }
102102

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