Commit 5e4ac7ea authored by Xiang Li's avatar Xiang Li
Browse files

Merge branch 'fix-265' into 'master'

Fix #265 Issue in context derivation for chroma tree

See merge request jvet/VVCSoftware_VTM!561
parents e5257d6d 79db7675
......@@ -382,10 +382,11 @@ 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);
const Position pos = cu.chType == CHANNEL_TYPE_CHROMA ? cu.chromaPos() : cu.lumaPos();
const CodingUnit *cuLeft = cs->getCURestricted(pos.offset(-1, 0), cu, cu.chType);
ctxId += (cuLeft && CU::isIBC(*cuLeft)) ? 1 : 0;
const CodingUnit *cuAbove = cs->getCURestricted(cu.lumaPos().offset(0, -1), cu, CH_L);
const CodingUnit *cuAbove = cs->getCURestricted(pos.offset(0, -1), cu, cu.chType);
ctxId += (cuAbove && CU::isIBC(*cuAbove)) ? 1 : 0;
return ctxId;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment