Changeset 66 in 3DVCSoftware for branches/HTM-3.0-Qualcomm/source/Lib
- Timestamp:
- 22 May 2012, 00:18:14 (13 years ago)
- Location:
- branches/HTM-3.0-Qualcomm/source/Lib
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r62 r66 5952 5952 #if HHI_INTER_VIEW_RESIDUAL_PRED 5953 5953 Bool 5954 TComDataCU::getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv ) 5954 TComDataCU::getResidualSamples( UInt uiPartIdx, 5955 #if QC_SIMPLIFIEDIVRP_M24938 5956 Bool bRecon , 5957 #endif 5958 TComYuv* pcYuv ) 5955 5959 { 5956 5960 TComResidualGenerator* pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator(); 5957 5961 ROFRS( pcResidualGenerator, false ); 5958 return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv ); 5962 return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv 5963 #if QC_SIMPLIFIEDIVRP_M24938 5964 , bRecon 5965 #endif 5966 ); 5959 5967 } 5960 5968 #endif -
branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r62 r66 521 521 #endif 522 522 #if HHI_INTER_VIEW_RESIDUAL_PRED 523 Bool getResidualSamples( UInt uiPartIdx, TComYuv* pcYuv = 0 ); 523 Bool getResidualSamples( UInt uiPartIdx, 524 #if QC_SIMPLIFIEDIVRP_M24938 525 Bool bRecon , 526 #endif 527 TComYuv* pcYuv = 0 ); 524 528 #endif 525 529 // ------------------------------------------------------------------------------------------------------------------- -
branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.cpp
r62 r66 221 221 222 222 Bool 223 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv ) 223 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv 224 #if QC_SIMPLIFIEDIVRP_M24938 225 , Bool bRecon 226 #endif 227 ) 224 228 { 225 229 AOF( pcCU ); … … 231 235 iBlkHeight = pcCU->getHeight ( 0 ); 232 236 pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos ); 233 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv ); 237 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv 238 #if QC_SIMPLIFIEDIVRP_M24938 239 , bRecon 240 #endif 241 ); 234 242 } 235 243 236 244 Bool 237 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv ) 245 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 246 #if QC_SIMPLIFIEDIVRP_M24938 247 , Bool bRecon 248 #endif 249 ) 238 250 { 239 251 UInt uiBaseViewId = m_pcDepthMapGenerator->getBaseViewId( 0 ); … … 243 255 pcYuv = m_ppcYuvTmp[1]; 244 256 } 245 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv ); 257 #if QC_SIMPLIFIEDIVRP_M24938 258 UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos; 259 #endif 260 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv 261 #if QC_SIMPLIFIEDIVRP_M24938 262 , &uiXPosInRefView , &uiYPosInRefView , bRecon 263 #endif 264 ); 265 266 #if QC_SIMPLIFIEDIVRP_M24938 267 return xIsNonZeroByCBF( uiBaseViewId , uiXPosInRefView , uiYPosInRefView , uiBlkWidth , uiBlkHeight ); 268 #else 246 269 return xIsNonZero( pcYuv, uiBlkWidth, uiBlkHeight ); 247 } 270 #endif 271 } 272 273 #if QC_SIMPLIFIEDIVRP_M24938 274 Bool TComResidualGenerator::xIsNonZeroByCBF( UInt uiBaseViewId , UInt uiXPos , UInt uiYPos, UInt uiBlkWidth , UInt uiBlkHeight ) 275 { 276 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseViewId ); 277 const Int nMaxPicX = pcBasePic->getSPS()->getPicWidthInLumaSamples() - 1; 278 const Int nMaxPicY = pcBasePic->getSPS()->getPicHeightInLumaSamples() - 1; 279 for( UInt y = 0 ; y < uiBlkHeight ; y +=4 ) 280 { 281 for( UInt x = 0 ; x <= uiBlkWidth ; x += 4 ) 282 { // to cover both the mapped CU and the 1-pixel-right-shifted mapped CU 283 Int iCuAddr = 0, iAbsZorderIdx = 0; 284 pcBasePic->getPicYuvRec()->getCUAddrAndPartIdx( Min( uiXPos + x , nMaxPicX ) , Min( uiYPos + y , nMaxPicY ) , iCuAddr , iAbsZorderIdx ); 285 TComDataCU *pCUInRefView = pcBasePic->getCU( iCuAddr ); 286 if( pCUInRefView->isIntra( iAbsZorderIdx ) ) 287 // no inter-view residual pred from a intra CU 288 continue; 289 UInt uiTempTrDepth = pCUInRefView->getTransformIdx( iAbsZorderIdx ); 290 if( pCUInRefView->getCbf( iAbsZorderIdx , TEXT_LUMA , uiTempTrDepth ) 291 || pCUInRefView->getCbf( iAbsZorderIdx , TEXT_CHROMA_U , uiTempTrDepth ) 292 || pCUInRefView->getCbf( iAbsZorderIdx , TEXT_CHROMA_V , uiTempTrDepth ) ) 293 return( true ); 294 } 295 } 296 297 return( false ); 298 } 299 #endif 248 300 249 301 … … 364 416 { 365 417 AOF( pcCU->getResPredAvail( 0 ) ); 366 Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvTmp[0] ); 418 Bool bOK = pcCU->getResidualSamples( 0, 419 #if QC_SIMPLIFIEDIVRP_M24938 420 true, 421 #endif 422 m_ppcYuvTmp[0] ); 367 423 AOF( bOK ); 368 424 #if LG_RESTRICTEDRESPRED_M24766 … … 431 487 432 488 Void 433 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv ) 489 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 490 #if QC_SIMPLIFIEDIVRP_M24938 491 , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon 492 #endif 493 ) 434 494 { 435 495 //===== set and check some basic variables ===== … … 464 524 Pel* pSrcSamplesY= pcBaseRes->getLumaAddr ( 0 ) + uiYPos * iSrcStrideY; 465 525 Pel* pDesSamplesY= pcYuv ->getLumaAddr (); 526 527 #if QC_SIMPLIFIEDIVRP_M24938 528 if( puiXPosInRefView != NULL ) 529 *puiXPosInRefView = Max( 0, Min( iYMaxPosX, iYRefPosX0 ) ); 530 if( puiYPosInRefView != NULL ) 531 *puiYPosInRefView = uiYPos; 532 if( bRecon == false ) 533 return; 534 #endif 535 466 536 for( Int iY = 0; iY < iYHeight; iY++, pSrcSamplesY += iSrcStrideY, pDesSamplesY += iDesStrideY ) 467 537 { -
branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.h
r5 r66 69 69 Void setRecResidualPic ( TComPic* pcPic ); 70 70 71 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv ); 72 Bool getResidualSamples ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv ); 71 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv 72 #if QC_SIMPLIFIEDIVRP_M24938 73 , Bool bRecon 74 #endif 75 ); 76 Bool getResidualSamples ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 77 #if QC_SIMPLIFIEDIVRP_M24938 78 , Bool bRecon 79 #endif 80 ); 73 81 74 82 private: … … 80 88 Void xClearResidual ( TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight ); 81 89 82 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv ); 90 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 91 #if QC_SIMPLIFIEDIVRP_M24938 92 , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon 93 #endif 94 ); 83 95 Bool xIsNonZero ( TComYuv* pcYuv, UInt uiBlkWidth, UInt uiBlkHeight ); 96 #if QC_SIMPLIFIEDIVRP_M24938 97 Bool xIsNonZeroByCBF ( UInt uiBaseViewId , UInt uiXPos , UInt uiYPos, UInt uiBlkWidth , UInt uiBlkHeight ); 98 #endif 84 99 85 100 Void xDumpResidual ( TComPic* pcPic, char* pFilenameBase ); -
branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComRom.cpp
r56 r66 1188 1188 assert( uiWidth == uiHeight ); 1189 1189 1190 UChar uhStartX , uhStartY, uhEndX, uhEndY;1191 Int iStepStartX , iStepStartY, iStepEndX, iStepEndY;1190 UChar uhStartX = 0, uhStartY = 0, uhEndX = 0, uhEndY = 0; 1191 Int iStepStartX = 0, iStepStartY = 0, iStepEndX = 0, iStepEndY = 0; 1192 1192 1193 1193 UInt uiBlockSize = 0; -
branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r62 r66 70 70 #if HHI_INTER_VIEW_RESIDUAL_PRED 71 71 #define LG_RESTRICTEDRESPRED_M24766 1 // restricted inter-view residual prediction 72 #define QC_SIMPLIFIEDIVRP_M24938 1 72 73 #else 73 74 #define LG_RESTRICTEDRESPRED_M24766 0 75 #define QC_SIMPLIFIEDIVRP_M24938 0 74 76 #endif 75 77 … … 755 757 }; 756 758 757 758 759 //! \} 759 760 -
branches/HTM-3.0-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp
r62 r66 636 636 { 637 637 AOF( pcCU->getResPredAvail( 0 ) ); 638 Bool bOK = pcCU->getResidualSamples( 0, m_ppcYuvResPred[uiDepth] ); 638 Bool bOK = pcCU->getResidualSamples( 0, 639 #if QC_SIMPLIFIEDIVRP_M24938 640 true, 641 #endif 642 m_ppcYuvResPred[uiDepth] ); 639 643 AOF( bOK ); 640 644 #if LG_RESTRICTEDRESPRED_M24766 -
branches/HTM-3.0-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp
r62 r66 98 98 if( bResPredAllowed ) 99 99 { 100 bResPredAvailable = pcSubCU->getResidualSamples( uiPUIdx ); 100 bResPredAvailable = pcSubCU->getResidualSamples( uiPUIdx 101 #if QC_SIMPLIFIEDIVRP_M24938 102 , false 103 #endif 104 ); 101 105 } 102 106 -
branches/HTM-3.0-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
r65 r66 604 604 if( bResPredAllowed ) 605 605 { 606 bResPredAvailable = rpcBestCU->getResidualSamples( 0, m_ppcResPredTmp[uiDepth] ); 606 bResPredAvailable = rpcBestCU->getResidualSamples( 0, 607 #if QC_SIMPLIFIEDIVRP_M24938 608 true , 609 #endif 610 m_ppcResPredTmp[uiDepth] ); 607 611 } 608 612 … … 698 702 if( bResPredAllowed ) 699 703 { 700 bResPredAvailable = rpcBestCU->getResidualSamples( 0, m_ppcResPredTmp[uiDepth] ); 704 bResPredAvailable = rpcBestCU->getResidualSamples( 0, 705 #if QC_SIMPLIFIEDIVRP_M24938 706 true, 707 #endif 708 m_ppcResPredTmp[uiDepth] ); 701 709 } 702 710
Note: See TracChangeset for help on using the changeset viewer.