[FFmpeg-cvslog] avcodec/vvcdec: cabac, fix non_inter_flag, pred_mode_flag, amvr_shift for IBC
Nuo Mi
git at videolan.org
Sat Feb 24 14:30:49 EET 2024
ffmpeg | branch: master | Nuo Mi <nuomi2021 at gmail.com> | Thu Feb 22 15:13:59 2024 +0800| [5a388d2cc6717655556f21084f8676588b4538d8] | committer: Nuo Mi
avcodec/vvcdec: cabac, fix non_inter_flag, pred_mode_flag, amvr_shift for IBC
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5a388d2cc6717655556f21084f8676588b4538d8
---
libavcodec/vvc/vvc_cabac.c | 10 +++++-----
1 file 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);
More information about the ffmpeg-cvslog
mailing list