Changeset 66 in 3DVCSoftware for branches/HTM-3.0-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.cpp
- Timestamp:
- 22 May 2012, 00:18:14 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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 {
Note: See TracChangeset for help on using the changeset viewer.