History

avcodec/vvcdec: alf, support subpicture

Nuo Mi committed 2 years ago

Commit adeb51c1 parent bbf0ccb1 file · +9 −0Browse files

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

Unified · Split

libavcodec/vvc/vvc_filter.c+9−0
@@ -1199,6 +1199,7 @@ void ff_vvc_alf_copy_ctu_to_hv(VVCLocalContext* lc, const int x0, const int y0) · 1198 unmodified lines
11991199 void ff_vvc_alf_filter(VVCLocalContext *lc, const int x0, const int y0)
12001200 {
12011201 VVCFrameContext *fc = lc->fc;
1202+ const VVCSPS *sps = fc->ps.sps;
12021203 const VVCPPS *pps = fc->ps.pps;
12031204 const int rx = x0 >> fc->ps.sps->ctb_log2_size_y;
12041205 const int ry = y0 >> fc->ps.sps->ctb_log2_size_y;
@@ -1207,6 +1208,7 @@ void ff_vvc_alf_filter(VVCLocalContext *lc, const int x0, const int y0) · 2 unmodified lines
12071208 const int padded_stride = EDGE_EMU_BUFFER_STRIDE << ps;
12081209 const int padded_offset = padded_stride * ALF_PADDING_SIZE + (ALF_PADDING_SIZE << ps);
12091210 const int c_end = fc->ps.sps->r->sps_chroma_format_idc ? VVC_MAX_SAMPLE_ARRAYS : 1;
1211+ const int subpic_idx = lc->sc->sh.r->curr_subpic_idx;
12101212 ALFParams *alf = &CTB(fc->tab.alf, rx, ry);
12111213 int edges[MAX_EDGES] = { rx == 0, ry == 0, rx == pps->ctb_width - 1, ry == pps->ctb_height - 1 };
12121214
@@ -1224,6 +1226,13 @@ void ff_vvc_alf_filter(VVCLocalContext *lc, const int x0, const int y0) · 11 unmodified lines
12241226 edges[BOTTOM] = edges[BOTTOM] || CTB(fc->tab.slice_idx, rx, ry) != CTB(fc->tab.slice_idx, rx, ry + 1);
12251227 }
12261228
1229+ if (!sps->r->sps_loop_filter_across_subpic_enabled_flag[subpic_idx]) {
1230+ edges[LEFT] = edges[LEFT] || (lc->boundary_flags & BOUNDARY_LEFT_SUBPIC);
1231+ edges[TOP] = edges[TOP] || (lc->boundary_flags & BOUNDARY_UPPER_SUBPIC);
1232+ edges[RIGHT] = edges[RIGHT] || fc->ps.sps->r->sps_subpic_ctu_top_left_x[subpic_idx] + fc->ps.sps->r->sps_subpic_width_minus1[subpic_idx] == rx;
1233+ edges[BOTTOM] = edges[BOTTOM] || fc->ps.sps->r->sps_subpic_ctu_top_left_y[subpic_idx] + fc->ps.sps->r->sps_subpic_height_minus1[subpic_idx] == ry;
1234+ }
1235+
12271236 for (int c_idx = 0; c_idx < c_end; c_idx++) {
12281237 const int hs = fc->ps.sps->hshift[c_idx];
12291238 const int vs = fc->ps.sps->vshift[c_idx];

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