aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNuo Mi <nuomi2021@gmail.com>2024-10-04 22:31:13 +0800
committerNuo Mi <nuomi2021@gmail.com>2024-10-16 20:28:09 +0800
commitd78b43ecf83feaa1f1fe24c7a4fb4850f9ede7da (patch)
tree27d47be3bca454d77a9665ab51a623374fa8b642
parent634780f3cf7298401366c41e738ad728d26fee47 (diff)
downloadffmpeg-d78b43ecf83feaa1f1fe24c7a4fb4850f9ede7da.tar.gz
avcodec/vvcdec: misc, move pcmf from min_tu_tl_init to min_cb_nz_tl_init
pcmf are cu level flags
-rw-r--r--libavcodec/vvc/ctu.c8
-rw-r--r--libavcodec/vvc/dec.c4
-rw-r--r--libavcodec/vvc/filter.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c
index b33ad576cf..8210ab520f 100644
--- a/libavcodec/vvc/ctu.c
+++ b/libavcodec/vvc/ctu.c
@@ -1240,16 +1240,18 @@ static void set_cu_tabs(const VVCLocalContext *lc, const CodingUnit *cu)
set_cb_tab(lc, fc->tab.mmi, pu->mi.motion_model_idc);
set_cb_tab(lc, fc->tab.msf, pu->merge_subblock_flag);
- if (cu->tree_type != DUAL_TREE_CHROMA)
+ if (cu->tree_type != DUAL_TREE_CHROMA) {
set_cb_tab(lc, fc->tab.skip, cu->skip_flag);
+ set_cb_tab(lc, fc->tab.pcmf[LUMA], cu->bdpcm_flag[LUMA]);
+ }
+ if (cu->tree_type != DUAL_TREE_LUMA)
+ set_cb_tab(lc, fc->tab.pcmf[CHROMA], cu->bdpcm_flag[CHROMA]);
while (tu) {
for (int j = 0; j < tu->nb_tbs; j++) {
const TransformBlock *tb = tu->tbs + j;
if (tb->c_idx != LUMA)
set_qp_c_tab(lc, tu, tb);
- if (tb->c_idx != CR && cu->bdpcm_flag[tb->c_idx])
- set_tb_tab(fc->tab.pcmf[tb->c_idx], 1, fc, tb);
}
tu = tu->next;
}
diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c
index edf2607f50..13ca752eec 100644
--- a/libavcodec/vvc/dec.c
+++ b/libavcodec/vvc/dec.c
@@ -150,6 +150,7 @@ static void min_cb_nz_tl_init(TabList *l, VVCFrameContext *fc)
TL_ADD(cb_height[i], pic_size_in_min_cb);
TL_ADD(cp_mv[i], pic_size_in_min_cb * MAX_CONTROL_POINTS);
TL_ADD(cpm[i], pic_size_in_min_cb);
+ TL_ADD(pcmf[i], pic_size_in_min_cb);
}
// For luma, qp can only change at the CU level, so the qp tab size is related to the CU.
TL_ADD(qp[LUMA], pic_size_in_min_cb);
@@ -189,9 +190,6 @@ static void min_tu_tl_init(TabList *l, VVCFrameContext *fc)
TL_ADD(tu_joint_cbcr_residual_flag, pic_size_in_min_tu);
- for (int i = LUMA; i <= CHROMA; i++)
- TL_ADD(pcmf[i], pic_size_in_min_tu);
-
for (int i = 0; i < VVC_MAX_SAMPLE_ARRAYS; i++) {
TL_ADD(tu_coded_flag[i], pic_size_in_min_tu);
diff --git a/libavcodec/vvc/filter.c b/libavcodec/vvc/filter.c
index 707fc24203..9a45a735e0 100644
--- a/libavcodec/vvc/filter.c
+++ b/libavcodec/vvc/filter.c
@@ -543,9 +543,9 @@ static av_always_inline int deblock_bs(const VVCLocalContext *lc,
const uint8_t chroma = !!c_idx;
const int tu_p = (y_p >> log2_min_tu_size) * min_tu_width + (x_p >> log2_min_tu_size);
const int tu_q = (y_q >> log2_min_tu_size) * min_tu_width + (x_q >> log2_min_tu_size);
- const uint8_t pcmf = fc->tab.pcmf[chroma][tu_p] && fc->tab.pcmf[chroma][tu_q];
const int cb_p = (y_p >> log2_min_cb_size) * min_cb_width + (x_p >> log2_min_cb_size);
const int cb_q = (y_q >> log2_min_cb_size) * min_cb_width + (x_q >> log2_min_cb_size);
+ const uint8_t pcmf = fc->tab.pcmf[chroma][cb_p] && fc->tab.pcmf[chroma][cb_q];
const uint8_t intra = fc->tab.cpm[chroma][cb_p] == MODE_INTRA || fc->tab.cpm[chroma][cb_q] == MODE_INTRA;
const uint8_t same_mode = fc->tab.cpm[chroma][cb_p] == fc->tab.cpm[chroma][cb_q];