Ticket #419: 419cleanup_fix.patch
File 419cleanup_fix.patch, 4.0 KB (added by bbross, 13 years ago) |
---|
-
source/Lib/TLibCommon/TComDataCU.h
350 350 UChar getTransformIdx ( UInt uiIdx ) { return m_puhTrIdx[uiIdx]; } 351 351 Void setTrIdxSubParts ( UInt uiTrIdx, UInt uiAbsPartIdx, UInt uiDepth ); 352 352 353 UInt getQuadtreeTULog2MinSizeInCU( UInt uiIdx );353 UInt getQuadtreeTULog2MinSizeInCU( UInt absPartIdx ); 354 354 355 355 TComCUMvField* getCUMvField ( RefPicList e ) { return &m_acCUMvField[e]; } 356 356 -
source/Lib/TLibCommon/TComDataCU.cpp
2023 2023 } 2024 2024 } 2025 2025 2026 UInt TComDataCU::getQuadtreeTULog2MinSizeInCU( UInt uiIdx )2026 UInt TComDataCU::getQuadtreeTULog2MinSizeInCU( UInt absPartIdx ) 2027 2027 { 2028 UInt uiLog2MinTUSizeInCU = g_aucConvertToBit[getWidth( uiIdx )] + 2; 2029 2030 if ( getPredictionMode( uiIdx ) == MODE_INTRA && getPartitionSize( uiIdx ) == SIZE_NxN ) 2031 { 2032 uiLog2MinTUSizeInCU--; 2033 } 2034 2035 UInt uiQuadtreeTUMaxDepth = getPredictionMode( uiIdx ) == MODE_INTRA ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter(); 2036 2037 PartSize partSize = getPartitionSize( uiIdx ); 2028 UInt log2CbSize = g_aucConvertToBit[getWidth( absPartIdx )] + 2; 2029 PartSize partSize = getPartitionSize( absPartIdx ); 2030 UInt quadtreeTUMaxDepth = getPredictionMode( absPartIdx ) == MODE_INTRA ? m_pcSlice->getSPS()->getQuadtreeTUMaxDepthIntra() : m_pcSlice->getSPS()->getQuadtreeTUMaxDepthInter(); 2031 Int intraSplitFlag = ( getPredictionMode( absPartIdx ) == MODE_INTRA && partSize == SIZE_NxN ) ? 1 : 0; 2038 2032 #if G519_TU_AMP_NSQT_HARMONIZATION 2039 Int SplitFlag = ((uiQuadtreeTUMaxDepth == 1) && (getPredictionMode( uiIdx ) == MODE_INTER) && (partSize != SIZE_2Nx2N) );2033 Int interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode( absPartIdx ) == MODE_INTER) && (partSize != SIZE_2Nx2N) ); 2040 2034 #else 2041 Int SplitFlag = ((uiQuadtreeTUMaxDepth == 1) && (getPredictionMode( uiIdx ) == MODE_INTER) && (partSize == SIZE_Nx2N || partSize == SIZE_2NxN) );2035 Int interSplitFlag = ((quadtreeTUMaxDepth == 1) && (getPredictionMode( absPartIdx ) == MODE_INTER) && (partSize == SIZE_Nx2N || partSize == SIZE_2NxN) ); 2042 2036 #endif 2043 2044 if (uiLog2MinTUSizeInCU < m_pcSlice->getSPS()->getQuadtreeTULog2MinSize() + uiQuadtreeTUMaxDepth - 1 + SplitFlag) 2037 2038 UInt log2MinTUSizeInCU = 0; 2039 if (log2CbSize < (m_pcSlice->getSPS()->getQuadtreeTULog2MinSize() + quadtreeTUMaxDepth - 1 + interSplitFlag + intraSplitFlag) ) 2045 2040 { 2046 uiLog2MinTUSizeInCU = m_pcSlice->getSPS()->getQuadtreeTULog2MinSize(); 2041 // when fully making use of signaled TUMaxDepth + inter/intraSplitFlag, resulting luma TB size is < QuadtreeTULog2MinSize 2042 log2MinTUSizeInCU = m_pcSlice->getSPS()->getQuadtreeTULog2MinSize(); 2047 2043 } 2048 2044 else 2049 2045 { 2050 uiLog2MinTUSizeInCU -= uiQuadtreeTUMaxDepth - 1 + SplitFlag; 2046 // when fully making use of signaled TUMaxDepth + inter/intraSplitFlag, resulting luma TB size is still >= QuadtreeTULog2MinSize 2047 log2MinTUSizeInCU = log2CbSize - ( quadtreeTUMaxDepth - 1 + interSplitFlag + intraSplitFlag); // stop when trafoDepth == hierarchy_depth = splitFlag 2048 if ( log2MinTUSizeInCU > m_pcSlice->getSPS()->getQuadtreeTULog2MaxSize()) 2049 { 2050 // when fully making use of signaled TUMaxDepth + inter/intraSplitFlag, resulting luma TB size is still > QuadtreeTULog2MaxSize 2051 log2MinTUSizeInCU = m_pcSlice->getSPS()->getQuadtreeTULog2MaxSize(); 2052 } 2051 2053 } 2052 2053 if ( uiLog2MinTUSizeInCU > m_pcSlice->getSPS()->getQuadtreeTULog2MaxSize()) 2054 { 2055 uiLog2MinTUSizeInCU = m_pcSlice->getSPS()->getQuadtreeTULog2MaxSize() - SplitFlag; 2056 } 2057 2058 return uiLog2MinTUSizeInCU; 2054 return log2MinTUSizeInCU; 2059 2055 } 2060 2056 2061 2057 UInt TComDataCU::getCtxSkipFlag( UInt uiAbsPartIdx )