diff --git a/doc/software-manual.tex b/doc/software-manual.tex index 6c82974f67c07008cf4aca4f8fd9ed75988cafc9..1abd52b5855819b9701dfd787a359caee55701cb 100644 --- a/doc/software-manual.tex +++ b/doc/software-manual.tex @@ -1204,6 +1204,11 @@ Defines the initial maximum depth of the multi-type tree in dual tree for luma c %\ShortOption{\None} & \Default{4} & Defines the initial minimum size of the quad tree in dual tree for chroma components. + +Note: this size is defined in chroma sample unit in configuration, and it is converted +into luma sample unit according to the horizontal chroma subsampling ratio when applied +in the software. In chroma format 4:2:2 case, this value shall be set to the value of +the height of minimum chroma QT node in chroma samples. \\ \Option{MinQTISlice} & diff --git a/source/Lib/CommonLib/UnitPartitioner.cpp b/source/Lib/CommonLib/UnitPartitioner.cpp index bb832878d7291699450eacd777e7f771313a1d0e..5b9db75c5dbd827d63ad852c9b72a6922178265d 100644 --- a/source/Lib/CommonLib/UnitPartitioner.cpp +++ b/source/Lib/CommonLib/UnitPartitioner.cpp @@ -391,12 +391,9 @@ void QTBTPartitioner::canSplit( const CodingStructure &cs, bool& canNo, bool& ca // don't allow QT-splitting below a BT split if( lastSplit != CTU_LEVEL && lastSplit != CU_QUAD_SPLIT ) canQt = false; #if JVET_Q0471_CHROMA_QT_SPLIT_ON_HEIGHT -#if JVET_Q0438_MONOCHROME_BUGFIXES - SizeType side = (chType == CHANNEL_TYPE_CHROMA) ? areaC->height : area.height; -#else - SizeType side = chType == CHANNEL_TYPE_CHROMA ? areaC.height : area.height; -#endif - if (side <= minQtSize) canQt = false; + // minQtSize is in luma samples unit + const unsigned minQTThreshold = minQtSize >> ((int) getChannelTypeScaleX(CHANNEL_TYPE_CHROMA, area.chromaFormat) - (int) getChannelTypeScaleY(CHANNEL_TYPE_CHROMA, area.chromaFormat)); + if( area.width <= minQTThreshold ) canQt = false; #else if( area.width <= minQtSize ) canQt = false; #endif @@ -574,8 +571,9 @@ PartSplit QTBTPartitioner::getImplicitSplit( const CodingStructure &cs ) #endif const unsigned minQtSize = cs.pcv->getMinQtSize( *cs.slice, chType ); #if JVET_Q0471_CHROMA_QT_SPLIT_ON_HEIGHT - SizeType side = chType == CHANNEL_TYPE_CHROMA ? currArea().Cb().height : area.height; - const bool isQtAllowed = side > minQtSize && currBtDepth == 0; + // minQtSize is in luma samples unit + const unsigned minQTThreshold = minQtSize >> ((int) getChannelTypeScaleX(CHANNEL_TYPE_CHROMA, area.chromaFormat) - (int) getChannelTypeScaleY(CHANNEL_TYPE_CHROMA, area.chromaFormat)); + const bool isQtAllowed = area.width > minQTThreshold && currBtDepth == 0; #else const bool isQtAllowed = area.width > minQtSize && area.height > minQtSize && currBtDepth == 0; #endif