Changeset 876 in 3DVCSoftware
- Timestamp:
- 27 Mar 2014, 18:52:26 (11 years ago)
- Location:
- branches/HTM-10.1-dev0/source
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r872 r876 521 521 #if H_3D_SPIVMP 522 522 ("SubPULog2Size", m_iSubPULog2Size, (Int)3, "Sub-PU size index: 2^n") 523 #endif524 #if QC_SPIVMP_MPI_G0119525 523 ("SubPUMPILog2Size", m_iSubPUMPILog2Size, (Int)3, "Sub-PU MPI size index: 2^n") 526 524 #endif … … 1552 1550 #endif 1553 1551 #if H_3D_SPIVMP 1554 #if SEC_SPIVMP_MCP_SIZE_G00771555 1552 xConfirmPara( m_iSubPULog2Size < 3, "SubPULog2Size must be 3 or greater."); 1556 #else1557 xConfirmPara( m_iSubPULog2Size < 2, "SubPULog2Size must be 2 or greater.");1558 #endif1559 1553 xConfirmPara( m_iSubPULog2Size > 6, "SubPULog2Size must be 6 or smaller."); 1560 1554 xConfirmPara( (1<<m_iSubPULog2Size) > m_uiMaxCUWidth, "SubPULog2Size must be log2(maxCUSize) or smaller."); 1561 #endif 1562 #if QC_SPIVMP_MPI_G0119 1555 1563 1556 xConfirmPara( m_iSubPUMPILog2Size < 3, "SubPUMPILog2Size must be 3 or greater."); 1564 1557 xConfirmPara( m_iSubPUMPILog2Size > 6, "SubPUMPILog2Size must be 6 or smaller."); … … 2499 2492 #if H_3D_SPIVMP 2500 2493 printf(" SubPULog2Size:%d " , m_iSubPULog2Size ); 2501 #endif2502 #endif2503 #if QC_SPIVMP_MPI_G01192504 2494 printf(" SubPUMPILog2Size:%d " , m_iSubPUMPILog2Size ); 2495 #endif 2505 2496 #endif 2506 2497 #if H_3D_ARP -
branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncCfg.h
r872 r876 141 141 #if H_3D_SPIVMP 142 142 Int m_iSubPULog2Size; 143 #endif144 #endif145 #if QC_SPIVMP_MPI_G0119146 143 Int m_iSubPUMPILog2Size; 144 #endif 147 145 #endif 148 146 #if H_3D_ARP /// < flag and number of weighting factors in ARP -
branches/HTM-10.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r872 r876 187 187 #if H_3D_SPIVMP 188 188 m_cTEncTop.setSubPULog2Size (( isDepth || 0==layerIdInVps ) ? 0 : m_iSubPULog2Size ); 189 #endif190 #if QC_SPIVMP_MPI_G0119191 189 m_cTEncTop.setSubPUMPILog2Size ( !isDepth ? 0 : m_iSubPUMPILog2Size ); 192 190 #endif … … 1970 1968 #endif 1971 1969 } 1972 #if QC_SPIVMP_MPI_G01191970 #if H_3D_SPIVMP 1973 1971 vps.setSubPUMPILog2Size( m_iSubPUMPILog2Size ); 1974 1972 #endif -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/ContextTables.h
r872 r876 94 94 95 95 #if H_3D_ARP 96 #if MTK_ARP_FLAG_CABAC_SIMP_G006197 96 #define NUM_ARPW_CTX 3 ///< number of context models for weighting factor index used by advanced residual prediction 98 #else99 #define NUM_ARPW_CTX 4 ///< number of context models for weighting factor index used by advanced residual prediction100 #endif101 97 #endif 102 98 103 99 #if H_3D_IC 104 #if MTK_IC_FLAG_CABAC_SIMP_G0061105 100 #define NUM_IC_FLAG_CTX 1 ///< number of context models for illumination compensation flag 106 #else107 #define NUM_IC_FLAG_CTX 3 ///< number of context models for illumination compensation flag108 #endif109 101 #endif 110 102 … … 366 358 367 359 #if H_3D_ARP 368 #if MTK_ARP_FLAG_CABAC_SIMP_G0061369 360 static const UChar 370 361 INIT_ARPW[3][NUM_ARPW_CTX] = … … 374 365 { 162, 153, 162 }, 375 366 }; 376 #else 377 static const UChar 378 INIT_ARPW[3][NUM_ARPW_CTX] = 379 { 380 { 162, 153, 154, 162 }, 381 { 162, 153, 154, 162 }, 382 { 162, 153, 154, 162 }, 383 }; 384 #endif 367 385 368 #endif 386 369 #if H_3D_IC 387 #if MTK_IC_FLAG_CABAC_SIMP_G0061388 370 static const UChar 389 371 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = … … 393 375 { 154 }, 394 376 }; 395 #else 396 static const UChar 397 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 398 { 399 { 154, 154, 154, }, 400 { 154, 154, 154, }, 401 { 154, 154, 154, }, 402 }; 403 #endif 377 404 378 #endif 405 379 #if H_3D_DIM -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r872 r876 2463 2463 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2464 2464 uiCtx = ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1) : 0; 2465 2466 #if !MTK_ARP_FLAG_CABAC_SIMP_G0061 2467 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2468 uiCtx += ( pcTempCU ) ? ((pcTempCU->getARPW( uiTempPartIdx )==0)?0:1): 0; 2469 #endif 2470 return uiCtx; 2471 } 2472 #endif 2473 #if !MTK_IC_FLAG_CABAC_SIMP_G0061 2474 #if H_3D_IC 2475 UInt TComDataCU::getCtxICFlag( UInt uiAbsPartIdx ) 2476 { 2477 UInt uiCtx = 0; 2478 2479 TComDataCU* pcTempCU = NULL; 2480 UInt uiTempPartIdx = 0; 2481 2482 pcTempCU = getPULeft( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2483 uiCtx = ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0; 2484 2485 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2486 uiCtx += ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0; 2487 2488 return uiCtx; 2489 } 2490 #endif 2465 return uiCtx; 2466 } 2491 2467 #endif 2492 2468 #if H_3D_DBBP … … 3582 3558 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3583 3559 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3584 { 3585 #if MTK_NBDV_IVREF_FIX_G0067 3560 { 3586 3561 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() || pDInfo->m_aVIdxCan == -1) 3587 #else3588 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() )3589 #endif3590 3562 { 3591 3563 return false; … … 3594 3566 Int refViewIdx = pDInfo->m_aVIdxCan; 3595 3567 TComPic* picDepth = getSlice()->getIvPic( true, refViewIdx ); 3596 3568 3597 3569 if( picDepth == NULL ) // No depth reference avail 3598 3570 { … … 3602 3574 3603 3575 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3604 3576 3605 3577 Bool refViewAvailFlag = false; 3606 3578 UChar predFlag[2] = {0, 0}; … … 3609 3581 Int viewIdInRefListX = -1; 3610 3582 #endif 3611 3583 3612 3584 for( Int iRefListIdX = 0; iRefListIdX < 2 && !refViewAvailFlag; iRefListIdX++ ) 3613 3585 { … … 3645 3617 predFlag[refListIdY] = 1; 3646 3618 TComMv cMv = pDInfo->m_acNBDV; 3647 3619 3648 3620 Int viewIdInRefListY = m_pcSlice->getRefPic( eRefPicListY, i)->getViewId(); 3649 3621 Int currViewId = m_pcSlice->getViewId(); 3650 3622 3651 3623 //// Following might be added here when MV-HEVC 5 HLS is included (and derivations above removed): 3652 3624 // Int viewIdInRefListX = m_pcSlice->getVPS()->getViewIdVal( refViewIdx ); 3653 3625 3654 3626 Int iScale = xGetDistScaleFactor( currViewId, viewIdInRefListY, currViewId, viewIdInRefListX ); 3655 3627 3656 3628 // Can iScale == 4096 happen?, I guess not since viewIdInRefListY is always unequal to viewIdInRefListX. 3657 3629 if ( iScale != 4096 && m_pcSlice->getVPS()->getIvMvScalingFlag() ) … … 4449 4421 if( bMPIFlag) 4450 4422 { 4451 #if QC_SPIVMP_MPI_G01194452 4423 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4453 4424 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); … … 4556 4527 } 4557 4528 #endif 4558 #else 4559 UInt uiPartIdxCenter; 4560 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 4561 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4562 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4563 Int tRef[2]={-1, -1}; 4564 4565 #if H_3D_FCO 4566 TComPic * pcTexturePic = m_pcSlice->getTexturePic(); 4567 TComDataCU *pcTextureCU = 0; 4568 if ( pcTexturePic ) 4569 pcTextureCU = pcTexturePic->getCU( getAddr() ); 4570 #else 4571 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4572 #endif 4573 4574 #if H_3D_FCO 4575 if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 4576 #else 4577 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 4578 #endif 4579 { 4580 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, tmpMV[0] ); 4581 tRef[0] = getPic()->isTextRefValid( REF_PIC_LIST_0, tmpMV[0].getRefIdx() ); 4582 if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) ) 4583 { 4584 TComMv cMvPred = tmpMV[0].getMv(); 4585 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4586 cMvPred+=cAdd; 4587 cMvPred>>=2; 4588 clipMv(cMvPred); 4589 tmpMV[0].setMvField(cMvPred,tRef[0]); 4590 } 4591 if ( getSlice()->isInterB() ) 4592 { 4593 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, tmpMV[1] ); 4594 tRef[1] = getPic()->isTextRefValid( REF_PIC_LIST_1, tmpMV[1].getRefIdx() ); 4595 if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) ) 4529 if( tmpDir != 0 ) 4530 { 4531 Int iCnloop = 0; 4532 Bool bRemoveSpa = false; //pruning 4533 4534 for(Int i = 0; i < 2; i ++) 4535 { 4536 iCnloop = iPosLeftAbove[i]; 4537 if ( iCnloop == -1 ) 4596 4538 { 4597 TComMv cMvPred = tmpMV[1].getMv(); 4598 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4599 cMvPred+=cAdd; 4600 cMvPred>>=2; 4601 clipMv(cMvPred); 4602 tmpMV[1].setMvField(cMvPred,tRef[1]); 4539 continue; 4603 4540 } 4604 } 4605 4606 tmpDir = 0; 4607 if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) ) 4608 { 4609 tmpDir += ((tmpMV[0].getRefIdx()>=0)?1:0); 4610 } 4611 if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) ) 4612 { 4613 tmpDir += ((tmpMV[1].getRefIdx()>=0)?2:0); 4614 } 4615 #endif 4616 if( tmpDir != 0 ) 4617 { 4618 Int iCnloop = 0; 4619 Bool bRemoveSpa = false; //pruning 4620 4621 for(Int i = 0; i < 2; i ++) 4541 if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1]) 4622 4542 { 4623 iCnloop = iPosLeftAbove[i]; 4624 if ( iCnloop == -1 ) 4543 bRemoveSpa = true; 4544 break; 4545 } 4546 } 4547 4548 if (!bRemoveSpa) 4549 { 4550 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4551 } 4552 else 4553 { 4554 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV); 4555 if (iCnloop<numA1B1B0) 4556 { 4557 numA1B1B0--; 4558 } 4559 iCountHEVC--; 4560 4561 if (iPosLeftAbove[0] != -1) 4562 { 4563 if (iCnloop == iPosLeftAbove[0]) 4625 4564 { 4626 continue;4565 iPosLeftAbove[0] = -1; 4627 4566 } 4628 if(tmpDir == puhInterDirNeighbours[iCnloop] && tmpMV[0]==pcMvFieldNeighbours[(iCnloop<<1)] && tmpMV[1]==pcMvFieldNeighbours[(iCnloop<<1)+1])4567 else 4629 4568 { 4630 bRemoveSpa = true; 4631 break; 4632 } 4569 iPosLeftAbove[0]++; 4570 } 4633 4571 } 4634 4635 if (!bRemoveSpa) 4572 if (iPosLeftAbove[1] != -1) 4636 4573 { 4637 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, 5-iCount, iCount3DV); 4638 } 4639 else 4640 { 4641 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (iCnloop-iCount), iCount3DV); 4642 if (iCnloop<numA1B1B0) 4574 if (iCnloop == iPosLeftAbove[1]) 4643 4575 { 4644 numA1B1B0--;4576 iPosLeftAbove[1] = -1; 4645 4577 } 4646 iCountHEVC--; 4647 4648 if (iPosLeftAbove[0] != -1) 4578 else 4649 4579 { 4650 if (iCnloop == iPosLeftAbove[0])4580 if (iCnloop > iPosLeftAbove[1]) 4651 4581 { 4652 iPosLeftAbove[0] = -1; 4653 } 4654 else 4655 { 4656 iPosLeftAbove[0]++; 4657 } 4658 } 4659 if (iPosLeftAbove[1] != -1) 4660 { 4661 if (iCnloop == iPosLeftAbove[1]) 4662 { 4663 iPosLeftAbove[1] = -1; 4664 } 4665 else 4666 { 4667 if (iCnloop > iPosLeftAbove[1]) 4668 { 4669 iPosLeftAbove[1]++; 4670 } 4582 iPosLeftAbove[1]++; 4671 4583 } 4672 4584 } 4673 4585 } 4674 #if QC_SPIVMP_MPI_G0119 4675 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx()); 4676 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx()); 4677 #else 4678 if( (tmpMV[0].getRefIdx()>=0) && ( tRef[0] >= 0 ) ) 4679 { 4680 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tRef[0]); 4681 } 4682 if ( getSlice()->isInterB()) 4683 { 4684 if( (tmpMV[1].getRefIdx()>=0) && ( tRef[1] >= 0) ) 4685 { 4686 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tRef[1]); 4687 } 4688 } 4689 #endif 4690 puhInterDirNeighbours[iCount] = tmpDir; 4691 4692 if ( mrgCandIdx == iCount ) 4693 { 4694 return; 4695 } 4696 iCount ++; 4697 } 4698 #if !QC_SPIVMP_MPI_G0119 4699 } 4700 #endif 4586 } 4587 pcMvFieldNeighbours[iCount<<1].setMvField(tmpMV[0].getMv(), tmpMV[0].getRefIdx()); 4588 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(tmpMV[1].getMv(), tmpMV[1].getRefIdx()); 4589 4590 puhInterDirNeighbours[iCount] = tmpDir; 4591 4592 if ( mrgCandIdx == iCount ) 4593 { 4594 return; 4595 } 4596 iCount ++; 4597 } 4701 4598 } 4702 4599 #if MTK_DDD_G0063 … … 4836 4733 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4837 4734 4838 #if MTK_NBDV_IVREF_FIX_G00674839 4735 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 4840 #else4841 if ( ivMvPredFlag )4842 #endif4843 4736 { 4844 4737 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); … … 4848 4741 //////// INTER VIEW MOTION COMP(IvMC) ///////// 4849 4742 /////////////////////////////////////////////// 4850 #if QC_DEPTH_MERGE_SIMP_G01274851 4743 if( getSlice()->getIsDepth() ) 4852 4744 { 4853 4745 ivCandDir[1] = ivCandDir[2] = ivCandDir[3] = 0; 4854 4746 } 4855 #endif 4747 4856 4748 if( ivCandDir[0] ) 4857 4749 { … … 4961 4853 if (bIvMC) 4962 4854 { 4963 #if QC_SPIVMP_MPI_G0119 4964 if(!m_pcSlice->getIsDepth()) 4965 #endif 4966 #if SEC_SPIVMP_MCP_SIZE_G0077 4967 if(getPartitionSize(0) == SIZE_2Nx2N) 4855 if(!m_pcSlice->getIsDepth() && getPartitionSize(0) == SIZE_2Nx2N ) 4856 { 4968 4857 pbSPIVMPFlag[iCount] = true; 4969 #else 4970 pbSPIVMPFlag[iCount] = true; 4971 #endif 4858 } 4972 4859 #if H_3D_DBBP 4973 4860 pbSPIVMPFlag[iCount] &= !bDBBPFlag; … … 5111 4998 //////// INTER VIEW DISP COMP (IvDC) //////// 5112 4999 ///////////////////////////////////////////// 5113 #if QC_DEPTH_MERGE_SIMP_G01275114 5000 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5115 #else5116 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand())5117 #endif5118 5001 { 5119 5002 assert(iCount < getSlice()->getMaxNumMergeCand()); … … 5276 5159 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 5277 5160 //////////////////////////////////////////////////// 5278 #if QC_DEPTH_MERGE_SIMP_G01275279 5161 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() && !getSlice()->getIsDepth() ) 5280 #else5281 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() )5282 #endif5283 5162 { 5284 5163 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) … … 6645 6524 #endif 6646 6525 #if H_3D_IV_MERGE 6647 #if SEC_DEPTH_DV_DERIVAITON_G00746648 6526 Bool TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 6649 #else 6650 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 6651 #endif 6652 { 6653 #if SEC_DEPTH_DV_DERIVAITON_G0074 6527 { 6528 6654 6529 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N); 6655 6530 … … 6662 6537 6663 6538 return true; 6664 #else6665 Pel pDepPos[3] = {0, 0, 0};6666 assert(getPartitionSize( uiPartAddr ) == SIZE_2Nx2N);6667 Bool bDepAvail = false;6668 Pel *pDepth = this->getPic()->getPicYuvRec()->getLumaAddr();6669 Int iDepStride = this->getPic()->getPicYuvRec()->getStride();6670 TComMv cMv;6671 6672 Int xP, yP, nPSW, nPSH;6673 this->getPartPosition(uiPartIdx, xP, yP, nPSW, nPSH);6674 6675 if(xP != 0 && yP != 0)6676 {6677 pDepPos[0] = pDepth[ (yP-1) * iDepStride + (xP-1) ];6678 bDepAvail = true;6679 }6680 6681 if(xP != 0)6682 {6683 pDepPos[1] = pDepth[ (yP+nPSH-1) * iDepStride + (xP-1) ];6684 bDepAvail = true;6685 }6686 6687 if(yP != 0)6688 {6689 pDepPos[2] = pDepth[ (yP-1) * iDepStride + (xP+nPSW-1) ];6690 bDepAvail = true;6691 }6692 6693 if (bDepAvail)6694 {6695 Pel pAvgDepth = (xP != 0 && yP != 0) ? ((5*pDepPos[0] + 5*pDepPos[1] + 6*pDepPos[2] + 8)>>4) : (xP == 0) ? pDepPos[2] : pDepPos[1];6696 Int iDisp = getSlice()->getDepthToDisparityB( 0 )[ pAvgDepth ];6697 cMv.setHor(iDisp);6698 cMv.setVer(0);6699 pDisp->m_acNBDV = cMv;6700 pDisp->m_aVIdxCan = 0;6701 return true;6702 }6703 else6704 {6705 cMv.setZero();6706 pDisp->m_acNBDV = cMv;6707 pDisp->m_aVIdxCan = 0;6708 return false;6709 }6710 #endif6711 6539 } 6712 6540 #endif … … 6725 6553 // Init disparity struct for results 6726 6554 pDInfo->bDV = false; 6727 #if MTK_NBDV_IVREF_FIX_G00676728 6555 pDInfo->m_aVIdxCan = -1; 6729 #endif 6556 6730 6557 // Init struct for disparities from MCP neighboring blocks 6731 6558 IDVInfo cIDVInfo; … … 7248 7075 { 7249 7076 Int iSubPUSize = 1<<getSlice()->getVPS()->getSubPULog2Size(getSlice()->getLayerId()); 7250 #if QC_SPIVMP_MPI_G01197251 7077 if( getSlice()->getIsDepth() ) 7252 7078 { 7253 7079 iSubPUSize = 1 << getSlice()->getVPS()->getSubPUMPILog2Size(); 7254 7080 } 7255 #endif 7081 7256 7082 iNumSPInOneLine = iPUWidth/iSubPUSize; 7257 7083 iNumSPInOneLine = iNumSPInOneLine < 1 ? 1: iNumSPInOneLine; … … 7310 7136 TComSlice* pcSlice = getSlice (); 7311 7137 Int iViewIndex = pDInfo->m_aVIdxCan; 7312 7138 7313 7139 //--- get base CU/PU and check prediction mode --- 7314 7140 TComPic* pcBasePic = pcSlice->getIvPic( bIsDepth, iViewIndex ); … … 7334 7160 7335 7161 TComMv cDv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7336 7162 7337 7163 Bool abPdmAvailable[8] = {false, false, false, false, false, false, false, false}; 7338 7164 #if H_3D_NBDV … … 7347 7173 //////////sub-PU IvMC/////////// 7348 7174 //////////////////////////////// 7349 #if QC_SPIVMP_MPI_G01197350 7175 if(!m_pcSlice->getIsDepth()) 7351 7176 { 7352 #endif 7353 #if SEC_SPIVMP_MCP_SIZE_G0077 7354 if( getPartitionSize(0) == SIZE_2Nx2N ) 7355 { 7356 #endif 7357 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 7358 getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 7359 7360 for (Int i=0; i<iNumSP; i++) 7361 { 7362 puhInterDirSP[i] = 0; 7363 pcMvFieldSP[2*i].getMv().set(0, 0); 7364 pcMvFieldSP[2*i+1].getMv().set(0,0); 7365 pcMvFieldSP[2*i].setRefIdx(-1); 7366 pcMvFieldSP[2*i+1].setRefIdx(-1); 7367 } 7368 7369 Int iBaseCUAddr; 7370 Int iBaseAbsPartIdx; 7371 TComDataCU* pcBaseCU; 7372 Int iPartition = 0; 7177 if( getPartitionSize(0) == SIZE_2Nx2N ) 7178 { 7179 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 7180 getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 7181 7182 for (Int i=0; i<iNumSP; i++) 7183 { 7184 puhInterDirSP[i] = 0; 7185 pcMvFieldSP[2*i].getMv().set(0, 0); 7186 pcMvFieldSP[2*i+1].getMv().set(0,0); 7187 pcMvFieldSP[2*i].setRefIdx(-1); 7188 pcMvFieldSP[2*i+1].setRefIdx(-1); 7189 } 7190 7191 Int iBaseCUAddr; 7192 Int iBaseAbsPartIdx; 7193 TComDataCU* pcBaseCU; 7194 Int iPartition = 0; 7373 7195 #if !KHU_SIMP_SPIVMP_G0147 7374 Int iInterDirLast = 0;7375 TComMvField cMvFieldLast[2];7376 #endif 7377 7378 Int iDelX = iSPWidth/2;7379 Int iDelY = iSPHeight/2;7196 Int iInterDirLast = 0; 7197 TComMvField cMvFieldLast[2]; 7198 #endif 7199 7200 Int iDelX = iSPWidth/2; 7201 Int iDelY = iSPHeight/2; 7380 7202 7381 7203 #if KHU_SIMP_SPIVMP_G0147 7382 Int iCenterPosX = iCurrPosX + ( ( iWidth / iSPWidth ) >> 1 ) * iSPWidth + ( iSPWidth >> 1 ); 7383 Int iCenterPosY = iCurrPosY + ( ( iHeight / iSPHeight ) >> 1 ) * iSPHeight + (iSPHeight >> 1); 7384 Int iRefCenterCUAddr, iRefCenterAbsPartIdx; 7385 7386 if(iWidth == iSPWidth && iHeight == iSPHeight) 7387 { 7388 iCenterPosX = iCurrPosX + (iWidth >> 1); 7389 iCenterPosY = iCurrPosY + (iHeight >> 1); 7390 } 7391 7392 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 7393 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 7394 7395 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 7396 TComDataCU* pcDefaultCU = pcBasePic->getCU( iRefCenterCUAddr ); 7397 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 7398 { 7399 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7400 { 7401 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7402 Bool stopLoop = false; 7403 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 7404 { 7405 RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 7406 TComMvField cDefaultMvField; 7407 pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField ); 7408 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 7409 if (iDefaultRefIdx >= 0) 7410 { 7411 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx); 7412 if (iDefaultRefPOC != pcSlice->getPOC()) 7413 { 7414 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7415 { 7416 if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7417 { 7418 abPdmAvailable[ uiCurrRefListId ] = true; 7419 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 7420 #if H_3D_NBDV 7421 #if H_3D_IV_MERGE 7422 if( !bIsDepth ) 7423 { 7424 #endif 7425 cMv.setIDVFlag (true); 7426 cMv.setIDVHor (cDv.getHor()); 7427 cMv.setIDVVer (cDv.getVer()); 7428 cMv.setIDVVId (iViewIndex); 7429 #if H_3D_IV_MERGE 7430 } 7431 #endif 7432 #endif 7433 clipMv( cMv ); 7434 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 7435 pacPdmMv [ uiCurrRefListId ] = cMv; 7436 stopLoop = true; 7437 break; 7438 } 7439 } 7440 } 7441 } 7442 } 7443 } 7444 } 7445 availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0); 7446 7447 if(availableMcDc[0]) 7448 { 7449 #endif 7450 Int iBasePosX, iBasePosY; 7451 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight) 7452 { 7453 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 7454 { 7455 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 7456 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 7457 7458 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 7459 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7460 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7461 { 7462 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7204 Int iCenterPosX = iCurrPosX + ( ( iWidth / iSPWidth ) >> 1 ) * iSPWidth + ( iSPWidth >> 1 ); 7205 Int iCenterPosY = iCurrPosY + ( ( iHeight / iSPHeight ) >> 1 ) * iSPHeight + (iSPHeight >> 1); 7206 Int iRefCenterCUAddr, iRefCenterAbsPartIdx; 7207 7208 if(iWidth == iSPWidth && iHeight == iSPHeight) 7209 { 7210 iCenterPosX = iCurrPosX + (iWidth >> 1); 7211 iCenterPosY = iCurrPosY + (iHeight >> 1); 7212 } 7213 7214 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 7215 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 7216 7217 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 7218 TComDataCU* pcDefaultCU = pcBasePic->getCU( iRefCenterCUAddr ); 7219 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 7220 { 7221 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7463 7222 { 7464 7223 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7465 Bool bLoop_stop = false;7466 for(Int iLoop = 0; iLoop < 2 && ! bLoop_stop; ++iLoop)7224 Bool stopLoop = false; 7225 for(Int iLoop = 0; iLoop < 2 && !stopLoop; ++iLoop) 7467 7226 { 7468 RefPicList e BaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId );7469 TComMvField c BaseMvField;7470 pc BaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField );7471 Int i BaseRefIdx = cBaseMvField.getRefIdx();7472 if (i BaseRefIdx >= 0)7227 RefPicList eDefaultRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 7228 TComMvField cDefaultMvField; 7229 pcDefaultCU->getMvField( pcDefaultCU, iRefCenterAbsPartIdx, eDefaultRefPicList, cDefaultMvField ); 7230 Int iDefaultRefIdx = cDefaultMvField.getRefIdx(); 7231 if (iDefaultRefIdx >= 0) 7473 7232 { 7474 Int i BaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx);7475 if (i BaseRefPOC != pcSlice->getPOC())7233 Int iDefaultRefPOC = pcDefaultCU->getSlice()->getRefPOC(eDefaultRefPicList, iDefaultRefIdx); 7234 if (iDefaultRefPOC != pcSlice->getPOC()) 7476 7235 { 7477 7236 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7478 7237 { 7479 if (i BaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx))7238 if (iDefaultRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7480 7239 { 7481 7240 abPdmAvailable[ uiCurrRefListId ] = true; 7482 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 7483 7241 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 7242 #if H_3D_NBDV 7243 #if H_3D_IV_MERGE 7484 7244 if( !bIsDepth ) 7485 7245 { 7246 #endif 7486 7247 cMv.setIDVFlag (true); 7487 7248 cMv.setIDVHor (cDv.getHor()); 7488 7249 cMv.setIDVVer (cDv.getVer()); 7489 7250 cMv.setIDVVId (iViewIndex); 7251 #if H_3D_IV_MERGE 7490 7252 } 7491 7253 #endif 7254 #endif 7492 7255 clipMv( cMv ); 7493 bLoop_stop = true;7494 7495 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx);7256 paiPdmRefIdx [ uiCurrRefListId ] = iPdmRefIdx; 7257 pacPdmMv [ uiCurrRefListId ] = cMv; 7258 stopLoop = true; 7496 7259 break; 7497 7260 } … … 7502 7265 } 7503 7266 } 7504 7505 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 7506 if (puhInterDirSP[iPartition] == 0) 7507 { 7267 availableMcDc[0] = ( abPdmAvailable[0]? 1 : 0) + (abPdmAvailable[1]? 2 : 0); 7268 7269 if(availableMcDc[0]) 7270 { 7271 #endif 7272 Int iBasePosX, iBasePosY; 7273 for (Int i=iCurrPosY; i < iCurrPosY + iHeight; i += iSPHeight) 7274 { 7275 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 7276 { 7277 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 7278 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 7279 7280 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 7281 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7282 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7283 { 7284 for( UInt uiCurrRefListId = 0; uiCurrRefListId < 2; uiCurrRefListId++ ) 7285 { 7286 RefPicList eCurrRefPicList = RefPicList( uiCurrRefListId ); 7287 Bool bLoop_stop = false; 7288 for(Int iLoop = 0; iLoop < 2 && !bLoop_stop; ++iLoop) 7289 { 7290 RefPicList eBaseRefPicList = (iLoop ==1)? RefPicList( 1 - uiCurrRefListId ) : RefPicList( uiCurrRefListId ); 7291 TComMvField cBaseMvField; 7292 pcBaseCU->getMvField( pcBaseCU, iBaseAbsPartIdx, eBaseRefPicList, cBaseMvField ); 7293 Int iBaseRefIdx = cBaseMvField.getRefIdx(); 7294 if (iBaseRefIdx >= 0) 7295 { 7296 Int iBaseRefPOC = pcBaseCU->getSlice()->getRefPOC(eBaseRefPicList, iBaseRefIdx); 7297 if (iBaseRefPOC != pcSlice->getPOC()) 7298 { 7299 for (Int iPdmRefIdx = 0; iPdmRefIdx < pcSlice->getNumRefIdx( eCurrRefPicList ); iPdmRefIdx++) 7300 { 7301 if (iBaseRefPOC == pcSlice->getRefPOC(eCurrRefPicList, iPdmRefIdx)) 7302 { 7303 abPdmAvailable[ uiCurrRefListId ] = true; 7304 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 7305 7306 if( !bIsDepth ) 7307 { 7308 cMv.setIDVFlag (true); 7309 cMv.setIDVHor (cDv.getHor()); 7310 cMv.setIDVVer (cDv.getVer()); 7311 cMv.setIDVVId (iViewIndex); 7312 } 7313 7314 clipMv( cMv ); 7315 bLoop_stop = true; 7316 7317 pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx); 7318 break; 7319 } 7320 } 7321 } 7322 } 7323 } 7324 } 7325 } 7326 7327 puhInterDirSP[iPartition] = (pcMvFieldSP[2*iPartition].getRefIdx()!=-1 ? 1: 0) + (pcMvFieldSP[2*iPartition+1].getRefIdx()!=-1 ? 2: 0); 7328 if (puhInterDirSP[iPartition] == 0) 7329 { 7508 7330 #if KHU_SIMP_SPIVMP_G0147 7509 puhInterDirSP[iPartition] = availableMcDc[0];7510 pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]);7511 pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]);7331 puhInterDirSP[iPartition] = availableMcDc[0]; 7332 pcMvFieldSP[2*iPartition].setMvField(pacPdmMv[0], paiPdmRefIdx[0]); 7333 pcMvFieldSP[2*iPartition + 1].setMvField(pacPdmMv[1], paiPdmRefIdx[1]); 7512 7334 #else 7513 if (iInterDirLast != 0)7514 {7515 puhInterDirSP[iPartition] = iInterDirLast;7516 pcMvFieldSP[2*iPartition] = cMvFieldLast[0];7517 pcMvFieldSP[2*iPartition + 1] = cMvFieldLast[1];7518 }7519 #endif 7520 }7335 if (iInterDirLast != 0) 7336 { 7337 puhInterDirSP[iPartition] = iInterDirLast; 7338 pcMvFieldSP[2*iPartition] = cMvFieldLast[0]; 7339 pcMvFieldSP[2*iPartition + 1] = cMvFieldLast[1]; 7340 } 7341 #endif 7342 } 7521 7343 #if !KHU_SIMP_SPIVMP_G0147 7522 else 7523 { 7524 if (iInterDirLast ==0) 7525 { 7526 availableMcDc[0] = puhInterDirSP[iPartition]; 7527 paiPdmRefIdx [ 0 ] = pcMvFieldSP[2*iPartition].getRefIdx(); 7528 pacPdmMv [ 0 ] = pcMvFieldSP[2*iPartition].getMv(); 7529 paiPdmRefIdx [ 1 ] = pcMvFieldSP[2*iPartition+1].getRefIdx(); 7530 pacPdmMv [ 1 ] = pcMvFieldSP[2*iPartition+1].getMv(); 7531 7532 if (iPartition != 0) 7533 { 7534 for (Int iPart = iPartition-1; iPart >= 0; iPart--) 7344 else 7535 7345 { 7536 puhInterDirSP[iPart] = puhInterDirSP[iPartition]; 7537 pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition]; 7538 pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1]; 7346 if (iInterDirLast ==0) 7347 { 7348 availableMcDc[0] = puhInterDirSP[iPartition]; 7349 paiPdmRefIdx [ 0 ] = pcMvFieldSP[2*iPartition].getRefIdx(); 7350 pacPdmMv [ 0 ] = pcMvFieldSP[2*iPartition].getMv(); 7351 paiPdmRefIdx [ 1 ] = pcMvFieldSP[2*iPartition+1].getRefIdx(); 7352 pacPdmMv [ 1 ] = pcMvFieldSP[2*iPartition+1].getMv(); 7353 7354 if (iPartition != 0) 7355 { 7356 for (Int iPart = iPartition-1; iPart >= 0; iPart--) 7357 { 7358 puhInterDirSP[iPart] = puhInterDirSP[iPartition]; 7359 pcMvFieldSP[2*iPart] = pcMvFieldSP[2*iPartition]; 7360 pcMvFieldSP[2*iPart + 1] = pcMvFieldSP[2*iPartition + 1]; 7361 } 7362 } 7363 } 7364 iInterDirLast = puhInterDirSP[iPartition]; 7365 cMvFieldLast[0] = pcMvFieldSP[2*iPartition]; 7366 cMvFieldLast[1] = pcMvFieldSP[2*iPartition + 1]; 7539 7367 } 7368 #endif 7369 iPartition ++; 7370 7540 7371 } 7541 7372 } 7542 iInterDirLast = puhInterDirSP[iPartition];7543 cMvFieldLast[0] = pcMvFieldSP[2*iPartition];7544 cMvFieldLast[1] = pcMvFieldSP[2*iPartition + 1];7545 }7546 #endif7547 iPartition ++;7548 7549 }7550 }7551 7373 #if KHU_SIMP_SPIVMP_G0147 7552 } 7553 #endif 7554 #if SEC_SPIVMP_MCP_SIZE_G0077 7555 } 7556 #endif 7557 7558 iCurrPosX += ( iWidth >> 1 ); 7559 iCurrPosY += ( iHeight >> 1 ); 7560 #if QC_SPIVMP_MPI_G0119 7561 } 7562 #endif 7374 } 7375 #endif 7376 } 7377 7378 iCurrPosX += ( iWidth >> 1 ); 7379 iCurrPosY += ( iHeight >> 1 ); 7380 } 7563 7381 #endif 7564 7382 … … 7568 7386 7569 7387 #if H_3D_SPIVMP 7570 #if QC_SPIVMP_MPI_G0119 7571 if(m_pcSlice->getIsDepth()) 7572 { 7573 iCurrPosX += ( iWidth >> 1 ); 7574 iCurrPosY += ( iHeight >> 1 ); 7575 } 7576 #if QC_DEPTH_MERGE_SIMP_G0127 7577 #if SEC_SPIVMP_MCP_SIZE_G0077 7388 if(m_pcSlice->getIsDepth()) 7389 { 7390 iCurrPosX += ( iWidth >> 1 ); 7391 iCurrPosY += ( iHeight >> 1 ); 7392 } 7578 7393 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7579 7394 #else 7580 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)7581 #endif7582 #else7583 #if SEC_SPIVMP_MCP_SIZE_G00777584 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getPartitionSize(uiPartAddr) != SIZE_2Nx2N) ? 0 : 1 ); iLoopCan < 2; iLoopCan ++)7585 #else7586 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)7587 #endif7588 #endif7589 #else7590 #if SEC_SPIVMP_MCP_SIZE_G00777591 for(Int iLoopCan = (getPartitionSize(uiPartAddr) == SIZE_2Nx2N ? 1 : 0); iLoopCan < 2; iLoopCan ++)7592 #else7593 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)7594 #endif7595 #endif7596 #else7597 7395 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7598 7396 #endif … … 7601 7399 // iLoopCan == 1 --> IvMCShift 7602 7400 7603 #if !H_3D_SPIVMP || QC_SPIVMP_MPI_G01197604 7401 Int iBaseCUAddr; 7605 7402 Int iBaseAbsPartIdx; 7606 #endif7607 7403 7608 7404 Int offsetW = (iLoopCan == 0) ? 0 : ( ((iWidth /2)*4) + 4 ); 7609 7405 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 7610 7406 7611 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G01197612 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );7613 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );7614 #else7615 7407 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 7616 7408 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); 7617 #endif7618 7409 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 7619 7410 7620 #if H_3D_SPIVMP && !QC_SPIVMP_MPI_G01197621 pcBaseCU = pcBasePic->getCU( iBaseCUAddr );7622 #else7623 7411 TComDataCU* pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 7624 #endif7625 7412 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 7626 7413 { … … 7676 7463 } 7677 7464 #if H_3D_SPIVMP 7678 #if QC_SPIVMP_MPI_G01197679 #if QC_DEPTH_MERGE_SIMP_G01277680 7465 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 7681 7466 #else 7682 for(Int iLoopCan = ( 1 - m_pcSlice->getIsDepth() ); iLoopCan < 2; iLoopCan ++)7683 #endif7684 #else7685 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++)7686 #endif7687 #else7688 7467 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7689 7468 #endif … … 7691 7470 availableMcDc[(iLoopCan << 1)] = ( abPdmAvailable[(iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[1 + (iLoopCan<<2)] ? 2 : 0); 7692 7471 } 7693 7694 7472 7473 7695 7474 //////////////////////////////// 7696 7475 /////// IvDC + IvDCShift /////// 7697 7476 //////////////////////////////// 7698 #if QC_DEPTH_MERGE_SIMP_G0127 7477 7699 7478 if( !getSlice()->getIsDepth() ) 7700 7479 { 7701 #endif 7702 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 7703 { 7704 RefPicList eRefPicListDMV = RefPicList( iRefListId ); 7705 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicListDMV ); 7706 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 7707 { 7708 if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan)) 7709 { 7710 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7480 for( Int iRefListId = 0; iRefListId < 2 ; iRefListId++ ) 7481 { 7482 RefPicList eRefPicListDMV = RefPicList( iRefListId ); 7483 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicListDMV ); 7484 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 7485 { 7486 if(( pcSlice->getRefPOC( eRefPicListDMV, iPdmRefIdx ) == pcSlice->getPOC()) && (pcSlice->getRefPic( eRefPicListDMV, iPdmRefIdx )->getViewIndex() == pDInfo->m_aVIdxCan)) 7711 7487 { 7712 Int ioffsetDV = (iLoopCan == 0) ? 0 : 4; 7713 abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true; 7714 paiPdmRefIdx [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx; 7488 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7489 { 7490 Int ioffsetDV = (iLoopCan == 0) ? 0 : 4; 7491 abPdmAvailable[ iRefListId + 2 + (iLoopCan<<2) ] = true; 7492 paiPdmRefIdx [ iRefListId + 2 + (iLoopCan<<2) ] = iPdmRefIdx; 7715 7493 #if H_3D_NBDV_REF 7716 TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV;7717 #endif 7718 cMv.setHor( cMv.getHor() + ioffsetDV );7494 TComMv cMv = depthRefineFlag ? pDInfo->m_acDoNBDV : pDInfo->m_acNBDV; 7495 #endif 7496 cMv.setHor( cMv.getHor() + ioffsetDV ); 7719 7497 #if H_3D_IV_MERGE 7720 if( bIsDepth ) 7721 cMv.setHor((cMv.getHor()+2)>>2); 7722 #endif 7723 cMv.setVer( 0 ); 7724 clipMv( cMv ); 7725 pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; 7498 if( bIsDepth ) 7499 { 7500 cMv.setHor((cMv.getHor()+2)>>2); 7501 } 7502 #endif 7503 cMv.setVer( 0 ); 7504 clipMv( cMv ); 7505 pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; 7506 } 7507 break; 7726 7508 } 7727 break; 7728 } 7729 } 7730 } 7731 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7732 { 7733 availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 ); 7734 } 7735 #if QC_DEPTH_MERGE_SIMP_G0127 7736 } 7737 #endif 7509 } 7510 } 7511 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 7512 { 7513 availableMcDc[1 + (iLoopCan << 1)] = ( abPdmAvailable[2 + (iLoopCan<<2)] ? 1 : 0 ) + ( abPdmAvailable[3 + (iLoopCan<<2)] ? 2 : 0 ); 7514 } 7515 } 7738 7516 return false; 7739 7517 } -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComDataCU.h
r872 r876 499 499 #if H_3D 500 500 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV); 501 #if SEC_DEPTH_DV_DERIVAITON_G0074502 501 Bool getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 503 #else504 Bool getDispNeighBlocks ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp);505 #endif506 502 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); 507 503 #endif … … 743 739 UInt getCTXARPWFlag ( UInt uiAbsPartIdx ); 744 740 #endif 745 #if !MTK_IC_FLAG_CABAC_SIMP_G0061746 #if H_3D_IC747 UInt getCtxICFlag ( UInt uiAbsPartIdx );748 #endif749 #endif750 741 UInt getSliceStartCU ( UInt pos ) { return m_sliceStartCU[pos-m_uiAbsIdxInLCU]; } 751 742 UInt getSliceSegmentStartCU ( UInt pos ) { return m_sliceSegmentStartCU[pos-m_uiAbsIdxInLCU]; } -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComRdCost.cpp
r872 r876 599 599 cDtParam.uiComp = 255; // just for assert: to be sure it was set before use, since only values 0,1 or 2 are allowed. 600 600 601 #if SCU_HS_VSD_BUGFIX_IMPROV_G0163602 601 cDtParam.bitDepth = g_bitDepthY; 603 #endif 602 604 603 Dist dist = cDtParam.DistFunc( &cDtParam ); 605 604 … … 2985 2984 dD = ( (Double) ( dDM >> DISTORTION_PRECISION_ADJUSTMENT( g_bitDepthY - 8 ) ) ) * m_dDisparityCoeff; 2986 2985 2987 #if SCU_HS_VSD_BUGFIX_IMPROV_G01632988 2986 Double dDepthWeight = ( pOrg[x] >= ( (1<<(g_bitDepthY - 3)) + (1<<(g_bitDepthY - 2)) ) ? 4 : pOrg[x] > ((1<<g_bitDepthY) >> 4) ? (Float)(pOrg[x] - ((1<<g_bitDepthY) >> 4))/(Float)((1<<g_bitDepthY) >> 3) + 1 : 1.0 ); 2989 2987 Double dTemp = ( 0.5 * fabs(dD) * dDepthWeight * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) ); 2990 #else2991 Double dTemp = ( 0.5 * fabs(dD) * ( abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x-1+y*iVirStride ] ) + abs( (Int) pVirRec[ x+y*iVirStride ] - (Int) pVirRec[ x+1+y*iVirStride ] ) ) );2992 #endif2993 2988 iTemp = (Int) (((dTemp) < 0)? (Int)((dTemp) - 0.5) : (Int)((dTemp) + 0.5)); 2994 2989 -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
r872 r876 3207 3207 for ( Int refListIdx = 0; refListIdx < ((m_eSliceType==B_SLICE) ? 2 : 1); refListIdx++ ) 3208 3208 { 3209 #if MTK_ARP_REF_SELECTION_G00533210 3209 Int diffPOC=MAX_INT; 3211 3210 Int idx=-1; 3212 #endif3213 3211 for(Int i = 0; i < getNumRefIdx(RefPicList(refListIdx)); i++ ) 3214 3212 { 3215 3213 if ( getRefPic(RefPicList(refListIdx), i)->getPOC() != getPOC() ) 3216 3214 { 3217 #if MTK_ARP_REF_SELECTION_G00533218 3215 if( abs(getRefPic(RefPicList(refListIdx), i)->getPOC() - getPOC()) < diffPOC) 3219 3216 { … … 3221 3218 idx=i; 3222 3219 } 3223 #else3224 setFirstTRefIdx (RefPicList(refListIdx), i);3225 break;3226 #endif3227 3220 } 3228 #if MTK_ARP_REF_SELECTION_G00533229 3221 if(idx>=0) 3230 3222 { 3231 3223 setFirstTRefIdx (RefPicList(refListIdx), idx); 3232 3224 } 3233 #endif3234 3225 } 3235 3226 } -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TComSlice.h
r872 r876 869 869 #if H_3D_SPIVMP 870 870 Int m_iSubPULog2Size [MAX_NUM_LAYERS ]; 871 #endif872 #endif873 #if QC_SPIVMP_MPI_G0119874 871 Int m_iSubPUMPILog2Size; 872 #endif 875 873 #endif 876 874 #if H_3D_VSP … … 1248 1246 Int getSubPULog2Size(Int layerIdInVps) { return m_iSubPULog2Size[layerIdInVps]; } 1249 1247 Void setSubPULog2Size(Int layerIdInVps, Int u) { m_iSubPULog2Size[layerIdInVps] = u;} 1250 #endif1251 #endif1252 #if QC_SPIVMP_MPI_G01191253 1248 Int getSubPUMPILog2Size( ) { return m_iSubPUMPILog2Size; } 1254 1249 Void setSubPUMPILog2Size( Int u ) { m_iSubPUMPILog2Size = u; } 1250 #endif 1255 1251 #endif 1256 1252 #if H_3D_VSP -
branches/HTM-10.1-dev0/source/Lib/TLibCommon/TypeDef.h
r872 r876 83 83 // SAIT_VSO_EST_A0033, JCT3V-A0033 modification 3 84 84 // LGE_WVSO_A0119 85 // SCU_HS_VSD_BUGFIX_IMPROV_G0163 85 86 #define H_3D_NBDV 1 // Neighboring block disparity derivation 86 87 // QC_JCT3V-A0097 … … 102 103 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check 103 104 // LGE_ARP_CTX_F0161 JCT3V-F0161 105 // MTK_ARP_FLAG_CABAC_SIMP_G0061 Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061 106 // MTK_ARP_REF_SELECTION_G0053 ARP Reference picture selection in JCT3V-G0053 107 104 108 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 105 109 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 109 113 // LGE_IC_CTX_F0160 //JCT3V-F0160 110 114 // SEC_ONLY_TEXTURE_IC_F0151 115 // MTK_IC_FLAG_CABAC_SIMP_G0061 116 // SEC_IC_ARP_SIG_G0072, Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121 111 117 112 118 #if H_3D_NBDV … … 145 151 // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate 146 152 // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode 153 // MTK_NBDV_IVREF_FIX_G0067 , Disable IvMC, VSP when IVREF is not available, JCT3V-G0067 154 // SEC_DEPTH_DV_DERIVAITON_G0074, Simplification of DV derivation for depth, JCT3V-G0074 155 // QC_DEPTH_MERGE_SIMP_G0127 Remove DV candidate and shifting candidate for depth coding 156 147 157 #define H_3D_TMVP 1 // QC_TMVP_C0047 148 158 // Sony_M23639 … … 177 187 // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding 178 188 #define H_3D_SPIVMP 1 // H_3D_SPIVMP // JCT3V-F0110: Sub-PU level inter-view motion prediction 189 // SEC_SPIVMP_MCP_SIZE_G0077, Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077 190 // QC_SPIVMP_MPI_G0119 Sub-PU level MPI merge candidate 179 191 #define H_3D_FCO 0 // Flexible coding order for 3D 180 192 … … 279 291 280 292 #define MTK_DDD_G0063 1 // Disparity derived depth coding 281 #define HTM10RC1_FIX 293 #define HTM10RC1_FIX 1 // Fix of DDD 282 294 283 295 … … 311 323 #define KHU_SIMP_SPIVMP_G0147 1 // Simplification on Sub-PU level temporal interview motion prediction 312 324 313 #if H_3D_SPIVMP314 #define QC_SPIVMP_MPI_G0119 1 // Sub-PU level MPI merge candidate315 #endif316 317 #define QC_DEPTH_MERGE_SIMP_G0127 1 // Remove DV candidate and shifting candidate for depth coding318 #define SEC_IC_ARP_SIG_G0072 1 // Disabling IC when ARP is enabled, option 1 in JCT3V-G0072, part 2 in JCT3V-G0121319 #define SCU_HS_VSD_BUGFIX_IMPROV_G0163 1320 #define SEC_SPIVMP_MCP_SIZE_G0077 1 // Apply SPIVMP only to 2Nx2N partition, JCT3V-G0077321 #define SEC_DEPTH_DV_DERIVAITON_G0074 1 // Simplification of DV derivation for depth, JCT3V-G0074322 #define MTK_ARP_REF_SELECTION_G0053 1 // ARP Reference picture selection in JCT3V-G0053323 #define MTK_ARP_FLAG_CABAC_SIMP_G0061 1 // Use 2 context for ARP flag referring to only left neighbor block in JCT3V-G0061324 #define MTK_IC_FLAG_CABAC_SIMP_G0061 1 // Use only 1 context for IC flag in JCT3V-G0061325 #define MTK_NBDV_IVREF_FIX_G0067 1 // Disable IvMC, VSP when IVREF is not available, JCT3V-G0067326 325 #endif 327 326 -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r872 r876 1933 1933 READ_FLAG( uiCode, "iv_mv_pred_flag[i]"); pcVPS->setIvMvPredFlag ( i, uiCode == 1 ? true : false ); 1934 1934 #if H_3D_SPIVMP 1935 #if SEC_SPIVMP_MCP_SIZE_G00771936 1935 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); 1937 #else1938 READ_UVLC (uiCode, "log2_sub_PU_size_minus2"); pcVPS->setSubPULog2Size(i, uiCode+2);1939 #endif1940 1936 #endif 1941 1937 #endif … … 1965 1961 if (i!=1) 1966 1962 { 1967 #if SEC_SPIVMP_MCP_SIZE_G00771968 1963 READ_UVLC (uiCode, "log2_sub_PU_size_minus3[i]"); pcVPS->setSubPULog2Size(i, uiCode+3); 1969 #else1970 READ_UVLC (uiCode, "log2_sub_PU_size_minus2[i]"); pcVPS->setSubPULog2Size(i, uiCode+2);1971 #endif1972 1964 } 1973 1965 #endif … … 2013 2005 } 2014 2006 } 2015 #if QC_SPIVMP_MPI_G01192016 2007 READ_UVLC (uiCode, "log2_sub_PU_MPI_size_minus3"); pcVPS->setSubPUMPILog2Size( uiCode + 3 ); 2017 #endif2018 2008 READ_FLAG( uiCode, "iv_mv_scaling_flag"); pcVPS->setIvMvScalingFlag( uiCode == 1 ? true : false ); 2019 2009 } -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecCu.cpp
r872 r876 339 339 if( pcCU->getSlice()->getIsDepth()) 340 340 { 341 #if SEC_DEPTH_DV_DERIVAITON_G0074342 341 DvInfo.bDV = m_ppcCU[uiDepth]->getDispforDepth(0, 0, &DvInfo); 343 #else344 DvInfo.bDV = m_ppcCU[uiDepth]->getDispNeighBlocks(0, 0, &DvInfo);345 #endif346 342 } 347 343 else … … 414 410 m_pcEntropyDecoder->decodeMergeIndex( pcCU, 0, uiAbsPartIdx, uiDepth ); 415 411 UInt uiMergeIndex = pcCU->getMergeIndex(uiAbsPartIdx); 416 417 #if !SEC_IC_ARP_SIG_G0072 412 #if H_3D_ARP 413 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth ); 414 #endif 418 415 #if H_3D_IC 419 416 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 420 #endif421 #endif422 #if H_3D_ARP423 m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );424 #endif425 #if SEC_IC_ARP_SIG_G0072426 #if H_3D_IC427 m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );428 #endif429 417 #endif 430 418 -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp
r872 r876 111 111 pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth ); 112 112 113 #if SEC_IC_ARP_SIG_G0072114 113 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 115 #else116 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )117 #endif118 114 { 119 115 return; … … 272 268 decodeMergeIndex( pcCU, uiPartIdx, uiSubPartIdx, uiDepth ); 273 269 UInt uiMergeIndex = pcCU->getMergeIndex(uiSubPartIdx); 274 #if !SEC_IC_ARP_SIG_G0072 270 #if H_3D_ARP 271 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 272 #endif 275 273 #if H_3D_IC 276 274 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 277 #endif278 #endif279 #if H_3D_ARP280 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );281 #endif282 #if SEC_IC_ARP_SIG_G0072283 #if H_3D_IC284 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );285 #endif286 275 #endif 287 276 #if H_3D_DBBP … … 440 429 } 441 430 } 442 #if !SEC_IC_ARP_SIG_G0072 431 #if H_3D_ARP 432 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth ); 433 #endif 443 434 #if H_3D_IC 444 435 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth ); 445 #endif446 #endif447 #if H_3D_ARP448 decodeARPW ( pcCU, uiAbsPartIdx, uiDepth );449 #endif450 #if SEC_IC_ARP_SIG_G0072451 #if H_3D_IC452 decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );453 #endif454 436 #endif 455 437 } -
branches/HTM-10.1-dev0/source/Lib/TLibDecoder/TDecSbac.cpp
r872 r876 2189 2189 if( 1 == uiW ) 2190 2190 { 2191 #if MTK_ARP_FLAG_CABAC_SIMP_G00612192 2191 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 2 ) ); 2193 #else2194 m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 3 ) );2195 #endif2196 2192 uiW += ( 1 == uiCode ? 1 : 0 ); 2197 2193 } … … 2213 2209 { 2214 2210 UInt uiSymbol = 0; 2215 #if MTK_IC_FLAG_CABAC_SIMP_G00612216 2211 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) ); 2217 #else2218 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx );2219 m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );2220 #endif2221 2212 #if !H_MV_ENC_DEC_TRAC 2222 2213 DTRACE_CABAC_VL( g_nSymbolCounter++ ); -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r872 r876 1705 1705 WRITE_FLAG( pcVPS->getIvMvPredFlag ( i ) ? 1 : 0 , "iv_mv_pred_flag[i]"); 1706 1706 #if H_3D_SPIVMP 1707 #if SEC_SPIVMP_MCP_SIZE_G00771708 1707 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]"); 1709 #else1710 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]");1711 #endif1712 1708 #endif 1713 1709 #endif … … 1734 1730 if (i!=1) 1735 1731 { 1736 #if SEC_SPIVMP_MCP_SIZE_G00771737 1732 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-3, "log2_sub_PU_size_minus3[i]"); 1738 #else1739 WRITE_UVLC( pcVPS->getSubPULog2Size(i)-2, "log2_sub_PU_size_minus2[i]");1740 #endif1741 1733 } 1742 1734 #endif … … 1771 1763 } 1772 1764 } 1773 #if QC_SPIVMP_MPI_G01191774 1765 WRITE_UVLC( pcVPS->getSubPUMPILog2Size( ) - 3, "log2_sub_PU_MPI_size_minus3"); 1775 #endif1776 1766 #if H_3D_TMVP 1777 1767 WRITE_FLAG( pcVPS->getIvMvScalingFlag( ) ? 1 : 0 , "iv_mv_scaling_flag" ); -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
r872 r876 397 397 #if H_3D_SPIVMP 398 398 Int m_iSubPULog2Size; 399 #endif400 #if QC_SPIVMP_MPI_G0119401 399 Int m_iSubPUMPILog2Size; 402 400 #endif … … 507 505 Int getSubPULog2Size () { return m_iSubPULog2Size;} 508 506 Void setSubPULog2Size (Int u) { m_iSubPULog2Size = u; } 509 #endif510 #if QC_SPIVMP_MPI_G0119511 507 Int getSubPUMPILog2Size () { return m_iSubPUMPILog2Size;} 512 508 Void setSubPUMPILog2Size (Int u) { m_iSubPUMPILog2Size = u; } -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
r872 r876 582 582 if (rpcTempCU->getSlice()->getIsDepth() ) 583 583 { 584 #if SEC_DEPTH_DV_DERIVAITON_G0074585 584 DvInfo.bDV = rpcTempCU->getDispforDepth(0, 0, &DvInfo); 586 #else587 DvInfo.bDV = rpcTempCU->getDispNeighBlocks(0, 0, &DvInfo);588 #endif589 585 } 590 586 else … … 1533 1529 #endif 1534 1530 m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx ); 1535 #if !SEC_IC_ARP_SIG_G0072 1531 #if H_3D_ARP 1532 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1533 #endif 1536 1534 #if H_3D_IC 1537 1535 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1538 #endif1539 #endif1540 #if H_3D_ARP1541 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );1542 #endif1543 #if SEC_IC_ARP_SIG_G00721544 #if H_3D_IC1545 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx );1546 #endif1547 1536 #endif 1548 1537 finishCU(pcCU,uiAbsPartIdx,uiDepth); … … 1570 1559 // prediction Info ( Intra : direction mode, Inter : Mv, reference idx ) 1571 1560 m_pcEntropyCoder->encodePredInfo( pcCU, uiAbsPartIdx ); 1572 #if !SEC_IC_ARP_SIG_G0072 1561 1562 #if H_3D_ARP 1563 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx ); 1564 #endif 1573 1565 #if H_3D_IC 1574 1566 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx ); 1575 #endif1576 #endif1577 #if H_3D_ARP1578 m_pcEntropyCoder->encodeARPW( pcCU , uiAbsPartIdx );1579 #endif1580 #if SEC_IC_ARP_SIG_G00721581 #if H_3D_IC1582 m_pcEntropyCoder->encodeICFlag ( pcCU, uiAbsPartIdx );1583 #endif1584 1567 #endif 1585 1568 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130 … … 1809 1792 #if H_3D_ARP 1810 1793 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 1811 #if SEC_IC_ARP_SIG_G00721812 1794 if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV || bICFlag ) 1813 #else1814 if( nARPWMax < 0 || !rpcTempCU->getDvInfo(0).bDV )1815 #endif1816 1795 { 1817 1796 nARPWMax = 0; … … 2157 2136 Int nARPWMax = rpcTempCU->getSlice()->getARPStepNum() - 1; 2158 2137 2159 #if SEC_IC_ARP_SIG_G00722160 2138 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV || rpcTempCU->getICFlag(0) ) 2161 #else2162 if( nARPWMax < 0 || ePartSize != SIZE_2Nx2N || !rpcTempCU->getDvInfo(0).bDV )2163 #endif2164 2139 { 2165 2140 nARPWMax = 0; -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncEntropy.cpp
r872 r876 151 151 Void TEncEntropy::encodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, Bool bRD ) 152 152 { 153 #if SEC_IC_ARP_SIG_G0072154 153 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() || pcCU->getARPW( uiAbsPartIdx ) > 0 ) 155 #else156 if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) || pcCU->getSlice()->getIsDepth() )157 #endif158 154 { 159 155 return; -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
r872 r876 1050 1050 if( nBinNum > 1 ) 1051 1051 { 1052 #if MTK_ARP_FLAG_CABAC_SIMP_G00611053 1052 m_pcBinIf->encodeBin( ( iW == iMaxW ) ? 1 : 0, m_cCUPUARPWSCModel.get( 0, 0, 2 ) ); 1054 #else1055 m_pcBinIf->encodeBin( ( iW == iMaxW ) ? 1 : 0, m_cCUPUARPWSCModel.get( 0, 0, 3 ) );1056 #endif1057 1053 } 1058 1054 #if H_MV_ENC_DEC_TRAC … … 1072 1068 // get context function is here 1073 1069 UInt uiSymbol = pcCU->getICFlag( uiAbsPartIdx ) ? 1 : 0; 1074 #if MTK_IC_FLAG_CABAC_SIMP_G00611075 1070 m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, 0 ) ); 1076 #else1077 UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx ) ;1078 m_pcBinIf->encodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );1079 #endif1080 1071 #if !H_MV_ENC_DEC_TRAC 1081 1072 DTRACE_CABAC_VL( g_nSymbolCounter++ ); 1082 1073 DTRACE_CABAC_T( "\tICFlag" ); 1083 DTRACE_CABAC_T( "\tuiCtxIC: ");1084 DTRACE_CABAC_V( uiCtxIC );1085 1074 DTRACE_CABAC_T( "\tuiSymbol: "); 1086 1075 DTRACE_CABAC_V( uiSymbol ); -
branches/HTM-10.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
r872 r876 5616 5616 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 5617 5617 m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, true ); 5618 #if !SEC_IC_ARP_SIG_G0072 5618 #if H_3D_ARP 5619 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 5620 #endif 5619 5621 #if H_3D_IC 5620 5622 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 5621 #endif5622 #endif5623 #if H_3D_ARP5624 m_pcEntropyCoder->encodeARPW( pcCU, 0 );5625 #endif5626 #if SEC_IC_ARP_SIG_G00725627 #if H_3D_IC5628 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );5629 #endif5630 5623 #endif 5631 5624 uiBits = m_pcEntropyCoder->getNumberOfWrittenBits(); … … 7176 7169 m_pcEntropyCoder->encodeSkipFlag(pcCU, 0, true); 7177 7170 m_pcEntropyCoder->encodeMergeIndex(pcCU, 0, true); 7178 #if !SEC_IC_ARP_SIG_G0072 7171 #if H_3D_ARP 7172 m_pcEntropyCoder->encodeARPW( pcCU, 0 ); 7173 #endif 7179 7174 #if H_3D_IC 7180 7175 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7181 #endif7182 #endif7183 #if H_3D_ARP7184 m_pcEntropyCoder->encodeARPW( pcCU, 0 );7185 #endif7186 #if SEC_IC_ARP_SIG_G00727187 #if H_3D_IC7188 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );7189 #endif7190 7176 #endif 7191 7177 ruiBits += m_pcEntropyCoder->getNumberOfWrittenBits(); … … 7205 7191 #endif 7206 7192 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 7207 #if !SEC_IC_ARP_SIG_G0072 7193 #if H_3D_ARP 7194 m_pcEntropyCoder->encodeARPW( pcCU , 0 ); 7195 #endif 7208 7196 #if H_3D_IC 7209 7197 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true ); 7210 #endif7211 #endif7212 #if H_3D_ARP7213 m_pcEntropyCoder->encodeARPW( pcCU , 0 );7214 #endif7215 #if SEC_IC_ARP_SIG_G00727216 #if H_3D_IC7217 m_pcEntropyCoder->encodeICFlag( pcCU, 0, true );7218 #endif7219 7198 #endif 7220 7199 #if H_3D_INTER_SDC && !QC_SDC_UNIFY_G0130
Note: See TracChangeset for help on using the changeset viewer.