Commit 6b8849e2 authored by Yin Zhao's avatar Yin Zhao

update code to address coordinator's comments

parent b97e1f7e
......@@ -342,26 +342,26 @@ const bool CodingUnit::checkCCLMAllowed() const
}
else //dual tree, CTU size 64 or 128
{
int idxFor64x64Node = slice->getSPS()->getCTUSize() == 128 ? 1 : 0;
const PartSplit cuSplitTypeDepth1 = PartSplit( (splitSeries >> (idxFor64x64Node * SPLIT_DMULT)) & SPLIT_MASK );
const PartSplit cuSplitTypeDepth2 = PartSplit( (splitSeries >> ((idxFor64x64Node + 1) * SPLIT_DMULT)) & SPLIT_MASK );
int depthFor64x64Node = slice->getSPS()->getCTUSize() == 128 ? 1 : 0;
const PartSplit cuSplitTypeDepth1 = CU::getSplitAtDepth( *this, depthFor64x64Node );
const PartSplit cuSplitTypeDepth2 = CU::getSplitAtDepth( *this, depthFor64x64Node + 1 );
//allow CCLM if 64x64 chroma tree node uses QT split or HBT+VBT split combination
if( cuSplitTypeDepth1 == CU_QUAD_SPLIT || (cuSplitTypeDepth1 == CU_HORZ_SPLIT && cuSplitTypeDepth2 == CU_VERT_SPLIT) )
{
assert( blocks[COMPONENT_Cb].width <= 16 && blocks[COMPONENT_Cb].height <= 16 );
CHECK( !(blocks[COMPONENT_Cb].width <= 16 && blocks[COMPONENT_Cb].height <= 16), "chroma cu size shall be <= 16x16" );
allowCCLM = true;
}
//allow CCLM if 64x64 chroma tree node uses NS (No Split) and becomes a chroma CU containing 32x32 chroma blocks
else if( cuSplitTypeDepth1 == 0 )
else if( cuSplitTypeDepth1 == CU_DONT_SPLIT )
{
assert( blocks[COMPONENT_Cb].width == 32 && blocks[COMPONENT_Cb].height == 32 );
CHECK( !(blocks[COMPONENT_Cb].width == 32 && blocks[COMPONENT_Cb].height == 32), "chroma cu size shall be 32x32" );
allowCCLM = true;
}
//allow CCLM if 64x32 chroma tree node uses NS and becomes a chroma CU containing 32x16 chroma blocks
else if( cuSplitTypeDepth1 == CU_HORZ_SPLIT && cuSplitTypeDepth2 == 0 )
else if( cuSplitTypeDepth1 == CU_HORZ_SPLIT && cuSplitTypeDepth2 == CU_DONT_SPLIT )
{
assert( blocks[COMPONENT_Cb].width == 32 && blocks[COMPONENT_Cb].height == 16 );
CHECK( !(blocks[COMPONENT_Cb].width == 32 && blocks[COMPONENT_Cb].height == 16), "chroma cu size shall be 32x16" );
allowCCLM = true;
}
......@@ -374,8 +374,8 @@ const bool CodingUnit::checkCCLMAllowed() const
if( colLumaCu->lwidth() < 64 || colLumaCu->lheight() < 64 ) //further split at 64x64 luma node
{
const PartSplit cuSplitTypeDepth1Luma = PartSplit( (colLumaCu->splitSeries >> (idxFor64x64Node * SPLIT_DMULT)) & SPLIT_MASK );
assert( cuSplitTypeDepth1Luma >= CU_QUAD_SPLIT && cuSplitTypeDepth1Luma <= CU_TRIV_SPLIT );
const PartSplit cuSplitTypeDepth1Luma = CU::getSplitAtDepth( *colLumaCu, depthFor64x64Node );
CHECK( !(cuSplitTypeDepth1Luma >= CU_QUAD_SPLIT && cuSplitTypeDepth1Luma <= CU_TRIV_SPLIT), "split mode shall be BT, TT or QT" );
if( cuSplitTypeDepth1Luma != CU_QUAD_SPLIT )
{
allowCCLM = false;
......
Markdown is supported
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