Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -1199,6 +1199,7 @@ void ff_vvc_alf_copy_ctu_to_hv(VVCLocalContext* lc, const int x0, const int y0) · 1198 unmodified lines | ||
| 1199 | 1199 | void ff_vvc_alf_filter(VVCLocalContext *lc, const int x0, const int y0) |
| 1200 | 1200 | { |
| 1201 | 1201 | VVCFrameContext *fc = lc->fc; |
| 1202 | + const VVCSPS *sps = fc->ps.sps; | |
| 1202 | 1203 | const VVCPPS *pps = fc->ps.pps; |
| 1203 | 1204 | const int rx = x0 >> fc->ps.sps->ctb_log2_size_y; |
| 1204 | 1205 | 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 | ||
| 1207 | 1208 | const int padded_stride = EDGE_EMU_BUFFER_STRIDE << ps; |
| 1208 | 1209 | const int padded_offset = padded_stride * ALF_PADDING_SIZE + (ALF_PADDING_SIZE << ps); |
| 1209 | 1210 | 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; | |
| 1210 | 1212 | ALFParams *alf = &CTB(fc->tab.alf, rx, ry); |
| 1211 | 1213 | int edges[MAX_EDGES] = { rx == 0, ry == 0, rx == pps->ctb_width - 1, ry == pps->ctb_height - 1 }; |
| 1212 | 1214 | |
| @@ -1224,6 +1226,13 @@ void ff_vvc_alf_filter(VVCLocalContext *lc, const int x0, const int y0) · 11 unmodified lines | ||
| 1224 | 1226 | edges[BOTTOM] = edges[BOTTOM] || CTB(fc->tab.slice_idx, rx, ry) != CTB(fc->tab.slice_idx, rx, ry + 1); |
| 1225 | 1227 | } |
| 1226 | 1228 | |
| 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 | + | |
| 1227 | 1236 | for (int c_idx = 0; c_idx < c_end; c_idx++) { |
| 1228 | 1237 | const int hs = fc->ps.sps->hshift[c_idx]; |
| 1229 | 1238 | const int vs = fc->ps.sps->vshift[c_idx]; |