diff options
author | Nuo Mi <nuomi2021@gmail.com> | 2024-02-22 15:13:59 +0800 |
---|---|---|
committer | Nuo Mi <nuomi2021@gmail.com> | 2024-02-24 20:24:55 +0800 |
commit | 5a388d2cc6717655556f21084f8676588b4538d8 (patch) | |
tree | f3ad0086da4aa8eb3b2929069e9288da10067951 /libavcodec/vvc/vvc_cabac.c | |
parent | dd3650cada8ca12cceedd8a506bc2e054e04adca (diff) | |
download | ffmpeg-5a388d2cc6717655556f21084f8676588b4538d8.tar.gz |
avcodec/vvcdec: cabac, fix non_inter_flag, pred_mode_flag, amvr_shift for IBC
Diffstat (limited to 'libavcodec/vvc/vvc_cabac.c')
-rw-r--r-- | libavcodec/vvc/vvc_cabac.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/vvc/vvc_cabac.c b/libavcodec/vvc/vvc_cabac.c index 4342dfc342..5e24a1b677 100644 --- a/libavcodec/vvc/vvc_cabac.c +++ b/libavcodec/vvc/vvc_cabac.c @@ -1196,10 +1196,10 @@ VVCSplitMode ff_vvc_split_mode(VVCLocalContext *lc, const int x0, const int y0, int ff_vvc_non_inter_flag(VVCLocalContext *lc, const int x0, const int y0, const int ch_type) { const VVCFrameContext *fc = lc->fc; - uint8_t inc, left = 0, top = 0; + uint8_t inc, left = MODE_INTER, top = MODE_INTER; get_left_top(lc, &left, &top, x0, y0, fc->tab.cpm[ch_type], fc->tab.cpm[ch_type]); - inc = left || top; + inc = left == MODE_INTRA || top == MODE_INTRA; return GET_CABAC(NON_INTER_FLAG + inc); } @@ -1207,10 +1207,10 @@ int ff_vvc_pred_mode_flag(VVCLocalContext *lc, const int is_chroma) { const VVCFrameContext *fc = lc->fc; const CodingUnit *cu = lc->cu; - uint8_t inc, left = 0, top = 0; + uint8_t inc, left = MODE_INTER, top = MODE_INTER; get_left_top(lc, &left, &top, cu->x0, cu->y0, fc->tab.cpm[is_chroma], fc->tab.cpm[is_chroma]); - inc = left || top; + inc = left == MODE_INTRA || top == MODE_INTRA; return GET_CABAC(PRED_MODE_FLAG + inc); } @@ -1569,7 +1569,7 @@ int ff_vvc_amvr_shift(VVCLocalContext *lc, const int inter_affine_flag, { int amvr_shift = 2; if (has_amvr_flag) { - if (amvr_flag(lc, inter_affine_flag)) { + if (pred_mode == MODE_IBC || amvr_flag(lc, inter_affine_flag)) { int idx; if (inter_affine_flag) { idx = amvr_precision_idx(lc, 2, 1); |