Commit 10ee5b34 authored by Frank Bossen's avatar Frank Bossen
Browse files

Merge branch 'IBC_DEC_BV_CHECK' into 'master'

Add decoder validation check for IBC block vector

See merge request jvet/VVCSoftware_VTM!491
parents cf726611 ce31afe4
......@@ -822,6 +822,19 @@ void DecCu::xDeriveCUMV( CodingUnit &cu )
printf( "DECODER: pu motion vector across tile boundaries (%d,%d,%d,%d)\n", pu.lx(), pu.ly(), pu.lwidth(), pu.lheight() );
}
}
if (CU::isIBC(cu))
{
const int cuPelX = pu.Y().x;
const int cuPelY = pu.Y().y;
int roiWidth = pu.lwidth();
int roiHeight = pu.lheight();
const int picWidth = pu.cs->slice->getSPS()->getPicWidthInLumaSamples();
const int picHeight = pu.cs->slice->getSPS()->getPicHeightInLumaSamples();
const unsigned int lcuWidth = pu.cs->slice->getSPS()->getMaxCUWidth();
int xPred = pu.mv[0].getHor()>>4;
int yPred = pu.mv[0].getVer()>>4;
CHECK(!PU::isBlockVectorValid(pu, cuPelX, cuPelY, roiWidth, roiHeight, picWidth, picHeight, 0, 0, xPred, yPred, lcuWidth), "invalid block vector for IBC detected.");
}
}
}
//! \}
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