Ticket #397: bugfix_for_dQP_r1.patch
File bugfix_for_dQP_r1.patch, 4.7 KB (added by kazushi, 11 years ago) |
---|
-
Lib/TLibCommon/TComDataCU.cpp
1657 1657 { 1658 1658 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 1659 1659 1660 UInt uiAbsRorderQpMinCUIdx = g_auiZscanToRaster[(uiCurrAbsIdxInLCU>>( 8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1))];1660 UInt uiAbsRorderQpMinCUIdx = g_auiZscanToRaster[(uiCurrAbsIdxInLCU>>((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1))<<((g_uiMaxCUDepth -getSlice()->getPPS()->getMaxCuDQPDepth())<<1)]; 1661 1661 UInt uiNumPartInQpMinCUWidth = getSlice()->getPPS()->getMinCuDQPSize()>>2; 1662 1662 1663 UInt uiAbsZorderQpMinCUIdx = (uiCurrAbsIdxInLCU>>( 8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1));1663 UInt uiAbsZorderQpMinCUIdx = (uiCurrAbsIdxInLCU>>((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1))<<((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1); 1664 1664 if( (uiCurrAbsIdxInLCU != uiAbsZorderQpMinCUIdx) && 1665 1665 ((bEnforceSliceRestriction && (m_pcPic->getCU( getAddr() )->getSliceStartCU(uiCurrAbsIdxInLCU) != m_pcPic->getCU( getAddr() )->getSliceStartCU (uiAbsZorderQpMinCUIdx))) || 1666 1666 (bEnforceEntropySliceRestriction &&(m_pcPic->getCU( getAddr() )->getEntropySliceStartCU(uiCurrAbsIdxInLCU) != m_pcPic->getCU( getAddr() )->getEntropySliceStartCU (uiAbsZorderQpMinCUIdx)) )) ) … … 1717 1717 { 1718 1718 UInt numPartInCUWidth = m_pcPic->getNumPartInWidth(); 1719 1719 1720 UInt absRorderQpMinCUIdx = g_auiZscanToRaster[(currAbsIdxInLCU>>( 8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1))];1720 UInt absRorderQpMinCUIdx = g_auiZscanToRaster[(currAbsIdxInLCU>>((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1))<<((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1)]; 1721 1721 1722 UInt absZorderQpMinCUIdx = (currAbsIdxInLCU>>( 8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1));1722 UInt absZorderQpMinCUIdx = (currAbsIdxInLCU>>((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1))<<((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1); 1723 1723 if( (currAbsIdxInLCU != absZorderQpMinCUIdx) && 1724 1724 ((enforceSliceRestriction && (m_pcPic->getCU( getAddr() )->getSliceStartCU(currAbsIdxInLCU) != m_pcPic->getCU( getAddr() )->getSliceStartCU (absZorderQpMinCUIdx))) 1725 1725 ||(enforceEntropySliceRestriction && (m_pcPic->getCU( getAddr() )->getEntropySliceStartCU(currAbsIdxInLCU) != m_pcPic->getCU( getAddr() )->getEntropySliceStartCU (absZorderQpMinCUIdx)) )) ) … … 1814 1814 UChar TComDataCU::getLastCodedQP( UInt uiAbsPartIdx ) 1815 1815 #endif 1816 1816 { 1817 UInt uiQUPartIdxMask = ~((1<<( 8-(getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))-1);1817 UInt uiQUPartIdxMask = ~((1<<((g_uiMaxCUDepth - getSlice()->getPPS()->getMaxCuDQPDepth())<<1))-1); 1818 1818 Int iLastValidPartIdx = getLastValidPartIdx( uiAbsPartIdx&uiQUPartIdxMask ); 1819 1819 if ( uiAbsPartIdx < m_uiNumPartition 1820 1820 && (getSCUAddr()+iLastValidPartIdx < getSliceStartCU(m_uiAbsIdxInLCU+uiAbsPartIdx) || getSCUAddr()+iLastValidPartIdx < getEntropySliceStartCU(m_uiAbsIdxInLCU+uiAbsPartIdx) )) -
Lib/TLibDecoder/TDecCAVLC.cpp
2362 2362 uiQp = pcCU->getRefQP( uiAbsPartIdx ) + iDQp; 2363 2363 #endif 2364 2364 2365 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>( 8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ;2365 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>((g_uiMaxCUDepth - pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())<<1))<<((g_uiMaxCUDepth - pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())<<1) ; 2366 2366 UInt uiQpCUDepth = min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ; 2367 2367 2368 2368 #if H0736_AVC_STYLE_QP_RANGE -
Lib/TLibDecoder/TDecSbac.cpp
1080 1080 #endif 1081 1081 } 1082 1082 1083 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>( 8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)))<<(8-(pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()<<1)) ;1083 UInt uiAbsQpCUPartIdx = (uiAbsPartIdx>>((g_uiMaxCUDepth - pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())<<1))<<((g_uiMaxCUDepth - pcCU->getSlice()->getPPS()->getMaxCuDQPDepth())<<1) ; 1084 1084 UInt uiQpCUDepth = min(uiDepth,pcCU->getSlice()->getPPS()->getMaxCuDQPDepth()) ; 1085 1085 #if H0736_AVC_STYLE_QP_RANGE 1086 1086 pcCU->setQPSubParts( qp, uiAbsQpCUPartIdx, uiQpCUDepth );