aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vvc
diff options
context:
space:
mode:
authorNuo Mi <nuomi2021@gmail.com>2024-03-27 21:01:03 +0800
committerNuo Mi <nuomi2021@gmail.com>2024-04-02 20:56:22 +0800
commit260130aae86bbd95ee269ebf1a8601eb640173da (patch)
tree1d0fb1f832e760a9ca157a437b60a10a67012760 /libavcodec/vvc
parent4e47847119cee3ebdd3e13890a3da8e0552f00f9 (diff)
downloadffmpeg-260130aae86bbd95ee269ebf1a8601eb640173da.tar.gz
avcodec/vvcdec: ff_vvc_decode_neighbour, support subpicture
Diffstat (limited to 'libavcodec/vvc')
-rw-r--r--libavcodec/vvc/vvc_ctu.c4
-rw-r--r--libavcodec/vvc/vvc_ctu.h6
2 files changed, 8 insertions, 2 deletions
diff --git a/libavcodec/vvc/vvc_ctu.c b/libavcodec/vvc/vvc_ctu.c
index e48ffda938..05c3e04b83 100644
--- a/libavcodec/vvc/vvc_ctu.c
+++ b/libavcodec/vvc/vvc_ctu.c
@@ -2493,6 +2493,10 @@ void ff_vvc_decode_neighbour(VVCLocalContext *lc, const int x_ctb, const int y_c
lc->boundary_flags |= BOUNDARY_UPPER_TILE;
if (ry > 0 && fc->tab.slice_idx[rs] != fc->tab.slice_idx[rs - fc->ps.pps->ctb_width])
lc->boundary_flags |= BOUNDARY_UPPER_SLICE;
+ if (fc->ps.sps->r->sps_subpic_ctu_top_left_x[lc->sc->sh.r->curr_subpic_idx] == rx)
+ lc->boundary_flags |= BOUNDARY_LEFT_SUBPIC;
+ if (fc->ps.sps->r->sps_subpic_ctu_top_left_y[lc->sc->sh.r->curr_subpic_idx] == ry)
+ lc->boundary_flags |= BOUNDARY_UPPER_SUBPIC;
lc->ctb_left_flag = rx > 0 && !(lc->boundary_flags & BOUNDARY_LEFT_TILE);
lc->ctb_up_flag = ry > 0 && !(lc->boundary_flags & BOUNDARY_UPPER_TILE) && !(lc->boundary_flags & BOUNDARY_UPPER_SLICE);
lc->ctb_up_right_flag = lc->ctb_up_flag && (fc->ps.pps->ctb_to_col_bd[rx] == fc->ps.pps->ctb_to_col_bd[rx + 1]) &&
diff --git a/libavcodec/vvc/vvc_ctu.h b/libavcodec/vvc/vvc_ctu.h
index 8020e184c5..460dbdba59 100644
--- a/libavcodec/vvc/vvc_ctu.h
+++ b/libavcodec/vvc/vvc_ctu.h
@@ -421,8 +421,10 @@ typedef struct VVCLocalContext {
#define BOUNDARY_LEFT_SLICE (1 << 0)
#define BOUNDARY_LEFT_TILE (1 << 1)
-#define BOUNDARY_UPPER_SLICE (1 << 2)
-#define BOUNDARY_UPPER_TILE (1 << 3)
+#define BOUNDARY_LEFT_SUBPIC (1 << 2)
+#define BOUNDARY_UPPER_SLICE (1 << 3)
+#define BOUNDARY_UPPER_TILE (1 << 4)
+#define BOUNDARY_UPPER_SUBPIC (1 << 5)
/* properties of the boundary of the current CTB for the purposes
* of the deblocking filter */
int boundary_flags;