Changeset 91 in 3DVCSoftware for branches/HTM-3.1-Qualcomm
- Timestamp:
- 1 Jul 2012, 08:23:26 (12 years ago)
- Location:
- branches/HTM-3.1-Qualcomm/source/Lib
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/CommonDef.h
r77 r91 138 138 #define PDM_NO_INTER_UPDATE 1 // no update for inter (but not inter-view) predicted blocks 139 139 #define PDM_MERGE_POS 0 // position of pdm in merge list (0..4) 140 #if SAIT_IMPROV_MOTION_PRED_M24829 140 #if SAIT_IMPROV_MOTION_PRED_M24829&!QC_MULTI_DIS_CAN 141 141 #define PDM_AMVP_POS 0 // position of pdm in amvp list (0..3) 142 142 #else -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r81 r91 3358 3358 TComMv acPdmMv [2]; 3359 3359 Int aiPdmRefIdx [2] = {-1, -1}; 3360 #if QC_MULTI_DIS_CAN 3361 DisInfo cDisInfo; 3362 cDisInfo.iN = 0; 3363 if(!bNoPdmMerge) 3364 getDisMvpCand (uiPUIdx, uiAbsPartIdx, &cDisInfo ); 3365 if(cDisInfo.iN==0) 3366 { 3367 cDisInfo.iN = 1; 3368 cDisInfo.m_acMvCand[0].setHor(0); 3369 cDisInfo.m_acMvCand[0].setVer(0); 3370 cDisInfo.m_aVIdxCan[0] = 0; 3371 } 3372 Int iPdmInterDir = cDisInfo.iN==0? 0:getPdmMergeCandidateDisCan ( uiPUIdx, aiPdmRefIdx, acPdmMv, &cDisInfo ); 3373 #else 3360 3374 Int iPdmInterDir = getPdmMergeCandidate( uiPUIdx, aiPdmRefIdx, acPdmMv ); 3375 #endif 3361 3376 3362 3377 if( iPdmInterDir && !bNoPdmMerge && PDM_MERGE_POS == 0 ) … … 4274 4289 return m_pcSlice->getSPS()->getAMVPMode(m_puhDepth[uiIdx]); 4275 4290 } 4291 #if QC_MULTI_DIS_CAN 4292 /** construct a list of disparity motion vectors from the neighbouring PUs **/ 4293 Void TComDataCU::getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr,DisInfo* pDInfo ) 4294 { 4295 PartSize eCUMode = getPartitionSize( uiPartAddr ); 4296 TComDataCU* pcTmpCU = NULL; 4297 pDInfo->iN = 0; 4298 4299 RefPicList eRefPicList = REF_PIC_LIST_0 ; 4300 //-- Get Spatial MV 4301 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 4302 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 4303 4304 deriveLeftRightTopIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLT, uiPartIdxRT ); 4305 deriveLeftBottomIdxGeneral( eCUMode, uiPartAddr, uiPartIdx, uiPartIdxLB ); 4306 4307 UInt uiIdx = 0; 4308 #if MVP_AT_ENTROPYSLICE_BOUNDARY 4309 pcTmpCU = getPULeft(uiIdx, uiPartIdxLB, true, false); 4310 #else 4311 pcTmpCU = getPULeft(uiIdx, uiPartIdxLB); 4312 #endif 4313 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4314 { 4315 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 4316 { 4317 eRefPicList = RefPicList(iList); 4318 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ; 4319 if( refId >= 0) 4320 { 4321 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4322 if (refViewIdx!= m_pcSlice->getViewId()) 4323 { 4324 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 4325 clipMv(cMvPred); 4326 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 4327 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; 4328 return; 4329 } 4330 } 4331 } 4332 } 4333 #if MVP_AT_ENTROPYSLICE_BOUNDARY 4334 pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT, true, false, true); 4335 #else 4336 pcTmpCU = getPUAbove(uiIdx, uiPartIdxRT); 4337 #endif 4338 4339 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4340 { 4341 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 4342 { 4343 eRefPicList = RefPicList(iList); 4344 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ; 4345 if( refId >= 0) 4346 { 4347 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4348 if (refViewIdx!= m_pcSlice->getViewId()) 4349 { 4350 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 4351 clipMv(cMvPred); 4352 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 4353 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; 4354 return; 4355 } 4356 } 4357 } 4358 } 4359 4360 #if MVP_AT_ENTROPYSLICE_BOUNDARY 4361 pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, false, true); 4362 #else 4363 pcTmpCU = getPUAboveRight(uiIdx, uiPartIdxRT, true, true, true); 4364 #endif 4365 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4366 { 4367 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 4368 { 4369 eRefPicList = RefPicList(iList); 4370 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ; 4371 if( refId >= 0) 4372 { 4373 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4374 if (refViewIdx!= m_pcSlice->getViewId()) 4375 { 4376 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 4377 clipMv(cMvPred); 4378 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 4379 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; 4380 return; 4381 } 4382 } 4383 } 4384 } 4385 #if MVP_AT_ENTROPYSLICE_BOUNDARY 4386 pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB, true, false); 4387 #else 4388 pcTmpCU = getPUBelowLeft(uiIdx, uiPartIdxLB); 4389 #endif 4390 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4391 { 4392 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 4393 { 4394 eRefPicList = RefPicList(iList); 4395 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ; 4396 if( refId >= 0) 4397 { 4398 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4399 if (refViewIdx!= m_pcSlice->getViewId()) 4400 { 4401 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 4402 clipMv(cMvPred); 4403 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 4404 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; 4405 return; 4406 } 4407 } 4408 } 4409 } 4410 4411 // Above predictor search 4412 #if MVP_AT_ENTROPYSLICE_BOUNDARY 4413 pcTmpCU = getPUAboveLeft(uiIdx, (m_uiAbsIdxInLCU + uiPartAddr), true, false, true); 4414 assert(uiPartIdxLT == (m_uiAbsIdxInLCU + uiPartAddr)); 4415 #else 4416 pcTmpCU = getPUAboveLeft(uiIdx, uiPartIdxLT, true, true, true); 4417 #endif 4418 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4419 { 4420 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) 4421 { 4422 eRefPicList = RefPicList(iList); 4423 Int refId = pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ; 4424 if( refId >= 0) 4425 { 4426 Int refViewIdx = pcTmpCU->getSlice()->getRefViewId( eRefPicList, refId); 4427 if (refViewIdx!= m_pcSlice->getViewId()) 4428 { 4429 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); 4430 clipMv(cMvPred); 4431 pDInfo->m_acMvCand[ pDInfo->iN] = cMvPred; 4432 pDInfo->m_aVIdxCan[ pDInfo->iN++] = refViewIdx; 4433 return; 4434 } 4435 } 4436 } 4437 } 4438 //Get temporal MV 4439 TComMv cColMv; 4440 Int iTargetViewIdx = 0; 4441 Int iTStartViewIdx = 0; 4442 UInt uiPartIdxRB, uiBRIdx; 4443 Int uiViewIdxCurr= getSlice()->getViewId(); 4444 4445 UInt uiAbsPartAddr; 4446 int uiLCUIdx = getAddr(); 4447 Int uiLCUnew = uiLCUIdx; 4448 eCUMode = getPartitionSize( 0 ); 4449 deriveRightBottomIdx( eCUMode, uiPartIdx, uiPartIdxRB ); 4450 uiBRIdx = uiPartIdxLT; 4451 UInt uiAbsPartIdxTmp = g_auiZscanToRaster[uiPartIdxRB]; 4452 if ( (( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) < m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) &&(( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) < m_pcSlice->getSPS()->getPicHeightInLumaSamples() )) // image boundary check 4453 { 4454 if ( ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) && // is not at the last column of LCU 4455 ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) ) // is not at the last row of LCU 4456 { 4457 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + uiNumPartInCUWidth + 1 ]; 4458 } 4459 else if ( uiAbsPartIdxTmp % uiNumPartInCUWidth < uiNumPartInCUWidth - 1 ) // is not at the last column of LCU But is last row of LCU 4460 { 4461 uiBRIdx = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 4462 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU(); 4463 } 4464 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU 4465 { 4466 uiBRIdx = g_auiRasterToZscan[ uiAbsPartIdxTmp + 1 ]; 4467 uiLCUnew = uiLCUIdx + 1; 4468 } 4469 else //is the right bottom corner of LCU 4470 { 4471 uiBRIdx = 0; 4472 uiLCUnew = uiLCUIdx + m_pcPic->getFrameWidthInCU() + 1; 4473 } 4474 } 4475 4476 Int MaxRef = getSlice()->getNumRefIdx(RefPicList(0)); 4477 UInt uiNumPartInCUHeight = m_pcPic->getNumPartInHeight(); 4478 UInt uiPUVert = (UInt)((Int)g_auiZscanToRaster[uiPartIdxLB]/(Int)(uiNumPartInCUWidth)-(Int)g_auiZscanToRaster[uiPartIdxLT]/(Int)(uiNumPartInCUWidth)); 4479 UInt uiPUHorStart = g_auiZscanToRaster[uiPartIdxLT]; 4480 UInt uiPUHorEnd = g_auiZscanToRaster[uiPartIdxRT]; 4481 for( Int i= 0; i< getSlice()->getNumRefIdx(RefPicList(0)); i ++) 4482 { 4483 getSlice()->getRefPic( RefPicList(0), i)->setCandPicCheckedFlag(0); 4484 } 4485 for( Int i= 0; i< getSlice()->getNumRefIdx(RefPicList(1)); i ++) 4486 { 4487 getSlice()->getRefPic( RefPicList(1), i)->setCandPicCheckedFlag(0); 4488 } 4489 { 4490 //check the col-located picture 4491 eRefPicList = RefPicList(getSlice()->isInterB() ? getSlice()->getColDir() : 0); 4492 #if COLLOCATED_REF_IDX 4493 Int lpRef = getSlice()->getColRefIdx(); 4494 #else 4495 Int lpRef = 0; 4496 #endif 4497 if( m_pcSlice->getViewId() == getSlice()->getRefPic( eRefPicList, lpRef)->getViewId() ) 4498 { 4499 if (uiViewIdxCurr > 1) 4500 { 4501 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 4502 { 4503 clipMv(cColMv); 4504 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4505 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4506 return ; 4507 } 4508 } 4509 for(UInt uiLoopVert = 0; uiLoopVert <= uiPUVert; uiLoopVert+=4) 4510 for( uiIdx = uiPUHorStart; uiIdx <= uiPUHorEnd; uiIdx +=4 ) 4511 { 4512 uiAbsPartAddr = g_auiRasterToZscan[uiIdx+uiNumPartInCUWidth*uiLoopVert]; 4513 if ( uiLCUIdx >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetViewIdx, iTStartViewIdx ) ) 4514 { 4515 clipMv(cColMv); 4516 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4517 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4518 return ; 4519 } 4520 } 4521 for(UInt uiIdx_y = 0; uiIdx_y <uiNumPartInCUHeight; uiIdx_y +=4 ) 4522 for(UInt uiIdx_X = 0; uiIdx_X <uiNumPartInCUWidth; uiIdx_X +=4 ) 4523 { 4524 uiIdx = uiIdx_X + uiIdx_y * uiNumPartInCUWidth; 4525 uiAbsPartAddr = g_auiRasterToZscan[uiIdx]; 4526 if ( uiLCUIdx >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetViewIdx, iTStartViewIdx ) ) 4527 { 4528 clipMv(cColMv); 4529 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4530 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4531 return ; 4532 } 4533 } 4534 if (uiViewIdxCurr == 1) 4535 { 4536 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 4537 { 4538 clipMv(cColMv); 4539 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4540 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4541 return ; 4542 } 4543 } 4544 } 4545 getSlice()->getRefPic( eRefPicList, lpRef)->setCandPicCheckedFlag(1); 4546 } 4547 { 4548 //check the remaining reference pictures in list0 and list1 4549 if(getSlice()->isInterB()) 4550 { 4551 if(getSlice()->getNumRefIdx(RefPicList(0))< getSlice()->getNumRefIdx(RefPicList(1))) 4552 MaxRef = getSlice()->getNumRefIdx(RefPicList(1)); 4553 } 4554 for(Int lpRef = 0; lpRef < MaxRef; lpRef++) 4555 { 4556 for(Int lpNr = 0; lpNr < (getSlice()->isInterB() ? 2: 1); lpNr ++) 4557 { 4558 eRefPicList = RefPicList(0); 4559 if(getSlice()->isInterB()) 4560 eRefPicList = RefPicList(lpNr==0 ? (getSlice()->getColDir()): (1-getSlice()->getColDir())); 4561 if(getSlice()->getRefPic( eRefPicList, lpRef)->getCandPicCheckedFlag()) 4562 continue; 4563 4564 if(lpRef >= getSlice()->getNumRefIdx(eRefPicList)||(m_pcSlice->getViewId() != getSlice()->getRefPic( eRefPicList, lpRef)->getViewId())) 4565 continue; 4566 if (uiViewIdxCurr > 1 ) 4567 { 4568 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 4569 { 4570 clipMv(cColMv); 4571 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4572 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4573 return ; 4574 } 4575 } 4576 for(UInt uiLoopVert = 0; uiLoopVert <= uiPUVert; uiLoopVert += 4) 4577 for( uiIdx = uiPUHorStart; uiIdx <= uiPUHorEnd; uiIdx += 4 ) 4578 { 4579 uiAbsPartAddr = g_auiRasterToZscan[uiIdx+uiNumPartInCUWidth*uiLoopVert]; 4580 if ( uiLCUIdx >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetViewIdx, iTStartViewIdx ) ) 4581 { 4582 clipMv(cColMv); 4583 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4584 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4585 return ; 4586 } 4587 } 4588 for(UInt uiIdx_y = 0; uiIdx_y <uiNumPartInCUHeight; uiIdx_y += 4 ) 4589 for(UInt uiIdx_X = 0; uiIdx_X <uiNumPartInCUWidth; uiIdx_X += 4 ) 4590 { 4591 uiIdx = uiIdx_X + uiIdx_y * uiNumPartInCUWidth; 4592 uiAbsPartAddr = g_auiRasterToZscan[uiIdx]; 4593 if ( uiLCUIdx >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUIdx, uiAbsPartAddr, cColMv, iTargetViewIdx, iTStartViewIdx ) ) 4594 { 4595 clipMv(cColMv); 4596 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4597 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4598 return ; 4599 } 4600 } 4601 if (uiViewIdxCurr == 1 ) 4602 { 4603 if( (uiLCUnew >= 0 && xGetColDisMV( eRefPicList, lpRef, uiLCUnew, uiBRIdx, cColMv, iTargetViewIdx, iTStartViewIdx)) ) 4604 { 4605 clipMv(cColMv); 4606 pDInfo->m_acMvCand[pDInfo->iN] = cColMv; 4607 pDInfo->m_aVIdxCan[pDInfo->iN++] = iTargetViewIdx; 4608 return ; 4609 } 4610 } 4611 getSlice()->getRefPic( eRefPicList, lpRef)->setCandPicCheckedFlag(1); 4612 }//reference lists 4613 }//reference indices 4614 }//remaining pictures 4615 } 4616 #endif 4276 4617 4277 4618 /** Constructs a list of candidates for AMVP … … 4295 4636 } 4296 4637 4638 #if QC_MULTI_DIS_CAN 4639 DisInfo cDisInfo; 4640 cDisInfo.iN = 0; 4641 if(m_pcSlice->getSPS()->getViewId() && m_pcSlice->getSPS()->getMultiviewMvPredMode()) 4642 getDisMvpCand (uiPartIdx, uiPartAddr, &cDisInfo ); 4643 if(cDisInfo.iN==0) 4644 { 4645 cDisInfo.iN = 1; 4646 cDisInfo.m_acMvCand[0].setHor(0); 4647 cDisInfo.m_acMvCand[0].setVer(0); 4648 cDisInfo.m_aVIdxCan[0] = 0; 4649 } 4650 #endif 4297 4651 #if HHI_INTER_VIEW_MOTION_PRED 4298 4652 #if ( PDM_AMVP_POS == 0 ) 4299 4653 // get inter-view mv predictor (at position 0) 4300 4654 TComMv cPdmMvPred; 4655 #if QC_MULTI_DIS_CAN 4656 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 4657 #else 4301 4658 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 4659 #endif 4302 4660 { 4303 4661 clipMv( cPdmMvPred ); … … 4354 4712 // get inter-view mv predictor (at position 1) 4355 4713 TComMv cPdmMvPred; 4714 #if QC_MULTI_DIS_CAN 4715 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 4716 #else 4356 4717 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 4718 #endif 4357 4719 { 4358 4720 clipMv( cPdmMvPred ); … … 4402 4764 // get inter-view mv predictor (at position 2) 4403 4765 TComMv cPdmMvPred; 4766 #if QC_MULTI_DIS_CAN 4767 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 4768 #else 4404 4769 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 4770 #endif 4405 4771 { 4406 4772 clipMv( cPdmMvPred ); … … 4418 4784 } 4419 4785 } 4786 #if QC_MULTI_DIS_CAN 4787 if ( getSlice()->getViewId()!=0 && pInfo->iN == 3 ) 4788 { 4789 if ( pInfo->m_acMvCand[ 1 ] == pInfo->m_acMvCand[ 2 ] ) 4790 { 4791 pInfo->iN = 2; 4792 if( pInfo->m_acMvCand[ 0 ] == pInfo->m_acMvCand[ 1 ] ) 4793 pInfo->iN = 1; 4794 }else 4795 { 4796 if( pInfo->m_acMvCand[ 0 ] == pInfo->m_acMvCand[ 1 ] ) 4797 { 4798 pInfo->m_acMvCand[1 ] = pInfo->m_acMvCand[ 2 ]; 4799 pInfo->iN = 2; 4800 } 4801 else if (pInfo->m_acMvCand[ 0 ] == pInfo->m_acMvCand[ 2 ]) 4802 pInfo->iN = 2; 4803 } 4804 } 4805 #endif 4420 4806 #endif 4421 4807 … … 4488 4874 // get inter-view mv predictor (at position 3) 4489 4875 TComMv cPdmMvPred; 4876 #if QC_MULTI_DIS_CAN 4877 if( getPdmMvPredDisCan( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred, &cDisInfo ) ) 4878 #else 4490 4879 if( getPdmMvPred( uiPartIdx, eRefPicList, iRefIdx, cPdmMvPred ) ) 4880 #endif 4491 4881 { 4492 4882 clipMv( cPdmMvPred ); … … 4908 5298 } 4909 5299 5300 #if QC_MULTI_DIS_CAN 5301 Bool TComDataCU::xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv , Int & iTargetViewIdx, Int & iStartViewIdx ) 5302 { 5303 5304 UInt uiAbsPartAddr = uiPartUnitIdx; 5305 5306 RefPicList eColRefPicList = REF_PIC_LIST_0; 5307 Int iColViewIdx, iColRefViewIdx, iCurrViewIdx; 5308 iCurrViewIdx = m_pcSlice->getViewId(); 5309 TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx); 5310 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 5311 iColViewIdx = pColCU->getSlice()->getViewId(); 5312 5313 if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE||pColCU->isIntra(uiAbsPartAddr)) 5314 { 5315 return false; 5316 } 5317 for (Int ilist = 0; ilist < (pColCU->getSlice()->isInterB()? 2:1); ilist++) 5318 { 5319 if(pColCU->getSlice()->isInterB()) 5320 { 5321 if(ilist == 0 ) 5322 eColRefPicList = getSlice()->getCheckLDC() ? eRefPicList : RefPicList(1-getSlice()->getColDir()); 5323 else 5324 eColRefPicList = getSlice()->getCheckLDC() ? (eRefPicList== REF_PIC_LIST_0? REF_PIC_LIST_1:REF_PIC_LIST_0 ): RefPicList(getSlice()->getColDir()); 5325 } 5326 int iColRefIdx = pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr); 5327 if (iColRefIdx < 0) 5328 { 5329 continue; 5330 } 5331 iColRefViewIdx = pColCU->getSlice()->getRefPic(eColRefPicList, iColRefIdx)->getViewId(); 5332 if ( iColViewIdx == iColRefViewIdx ) // temporal vector 5333 continue; 5334 else 5335 { 5336 rcMv = pColCU->getCUMvField(eColRefPicList)->getMv(uiAbsPartAddr); 5337 iTargetViewIdx = iColRefViewIdx ; 5338 iStartViewIdx = iColViewIdx ; 5339 return true; 5340 } 5341 } 5342 return false; 5343 } 5344 #endif 4910 5345 /** 4911 5346 * \param eRefPicList … … 5951 6386 // ------------------------------------------------------------------------------------------------------------------- 5952 6387 #if HHI_INTER_VIEW_MOTION_PRED 6388 #if !QC_MULTI_DIS_CAN 5953 6389 Int 5954 6390 TComDataCU::getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ) … … 5967 6403 return pcDepthMapGenerator->getPdmMvPred( this, uiPartIdx, eRefPicList, iRefIdx, rcMv, bMerge ); 5968 6404 } 6405 #else 6406 Int 6407 TComDataCU::getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 6408 { 6409 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator(); 6410 ROFRS( pcDepthMapGenerator, 0 ); 6411 return pcDepthMapGenerator->getPdmMergeCandidate( this, uiPartIdx, paiPdmRefIdx, pacPdmMv, pDInfo ); 6412 } 6413 Bool 6414 TComDataCU::getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ) 6415 { 6416 TComDepthMapGenerator* pcDepthMapGenerator = m_pcSlice->getSPS()->getDepthMapGenerator(); 6417 ROFRS( pcDepthMapGenerator, false ); 6418 if (pDInfo->iN > 0 && pcDepthMapGenerator->getDisCanPdmMvPred(this, uiPartIdx, eRefPicList, iRefIdx, rcMv, pDInfo, bMerge )) //bug fix li 6419 return true; 6420 return false; 6421 } 6422 #endif 5969 6423 5970 6424 … … 5988 6442 TComResidualGenerator* pcResidualGenerator = m_pcSlice->getSPS()->getResidualGenerator(); 5989 6443 ROFRS( pcResidualGenerator, false ); 6444 #if QC_MULTI_DIS_CAN 6445 DisInfo cDisInfo; 6446 cDisInfo.iN = 0; 6447 PartSize m_peSaved = getPartitionSize( 0 ); 6448 m_pePartSize[0] = SIZE_2Nx2N; 6449 getDisMvpCand ( 0, 0, &cDisInfo ); 6450 if( cDisInfo.iN == 0) 6451 { 6452 m_pePartSize[0] = m_peSaved; 6453 return false; 6454 } 6455 else 6456 { 6457 Bool bAvailable = pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv, cDisInfo.m_acMvCand[0].getHor() 6458 #if QC_SIMPLIFIEDIVRP_M24938 6459 , bRecon 6460 #endif 6461 ); 6462 m_pePartSize[0] = m_peSaved; 6463 return bAvailable; 6464 } 6465 #else 5990 6466 return pcResidualGenerator->getResidualSamples( this, uiPartIdx, pcYuv 5991 6467 #if QC_SIMPLIFIEDIVRP_M24938 … … 5993 6469 #endif 5994 6470 ); 6471 #endif 5995 6472 } 5996 6473 #endif -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r77 r91 256 256 Void deriveRightBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB ); 257 257 Bool xGetColMVP( RefPicList eRefPicList, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int& riRefIdx ); 258 #if QC_MULTI_DIS_CAN 259 Bool xGetColDisMV( RefPicList eRefPicList, Int refidx, Int uiCUAddr, Int uiPartUnitIdx, TComMv& rcMv, Int & iTargetViewIdx, Int & iStartViewIdx ); 260 #endif 258 261 259 262 #if !AMVP_PRUNING_SIMPLIFICATION … … 503 506 504 507 #if HHI_INTER_VIEW_MOTION_PRED 508 #if !QC_MULTI_DIS_CAN 505 509 Int getPdmMergeCandidate( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); 506 510 Bool getPdmMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge = false ); 511 #else 512 Bool getPdmMvPredDisCan( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge = false ); 513 Int getPdmMergeCandidateDisCan( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 514 Void getDisMvpCand ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDInfo ); 515 #endif 507 516 Bool getIViewOrgDepthMvPred( UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv ); 508 517 #endif -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r77 r91 78 78 m_uiSubSampExpX = uiSubSampExpX; 79 79 m_uiSubSampExpY = uiSubSampExpY; 80 #if !QC_MULTI_DIS_CAN 80 81 m_ppcYuv = new TComYuv* [ m_uiMaxDepth ]; 81 82 m_ppcCU = new TComDataCU* [ m_uiMaxDepth ]; … … 91 92 m_cTmpPic.create( uiPicWidth >> m_uiSubSampExpX, uiPicHeight >> m_uiSubSampExpY, uiMaxCUWidth >> m_uiSubSampExpX, uiMaxCUHeight >> m_uiSubSampExpY, uiMaxCUDepth ); 92 93 xSetChroma( &m_cTmpPic, ( 1 << uiOrgBitDepth ) >> 1 ); 94 #endif 93 95 m_bCreated = true; 94 96 } … … 100 102 { 101 103 m_bCreated = false; 104 #if !QC_MULTI_DIS_CAN 102 105 for( UInt uiDepth = 0; uiDepth < m_uiMaxDepth; uiDepth++ ) 103 106 { … … 114 117 delete [] m_ppcCU; m_ppcCU = 0; 115 118 m_cTmpPic.destroy(); 119 #endif 116 120 m_uiMaxDepth = 0; 117 121 m_uiOrgDepthBitDepth = 0; … … 178 182 179 183 // set basic SPS parameters 184 //#if !QC_MULTI_DIS_CAN 180 185 const Int iDisparityDir = 1; // 1 or -1, depending on the usage of disparity vectors 186 //#endif 181 187 TComSPS* pcSPS = pcPic->getSPS (); 182 188 Int iVOI = pcSPS->getViewOrderIdx (); 189 //#if !QC_MULTI_DIS_CAN 183 190 UInt uiPdmPrec = pcSPS->getPdmPrecision (); 184 191 UInt uiCamPrec = pcSPS->getCamParPrecision (); 185 192 Bool bInSlice = pcSPS->hasCamParInSliceHeader (); 186 193 Int iScaleVOI01 = ( 1 << ( uiPdmPrec + PDM_INTER_CALC_SHIFT + PDM_VIRT_DEPTH_PRECISION - 2 ) ); 187 194 //#endif 188 195 // check availability of base views and set base id list 189 196 std::vector<Int> aiAbsDeltaVOI; … … 214 221 aiAbsDeltaVOI[ uiNextBaseId ] = 0; 215 222 } 216 223 //#if !QC_MULTI_DIS_CAN 217 224 // check availability of prediction depth map 218 225 if( m_uiCurrViewId ) … … 365 372 } 366 373 #endif 367 } 368 369 374 //#else 375 // if( m_uiCurrViewId ) 376 // { 377 // Bool bCheckVId1 = ( m_uiCurrViewId > 1 && m_auiBaseIdList[0] == 0 ); 378 // UInt uiBaseVId = ( bCheckVId1 ? 1 : m_auiBaseIdList[0] ); 379 // TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseVId ); 380 // SliceType eSliceType = pcBasePic->getCurrSlice()->getSliceType(); 381 // Bool bNoRAPdm = ( pcPic->getSPS()->getPredDepthMapGeneration() == 1 ); 382 // m_bPDMAvailable = ( eSliceType != I_SLICE || !bNoRAPdm ); 383 //} 384 //#endif 385 386 } 387 388 #if !QC_MULTI_DIS_CAN 370 389 Bool 371 390 TComDepthMapGenerator::predictDepthMap( TComPic* pcPic ) … … 520 539 m_cTmpPic.dump( acFilename, ( pcPic->getPOC() != 0 ) ); 521 540 } 522 541 #endif 523 542 524 543 #if HHI_INTER_VIEW_MOTION_PRED … … 563 582 564 583 #if HHI_INTER_VIEW_MOTION_PRED 584 #if QC_MULTI_DIS_CAN 585 Int 586 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ) 587 #else 565 588 Int 566 589 TComDepthMapGenerator::getPdmMergeCandidate( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ) 590 #endif 567 591 { 568 592 Int iMaxNumInterPics = 1; … … 580 604 if( pcCU->getSlice()->getRefPOC( eRefPicList, iPdmRefIdx ) != pcCU->getSlice()->getPOC() ) 581 605 { 606 #if QC_MULTI_DIS_CAN 607 if( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) ) 608 #else 582 609 if( getPdmMvPred( pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, true ) ) 610 #endif 583 611 { 584 612 pcCU->clipMv( cMv ); … … 602 630 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 603 631 { 632 #if QC_MULTI_DIS_CAN 633 if ( getDisCanPdmMvPred (pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, pDInfo, true ) ) 634 #else 604 635 if( getPdmMvPred( pcCU, uiPartIdx, eRefPicList, iPdmRefIdx, cMv, true ) ) 636 #endif 605 637 { 606 638 pcCU->clipMv( cMv ); … … 617 649 } 618 650 619 651 #if QC_MULTI_DIS_CAN 652 Bool 653 TComDepthMapGenerator::getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ) 654 { 655 AOF ( m_bCreated && m_bInit ); 656 AOF ( iRefIdx >= 0 ); 657 AOF ( pcCU ); 658 //ROFRS( m_bPDMAvailable, false ); 659 TComSlice* pcSlice = pcCU->getSlice (); 660 TComSPS* pcSPS = pcSlice->getSPS(); 661 AOF ( pcSPS->getViewId() == m_uiCurrViewId ); 662 TComPic* pcRefPic = pcSlice->getRefPic( eRefPicList, iRefIdx ); 663 UInt uiRefViewId = pcRefPic->getSPS()->getViewId(); 664 Int iRefPoc = pcRefPic->getPOC(); 665 Bool bInterview = ( uiRefViewId < m_uiCurrViewId ); 666 AOT( bInterview && iRefPoc != pcSlice->getPOC() ); 667 AOT( !bInterview && iRefPoc == pcSlice->getPOC() ); 668 Bool bPdmIView = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_IVIEW ) == PDM_USE_FOR_IVIEW ); 669 Bool bPdmInter = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_INTER ) == PDM_USE_FOR_INTER ); 670 Bool bPdmMerge = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE ) == PDM_USE_FOR_MERGE ); 671 ROTRS( ( bInterview && !bMerge ) && !bPdmIView, false ); 672 ROTRS( (!bInterview && !bMerge ) && !bPdmInter, false ); 673 ROTRS( bMerge && !bPdmMerge, false ); 674 Int iCurrPosX, iCurrPosY; 675 TComMv cDisMv; 676 677 if( bInterview ) 678 { 679 rcMv = pDInfo->m_acMvCand[0]; 680 rcMv.setVer(0); 681 return true; 682 } 683 for( UInt uiBId = 0; uiBId < m_uiCurrViewId; uiBId++ ) 684 { 685 UInt uiBaseId = uiBId; //m_auiBaseIdList[ uiBId ]; 686 if (m_uiCurrViewId >1 && uiBaseId ==1 ) continue; 687 TComPic* pcBasePic = m_pcAUPicAccess->getPic( uiBaseId ); 688 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 689 UInt uiPartAddr; 690 Int iWidth; 691 Int iHeight; 692 pcCU->getPartIndexAndSize( uiPartIdx, uiPartAddr, iWidth, iHeight ); 693 pcBaseRec->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY ); 694 iCurrPosX += ( ( iWidth - 1 ) >> 1 ); 695 iCurrPosY += ( ( iHeight - 1 ) >> 1 ); 696 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (pDInfo->m_acMvCand[0].getHor() + 2 ) >> 2 ) ); 697 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (pDInfo->m_acMvCand[0].getVer() + 2 ) >> 2 )); 698 Int iBaseCUAddr; 699 Int iBaseAbsPartIdx; 700 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 701 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 702 if( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_INTER && pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) != MODE_SKIP ) 703 { 704 continue; 705 } 706 for( UInt uiBaseRefListId = 0; uiBaseRefListId < 2; uiBaseRefListId++ ) 707 { 708 RefPicList eBaseRefPicList = RefPicList( uiBaseRefListId ); 709 TComMvField cBaseMvField; 710 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 711 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 712 Int iBaseRefPoc = ( iBaseRefIdx >= 0 ? pcBaseCU->getSlice()->getRefPic( eBaseRefPicList, iBaseRefIdx )->getPOC() : -(1<<30) ); 713 if( iBaseRefIdx >= 0 && iBaseRefPoc == iRefPoc ) 714 { 715 rcMv.set( cBaseMvField.getHor(), cBaseMvField.getVer() ); 716 return true; 717 } 718 } 719 } 720 return false; 721 } 722 #else 620 723 Bool 621 724 TComDepthMapGenerator::getPdmMvPred( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge ) … … 697 800 return false; 698 801 } 802 #endif 699 803 700 804 … … 744 848 745 849 746 850 #if !QC_MULTI_DIS_CAN 747 851 /*=======================================================* 748 852 *===== =====* … … 1511 1615 return true; 1512 1616 } 1617 #endif 1513 1618 1514 1619 #endif // DEPTH_MAP_GENERATION -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComDepthMapGenerator.h
r77 r91 136 136 137 137 Void initViewComponent ( TComPic* pcPic ); 138 #if !QC_MULTI_DIS_CAN 138 139 Bool predictDepthMap ( TComPic* pcPic ); 139 140 Void updateDepthMap ( TComPic* pcPic ); 140 141 Void dumpDepthMap ( TComPic* pcPic, char* pFilenameBase ); 142 #endif 141 143 142 144 #if HHI_INTER_VIEW_MOTION_PRED … … 149 151 Int getDisparity ( TComPic* pcPic, Int iPosX, Int iPosY, UInt uiRefViewId ); 150 152 #if HHI_INTER_VIEW_MOTION_PRED 153 #if QC_MULTI_DIS_CAN 154 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo ); 155 Bool getPdmMvPredDisCan ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); 156 Bool getDisCanPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, DisInfo* pDInfo, Bool bMerge ); 157 #else 151 158 Int getPdmMergeCandidate ( TComDataCU* pcCU, UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv ); 152 159 Bool getPdmMvPred ( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv, Bool bMerge ); 160 #endif 153 161 Bool getIViewOrgDepthMvPred( TComDataCU* pcCU, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMv ); 154 162 #endif … … 163 171 private: 164 172 // picture operations 173 #if !QC_MULTI_DIS_CAN 165 174 Bool xConvertDepthMapCurr2Ref ( TComPic* pcRef, TComPic* pcCur ); 166 175 Bool xConvertDepthMapRef2Curr ( TComPic* pcCur, TComPic* pcRef ); … … 182 191 Void xInterPUDepthMapPrediction( TComDataCU* pcCU, TComYuv* pcCUDepthMap, UInt uiPartIdx ); // PU inter prediction 183 192 Bool xGetPredDepth ( TComDataCU* pcCU, UInt uiPartIdx, Int& riPrdDepth, Int* piPosX = 0, Int* piPosY = 0 ); 184 193 #endif 185 194 // conversion functions 186 195 Int xGetVirtDepthFromDisparity( UInt uiBaseId, Int iDisparity ) -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.h
r56 r91 59 59 60 60 // ==================================================================================================================== 61 #if QC_MULTI_DIS_CAN 62 typedef struct _DisCand 63 { 64 TComMv m_acMvCand[ DIS_CANS ]; ///< array of motion vector predictor candidates 65 Int m_aVIdxCan[ DIS_CANS ]; ///< array of motion vector predictor candidates 66 Int iN; ///< number of motion vector predictor candidates 67 } DisInfo; 68 #endif 61 69 // Class definition 62 70 // ==================================================================================================================== -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComPic.h
r77 r91 71 71 #if HHI_INTER_VIEW_MOTION_PRED 72 72 TComPicYuv* m_pcOrgDepthMap; // original depth map 73 #if QC_MULTI_DIS_CAN 74 Bool m_checked; 75 #endif 73 76 #endif 74 77 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 140 143 #if HHI_INTER_VIEW_MOTION_PRED 141 144 TComPicYuv* getOrgDepthMap() { return m_pcOrgDepthMap; } 145 #if QC_MULTI_DIS_CAN 146 Void setCandPicCheckedFlag (Bool bchecked) { m_checked = bchecked; } 147 Bool getCandPicCheckedFlag () { return m_checked;} 148 #endif 142 149 #endif 143 150 -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.cpp
r77 r91 219 219 } 220 220 221 221 #if QC_MULTI_DIS_CAN 222 Bool 223 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp 224 #if QC_SIMPLIFIEDIVRP_M24938 225 , Bool bRecon 226 #endif 227 ) 228 #else 222 229 Bool 223 230 TComResidualGenerator::getResidualSamples( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv … … 226 233 #endif 227 234 ) 235 #endif 228 236 { 229 237 AOF( pcCU ); … … 235 243 iBlkHeight = pcCU->getHeight ( 0 ); 236 244 pcCU->getPic()->getPicYuvRec()->getTopLeftSamplePos( pcCU->getAddr(), pcCU->getZorderIdxInCU() + uiPartAddr, iXPos, iYPos ); 245 #if QC_MULTI_DIS_CAN 246 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv, iDisp 247 #if QC_SIMPLIFIEDIVRP_M24938 248 , bRecon 249 #endif 250 ); 251 #else 237 252 return getResidualSamples( pcCU->getPic(), (UInt)iXPos, (UInt)iYPos, (UInt)iBlkWidth, (UInt)iBlkHeight, pcYuv 238 253 #if QC_SIMPLIFIEDIVRP_M24938 … … 240 255 #endif 241 256 ); 257 #endif 242 258 } 243 259 260 #if QC_MULTI_DIS_CAN 261 Bool 262 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp 263 #if QC_SIMPLIFIEDIVRP_M24938 264 , Bool bRecon 265 #endif 266 ) 267 #else 244 268 Bool 245 269 TComResidualGenerator::getResidualSamples( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv … … 248 272 #endif 249 273 ) 274 #endif 250 275 { 251 276 UInt uiBaseViewId = m_pcDepthMapGenerator->getBaseViewId( 0 ); … … 258 283 UInt uiXPosInRefView = uiXPos , uiYPosInRefView = uiYPos; 259 284 #endif 285 #if QC_MULTI_DIS_CAN 286 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv, iDisp 287 #if QC_SIMPLIFIEDIVRP_M24938 288 , &uiXPosInRefView , &uiYPosInRefView , bRecon 289 #endif 290 ); 291 #else 260 292 xSetPredResidualBlock( pcPic, uiBaseViewId, uiXPos, uiYPos, uiBlkWidth, uiBlkHeight, pcYuv 261 293 #if QC_SIMPLIFIEDIVRP_M24938 … … 263 295 #endif 264 296 ); 265 297 #endif 266 298 #if QC_SIMPLIFIEDIVRP_M24938 267 299 return xIsNonZeroByCBF( uiBaseViewId , uiXPosInRefView , uiYPosInRefView , uiBlkWidth , uiBlkHeight ); … … 485 517 486 518 487 519 #if QC_MULTI_DIS_CAN 520 Void 521 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp 522 #if QC_SIMPLIFIEDIVRP_M24938 523 , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon 524 #endif 525 ) 526 #else 488 527 Void 489 528 TComResidualGenerator::xSetPredResidualBlock( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv … … 492 531 #endif 493 532 ) 533 #endif 494 534 { 495 535 //===== set and check some basic variables ===== … … 508 548 509 549 //===== get disparity ===== 550 #if QC_MULTI_DIS_CAN 551 Int iDisparity = iDisp; 552 #else 510 553 Int iMidPosX = Int( uiXPos + ( ( uiBlkWidth - 1 ) >> 1 ) ) >> m_pcDepthMapGenerator->getSubSampExpX(); 511 554 Int iMidPosY = Int( uiYPos + ( ( uiBlkHeight - 1 ) >> 1 ) ) >> m_pcDepthMapGenerator->getSubSampExpY(); 512 555 Int iDisparity = m_pcDepthMapGenerator->getDisparity( pcPic, iMidPosX, iMidPosY, uiBaseViewId ); 513 556 #endif 514 557 //===== compensate luma ===== 515 558 Int iYWidth = Int( uiBlkWidth ); -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TComResidualGenerator.h
r77 r91 69 69 Void setRecResidualPic ( TComPic* pcPic ); 70 70 71 #if QC_MULTI_DIS_CAN 72 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv, Int iDisp 73 #if QC_SIMPLIFIEDIVRP_M24938 74 , Bool bRecon 75 #endif 76 ); 77 Bool getResidualSamples ( TComPic* pcPic, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv , Int iDisp 78 #if QC_SIMPLIFIEDIVRP_M24938 79 , Bool bRecon 80 #endif 81 ); 82 #else 71 83 Bool getResidualSamples ( TComDataCU* pcCU, UInt uiPUIdx, TComYuv* pcYuv 72 84 #if QC_SIMPLIFIEDIVRP_M24938 … … 79 91 #endif 80 92 ); 93 #endif 81 94 82 95 private: … … 87 100 Void xClearIntViewResidual ( TComDataCU* pcCU, TComYuv* pcCUResidual, UInt uiPartIdx ); 88 101 Void xClearResidual ( TComYuv* pcCUResidual, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight ); 89 102 #if QC_MULTI_DIS_CAN 103 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv, Int iDisp 104 #if QC_SIMPLIFIEDIVRP_M24938 105 , UInt * puiXPosInRefView , UInt * puiYPosInRefView , Bool bRecon 106 #endif 107 ); 108 #else 90 109 Void xSetPredResidualBlock ( TComPic* pcPic, UInt uiBaseViewId, UInt uiXPos, UInt uiYPos, UInt uiBlkWidth, UInt uiBlkHeight, TComYuv* pcYuv 91 110 #if QC_SIMPLIFIEDIVRP_M24938 … … 93 112 #endif 94 113 ); 114 #endif 95 115 Bool xIsNonZero ( TComYuv* pcYuv, UInt uiBlkWidth, UInt uiBlkHeight ); 96 116 #if QC_SIMPLIFIEDIVRP_M24938 -
branches/HTM-3.1-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r77 r91 47 47 #define HHI_INTER_VIEW_RESIDUAL_PRED 1 // inter-view residual prediction 48 48 #define HHI_FIX 1 // inter-view prediction and other fixes 49 #define QC_MULTI_DIS_CAN 1 50 #if QC_MULTI_DIS_CAN 51 #define DIS_CANS 1 52 #endif 53 49 54 50 55 #define HHI_VSO 1 -
branches/HTM-3.1-Qualcomm/source/Lib/TLibDecoder/TDecGop.cpp
r56 r91 303 303 { 304 304 m_pcDepthMapGenerator->initViewComponent( rpcPic ); 305 #if !QC_MULTI_DIS_CAN 305 306 m_pcDepthMapGenerator->predictDepthMap ( rpcPic ); 307 #endif 306 308 #if HHI_INTER_VIEW_RESIDUAL_PRED 307 309 m_pcResidualGenerator->initViewComponent( rpcPic ); … … 339 341 #endif 340 342 #if DEPTH_MAP_GENERATION 343 #if !QC_MULTI_DIS_CAN 341 344 // update virtual depth map 342 345 m_pcDepthMapGenerator->updateDepthMap( rpcPic ); 346 #endif 343 347 #endif 344 348 // deblocking filter -
branches/HTM-3.1-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp
r77 r91 691 691 // init view component and predict virtual depth map 692 692 m_pcDepthMapGenerator->initViewComponent( pcPic ); 693 #if !QC_MULTI_DIS_CAN 693 694 m_pcDepthMapGenerator->predictDepthMap ( pcPic ); 694 695 #endif 696 #endif 695 697 #if HHI_INTER_VIEW_MOTION_PRED 698 //#if !QC_MULTI_DIS_CAN 696 699 m_pcDepthMapGenerator->covertOrgDepthMap( pcPic ); 700 //#endif 697 701 #endif 698 702 #if HHI_INTER_VIEW_RESIDUAL_PRED … … 758 762 #endif 759 763 #if DEPTH_MAP_GENERATION 764 #if !QC_MULTI_DIS_CAN 760 765 // update virtual depth map 761 766 m_pcDepthMapGenerator->updateDepthMap( pcPic ); 767 #endif 762 768 #endif 763 769
Note: See TracChangeset for help on using the changeset viewer.