Opened 6 years ago
Closed 6 years ago
#166 closed defect (fixed)
Derivation error with the context of IBC flag
Reported by: | XiangLi | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | VTM | Version: | |
Keywords: | IBC | Cc: | ksuehring, XiangLi, fbossen, jvet@… |
Description
#if JVET_M0483_IBC
unsigned DeriveCtx::CtxIBCFlag(const CodingUnit& cu)
{
const CodingStructure *cs = cu.cs;
unsigned ctxId = 0;
const CodingUnit *cuLeft = cs->getCURestricted(cu.lumaPos().offset(-1, 0), cu, CH_L);
ctxId = (cuLeft && CU::isIBC(*cuLeft)) ? 1 : 0;
const CodingUnit *cuAbove = cs->getCURestricted(cu.lumaPos().offset(0, -1), cu, CH_L);
ctxId = (cuAbove && CU::isIBC(*cuAbove)) ? 1 : 0;
return ctxId;
}
#endif
In this function, ctxId is reset for cuAbove. "+=" should be used instead.
Change history (7)
comment:1 Changed 6 years ago by fbossen
comment:2 Changed 6 years ago by wchien
The software attached in M0483 method 3 already had the same context derivation.
However, it did look like a bug with "=" instead of "+=".
comment:3 Changed 6 years ago by fbossen
It looks like a bug indeed, which is why I was searching corresponding text in the document for guidance but couldn't find it
comment:4 Changed 6 years ago by wchien
It seems software and text provided in M0483 are not matching. Software is the same as integrated, but one version of the text was using 1 context as pred_mode_flag. As the proponent of M0483, I believe software was the intention, but reverting the context derivation to use 1 context can be an alternative solution.
comment:5 Changed 6 years ago by fbossen
pred_mode_flag uses 1 context, well now 2 thanks to M0502. I was looking for pred_mode_cpr_flag in the text of M0483, which is more relevant here, but there doesn't seem to be any associated context definition...
I think the proposed fix makes sense.
comment:6 Changed 6 years ago by XiangLi
According to the following code, I think the intention was to have three contexts with ctxId = 0, 1, or 2.
#if JVET_M0483_IBC
const CtxSet ContextSetCfg::IBCFlag = ContextSetCfg::addCtxSet
({
#if JVET_M0453_CABAC_ENGINE
{ 149, 137, 137, },
{ 165, 151, 137, },
{ CNU, CNU, CNU, },
{ 9, 13, 10, },
#else
{ 165, 137, 153, },
{ 106, 122, 138, },
{ CNU, CNU, CNU, },
#endif
});
comment:7 Changed 6 years ago by fbossen
- Resolution set to fixed
- Status changed from new to closed
Is there a description of this in M0483? Couldn't find it.