Commit dcc19929 authored by Remy Foray's avatar Remy Foray
Browse files

Fix #429: use variable MaxTbSizeY in canSplit function

parent e328a149
Pipeline #2361 passed with stage
......@@ -393,20 +393,25 @@ void QTBTPartitioner::canSplit( const CodingStructure &cs, bool& canNo, bool& ca
canBh = canBv = false;
}
#if MAX_TB_SIZE_SIGNALLING
const unsigned maxTrSize = cs.sps->getMaxTbSize();
#else
const unsigned maxTrSize = MAX_TB_SIZEY;
#endif
// specific check for BT splits
if( area.height <= minBtSize ) canBh = false;
if( area.width > MAX_TB_SIZEY && area.height <= MAX_TB_SIZEY ) canBh = false;
if( area.width > maxTrSize && area.height <= maxTrSize ) canBh = false;
if( chType == CHANNEL_TYPE_CHROMA && areaC.width * areaC.height <= MIN_DUALTREE_CHROMA_SIZE ) canBh = false;
if( area.width <= minBtSize ) canBv = false;
if( area.width <= MAX_TB_SIZEY && area.height > MAX_TB_SIZEY ) canBv = false;
if( area.width <= maxTrSize && area.height > maxTrSize ) canBv = false;
if( chType == CHANNEL_TYPE_CHROMA && areaC.width * areaC.height <= MIN_DUALTREE_CHROMA_SIZE ) canBv = false;
if( area.height <= 2 * minTtSize || area.height > maxTtSize || area.width > maxTtSize )
canTh = false;
if( area.width > MAX_TB_SIZEY || area.height > MAX_TB_SIZEY ) canTh = false;
if( area.width > maxTrSize || area.height > maxTrSize ) canTh = false;
if( chType == CHANNEL_TYPE_CHROMA && areaC.width * areaC.height <= MIN_DUALTREE_CHROMA_SIZE*2 ) canTh = false;
if( area.width <= 2 * minTtSize || area.width > maxTtSize || area.height > maxTtSize )
canTv = false;
if( area.width > MAX_TB_SIZEY || area.height > MAX_TB_SIZEY ) canTv = false;
if( area.width > maxTrSize || area.height > maxTrSize ) canTv = false;
if( chType == CHANNEL_TYPE_CHROMA && areaC.width * areaC.height <= MIN_DUALTREE_CHROMA_SIZE*2 ) canTv = false;
}
......@@ -491,6 +496,11 @@ PartSplit QTBTPartitioner::getImplicitSplit( const CodingStructure &cs )
const bool isBtAllowed = area.width <= maxBtSize && area.height <= maxBtSize;
const unsigned minQtSize = cs.pcv->getMinQtSize( *cs.slice, chType );
const bool isQtAllowed = area.width > minQtSize && area.height > minQtSize && currBtDepth == 0;
#if MAX_TB_SIZE_SIGNALLING
const unsigned maxTrSize = cs.sps->getMaxTbSize();
#else
const unsigned maxTrSize = MAX_TB_SIZEY;
#endif
if( !isBlInPic && !isTrInPic && isQtAllowed )
{
......@@ -512,7 +522,7 @@ PartSplit QTBTPartitioner::getImplicitSplit( const CodingStructure &cs )
{
split = CU_QUAD_SPLIT;
}
if ((!isBlInPic || !isTrInPic) && (currArea().Y().width > MAX_TB_SIZEY || currArea().Y().height > MAX_TB_SIZEY))
if ((!isBlInPic || !isTrInPic) && (currArea().Y().width > maxTrSize || currArea().Y().height > maxTrSize))
{
split = CU_QUAD_SPLIT;
}
......
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