Changeset 773 in 3DVCSoftware for trunk/source/Lib/TLibCommon
- Timestamp:
- 16 Jan 2014, 09:56:13 (11 years ago)
- Location:
- trunk/source/Lib/TLibCommon
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibCommon/ContextTables.h
r724 r773 109 109 #define NUM_DEPTH_INTRA_MODE_CTX 8 ///< number of context models for depth intra modes 110 110 #define NUM_DDC_FLAG_CTX 2 ///< number of context models for deltaDC flag (DMM or RBC) 111 #if QC_DIM_DELTADC_UNIFY_F0132112 111 #define NUM_DDC_DATA_CTX 1 ///< number of context models for deltaDC data (DMM or RBC) 113 #else114 #define NUM_DDC_DATA_CTX 2 ///< number of context models for deltaDC data (DMM or RBC)115 #endif116 112 #if H_3D_DIM_DMM 117 113 #define NUM_DMM1_DATA_CTX 1 ///< number of context models for DMM1 data 118 #if !SEC_DMM3_RBC_F0147119 #define NUM_DMM3_DATA_CTX 1 ///< number of context models for DMM3 data120 #endif121 #endif122 #if H_3D_DIM_RBC123 #define NUM_RBC_DATA_CTX 1 ///< number of context models for RBC data124 114 #endif 125 115 #endif … … 377 367 INIT_ARPW[3][NUM_ARPW_CTX] = 378 368 { 379 #if LGE_ARP_CTX_F0161380 369 { 162, 153, 154, 162 }, 381 370 { 162, 153, 154, 162 }, 382 371 { 162, 153, 154, 162 }, 383 #else384 { 154, 154, 154, 154 },385 { 154, 154, 154, 154 },386 { 154, 154, 154, 154 },387 #endif388 372 }; 389 373 #endif … … 393 377 INIT_IC_FLAG[3][NUM_IC_FLAG_CTX] = 394 378 { 395 #if LGE_IC_CTX_F0160396 379 { 154, 154, 154, }, 397 380 { 154, 154, 154, }, 398 381 { 154, 154, 154, }, 399 #else400 { CNU, CNU, CNU, },401 { 197, 185, 201, },402 { 197, 185, 201, },403 #endif404 382 }; 405 383 #endif … … 423 401 INIT_DDC_DATA[3][NUM_DDC_DATA_CTX] = 424 402 { 425 #if QC_DIM_DELTADC_UNIFY_F0132 426 { 154 }, 427 { 154 }, 428 { 154 }, 429 #else 430 { CNU, CNU }, 431 { CNU, CNU }, 432 { CNU, CNU }, 433 #endif 403 { 154 }, 404 { 154 }, 405 { 154 }, 434 406 }; 435 407 #if H_3D_DIM_DMM … … 441 413 { CNU }, 442 414 }; 443 #if !SEC_DMM3_RBC_F0147444 static const UChar445 INIT_DMM3_DATA[3][NUM_DMM3_DATA_CTX] =446 {447 { CNU },448 { CNU },449 { CNU },450 };451 #endif452 #endif453 #if H_3D_DIM_RBC454 static const UChar455 INIT_RBC_DATA[3][NUM_RBC_DATA_CTX] =456 {457 { CNU },458 { CNU },459 { CNU },460 };461 415 #endif 462 416 #if H_3D_DIM_SDC -
trunk/source/Lib/TLibCommon/TComDataCU.cpp
r724 r773 120 120 m_dmmWedgeTabIdx[i] = NULL; 121 121 } 122 #if !SEC_DMM3_RBC_F0147123 m_dmm3IntraTabIdx = NULL;124 #endif125 #endif126 #if H_3D_DIM_RBC127 m_pucEdgeCode = NULL;128 m_pucEdgeNumber = NULL;129 m_pucEdgeStartPos = NULL;130 m_pbEdgeLeftFirst = NULL;131 m_pbEdgePartition = NULL;132 122 #endif 133 123 #if H_3D_DIM_SDC … … 146 136 m_piVSPFlag = NULL; 147 137 #endif 148 #if MTK_SPIVMP_F0110138 #if H_3D_SPIVMP 149 139 m_pbSPIVMPFlag = NULL; 150 140 #endif … … 200 190 m_piVSPFlag = (Char* )xMalloc(Char, uiNumPartition); 201 191 #endif 202 #if MTK_SPIVMP_F0110192 #if H_3D_SPIVMP 203 193 m_pbSPIVMPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 204 194 #endif … … 279 269 m_dmmWedgeTabIdx[i] = (UInt*)xMalloc(UInt, uiNumPartition); 280 270 } 281 #if !SEC_DMM3_RBC_F0147282 m_dmm3IntraTabIdx = (UInt*)xMalloc(UInt, uiNumPartition);283 #endif284 #endif285 #if H_3D_DIM_RBC286 m_pucEdgeCode = (UChar*)xMalloc(UChar, uiNumPartition * RBC_MAX_EDGE_NUM_PER_4x4);287 m_pucEdgeNumber = (UChar*)xMalloc(UChar, uiNumPartition);288 m_pucEdgeStartPos = (UChar*)xMalloc(UChar, uiNumPartition);289 m_pbEdgeLeftFirst = (Bool*)xMalloc(Bool, uiNumPartition);290 m_pbEdgePartition = (Bool*)xMalloc(Bool, uiNumPartition * 16);291 271 #endif 292 272 #if H_3D_DIM_SDC … … 362 342 if ( m_piVSPFlag ) { xFree(m_piVSPFlag); m_piVSPFlag = NULL; } 363 343 #endif 364 #if MTK_SPIVMP_F0110344 #if H_3D_SPIVMP 365 345 if ( m_pbSPIVMPFlag ) { xFree(m_pbSPIVMPFlag); m_pbSPIVMPFlag = NULL; } 366 346 #endif … … 417 397 if ( m_dmmWedgeTabIdx[i] ) { xFree( m_dmmWedgeTabIdx[i] ); m_dmmWedgeTabIdx[i] = NULL; } 418 398 } 419 #if !SEC_DMM3_RBC_F0147420 if ( m_dmm3IntraTabIdx ) { xFree( m_dmm3IntraTabIdx ); m_dmm3IntraTabIdx = NULL; }421 #endif422 #endif423 #if H_3D_DIM_RBC424 if ( m_pbEdgeLeftFirst ) { xFree( m_pbEdgeLeftFirst ); m_pbEdgeLeftFirst = NULL; }425 if ( m_pucEdgeStartPos ) { xFree( m_pucEdgeStartPos ); m_pucEdgeStartPos = NULL; }426 if ( m_pucEdgeNumber ) { xFree( m_pucEdgeNumber ); m_pucEdgeNumber = NULL; }427 if ( m_pucEdgeCode ) { xFree( m_pucEdgeCode ); m_pucEdgeCode = NULL; }428 if ( m_pbEdgePartition ) { xFree( m_pbEdgePartition ); m_pbEdgePartition = NULL; }429 399 #endif 430 400 #if H_3D_DIM_SDC … … 571 541 m_piVSPFlag[ui] = pcFrom->m_piVSPFlag[ui]; 572 542 #endif 573 #if MTK_SPIVMP_F0110543 #if H_3D_SPIVMP 574 544 m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui]; 575 545 #endif … … 616 586 memset( m_piVSPFlag + firstElement, 0, numElements * sizeof( *m_piVSPFlag ) ); 617 587 #endif 618 #if MTK_SPIVMP_F0110588 #if H_3D_SPIVMP 619 589 memset( m_pbSPIVMPFlag + firstElement, 0, numElements * sizeof( *m_pbSPIVMPFlag ) ); 620 590 #endif … … 643 613 memset( m_dmmWedgeTabIdx[i] + firstElement, 0, numElements * sizeof( *m_dmmWedgeTabIdx[i] ) ); 644 614 } 645 #if !SEC_DMM3_RBC_F0147646 memset( m_dmm3IntraTabIdx + firstElement, 0, numElements * sizeof( *m_dmm3IntraTabIdx ) );647 #endif648 #endif649 #if H_3D_DIM_RBC650 memset( m_pucEdgeCode + firstElement, 0, numElements * sizeof( *m_pucEdgeCode ) * RBC_MAX_EDGE_NUM_PER_4x4 );651 memset( m_pucEdgeNumber + firstElement, 0, numElements * sizeof( *m_pucEdgeNumber ) );652 memset( m_pucEdgeStartPos + firstElement, 0, numElements * sizeof( *m_pucEdgeStartPos ) );653 memset( m_pbEdgeLeftFirst + firstElement, false, numElements * sizeof( *m_pbEdgeLeftFirst ) );654 memset( m_pbEdgePartition + firstElement, false, numElements * sizeof( *m_pbEdgePartition ) * 16 );655 615 #endif 656 616 #if H_3D_DIM_SDC … … 799 759 m_piVSPFlag[ui] = 0; 800 760 #endif 801 #if MTK_SPIVMP_F0110761 #if H_3D_SPIVMP 802 762 m_pbSPIVMPFlag[ui] = 0; 803 763 #endif … … 825 785 m_dmmWedgeTabIdx[i] [ui] = 0; 826 786 } 827 #if !SEC_DMM3_RBC_F0147828 m_dmm3IntraTabIdx [ui] = 0;829 #endif830 787 #endif 831 788 #if H_3D_DIM_SDC … … 902 859 memset( m_piVSPFlag, 0, sizeof( Char ) * m_uiNumPartition ); 903 860 #endif 904 #if MTK_SPIVMP_F0110861 #if H_3D_SPIVMP 905 862 memset( m_pbSPIVMPFlag, 0, sizeof( Bool ) * m_uiNumPartition ); 906 863 #endif … … 941 898 memset( m_dmmWedgeTabIdx[i], 0, sizeof(UInt) * m_uiNumPartition ); 942 899 } 943 #if !SEC_DMM3_RBC_F0147944 memset( m_dmm3IntraTabIdx, 0, sizeof(UInt) * m_uiNumPartition );945 #endif946 #endif947 #if H_3D_DIM_RBC948 memset( m_pucEdgeCode , 0, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );949 memset( m_pucEdgeNumber , 0, iSizeInUchar );950 memset( m_pucEdgeStartPos, 0, iSizeInUchar );951 memset( m_pbEdgeLeftFirst, 0, iSizeInBool );952 memset( m_pbEdgePartition, 0, iSizeInBool * 16 );953 900 #endif 954 901 #if H_3D_DIM_SDC … … 1001 948 m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui]; 1002 949 #endif 1003 #if MTK_SPIVMP_F0110950 #if H_3D_SPIVMP 1004 951 m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui]; 1005 952 #endif … … 1028 975 m_dmmWedgeTabIdx[i] [ui] = pcCU->m_dmmWedgeTabIdx[i] [uiPartOffset+ui]; 1029 976 } 1030 #if !SEC_DMM3_RBC_F01471031 m_dmm3IntraTabIdx [ui] = pcCU->m_dmm3IntraTabIdx[uiPartOffset+ui];1032 #endif1033 977 #endif 1034 978 #if H_3D_DIM_SDC … … 1154 1098 m_piVSPFlag = pcCU->getVSPFlag() + uiPart; 1155 1099 #endif 1156 #if MTK_SPIVMP_F01101100 #if H_3D_SPIVMP 1157 1101 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1158 1102 #endif … … 1187 1131 m_dmmWedgeTabIdx[i] = pcCU->getDmmWedgeTabIdx( i ) + uiPart; 1188 1132 } 1189 #if !SEC_DMM3_RBC_F01471190 m_dmm3IntraTabIdx = pcCU->getDmm3IntraTabIdx() + uiPart;1191 #endif1192 #endif1193 #if H_3D_DIM_RBC1194 m_pucEdgeCode = pcCU->getEdgeCode( uiPart );1195 m_pucEdgeNumber = pcCU->getEdgeNumber() + uiPart;1196 m_pucEdgeStartPos = pcCU->getEdgeStartPos() + uiPart;1197 m_pbEdgeLeftFirst = pcCU->getEdgeLeftFirst() + uiPart;1198 m_pbEdgePartition = pcCU->getEdgePartition( uiPart );1199 1133 #endif 1200 1134 #if H_3D_DIM_SDC … … 1313 1247 m_pDvInfo = pcCU->getDvInfo() + uiAbsPartIdx; 1314 1248 #endif 1315 #if MTK_SPIVMP_F01101249 #if H_3D_SPIVMP 1316 1250 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1317 1251 #endif … … 1365 1299 1366 1300 #endif 1367 #if MTK_SPIVMP_F01101301 #if H_3D_SPIVMP 1368 1302 memcpy( m_pbSPIVMPFlag + uiOffset, pcCU->getSPIVMPFlag(), sizeof( Bool ) * uiNumPartition ); 1369 1303 #endif … … 1391 1325 memcpy( m_dmmWedgeTabIdx[i] + uiOffset, pcCU->getDmmWedgeTabIdx( i ), sizeof(UInt) * uiNumPartition ); 1392 1326 } 1393 #if !SEC_DMM3_RBC_F01471394 memcpy( m_dmm3IntraTabIdx + uiOffset, pcCU->getDmm3IntraTabIdx(), sizeof(UInt) * uiNumPartition );1395 #endif1396 #endif1397 #if H_3D_DIM_RBC1398 memcpy( getEdgeCode( uiOffset ), pcCU->getEdgeCode(0), iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );1399 memcpy( getEdgeNumber() + uiOffset, pcCU->getEdgeNumber(), iSizeInUchar );1400 memcpy( getEdgeStartPos() + uiOffset, pcCU->getEdgeStartPos(), iSizeInUchar );1401 memcpy( getEdgeLeftFirst() + uiOffset, pcCU->getEdgeLeftFirst(), iSizeInBool );1402 memcpy( getEdgePartition( uiOffset ), pcCU->getEdgePartition(0), iSizeInBool * 16 );1403 1327 #endif 1404 1328 #if H_3D_DIM_SDC … … 1497 1421 memcpy( rpcCU->getDvInfo() + m_uiAbsIdxInLCU, m_pDvInfo, sizeof( *m_pDvInfo ) * m_uiNumPartition ); 1498 1422 #endif 1499 #if MTK_SPIVMP_F01101423 #if H_3D_SPIVMP 1500 1424 memcpy( rpcCU->getSPIVMPFlag() + m_uiAbsIdxInLCU, m_pbSPIVMPFlag, sizeof( Bool ) * m_uiNumPartition ); 1501 1425 #endif … … 1523 1447 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + m_uiAbsIdxInLCU, m_dmmWedgeTabIdx[i], sizeof(UInt) * m_uiNumPartition ); 1524 1448 } 1525 #if !SEC_DMM3_RBC_F01471526 memcpy( rpcCU->getDmm3IntraTabIdx() + m_uiAbsIdxInLCU, m_dmm3IntraTabIdx, sizeof(UInt) * m_uiNumPartition );1527 #endif1528 #endif1529 #if H_3D_DIM_RBC1530 memcpy( rpcCU->getEdgeCode( m_uiAbsIdxInLCU ), m_pucEdgeCode, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );1531 memcpy( rpcCU->getEdgeNumber() + m_uiAbsIdxInLCU, m_pucEdgeNumber, iSizeInUchar );1532 memcpy( rpcCU->getEdgeStartPos() + m_uiAbsIdxInLCU, m_pucEdgeStartPos, iSizeInUchar );1533 memcpy( rpcCU->getEdgeLeftFirst() + m_uiAbsIdxInLCU, m_pbEdgeLeftFirst, iSizeInBool );1534 memcpy( rpcCU->getEdgePartition( m_uiAbsIdxInLCU ), m_pbEdgePartition, iSizeInBool * 16 );1535 1449 #endif 1536 1450 #if H_3D_DIM_SDC … … 1616 1530 memcpy( rpcCU->getVSPFlag() + uiPartOffset, m_piVSPFlag, sizeof(Char) * uiQNumPart ); 1617 1531 #endif 1618 #if MTK_SPIVMP_F01101532 #if H_3D_SPIVMP 1619 1533 memcpy( rpcCU->getSPIVMPFlag() + uiPartOffset, m_pbSPIVMPFlag, sizeof(Bool) * uiQNumPart ); 1620 1534 #endif … … 1641 1555 memcpy( rpcCU->getDmmWedgeTabIdx( i ) + uiPartOffset, m_dmmWedgeTabIdx[i], sizeof(UInt) * uiQNumPart ); 1642 1556 } 1643 #if !SEC_DMM3_RBC_F01471644 memcpy( rpcCU->getDmm3IntraTabIdx() + uiPartOffset, m_dmm3IntraTabIdx, sizeof(UInt) * uiQNumPart );1645 #endif1646 #endif1647 #if H_3D_DIM_RBC1648 memcpy( rpcCU->getEdgeCode( uiPartOffset ), m_pucEdgeCode, iSizeInUchar * RBC_MAX_EDGE_NUM_PER_4x4 );1649 memcpy( rpcCU->getEdgeNumber() + uiPartOffset, m_pucEdgeNumber, iSizeInUchar );1650 memcpy( rpcCU->getEdgeStartPos() + uiPartOffset, m_pucEdgeStartPos, iSizeInUchar );1651 memcpy( rpcCU->getEdgeLeftFirst() + uiPartOffset, m_pbEdgeLeftFirst, iSizeInBool );1652 memcpy( rpcCU->getEdgePartition( uiPartOffset ), m_pbEdgePartition, iSizeInBool * 16 );1653 1557 #endif 1654 1558 #if H_3D_DIM_SDC … … 2375 2279 UInt uiCtx = 0; 2376 2280 2377 #if LGE_IC_CTX_F01602378 2281 TComDataCU* pcTempCU = NULL; 2379 2282 UInt uiTempPartIdx = 0; … … 2384 2287 pcTempCU = getPUAbove( uiTempPartIdx, m_uiAbsIdxInLCU + uiAbsPartIdx ); 2385 2288 uiCtx += ( pcTempCU ) ? pcTempCU->isIC( uiTempPartIdx ) : 0; 2386 #endif2387 2289 2388 2290 return uiCtx; … … 2745 2647 } 2746 2648 2747 #if MTK_SPIVMP_F01102649 #if H_3D_SPIVMP 2748 2650 Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2749 2651 { … … 3345 3247 * false: otherwise 3346 3248 */ 3347 #if ETRIKHU_MERGE_REUSE_F00933348 3249 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3349 3250 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3350 #else 3351 inline Bool TComDataCU::xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 3352 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag ) 3353 #endif 3354 { 3251 { 3355 3252 if ( m_pcSlice->getViewIndex() == 0 || !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) || m_pcSlice->getIsDepth() ) 3356 3253 { … … 3367 3264 } 3368 3265 3369 #if ETRIKHU_MERGE_REUSE_F00933370 3266 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3371 #endif3372 3267 3373 3268 Bool refViewAvailFlag = false; … … 3454 3349 3455 3350 #if H_3D_IV_MERGE 3456 #if ETRIKHU_MERGE_REUSE_F00933457 3351 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 3458 3352 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ) 3459 #else3460 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,3461 Int* ivCandRefIdx, Int iPosIvDC, Int* vspFlag )3462 #endif3463 3353 { 3464 3354 for(Int iLoop = 0; iLoop < 2; iLoop ++ ) … … 3479 3369 clipMv( cMv ); 3480 3370 3481 #if ETRIKHU_MERGE_REUSE_F00933482 3371 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3483 #endif3484 3372 3485 3373 abCandIsInter [ iCount ] = true; … … 3502 3390 if(ivCandDir[iLoop + 2]) 3503 3391 { 3504 #if ETRIKHU_MERGE_REUSE_F00933505 3392 TComMvField tmpMV[2]; 3506 3393 UChar tmpDir = ivCandDir[iLoop + 2]; 3507 #else3508 abCandIsInter [ iCount ] = true;3509 puhInterDirNeighbours[ iCount ] = ivCandDir[iLoop + 2];3510 #endif3511 3394 if( ( ivCandDir[iLoop + 2] & 1 ) == 1 ) 3512 3395 { 3513 #if ETRIKHU_MERGE_REUSE_F00933514 3396 tmpMV[0].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] ); 3515 #else3516 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ (iLoop<<1) + 4 ], ivCandRefIdx[ (iLoop<<1) + 4 ] );3517 #endif3518 3397 } 3519 3398 if( ( ivCandDir[iLoop + 2] & 2 ) == 2 ) 3520 3399 { 3521 #if ETRIKHU_MERGE_REUSE_F00933522 3400 tmpMV[1].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] ); 3523 #else3524 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] );3525 #endif3526 3401 } 3527 3402 … … 3530 3405 if( !iLoop && ivCandDir[0] > 0) 3531 3406 { 3532 #if ETRIKHU_MERGE_REUSE_F00933533 3407 if(tmpDir == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0]==tmpMV[0] && pcMvFieldNeighbours[1]==tmpMV[1]) 3534 #else3535 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[0] && pcMvFieldNeighbours[0 ]== pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[1]==pcMvFieldNeighbours[(iCount<<1)+1])3536 #endif3537 3408 { 3538 3409 bRemove = true; 3539 #if !ETRIKHU_MERGE_REUSE_F00933540 abCandIsInter [ iCount ] = false;3541 puhInterDirNeighbours[ iCount ] = 0;3542 TComMv cZeroMv;3543 pcMvFieldNeighbours [ iCount<<1 ].setMvField( cZeroMv, NOT_VALID );3544 pcMvFieldNeighbours [(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );3545 #endif3546 3410 } 3547 3411 } 3548 3412 if(!bRemove) 3549 3413 { 3550 3551 #if ETRIKHU_MERGE_REUSE_F00933552 3414 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 3553 3415 … … 3562 3424 pcMvFieldNeighbours[ (iCount<<1)+1 ].setMvField( ivCandMv[ (iLoop<<1) + 5 ], ivCandRefIdx[ (iLoop<<1) + 5 ] ); 3563 3425 } 3564 #endif3565 3566 3426 #if H_3D_NBDV 3567 3427 if(iLoop) // For IvMcShift candidate … … 3603 3463 #endif 3604 3464 3605 3606 3607 3608 3609 3610 3611 3612 3613 #if ETRIKHU_MERGE_REUSE_F0093 3465 #if H_3D 3614 3466 Void TComDataCU::rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV) 3615 3467 { … … 3999 3851 * \param numValidMergeCand 4000 3852 */ 4001 #if ETRIKHU_MERGE_REUSE_F00933853 #if H_3D 4002 3854 Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 4003 3855 #else … … 4008 3860 , InheritedVSPDisInfo* inheritedVSPDisInfo 4009 3861 #endif 4010 #if MTK_SPIVMP_F01103862 #if H_3D_SPIVMP 4011 3863 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 4012 3864 #endif … … 4024 3876 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 4025 3877 #endif 4026 #if ETRIKHU_MERGE_REUSE_F00933878 #if H_3D 4027 3879 TComMvField tmpMV[2]; 4028 3880 UChar tmpDir; … … 4046 3898 { 4047 3899 abCandIsInter[ui] = false; 4048 #if H_3D_IV_MERGE4049 pcMvFieldNeighbours[ ( ui << 1 ) ].setMvField(cZeroMv, NOT_VALID);4050 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);4051 #else4052 3900 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 4053 3901 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 4054 #endif4055 3902 } 4056 3903 #endif … … 4069 3916 4070 3917 UInt uiPartIdxLT, uiPartIdxRT, uiPartIdxLB; 4071 #if ! ETRIKHU_MERGE_REUSE_F00933918 #if !H_3D 4072 3919 PartSize cCurPS = getPartitionSize( uiAbsPartIdx ); 4073 3920 #endif 4074 3921 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 4075 3922 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 4076 #if SEC_MPI_ENABLING_MERGE_F01503923 #if H_3D 4077 3924 Bool bMPIFlag = getSlice()->getVPS()->getMPIFlag( getSlice()->getLayerIdInVps() ); 4078 #endif4079 #if QC_DEPTH_IV_MRG_F01254080 3925 Bool bIsDepth = getSlice()->getIsDepth(); 4081 #if !BUGFIX_F00934082 Bool bDepthIPMCAvai = false;4083 #endif4084 3926 #endif 4085 3927 4086 #if LGE_SHARP_VSP_INHERIT_F01044087 3928 #if H_3D_IC 4088 3929 Bool bICFlag = getICFlag(uiAbsPartIdx); … … 4091 3932 Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false; 4092 3933 #endif 4093 #endif 4094 4095 #if ETRIKHU_MERGE_REUSE_F0093 3934 3935 #if H_3D 4096 3936 Int iPosLeftAbove[2] = {-1, -1}; 4097 3937 … … 4118 3958 #if H_3D_VSP 4119 3959 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1 4120 #if LGE_SHARP_VSP_INHERIT_F01044121 3960 #if H_3D_IC 4122 3961 && !bICFlag … … 4125 3964 && !bARPFlag 4126 3965 #endif 4127 #endif4128 3966 ) 4129 3967 { 4130 3968 vspFlag[numA1B1B0] = 1; 4131 #if !MTK_VSP_SIMPLIFICATION_F01114132 xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);4133 #endif4134 3969 } 4135 3970 #endif … … 4145 3980 iPosLeftAbove[1] = numA1B1B0; 4146 3981 #if H_3D_VSP 4147 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F01114148 3982 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 4149 #else4150 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 14151 #endif4152 #if LGE_SHARP_VSP_INHERIT_F01044153 3983 #if H_3D_IC 4154 3984 && !bICFlag … … 4157 3987 && !bARPFlag 4158 3988 #endif 4159 #endif4160 3989 ) 4161 3990 { 4162 3991 vspFlag[numA1B1B0] = 1; 4163 #if !MTK_VSP_SIMPLIFICATION_F01114164 xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo);4165 #endif4166 3992 } 4167 3993 #endif … … 4177 4003 { 4178 4004 #if H_3D_VSP 4179 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F01114180 4005 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1) 4181 #else4182 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 14183 #endif4184 #if LGE_SHARP_VSP_INHERIT_F01044185 4006 #if H_3D_IC 4186 4007 && !bICFlag … … 4189 4010 && !bARPFlag 4190 4011 #endif 4191 #endif4192 4012 ) 4193 4013 { 4194 4014 vspFlag[numA1B1B0] = 1; 4195 #if !MTK_VSP_SIMPLIFICATION_F01114196 xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);4197 #endif4198 4015 } 4199 4016 #endif … … 4208 4025 #if H_3D_VSP 4209 4026 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1 4210 #if LGE_SHARP_VSP_INHERIT_F01044211 4027 #if H_3D_IC 4212 4028 && !bICFlag … … 4215 4031 && !bARPFlag 4216 4032 #endif 4217 #endif4218 4033 ) 4219 4034 { 4220 4035 vspFlag[numA1B1B0] = 1; 4221 #if !MTK_VSP_SIMPLIFICATION_F01114222 xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);4223 #endif4224 4036 } 4225 4037 #endif … … 4235 4047 { 4236 4048 #if H_3D_VSP 4237 #if BUGFIX_2_F0093 && MTK_VSP_SIMPLIFICATION_F01114238 4049 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1) 4239 #else4240 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 14241 #endif4242 #if LGE_SHARP_VSP_INHERIT_F01044243 4050 #if H_3D_IC 4244 4051 && !bICFlag … … 4247 4054 && !bARPFlag 4248 4055 #endif 4249 #endif4250 4056 ) 4251 4057 { 4252 4058 vspFlag[numA1B1B0+iCountHEVC] = 1; 4253 #if !MTK_VSP_SIMPLIFICATION_F01114254 xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);4255 #endif4256 4059 } 4257 4060 #endif … … 4265 4068 4266 4069 #if H_3D_IV_MERGE 4267 4070 4268 4071 ///////////////////////////////////////////// 4269 4072 //////// TEXTURE MERGE CANDIDATE (T) //////// 4270 4073 ///////////////////////////////////////////// 4271 4272 #if SEC_MPI_ENABLING_MERGE_F0150 4074 4273 4075 if( bMPIFlag) 4274 #else4275 if( m_pcSlice->getIsDepth())4276 #endif4277 4076 { 4278 4077 UInt uiPartIdxCenter; 4279 4078 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 4280 4281 #if ETRIKHU_MERGE_REUSE_F00934282 4079 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4283 4080 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); 4284 4081 Int tRef[2]={-1, -1}; 4285 #endif4286 4082 4287 4083 #if H_3D_FCO … … 4289 4085 TComDataCU *pcTextureCU = 0; 4290 4086 if ( pcTexturePic ) 4291 4087 pcTextureCU = pcTexturePic->getCU( getAddr() ); 4292 4088 #else 4293 4089 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 4294 4090 #endif 4295 4091 4296 4092 #if H_3D_FCO 4297 4093 if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) ) … … 4300 4096 #endif 4301 4097 { 4302 #if ETRIKHU_MERGE_REUSE_F00934303 4098 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, tmpMV[0] ); 4304 4099 tRef[0] = getPic()->isTextRefValid( REF_PIC_LIST_0, tmpMV[0].getRefIdx() ); … … 4414 4209 } 4415 4210 iCount ++; 4416 4417 #else 4418 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 4419 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() ); 4420 if( (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 4421 { 4422 TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv(); 4423 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4424 cMvPred+=cAdd; 4425 cMvPred>>=2; 4426 clipMv(cMvPred); 4427 pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef); 4428 } 4429 if ( getSlice()->isInterB() ) 4430 { 4431 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4432 iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx() ); 4433 if( (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) && ( iValidDepRef >= 0) ) 4434 { 4435 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 4436 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 4437 cMvPred+=cAdd; 4438 cMvPred>>=2; 4439 clipMv(cMvPred); 4440 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef); 4441 } 4442 } 4443 puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0; 4444 puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0; 4445 if( puhInterDirNeighbours[iCount] != 0 ) 4446 { 4447 abCandIsInter[iCount] = true; 4448 if ( mrgCandIdx == iCount ) 4449 { 4450 return; 4451 } 4452 iCount ++; 4453 } 4454 #endif 4455 } 4456 } 4457 } 4458 4459 4460 #if !ETRIKHU_MERGE_REUSE_F0093 4461 ////////////////////////////////// 4462 //////// GET DISPARITIES //////// 4463 ////////////////////////////////// 4464 4465 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 4466 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 4467 { 4468 inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo; 4469 } 4470 #endif 4211 } 4212 } 4213 } 4471 4214 4472 4215 ///////////////////////////////////////////////////////////////// … … 4475 4218 4476 4219 Int posIvDC = -1; 4477 #if !ETRIKHU_MERGE_REUSE_F00934478 Bool bLeftAvai = false;4479 Int iPosLeftAbove[2] = {-1, -1};4480 #endif4481 4220 4482 4221 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; … … 4489 4228 4490 4229 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 4491 4230 4492 4231 if ( ivMvPredFlag ) 4493 4232 { 4494 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir 4495 #if QC_DEPTH_IV_MRG_F0125 4496 , bIsDepth 4497 #endif 4498 #if MTK_SPIVMP_F0110 4499 , pcMvFieldSP, puhInterDirSP 4500 #endif 4501 ); 4233 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP ); 4502 4234 } 4503 4235 4504 4236 /////////////////////////////////////////////// 4505 4237 //////// INTER VIEW MOTION COMP(IvMC) ///////// … … 4508 4240 if( ivCandDir[0] ) 4509 4241 { 4510 #if ETRIKHU_MERGE_REUSE_F00934511 4242 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 4512 4243 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); … … 4525 4256 Int iCnloop=0; 4526 4257 4527 #if BUGFIX_F00934528 4258 if (!bIsDepth) 4529 4259 { 4530 #endif4531 4260 for(Int i = 0; i < 2; i ++) 4532 4261 { … … 4542 4271 } 4543 4272 } 4544 #if BUGFIX_F0093 4545 } 4546 #endif 4547 #if QC_DEPTH_IV_MRG_F0125 4548 #if BUGFIX_F0093 4273 } 4549 4274 if (bIsDepth) 4550 #else4551 if ( bIsDepth && !bRemoveSpa)4552 #endif4553 4275 { 4554 4276 iCnloop = iCount-1; 4555 4277 for(; iCnloop >= 0; iCnloop --) 4556 4278 { 4557 #if BUGFIX_F00934558 4279 if(ivCandDir[0] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==tmpMV[0] && pcMvFieldNeighbours[(iCnloop<<1)+1]==tmpMV[1]) // F0125 compatible with F0093 4559 #else4560 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])4561 #endif4562 4280 { 4563 4281 bRemoveSpa = true; … … 4565 4283 } 4566 4284 } 4567 #if !BUGFIX_F0093 4568 if(!bRemoveSpa) 4569 { 4570 bDepthIPMCAvai = true; 4571 } 4572 #endif 4573 } 4574 #endif 4285 } 4575 4286 4576 4287 if (!bRemoveSpa) … … 4628 4339 if (bIvMC) 4629 4340 { 4630 #if MTK_SPIVMP_F01104631 4341 pbSPIVMPFlag[iCount] = true; 4632 #endif4633 4342 if( ( ivCandDir[0] & 1 ) == 1 ) 4634 4343 { … … 4642 4351 puhInterDirNeighbours[ iCount ] = ivCandDir[0]; 4643 4352 4644 #if !BUGFIX_F00934645 #if QC_DEPTH_IV_MRG_F01254646 if ( bDepthIPMCAvai || !bIsDepth )4647 {4648 #endif4649 #endif4650 if ( mrgCandIdx == iCount )4651 {4652 return;4653 }4654 iCount ++;4655 #if !BUGFIX_F00934656 #if QC_DEPTH_IV_MRG_F01254657 }4658 #endif4659 #endif4660 }4661 #else4662 abCandIsInter [ iCount ] = true;4663 puhInterDirNeighbours[ iCount ] = ivCandDir[0];4664 4665 if( ( ivCandDir[0] & 1 ) == 1 )4666 {4667 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] );4668 }4669 if( ( ivCandDir[0] & 2 ) == 2 )4670 {4671 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] );4672 }4673 #if QC_DEPTH_IV_MRG_F01254674 if ( bIsDepth )4675 {4676 Bool bRemoveSpa = false;4677 Int iCnloop = iCount-1;4678 for(; iCnloop >= 0; iCnloop --)4679 {4680 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])4681 {4682 bRemoveSpa = true;4683 abCandIsInter [ iCount ] = false;4684 4685 puhInterDirNeighbours[iCount] = 0;4686 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );4687 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );4688 break;4689 }4690 }4691 if(!bRemoveSpa)4692 {4693 bDepthIPMCAvai = true;4694 }4695 }4696 if ( bDepthIPMCAvai || !bIsDepth )4697 {4698 #endif4699 4353 if ( mrgCandIdx == iCount ) 4700 4354 { … … 4702 4356 } 4703 4357 iCount ++; 4704 #if QC_DEPTH_IV_MRG_F0125 4705 } 4706 #endif 4707 4708 #endif 4709 4358 } 4710 4359 } 4711 4360 … … 4717 4366 #endif 4718 4367 4719 4720 4721 4722 4723 #if ETRIKHU_MERGE_REUSE_F0093 4368 #if H_3D 4724 4369 iCount += numA1B1B0; 4725 4370 #else 4726 #if H_3D4727 ////////////////////////////4728 //////// LEFT (A1) /////////4729 ////////////////////////////4730 #endif4731 4371 //left 4732 4372 UInt uiLeftPartIdx = 0; … … 4748 4388 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4749 4389 } 4750 #if H_3D_IV_MERGE 4751 Bool bRemoveSpa = false; //pruning to inter-view candidates 4752 #if QC_DEPTH_IV_MRG_F0125 4753 Int iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1); 4754 #else 4755 Int iCnloop = iCount - 1; 4756 #endif 4757 for(; iCnloop >= 0; iCnloop --) 4758 { 4759 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4760 { 4761 bRemoveSpa = true; 4762 abCandIsInter [ iCount ] = false; 4763 4764 //reset to the default value for MC 4765 puhInterDirNeighbours[iCount] = 0; 4766 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 4767 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4768 break; 4769 } 4770 } 4771 if(!bRemoveSpa) 4772 { 4773 bLeftAvai = true; 4774 iPosLeftAbove[0] = iCount; 4775 #if H_3D_NBDV 4776 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 4777 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4778 #endif 4779 #if H_3D_VSP 4780 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 1 4781 #if LGE_SHARP_VSP_INHERIT_F0104 4782 #if H_3D_IC 4783 && !bICFlag 4784 #endif 4785 #if H_3D_ARP 4786 && !bARPFlag 4787 #endif 4788 #endif 4789 ) 4790 { 4791 vspFlag[iCount] = 1; 4792 #if !MTK_VSP_SIMPLIFICATION_F0111 4793 xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo); 4794 #endif 4795 } 4796 #endif 4797 if ( mrgCandIdx == iCount ) 4798 { 4799 return; 4800 } 4801 iCount ++; 4802 } 4803 #else // H_3D_IV_MERGE 4390 4804 4391 if ( mrgCandIdx == iCount ) 4805 4392 { … … 4807 4394 } 4808 4395 iCount ++; 4809 #endif // H_3D_IV_MERGE4810 4396 } 4811 4397 … … 4815 4401 return; 4816 4402 } 4817 #if H_3D 4818 //////////////////////////// 4819 //////// ABOVE (B1) //////// 4820 //////////////////////////// 4821 #endif 4403 4822 4404 // above 4823 4405 UInt uiAbovePartIdx = 0; … … 4839 4421 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4840 4422 } 4841 #if H_3D_IV_MERGE 4842 Bool bRemoveSpa = false; //pruning to inter-view candidates 4843 #if QC_DEPTH_IV_MRG_F0125 4844 Int iCnloop; 4845 if( bIsDepth ) 4846 iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai) ? (iCount-2): (iCount-1)); 4847 else 4848 iCnloop = bLeftAvai? (iCount-2): (iCount-1); 4849 #else 4850 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 4851 #endif 4852 for(; iCnloop >= 0; iCnloop --) 4853 { 4854 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 4855 { 4856 bRemoveSpa = true; 4857 abCandIsInter [ iCount ] = false; 4858 4859 //reset to the default value for MC 4860 puhInterDirNeighbours[iCount] = 0; 4861 4862 pcMvFieldNeighbours[iCount<<1] .setMvField( cZeroMv, NOT_VALID ); 4863 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 4864 break; 4865 } 4866 } 4867 4868 if(!bRemoveSpa) 4869 { 4870 iPosLeftAbove[1] = iCount; 4871 #if H_3D_NBDV 4872 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 4873 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4874 #endif 4875 #if H_3D_VSP 4876 #if MTK_VSP_SIMPLIFICATION_F0111 4877 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 4878 #if LGE_SHARP_VSP_INHERIT_F0104 4879 #if H_3D_IC 4880 && !bICFlag 4881 #endif 4882 #if H_3D_ARP 4883 && !bARPFlag 4884 #endif 4885 #endif 4886 ) 4887 #else 4888 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1 4889 #if LGE_SHARP_VSP_INHERIT_F0104 4890 #if H_3D_IC 4891 && !bICFlag 4892 #endif 4893 #if H_3D_ARP 4894 && !bARPFlag 4895 #endif 4896 #endif 4897 ) 4898 #endif 4899 { 4900 4901 vspFlag[iCount] = 1; 4902 #if !MTK_VSP_SIMPLIFICATION_F0111 4903 xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo); 4904 #endif 4905 } 4906 #endif 4907 if ( mrgCandIdx == iCount ) 4908 { 4909 return; 4910 } 4911 iCount ++; 4912 } 4913 #else // H_3D_IV_MERGE 4423 4914 4424 if ( mrgCandIdx == iCount ) 4915 4425 { … … 4917 4427 } 4918 4428 iCount ++; 4919 #endif // H_3D_IV_MERGE4920 4429 } 4921 4430 // early termination … … 4924 4433 return; 4925 4434 } 4926 4927 #if H_3D4928 //////////////////////////////////4929 //////// ABOVE RIGHT (B0) ////////4930 //////////////////////////////////4931 #endif4932 4435 4933 4436 // above right … … 4949 4452 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 4950 4453 } 4951 #if H_3D_NBDV 4952 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 4953 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 4954 #endif 4955 #if H_3D_VSP 4956 #if MTK_VSP_SIMPLIFICATION_F0111 4957 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1) 4958 #if LGE_SHARP_VSP_INHERIT_F0104 4959 #if H_3D_IC 4960 && !bICFlag 4961 #endif 4962 #if H_3D_ARP 4963 && !bARPFlag 4964 #endif 4965 #endif 4966 ) 4967 #else 4968 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1 4969 #if LGE_SHARP_VSP_INHERIT_F0104 4970 #if H_3D_IC 4971 && !bICFlag 4972 #endif 4973 #if H_3D_ARP 4974 && !bARPFlag 4975 #endif 4976 #endif 4977 ) 4978 #endif 4979 { 4980 vspFlag[iCount] = 1; 4981 #if !MTK_VSP_SIMPLIFICATION_F0111 4982 xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo); 4983 #endif 4984 } 4985 #endif 4454 4986 4455 if ( mrgCandIdx == iCount ) 4987 4456 { … … 5003 4472 ///////////////////////////////////////////// 5004 4473 5005 #if ETRIKHU_MERGE_REUSE_F00935006 4474 if( ivCandDir[1] && iCount < getSlice()->getMaxNumMergeCand()) 5007 #else5008 if( ivCandDir[1] )5009 #endif5010 4475 { 5011 4476 assert(iCount < getSlice()->getMaxNumMergeCand()); 5012 4477 5013 #if ETRIKHU_MERGE_REUSE_F00935014 4478 tmpMV[0].setMvField( cZeroMv, NOT_VALID ); 5015 4479 tmpMV[1].setMvField( cZeroMv, NOT_VALID ); … … 5022 4486 tmpMV[1].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 5023 4487 } 5024 #else5025 abCandIsInter [ iCount ] = true;5026 puhInterDirNeighbours[ iCount ] = ivCandDir[1];5027 if( ( ivCandDir[1] & 1 ) == 1 )5028 {5029 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );5030 }5031 if( ( ivCandDir[1] & 2 ) == 2 )5032 {5033 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );5034 }5035 #endif5036 4488 5037 4489 Bool bRemoveSpa = false; //pruning to A1, B1 … … 5046 4498 { 5047 4499 bRemoveSpa = true; 5048 #if !ETRIKHU_MERGE_REUSE_F00935049 abCandIsInter [ iCount ] = false;5050 //reset to the default value for MC5051 puhInterDirNeighbours[iCount] = 0;5052 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );5053 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );5054 #endif5055 4500 break; 5056 4501 } … … 5058 4503 if(!bRemoveSpa) 5059 4504 { 5060 #if ETRIKHU_MERGE_REUSE_F00935061 4505 rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); 5062 4506 puhInterDirNeighbours[ iCount ] = ivCandDir[1]; … … 5069 4513 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] ); 5070 4514 } 5071 #endif5072 4515 #if H_3D_NBDV 5073 4516 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); … … 5092 4535 //////// VIEW SYNTHESIS PREDICTION (VSP) //////// 5093 4536 ///////////////////////////////////////////////// 5094 #if ETRIKHU_MERGE_REUSE_F00935095 4537 if (iCount<getSlice()->getMaxNumMergeCand()) 5096 4538 { 5097 #endif5098 4539 5099 4540 if ( 5100 #if LGE_SHARP_VSP_INHERIT_F01045101 4541 #if H_3D_IC 5102 4542 !bICFlag && … … 5105 4545 !bARPFlag && 5106 4546 #endif 5107 #endif5108 #if ETRIKHU_MERGE_REUSE_F00935109 4547 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5110 #else5111 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) )5112 #endif5113 4548 { 5114 4549 return; … … 5121 4556 } 5122 4557 #endif 5123 #if ETRIKHU_MERGE_REUSE_F00935124 } 5125 #endif 5126 5127 #if ETRIKHU_MERGE_REUSE_F00934558 #if H_3D 4559 } 4560 #endif 4561 4562 #if H_3D 5128 4563 iCount += numA0B2; 5129 4564 #else 5130 #if H_3D5131 ///////////////////////////////////5132 //////// LEFT BOTTOM (A0) ////////5133 ///////////////////////////////////5134 #endif5135 5136 4565 //left bottom 5137 4566 UInt uiLeftBottomPartIdx = 0; … … 5152 4581 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5153 4582 } 5154 #if H_3D_NBDV5155 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5156 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5157 #endif5158 #if H_3D_VSP5159 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 15160 #if LGE_SHARP_VSP_INHERIT_F01045161 #if H_3D_IC5162 && !bICFlag5163 #endif5164 #if H_3D_ARP5165 && !bARPFlag5166 #endif5167 #endif5168 )5169 {5170 vspFlag[iCount] = 1;5171 #if !MTK_VSP_SIMPLIFICATION_F01115172 xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo);5173 #endif5174 }5175 #endif5176 4583 if ( mrgCandIdx == iCount ) 5177 4584 { … … 5185 4592 return; 5186 4593 } 5187 #if H_3D5188 ///////////////////////////////////5189 //////// LEFT ABOVE (B2) ////////5190 ///////////////////////////////////5191 #endif5192 4594 5193 4595 // above left … … 5212 4614 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5213 4615 } 5214 #if H_3D_NBDV5215 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5216 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5217 #endif5218 #if H_3D_VSP5219 #if MTK_VSP_SIMPLIFICATION_F01115220 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)5221 #if LGE_SHARP_VSP_INHERIT_F01045222 #if H_3D_IC5223 && !bICFlag5224 #endif5225 #if H_3D_ARP5226 && !bARPFlag5227 #endif5228 #endif5229 )5230 #else5231 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 15232 #if LGE_SHARP_VSP_INHERIT_F01045233 #if H_3D_IC5234 && !bICFlag5235 #endif5236 #if H_3D_ARP5237 && !bARPFlag5238 #endif5239 #endif5240 )5241 #endif5242 {5243 vspFlag[iCount] = 1;5244 #if !MTK_VSP_SIMPLIFICATION_F01115245 xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);5246 #endif5247 }5248 #endif5249 4616 if ( mrgCandIdx == iCount ) 5250 4617 { … … 5266 4633 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 5267 4634 //////////////////////////////////////////////////// 5268 #if ETRIKHU_MERGE_REUSE_F00935269 4635 if( ivMvPredFlag && iCount < getSlice()->getMaxNumMergeCand() ) 5270 4636 { 5271 4637 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag, iCount3DV, inheritedVSPDisInfo ) ) 5272 #else5273 if( ivMvPredFlag )5274 {5275 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag))5276 #endif5277 4638 { 5278 4639 return; … … 5286 4647 #endif 5287 4648 5288 #if ETRIKHU_MERGE_REUSE_F00934649 #if H_3D 5289 4650 if (iCountHEVC + iCount3DV > getSlice()->getMaxNumMergeCand()) 5290 4651 { … … 5297 4658 numValidMergeCand = iCount; 5298 4659 #else 5299 #if H_3D5300 /////////////////////////////////5301 //////// Collocate (COL) ////////5302 /////////////////////////////////5303 #endif5304 4660 if ( getSlice()->getEnableTMVPFlag()) 5305 4661 { … … 5366 4722 if ( getSlice()->isInterB() ) 5367 4723 { 5368 #if H_3D_TMVP5369 iRefIdx = 0;5370 #endif5371 4724 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 5372 4725 if( bExistMV == false ) … … 5385 4738 puhInterDirNeighbours[uiArrayAddr] = dir; 5386 4739 abCandIsInter[uiArrayAddr] = true; 5387 #if H_3D_NBDV5388 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5389 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5390 #endif5391 4740 if ( mrgCandIdx == iCount ) 5392 4741 { … … 5406 4755 if ( getSlice()->isInterB()) 5407 4756 { 5408 #if H_3D_IV_MERGE5409 UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3, 0, 4, 1, 4, 2, 4, 3, 4 };5410 UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2, 4, 0, 4, 1, 4, 2, 4, 3 };5411 #else5412 4757 UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 5413 4758 UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 5414 #endif5415 4759 5416 4760 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) 5417 4761 { 5418 4762 Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx]; 5419 #if H_3D_VSP5420 Bool bValid = true;5421 if ( vspFlag[i] == 1 || vspFlag[j] == 1 )5422 {5423 bValid = false;5424 }5425 if( !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) )5426 {5427 assert(bValid == true);5428 }5429 #endif5430 #if H_3D_VSP5431 if (abCandIsInter[i] && abCandIsInter[j] && (puhInterDirNeighbours[i]&0x1) && (puhInterDirNeighbours[j]&0x2) && bValid)5432 #else5433 4763 if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)) 5434 #endif5435 4764 { 5436 4765 abCandIsInter[uiArrayAddr] = true; … … 5488 4817 #endif 5489 4818 } 5490 5491 5492 5493 5494 4819 #else 5495 4820 … … 5503 4828 */ 5504 4829 Void TComDataCU::getInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours 5505 #if H_3D_VSP5506 , Int* vspFlag5507 , InheritedVSPDisInfo* inheritedVSPDisInfo5508 #endif5509 4830 , Int& numValidMergeCand, Int mrgCandIdx 5510 4831 ) 5511 4832 { 5512 4833 UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx; 5513 #if H_3D_IV_MERGE5514 ////////////////////////////5515 //////// INIT LISTS ////////5516 ////////////////////////////5517 TComMv cZeroMv;5518 Bool abCandIsInter[ MRG_MAX_NUM_CANDS_MEM ];5519 #else5520 4834 Bool abCandIsInter[ MRG_MAX_NUM_CANDS ]; 5521 #endif5522 4835 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ++ui ) 5523 4836 { 5524 4837 abCandIsInter[ui] = false; 5525 #if H_3D_IV_MERGE5526 pcMvFieldNeighbours[ ( ui << 1 ) ].setMvField(cZeroMv, NOT_VALID);5527 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setMvField(cZeroMv, NOT_VALID);5528 #else5529 4838 pcMvFieldNeighbours[ ( ui << 1 ) ].setRefIdx(NOT_VALID); 5530 4839 pcMvFieldNeighbours[ ( ui << 1 ) + 1 ].setRefIdx(NOT_VALID); 5531 #endif5532 4840 } 5533 4841 numValidMergeCand = getSlice()->getMaxNumMergeCand(); 5534 #if H_3D5535 //////////////////////////////////5536 //////// DERIVE LOCATIONS ////////5537 //////////////////////////////////5538 #endif5539 4842 // compute the location of the current PU 5540 4843 Int xP, yP, nPSW, nPSH; … … 5547 4850 deriveLeftRightTopIdxGeneral( uiAbsPartIdx, uiPUIdx, uiPartIdxLT, uiPartIdxRT ); 5548 4851 deriveLeftBottomIdxGeneral ( uiAbsPartIdx, uiPUIdx, uiPartIdxLB ); 5549 #if SEC_MPI_ENABLING_MERGE_F0150 5550 Bool bMPIFlag = getSlice()->getVPS()->getMPIFlag( getSlice()->getLayerIdInVps() ); 5551 #endif 5552 #if QC_DEPTH_IV_MRG_F0125 5553 Bool bIsDepth = getSlice()->getIsDepth(); 5554 Bool bDepthIPMCAvai = false; 5555 #endif 5556 5557 #if LGE_SHARP_VSP_INHERIT_F0104 5558 #if H_3D_IC 5559 Bool bICFlag = getICFlag(uiAbsPartIdx); 5560 #endif 5561 #if H_3D_ARP 5562 Bool bARPFlag = getARPW(uiAbsPartIdx)>0 ? true : false; 5563 #endif 5564 #endif 5565 5566 #if H_3D_IV_MERGE 5567 5568 ///////////////////////////////////////////// 5569 //////// TEXTURE MERGE CANDIDATE (T) //////// 5570 ///////////////////////////////////////////// 5571 5572 #if SEC_MPI_ENABLING_MERGE_F0150 5573 if( bMPIFlag) 5574 #else 5575 if( m_pcSlice->getIsDepth()) 5576 #endif 5577 { 5578 UInt uiPartIdxCenter; 5579 xDeriveCenterIdx( uiPUIdx, uiPartIdxCenter ); 5580 #if H_3D_FCO 5581 TComPic * pcTexturePic = m_pcSlice->getTexturePic(); 5582 TComDataCU *pcTextureCU = 0; 5583 if ( pcTexturePic ) 5584 pcTextureCU = pcTexturePic->getCU( getAddr() ); 5585 #else 5586 TComDataCU *pcTextureCU = m_pcSlice->getTexturePic()->getCU( getAddr() ); 5587 #endif 5588 5589 #if H_3D_FCO 5590 if ( pcTextureCU && pcTexturePic->getReconMark() && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 5591 #else 5592 if ( pcTextureCU && !pcTextureCU->isIntra( uiPartIdxCenter ) ) 5593 #endif 5594 { 5595 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 5596 Int iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1].getRefIdx() ); 5597 if( (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0) && ( iValidDepRef >= 0 ) ) 5598 { 5599 TComMv cMvPred = pcMvFieldNeighbours[iCount<<1].getMv(); 5600 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 5601 cMvPred+=cAdd; 5602 cMvPred>>=2; 5603 clipMv(cMvPred); 5604 pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef); 5605 } 5606 5607 if ( getSlice()->isInterB() ) 5608 { 5609 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5610 iValidDepRef = getPic()->isTextRefValid( REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx() ); 5611 if( (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0) && ( iValidDepRef >= 0) ) 5612 { 5613 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 5614 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); 5615 cMvPred+=cAdd; 5616 cMvPred>>=2; 5617 clipMv(cMvPred); 5618 pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef); 5619 } 5620 } 5621 5622 puhInterDirNeighbours[iCount] = (pcMvFieldNeighbours[iCount<<1].getRefIdx()>=0)?1:0; 5623 puhInterDirNeighbours[iCount] += (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()>=0)?2:0; 5624 5625 if( puhInterDirNeighbours[iCount] != 0 ) 5626 { 5627 abCandIsInter[iCount] = true; 5628 if ( mrgCandIdx == iCount ) 5629 { 5630 return; 5631 } 5632 iCount ++; 5633 } 5634 } 5635 } 5636 5637 ////////////////////////////////// 5638 //////// GET DISPARITIES //////// 5639 ////////////////////////////////// 5640 5641 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 5642 5643 for(Int i = 0; i < MRG_MAX_NUM_CANDS_MEM; i++) 5644 { 5645 inheritedVSPDisInfo[i].m_acDvInfo = cDisInfo; 5646 } 5647 5648 ///////////////////////////////////////////////////////////////// 5649 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// 5650 ///////////////////////////////////////////////////////////////// 5651 5652 Int posIvDC = -1; 5653 Bool bLeftAvai = false; 5654 Int iPosLeftAbove[2] = {-1, -1}; 5655 5656 5657 // { IvMCL0, IvMCL1, IvDCL0, IvDCL1, IvMCL0Shift, IvMCL1Shift, IvDCL0Shift, IvDCL1Shift }; 5658 // An enumerator would be appropriate here! 5659 TComMv ivCandMv [8]; 5660 Int ivCandRefIdx[8] = {-1, -1, -1, -1, -1, -1, -1, -1}; 5661 5662 // { IvMC, IvDC, IvMCShift, IvDCShift }; 5663 Int ivCandDir [4] = {0, 0, 0, 0}; 5664 5665 Bool ivMvPredFlag = getSlice()->getVPS()->getIvMvPredFlag( getSlice()->getLayerIdInVps() ); 5666 5667 if ( ivMvPredFlag ) 5668 { 5669 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir 5670 #if QC_DEPTH_IV_MRG_F0125 5671 , bIsDepth 5672 #endif 5673 ); 5674 } 5675 5676 /////////////////////////////////////////////// 5677 //////// INTER VIEW MOTION COMP(IvMC) ///////// 5678 /////////////////////////////////////////////// 5679 5680 if( ivCandDir[0] ) 5681 { 5682 abCandIsInter [ iCount ] = true; 5683 puhInterDirNeighbours[ iCount ] = ivCandDir[0]; 5684 5685 if( ( ivCandDir[0] & 1 ) == 1 ) 5686 { 5687 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 0 ], ivCandRefIdx[ 0 ] ); 5688 } 5689 if( ( ivCandDir[0] & 2 ) == 2 ) 5690 { 5691 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 1 ], ivCandRefIdx[ 1 ] ); 5692 } 5693 5694 #if QC_DEPTH_IV_MRG_F0125 5695 if ( bIsDepth ) 5696 { 5697 Bool bRemoveSpa = false; 5698 Int iCnloop = iCount-1; 5699 for(; iCnloop >= 0; iCnloop --) 5700 { 5701 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 5702 { 5703 bRemoveSpa = true; 5704 abCandIsInter [ iCount ] = false; 5705 5706 puhInterDirNeighbours[iCount] = 0; 5707 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID ); 5708 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 5709 break; 5710 } 5711 } 5712 if(!bRemoveSpa) 5713 { 5714 bDepthIPMCAvai = true; 5715 } 5716 } 5717 if ( bDepthIPMCAvai || !bIsDepth ) 5718 { 5719 #endif 5720 if ( mrgCandIdx == iCount ) 5721 { 5722 return; 5723 } 5724 iCount ++; 5725 #if QC_DEPTH_IV_MRG_F0125 5726 } 5727 #endif 5728 } 5729 5730 // early termination 5731 if (iCount == getSlice()->getMaxNumMergeCand()) 5732 { 5733 return; 5734 } 5735 #endif 5736 5737 #if H_3D 5738 //////////////////////////// 5739 //////// LEFT (A1) ///////// 5740 //////////////////////////// 5741 #endif 4852 5742 4853 //left 5743 4854 UInt uiLeftPartIdx = 0; … … 5759 4870 pcCULeft->getMvField( pcCULeft, uiLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5760 4871 } 5761 #if H_3D_IV_MERGE5762 Bool bRemoveSpa = false; //pruning to inter-view candidates5763 #if QC_DEPTH_IV_MRG_F01255764 Int iCnloop = bDepthIPMCAvai ? (iCount-2): (iCount-1);5765 #else5766 Int iCnloop = iCount - 1;5767 #endif5768 for(; iCnloop >= 0; iCnloop --)5769 {5770 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])5771 {5772 bRemoveSpa = true;5773 abCandIsInter [ iCount ] = false;5774 5775 //reset to the default value for MC5776 puhInterDirNeighbours[iCount] = 0;5777 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );5778 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );5779 break;5780 }5781 }5782 if(!bRemoveSpa)5783 {5784 bLeftAvai = true;5785 iPosLeftAbove[0] = iCount;5786 #if H_3D_NBDV5787 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5788 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5789 #endif5790 #if H_3D_VSP5791 if (pcCULeft->getVSPFlag(uiLeftPartIdx) == 15792 #if LGE_SHARP_VSP_INHERIT_F01045793 #if H_3D_IC5794 && !bICFlag5795 #endif5796 #if H_3D_ARP5797 && !bARPFlag5798 #endif5799 #endif5800 )5801 {5802 vspFlag[iCount] = 1;5803 #if !MTK_VSP_SIMPLIFICATION_F01115804 xInheritVSPDisInfo(pcCULeft,uiLeftPartIdx,iCount,inheritedVSPDisInfo);5805 #endif5806 }5807 #endif5808 if ( mrgCandIdx == iCount )5809 {5810 return;5811 }5812 iCount ++;5813 }5814 #else // H_3D_IV_MERGE5815 4872 if ( mrgCandIdx == iCount ) 5816 4873 { … … 5818 4875 } 5819 4876 iCount ++; 5820 #endif // H_3D_IV_MERGE5821 4877 } 5822 4878 … … 5826 4882 return; 5827 4883 } 5828 #if H_3D 5829 //////////////////////////// 5830 //////// ABOVE (B1) //////// 5831 //////////////////////////// 5832 #endif 4884 5833 4885 // above 5834 4886 UInt uiAbovePartIdx = 0; … … 5850 4902 pcCUAbove->getMvField( pcCUAbove, uiAbovePartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5851 4903 } 5852 #if H_3D_IV_MERGE 5853 Bool bRemoveSpa = false; //pruning to inter-view candidates 5854 #if QC_DEPTH_IV_MRG_F0125 5855 Int iCnloop; 5856 if( bIsDepth ) 5857 iCnloop = (bLeftAvai && bDepthIPMCAvai) ? (iCount-3) : ((bLeftAvai || bDepthIPMCAvai) ? (iCount-2): (iCount-1)); 5858 else 5859 iCnloop = bLeftAvai? (iCount-2): (iCount-1); 5860 #else 5861 Int iCnloop = bLeftAvai? (iCount-2): (iCount-1); 5862 #endif 5863 for(; iCnloop >= 0; iCnloop --) 5864 { 5865 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1]) 5866 { 5867 bRemoveSpa = true; 5868 abCandIsInter [ iCount ] = false; 5869 5870 //reset to the default value for MC 5871 puhInterDirNeighbours[iCount] = 0; 5872 5873 pcMvFieldNeighbours[iCount<<1] .setMvField( cZeroMv, NOT_VALID ); 5874 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID ); 5875 break; 5876 } 5877 } 5878 5879 if(!bRemoveSpa) 5880 { 5881 iPosLeftAbove[1] = iCount; 5882 #if H_3D_NBDV 5883 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 5884 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 5885 #endif 5886 #if H_3D_VSP 5887 #if MTK_VSP_SIMPLIFICATION_F0111 5888 if ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1) 5889 #if LGE_SHARP_VSP_INHERIT_F0104 5890 #if H_3D_IC 5891 && !bICFlag 5892 #endif 5893 #if H_3D_ARP 5894 && !bARPFlag 5895 #endif 5896 #endif 5897 ) 5898 #else 5899 if (pcCUAbove->getVSPFlag(uiAbovePartIdx) == 1 5900 #if LGE_SHARP_VSP_INHERIT_F0104 5901 #if H_3D_IC 5902 && !bICFlag 5903 #endif 5904 #if H_3D_ARP 5905 && !bARPFlag 5906 #endif 5907 #endif 5908 ) 5909 #endif 5910 { 5911 5912 vspFlag[iCount] = 1; 5913 #if !MTK_VSP_SIMPLIFICATION_F0111 5914 xInheritVSPDisInfo(pcCUAbove,uiAbovePartIdx,iCount,inheritedVSPDisInfo); 5915 #endif 5916 } 5917 #endif 5918 if ( mrgCandIdx == iCount ) 5919 { 5920 return; 5921 } 5922 iCount ++; 5923 } 5924 #else // H_3D_IV_MERGE 4904 5925 4905 if ( mrgCandIdx == iCount ) 5926 4906 { … … 5928 4908 } 5929 4909 iCount ++; 5930 #endif // H_3D_IV_MERGE5931 4910 } 5932 4911 // early termination … … 5936 4915 } 5937 4916 5938 #if H_3D5939 //////////////////////////////////5940 //////// ABOVE RIGHT (B0) ////////5941 //////////////////////////////////5942 #endif5943 4917 5944 4918 // above right … … 5960 4934 pcCUAboveRight->getMvField( pcCUAboveRight, uiAboveRightPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 5961 4935 } 5962 #if H_3D_NBDV5963 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);5964 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);5965 #endif5966 #if H_3D_VSP5967 #if MTK_VSP_SIMPLIFICATION_F01115968 if ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 1)5969 #if LGE_SHARP_VSP_INHERIT_F01045970 #if H_3D_IC5971 && !bICFlag5972 #endif5973 #if H_3D_ARP5974 && !bARPFlag5975 #endif5976 #endif5977 )5978 #else5979 if (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) == 15980 #if LGE_SHARP_VSP_INHERIT_F01045981 #if H_3D_IC5982 && !bICFlag5983 #endif5984 #if H_3D_ARP5985 && !bARPFlag5986 #endif5987 #endif5988 )5989 #endif5990 {5991 vspFlag[iCount] = 1;5992 #if !MTK_VSP_SIMPLIFICATION_F01115993 xInheritVSPDisInfo(pcCUAboveRight,uiAboveRightPartIdx,iCount,inheritedVSPDisInfo);5994 #endif5995 }5996 #endif5997 4936 if ( mrgCandIdx == iCount ) 5998 4937 { … … 6006 4945 return; 6007 4946 } 6008 6009 #if H_3D_IV_MERGE6010 /////////////////////////////////////////////6011 //////// INTER VIEW DISP COMP (IvDC) ////////6012 /////////////////////////////////////////////6013 6014 if( ivCandDir[1] )6015 {6016 assert(iCount < getSlice()->getMaxNumMergeCand());6017 abCandIsInter [ iCount ] = true;6018 puhInterDirNeighbours[ iCount ] = ivCandDir[1];6019 if( ( ivCandDir[1] & 1 ) == 1 )6020 {6021 pcMvFieldNeighbours[ iCount<<1 ].setMvField( ivCandMv[ 2 ], ivCandRefIdx[ 2 ] );6022 }6023 if( ( ivCandDir[1] & 2 ) == 2 )6024 {6025 pcMvFieldNeighbours[(iCount<<1)+1 ].setMvField( ivCandMv[ 3 ], ivCandRefIdx[ 3 ] );6026 }6027 6028 Bool bRemoveSpa = false; //pruning to A1, B16029 for(Int i = 0; i < 2; i ++)6030 {6031 Int iCnloop = iPosLeftAbove[i];6032 if ( iCnloop == -1 )6033 {6034 continue;6035 }6036 if(puhInterDirNeighbours[iCount] == puhInterDirNeighbours[iCnloop] && pcMvFieldNeighbours[iCnloop<<1]==pcMvFieldNeighbours[(iCount<<1)] && pcMvFieldNeighbours[(iCnloop<<1)+1]==pcMvFieldNeighbours[(iCount<<1)+1])6037 {6038 bRemoveSpa = true;6039 abCandIsInter [ iCount ] = false;6040 //reset to the default value for MC6041 puhInterDirNeighbours[iCount] = 0;6042 pcMvFieldNeighbours[iCount<<1].setMvField( cZeroMv, NOT_VALID );6043 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( cZeroMv, NOT_VALID );6044 break;6045 }6046 }6047 if(!bRemoveSpa)6048 {6049 #if H_3D_NBDV6050 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);6051 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);6052 #endif6053 posIvDC = iCount;6054 if ( mrgCandIdx == iCount )6055 return;6056 iCount ++;6057 6058 // early termination6059 if (iCount == getSlice()->getMaxNumMergeCand())6060 {6061 return;6062 }6063 }6064 }6065 #endif // H_3D_IV_MERGE6066 6067 #if H_3D_VSP6068 /////////////////////////////////////////////////6069 //////// VIEW SYNTHESIS PREDICTION (VSP) ////////6070 /////////////////////////////////////////////////6071 6072 if (6073 #if LGE_SHARP_VSP_INHERIT_F01046074 #if H_3D_IC6075 !bICFlag &&6076 #endif6077 #if H_3D_ARP6078 !bARPFlag &&6079 #endif6080 #endif6081 xAddVspCand( mrgCandIdx, &cDisInfo, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag ) )6082 {6083 return;6084 }6085 6086 // early termination6087 if (iCount == getSlice()->getMaxNumMergeCand())6088 {6089 return;6090 }6091 #endif6092 #if H_3D6093 ///////////////////////////////////6094 //////// LEFT BOTTOM (A0) ////////6095 ///////////////////////////////////6096 #endif6097 4947 6098 4948 //left bottom … … 6114 4964 pcCULeftBottom->getMvField( pcCULeftBottom, uiLeftBottomPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 6115 4965 } 6116 #if H_3D_NBDV 6117 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false); 6118 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false); 6119 #endif 6120 #if H_3D_VSP 6121 if (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) == 1 6122 #if LGE_SHARP_VSP_INHERIT_F0104 6123 #if H_3D_IC 6124 && !bICFlag 6125 #endif 6126 #if H_3D_ARP 6127 && !bARPFlag 6128 #endif 6129 #endif 6130 ) 6131 { 6132 vspFlag[iCount] = 1; 6133 #if !MTK_VSP_SIMPLIFICATION_F0111 6134 xInheritVSPDisInfo(pcCULeftBottom,uiLeftBottomPartIdx,iCount,inheritedVSPDisInfo); 6135 #endif 6136 } 6137 #endif 4966 6138 4967 if ( mrgCandIdx == iCount ) 6139 4968 { … … 6147 4976 return; 6148 4977 } 6149 #if H_3D6150 ///////////////////////////////////6151 //////// LEFT ABOVE (B2) ////////6152 ///////////////////////////////////6153 #endif6154 4978 6155 4979 // above left … … 6174 4998 pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 6175 4999 } 6176 #if H_3D_NBDV6177 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);6178 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);6179 #endif6180 #if H_3D_VSP6181 #if MTK_VSP_SIMPLIFICATION_F01116182 if ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 1)6183 #if LGE_SHARP_VSP_INHERIT_F01046184 #if H_3D_IC6185 && !bICFlag6186 #endif6187 #if H_3D_ARP6188 && !bARPFlag6189 #endif6190 #endif6191 )6192 #else6193 if (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) == 16194 #if LGE_SHARP_VSP_INHERIT_F01046195 #if H_3D_IC6196 && !bICFlag6197 #endif6198 #if H_3D_ARP6199 && !bARPFlag6200 #endif6201 #endif6202 )6203 #endif6204 {6205 vspFlag[iCount] = 1;6206 #if !MTK_VSP_SIMPLIFICATION_F01116207 xInheritVSPDisInfo(pcCUAboveLeft,uiAboveLeftPartIdx,iCount,inheritedVSPDisInfo);6208 #endif6209 }6210 #endif6211 5000 if ( mrgCandIdx == iCount ) 6212 5001 { … … 6221 5010 return; 6222 5011 } 6223 #if H_3D_IV_MERGE 6224 //////////////////////////////////////////////////// 6225 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// 6226 //////////////////////////////////////////////////// 6227 6228 if( ivMvPredFlag ) 6229 { 6230 if(xAddIvMRGCand( mrgCandIdx, iCount, abCandIsInter, pcMvFieldNeighbours, puhInterDirNeighbours, ivCandDir, ivCandMv, ivCandRefIdx, posIvDC, vspFlag)) 6231 { 6232 return; 6233 } 6234 //early termination 6235 if (iCount == getSlice()->getMaxNumMergeCand()) 6236 { 6237 return; 6238 } 6239 } 6240 #endif 6241 #if H_3D 6242 ///////////////////////////////// 6243 //////// Collocate (COL) //////// 6244 ///////////////////////////////// 6245 #endif 5012 6246 5013 if ( getSlice()->getEnableTMVPFlag()) 6247 5014 { … … 6308 5075 if ( getSlice()->isInterB() ) 6309 5076 { 6310 #if H_3D_TMVP6311 iRefIdx = 0;6312 #endif6313 5077 bExistMV = uiLCUIdx >= 0 && xGetColMVP( REF_PIC_LIST_1, uiLCUIdx, uiAbsPartAddr, cColMv, iRefIdx); 6314 5078 if( bExistMV == false ) … … 6327 5091 puhInterDirNeighbours[uiArrayAddr] = dir; 6328 5092 abCandIsInter[uiArrayAddr] = true; 6329 #if H_3D_NBDV6330 pcMvFieldNeighbours[iCount<<1 ].getMv().setIDVFlag (false);6331 pcMvFieldNeighbours[(iCount<<1)+1].getMv().setIDVFlag (false);6332 #endif6333 5093 if ( mrgCandIdx == iCount ) 6334 5094 { … … 6348 5108 if ( getSlice()->isInterB()) 6349 5109 { 6350 #if H_3D_IV_MERGE6351 UInt uiPriorityList0[20] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3, 0, 4, 1, 4, 2, 4, 3, 4 };6352 UInt uiPriorityList1[20] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2, 4, 0, 4, 1, 4, 2, 4, 3 };6353 #else6354 5110 UInt uiPriorityList0[12] = {0 , 1, 0, 2, 1, 2, 0, 3, 1, 3, 2, 3}; 6355 5111 UInt uiPriorityList1[12] = {1 , 0, 2, 0, 2, 1, 3, 0, 3, 1, 3, 2}; 6356 #endif6357 5112 6358 5113 for (Int idx=0; idx<uiCutoff*(uiCutoff-1) && uiArrayAddr!= getSlice()->getMaxNumMergeCand(); idx++) 6359 5114 { 6360 5115 Int i = uiPriorityList0[idx]; Int j = uiPriorityList1[idx]; 6361 #if H_3D_VSP6362 Bool bValid = true;6363 if ( vspFlag[i] == 1 || vspFlag[j] == 1 )6364 {6365 bValid = false;6366 }6367 if( !m_pcSlice->getVPS()->getViewSynthesisPredFlag( m_pcSlice->getLayerIdInVps() ) )6368 {6369 assert(bValid == true);6370 }6371 #endif6372 #if H_3D_VSP6373 if (abCandIsInter[i] && abCandIsInter[j] && (puhInterDirNeighbours[i]&0x1) && (puhInterDirNeighbours[j]&0x2) && bValid)6374 #else6375 5116 if (abCandIsInter[i] && abCandIsInter[j]&& (puhInterDirNeighbours[i]&0x1)&&(puhInterDirNeighbours[j]&0x2)) 6376 #endif6377 5117 { 6378 5118 abCandIsInter[uiArrayAddr] = true; … … 6429 5169 numValidMergeCand = uiArrayAddr; 6430 5170 } 6431 6432 6433 5171 #endif 6434 5172 … … 6770 5508 } 6771 5509 6772 #if LGE_IC_CTX_F01605510 #if H_3D_IC 6773 5511 Bool TComDataCU::isIC( UInt uiPartIdx ) 6774 5512 { … … 7623 6361 } 7624 6362 #endif 7625 #if QC_DEPTH_IV_MRG_F01256363 #if H_3D_IV_MERGE 7626 6364 Bool TComDataCU::getDispNeighBlocks (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 7627 6365 { … … 8203 6941 #endif 8204 6942 8205 #if MTK_SPIVMP_F01106943 #if H_3D_SPIVMP 8206 6944 Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight) 8207 6945 { … … 8255 6993 #if H_3D_IV_MERGE 8256 6994 Bool 8257 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 8258 #if QC_DEPTH_IV_MRG_F0125 8259 , Bool bIsDepth 8260 #endif 8261 #if MTK_SPIVMP_F0110 6995 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth 6996 #if H_3D_SPIVMP 8262 6997 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 8263 6998 #endif … … 8268 7003 8269 7004 //--- get base CU/PU and check prediction mode --- 8270 #if QC_DEPTH_IV_MRG_F01258271 7005 TComPic* pcBasePic = pcSlice->getIvPic( bIsDepth, iViewIndex ); 8272 #else8273 TComPic* pcBasePic = pcSlice->getIvPic( false, iViewIndex );8274 #endif8275 7006 TComPicYuv* pcBaseRec = pcBasePic->getPicYuvRec (); 8276 7007 … … 8283 7014 pcBaseRec->getTopLeftSamplePos( getAddr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY ); 8284 7015 8285 #if !MTK_SPIVMP_F0110 8286 #if QC_DEPTH_IV_MRG_F0125 7016 #if !H_3D_SPIVMP 8287 7017 iCurrPosX += ( iWidth >> 1 ); 8288 7018 iCurrPosY += ( iHeight >> 1 ); 8289 #else8290 iCurrPosX += ( ( iWidth - 1 ) >> 1 );8291 iCurrPosY += ( ( iHeight - 1 ) >> 1 );8292 #endif8293 7019 #endif 8294 7020 … … 8308 7034 #endif 8309 7035 8310 #if MTK_SPIVMP_F01107036 #if H_3D_SPIVMP 8311 7037 //////////////////////////////// 8312 7038 //////////sub-PU IvMC/////////// … … 8438 7164 //////////////////////////////// 8439 7165 8440 #if MTK_SPIVMP_F01107166 #if H_3D_SPIVMP 8441 7167 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++) 8442 7168 #else … … 8447 7173 // iLoopCan == 1 --> IvMCShift 8448 7174 8449 #if ! MTK_SPIVMP_F01107175 #if !H_3D_SPIVMP 8450 7176 Int iBaseCUAddr; 8451 7177 Int iBaseAbsPartIdx; … … 8455 7181 Int offsetH = (iLoopCan == 0) ? 0 : ( ((iHeight/2)*4) + 4 ); 8456 7182 8457 #if MTK_SPIVMP_F01107183 #if H_3D_SPIVMP 8458 7184 iBasePosX = Clip3( 0, pcBaseRec->getWidth () - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 8459 7185 iBasePosY = Clip3( 0, pcBaseRec->getHeight() - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); … … 8464 7190 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 8465 7191 8466 #if MTK_SPIVMP_F01107192 #if H_3D_SPIVMP 8467 7193 pcBaseCU = pcBasePic->getCU( iBaseCUAddr ); 8468 7194 #else … … 8496 7222 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 8497 7223 #if H_3D_NBDV 8498 #if QC_DEPTH_IV_MRG_F01257224 #if H_3D_IV_MERGE 8499 7225 if( !bIsDepth ) 8500 7226 { … … 8504 7230 cMv.setIDVVer (cDv.getVer()); 8505 7231 cMv.setIDVVId (iViewIndex); 8506 #if QC_DEPTH_IV_MRG_F01257232 #if H_3D_IV_MERGE 8507 7233 } 8508 7234 #endif … … 8521 7247 } 8522 7248 } 8523 #if MTK_SPIVMP_F01107249 #if H_3D_SPIVMP 8524 7250 for(Int iLoopCan = 1; iLoopCan < 2; iLoopCan ++) 8525 7251 #else … … 8552 7278 #endif 8553 7279 cMv.setHor( cMv.getHor() + ioffsetDV ); 8554 #if QC_DEPTH_IV_MRG_F01257280 #if H_3D_IV_MERGE 8555 7281 if( bIsDepth ) 8556 7282 cMv.setHor((cMv.getHor()+2)>>2); … … 8639 7365 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmmWedgeTabIdx[dmmType][uiAbsPartIdx+ui] = tabIdx; } 8640 7366 } 8641 #if !SEC_DMM3_RBC_F01478642 Void TComDataCU::setDmm3IntraTabIdxSubParts( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth )8643 {8644 UInt uiCurrPartNumb = m_pcPic->getNumPartInCU() >> (uiDepth << 1);8645 for( UInt ui = 0; ui < uiCurrPartNumb; ui++ ) { m_dmm3IntraTabIdx[uiAbsPartIdx+ui] = uiTIdx; }8646 }8647 #endif8648 #endif8649 #if H_3D_DIM_RBC8650 Void TComDataCU::reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion )8651 {8652 Int iWidth;8653 Int iHeight;8654 if( uiDepth == 0 )8655 {8656 iWidth = 64;8657 iHeight = 64;8658 }8659 else if( uiDepth == 1 )8660 {8661 iWidth = 32;8662 iHeight = 32;8663 }8664 else if( uiDepth == 2 )8665 {8666 iWidth = 16;8667 iHeight = 16;8668 }8669 else if( uiDepth == 3 )8670 {8671 iWidth = 8;8672 iHeight = 8;8673 }8674 else // uiDepth == 48675 {8676 iWidth = 4;8677 iHeight = 4;8678 }8679 8680 Int iPtr = 0;8681 Int iX, iY;8682 Int iDir = -1;8683 Int iDiffX = 0, iDiffY = 0;8684 8685 // 1. Edge Code -> Vert & Horz Edges8686 Bool* pbEdge = (Bool*) xMalloc( Bool, 4 * iWidth * iHeight );8687 8688 for( UInt ui = 0; ui < 4 * iWidth * iHeight; ui++ )8689 pbEdge [ ui ] = false;8690 8691 // Direction : left(0), right(1), top(2), bottom(3), left-top(4), right-top(5), left-bottom(6), right-bottom(7)8692 // Code : 0deg(0), 45deg(1), -45deg(2), 90deg(3), -90deg(4), 135deg(5), -135deg(6)8693 const UChar tableDir[8][7] = { { 0, 6, 4, 3, 2, 7, 5 },8694 { 1, 5, 7, 2, 3, 4, 6 },8695 { 2, 4, 5, 0, 1, 6, 7 },8696 { 3, 7, 6, 1, 0, 5, 4 },8697 { 4, 0, 2, 6, 5, 3, 1 },8698 { 5, 2, 1, 4, 7, 0, 3 },8699 { 6, 3, 0, 7, 4, 1, 2 },8700 { 7, 1, 3, 5, 6, 2, 0 }};8701 8702 UChar ucCode = pucEdgeCode[iPtr++];8703 8704 if( !bLeft )8705 {8706 iX = ucStartPos;8707 iY = 0;8708 8709 switch(ucCode)8710 {8711 case 0: // bottom8712 iDir = 3;8713 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8714 break;8715 case 2: // left-bottom8716 iDir = 6;8717 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8718 break;8719 case 1: // right-bottom8720 iDir = 7;8721 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8722 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8723 break;8724 case 4: // left8725 iDir = 0;8726 assert(false);8727 break;8728 case 3: // right8729 iDir = 1;8730 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8731 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8732 break;8733 }8734 }8735 else8736 {8737 iX = 0;8738 iY = ucStartPos;8739 8740 switch(ucCode)8741 {8742 case 0: // right8743 iDir = 1;8744 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8745 break;8746 case 1: // right-top8747 iDir = 5;8748 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8749 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8750 break;8751 case 2: // right-bottom8752 iDir = 7;8753 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8754 break;8755 case 3: // top8756 iDir = 2;8757 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8758 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8759 break;8760 case 4: // bottom8761 iDir = 3;8762 assert(false);8763 break;8764 }8765 }8766 8767 switch( iDir )8768 {8769 case 0: // left8770 iDiffX = -1;8771 iDiffY = 0;8772 break;8773 case 1: // right8774 iDiffX = +1;8775 iDiffY = 0;8776 break;8777 case 2: // top8778 iDiffX = 0;8779 iDiffY = -1;8780 break;8781 case 3: // bottom8782 iDiffX = 0;8783 iDiffY = +1;8784 break;8785 case 4: // left-top8786 iDiffX = -1;8787 iDiffY = -1;8788 break;8789 case 5: // right-top8790 iDiffX = +1;8791 iDiffY = -1;8792 break;8793 case 6: // left-bottom8794 iDiffX = -1;8795 iDiffY = +1;8796 break;8797 case 7: // right-bottom8798 iDiffX = +1;8799 iDiffY = +1;8800 break;8801 }8802 8803 iX += iDiffX;8804 iY += iDiffY;8805 8806 while( iPtr < ucNumEdge )8807 {8808 ucCode = pucEdgeCode[iPtr++];8809 8810 Int iNewDir = tableDir[iDir][ucCode];8811 8812 switch( iNewDir )8813 {8814 case 0: // left8815 iDiffX = -1;8816 iDiffY = 0;8817 break;8818 case 1: // right8819 iDiffX = +1;8820 iDiffY = 0;8821 break;8822 case 2: // top8823 iDiffX = 0;8824 iDiffY = -1;8825 break;8826 case 3: // bottom8827 iDiffX = 0;8828 iDiffY = +1;8829 break;8830 case 4: // left-top8831 iDiffX = -1;8832 iDiffY = -1;8833 break;8834 case 5: // right-top8835 iDiffX = +1;8836 iDiffY = -1;8837 break;8838 case 6: // left-bottom8839 iDiffX = -1;8840 iDiffY = +1;8841 break;8842 case 7: // right-bottom8843 iDiffX = +1;8844 iDiffY = +1;8845 break;8846 }8847 8848 switch( iDir )8849 {8850 case 0: // left8851 switch( ucCode )8852 {8853 case 0:8854 case 2:8855 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8856 break;8857 case 1:8858 case 3:8859 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8860 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8861 break;8862 case 4:8863 case 6:8864 // no8865 break;8866 case 5:8867 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8868 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8869 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8870 break;8871 }8872 break;8873 case 1: // right8874 switch( ucCode )8875 {8876 case 0:8877 case 2:8878 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8879 break;8880 case 1:8881 case 3:8882 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8883 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8884 break;8885 case 4:8886 case 6:8887 // no8888 break;8889 case 5:8890 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8891 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8892 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8893 break;8894 }8895 break;8896 case 2: // top8897 switch( ucCode )8898 {8899 case 0:8900 case 2:8901 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8902 break;8903 case 1:8904 case 3:8905 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8906 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8907 break;8908 case 4:8909 case 6:8910 // no8911 break;8912 case 5:8913 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8914 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8915 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8916 break;8917 }8918 break;8919 case 3: // bottom8920 switch( ucCode )8921 {8922 case 0:8923 case 2:8924 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8925 break;8926 case 1:8927 case 3:8928 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8929 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8930 break;8931 case 4:8932 case 6:8933 // no8934 break;8935 case 5:8936 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8937 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8938 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8939 break;8940 }8941 break;8942 case 4: // left-top8943 switch( ucCode )8944 {8945 case 0:8946 case 1:8947 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8948 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8949 break;8950 case 2:8951 case 4:8952 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8953 break;8954 case 3:8955 case 5:8956 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8957 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8958 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8959 break;8960 case 6:8961 // no8962 break;8963 }8964 break;8965 case 5: // right-top8966 switch( ucCode )8967 {8968 case 0:8969 case 1:8970 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8971 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8972 break;8973 case 2:8974 case 4:8975 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8976 break;8977 case 3:8978 case 5:8979 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8980 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;8981 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;8982 break;8983 case 6:8984 // no8985 break;8986 }8987 break;8988 case 6: // left-bottom8989 switch( ucCode )8990 {8991 case 0:8992 case 1:8993 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8994 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;8995 break;8996 case 2:8997 case 4:8998 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;8999 break;9000 case 3:9001 case 5:9002 if(iY > 0) pbEdge[ 2 * iX + (2 * (iY - 1) + 1) * 2 * iWidth ] = true;9003 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9004 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;9005 break;9006 case 6:9007 // no9008 break;9009 }9010 break;9011 case 7: // right-bottom9012 switch( ucCode )9013 {9014 case 0:9015 case 1:9016 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;9017 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9018 break;9019 case 2:9020 case 4:9021 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9022 break;9023 case 3:9024 case 5:9025 if(iX > 0) pbEdge[ 2 * (iX - 1) + 1 + iY * 4 * iWidth ] = true;9026 if(iX < iWidth - 1) pbEdge[ 2 * (iX + 0) + 1 + iY * 4 * iWidth ] = true;9027 if(iY < iHeight - 1) pbEdge[ 2 * iX + (2 * (iY + 0) + 1) * 2 * iWidth ] = true;9028 break;9029 case 6:9030 // no9031 break;9032 }9033 break;9034 }9035 9036 assert( iX >= 0 && iX <= iWidth );9037 assert( iY >= 0 && iY <= iHeight );9038 9039 iX += iDiffX;9040 iY += iDiffY;9041 iDir = iNewDir;9042 }9043 9044 // finalize edge chain9045 if( iX == iWidth-1 )9046 {9047 if( iY == 0 )9048 {9049 if( iDir == 1 )9050 {9051 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9052 }9053 else if( iDir == 5 )9054 {9055 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9056 }9057 else9058 {9059 assert(false);9060 }9061 }9062 else if( iY == iHeight-1 )9063 {9064 if( iDir == 3 )9065 {9066 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9067 }9068 else if( iDir == 7 )9069 {9070 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9071 }9072 else9073 {9074 assert(false);9075 }9076 }9077 else9078 {9079 if( iDir == 1 )9080 {9081 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9082 }9083 else if( iDir == 3 )9084 {9085 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9086 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9087 }9088 else if( iDir == 5 )9089 {9090 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9091 }9092 else if( iDir == 7 )9093 {9094 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9095 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9096 }9097 else9098 {9099 assert(false);9100 }9101 }9102 }9103 else if( iX == 0 )9104 {9105 if( iY == 0 )9106 {9107 if( iDir == 2 )9108 {9109 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9110 }9111 else if( iDir == 4 )9112 {9113 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9114 }9115 else9116 {9117 assert(false);9118 }9119 }9120 else if( iY == iHeight-1 )9121 {9122 if( iDir == 0 )9123 {9124 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9125 }9126 else if( iDir == 6 )9127 {9128 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9129 }9130 else9131 {9132 assert(false);9133 }9134 }9135 else9136 {9137 if( iDir == 0 )9138 {9139 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9140 }9141 else if( iDir == 2 )9142 {9143 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9144 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9145 }9146 else if( iDir == 4 )9147 {9148 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9149 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9150 }9151 else if( iDir == 6 )9152 {9153 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9154 }9155 else9156 {9157 assert(false);9158 }9159 }9160 }9161 else if( iY == 0 )9162 {9163 if( iDir == 1 )9164 {9165 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9166 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9167 }9168 else if( iDir == 2 )9169 {9170 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9171 }9172 else if( iDir == 4 )9173 {9174 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9175 }9176 else if( iDir == 5 )9177 {9178 pbEdge[ 2 * iX + (2 * iY + 1) * 2 * iWidth ] = true;9179 pbEdge[ 2 * iX + 1 + 2 * iY * 2 * iWidth ] = true;9180 }9181 else9182 {9183 assert(false);9184 }9185 }9186 else if( iY == iHeight-1 )9187 {9188 if( iDir == 0 )9189 {9190 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9191 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9192 }9193 else if( iDir == 3 )9194 {9195 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9196 }9197 else if( iDir == 6 )9198 {9199 pbEdge[ 2 * iX + (2 * iY - 1) * 2 * iWidth ] = true;9200 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9201 }9202 else if( iDir == 7 )9203 {9204 pbEdge[ 2 * iX - 1 + 2 * iY * 2 * iWidth ] = true;9205 }9206 else9207 {9208 assert(false);9209 }9210 }9211 else9212 {9213 printf("reconPartiton: wrong termination\n");9214 assert(false);9215 }9216 9217 // Reconstruct Region from Chain Code9218 Bool* pbVisit = (Bool*) xMalloc( Bool, iWidth * iHeight );9219 Int* piStack = (Int* ) xMalloc( Int, iWidth * iHeight );9220 9221 for( UInt ui = 0; ui < iWidth * iHeight; ui++ )9222 {9223 pbRegion[ ui ] = true; // fill it as region 1 (we'll discover region 0 next)9224 pbVisit [ ui ] = false;9225 }9226 9227 iPtr = 0;9228 piStack[iPtr++] = (0 << 8) | (0);9229 pbRegion[ 0 ] = false;9230 9231 while(iPtr > 0)9232 {9233 Int iTmp = piStack[--iPtr];9234 Int iX1, iY1;9235 iX1 = iTmp & 0xff;9236 iY1 = (iTmp >> 8) & 0xff;9237 9238 pbVisit[ iX1 + iY1 * iWidth ] = true;9239 9240 assert( iX1 >= 0 && iX1 < iWidth );9241 assert( iY1 >= 0 && iY1 < iHeight );9242 9243 if( iX1 > 0 && !pbEdge[ 2 * iX1 - 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 - 1 + iY1 * iWidth ] )9244 {9245 piStack[iPtr++] = (iY1 << 8) | (iX1 - 1);9246 pbRegion[ iX1 - 1 + iY1 * iWidth ] = false;9247 }9248 if( iX1 < iWidth - 1 && !pbEdge[ 2 * iX1 + 1 + 4 * iY1 * iWidth ] && !pbVisit[ iX1 + 1 + iY1 * iWidth ] )9249 {9250 piStack[iPtr++] = (iY1 << 8) | (iX1 + 1);9251 pbRegion[ iX1 + 1 + iY1 * iWidth ] = false;9252 }9253 if( iY1 > 0 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 - 1) * iWidth ] && !pbVisit[ iX1 + (iY1 - 1) * iWidth ] )9254 {9255 piStack[iPtr++] = ((iY1 - 1) << 8) | iX1;9256 pbRegion[ iX1 + (iY1 - 1) * iWidth ] = false;9257 }9258 if( iY1 < iHeight - 1 && !pbEdge[ 2 * iX1 + 2 * (2 * iY1 + 1) * iWidth ] && !pbVisit[ iX1 + (iY1 + 1) * iWidth ] )9259 {9260 piStack[iPtr++] = ((iY1 + 1) << 8) | iX1;9261 pbRegion[ iX1 + (iY1 + 1) * iWidth ] = false;9262 }9263 }9264 9265 xFree( pbEdge );9266 xFree( pbVisit );9267 xFree( piStack );9268 }9269 7367 #endif 9270 7368 -
trunk/source/Lib/TLibCommon/TComDataCU.h
r724 r773 198 198 ///< 0: non-VSP; 1: VSP 199 199 #endif 200 #if MTK_SPIVMP_F0110200 #if H_3D_SPIVMP 201 201 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP 202 202 ///< 0: non-SPIVMP; 1: SPIVMP … … 212 212 #if H_3D_DIM_DMM 213 213 UInt* m_dmmWedgeTabIdx[DMM_NUM_TYPE]; 214 #if !SEC_DMM3_RBC_F0147215 UInt* m_dmm3IntraTabIdx;216 #endif217 #endif218 #if H_3D_DIM_RBC219 UChar* m_pucEdgeCode; ///< array of edge code220 UChar* m_pucEdgeNumber; ///< total number of edge221 UChar* m_pucEdgeStartPos; ///< starting point position222 Bool* m_pbEdgeLeftFirst; ///< true if edge should be checked in left boundary first223 Bool* m_pbEdgePartition; ///< true if it belongs to region 1, otherwise, region 0224 214 #endif 225 215 #if H_3D_DIM_SDC … … 233 223 UChar* m_pucInterSDCMask; 234 224 #endif 235 #if ETRIKHU_MERGE_REUSE_F0093225 #if H_3D 236 226 Bool m_bAvailableFlagA1; ///< A1 available flag 237 227 Bool m_bAvailableFlagB1; ///< B1 available flag … … 256 246 UInt* m_sliceSegmentStartCU; ///< Start CU address of current slice 257 247 Char m_codedQP; 258 #if ETRIKHU_MERGE_REUSE_F0093248 #if H_3D 259 249 DisInfo m_cDefaultDisInfo; ///< Default disparity information for initializing 260 250 #endif … … 266 256 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 267 257 #if H_3D_VSP 268 #if ETRIKHU_MERGE_REUSE_F0093269 258 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount, 270 259 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag, Int& iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo); 271 #else272 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount,273 Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* vspFlag );274 #endif275 260 #endif 276 261 #if H_3D_IV_MERGE 277 #if ETRIKHU_MERGE_REUSE_F0093278 262 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv, 279 263 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag, Int &iCount3DV, InheritedVSPDisInfo* inheritedVSPDisInfo ); 280 #else281 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Bool* abCandIsInter, TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* ivCandDir, TComMv* ivCandMv,282 Int* ivCandRefIdx, Int posIvDC, Int* vspFlag );283 #endif284 264 Bool xGetPosFirstAvailDmvCand( Int iCount, TComMvField* pcMvFieldNeighbours, Int* ivCandDir, Int posIvDC, Int* vspFlag, Int& iFirDispCand ); 285 265 #endif … … 519 499 ); 520 500 521 #if ETRIKHU_MERGE_REUSE_F0093501 #if H_3D 522 502 Void rightShiftMergeCandList( TComMvField* pcMvFieldNeighbours, UChar* puhInterDirNeighbours, Int* iVSPIndexTrue, InheritedVSPDisInfo* inheritedVSPDisInfo, UInt start, UInt num, Int &iCount3DV); 523 #endif524 #if QC_DEPTH_IV_MRG_F0125525 503 Bool getDispNeighBlocks ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 526 504 Bool getDispMvPredCan(UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDis, Int* iPdm ); … … 535 513 Void getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD); 536 514 #endif 537 #if MTK_SPIVMP_F0110515 #if H_3D_SPIVMP 538 516 Void getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight); 539 517 Void getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr ); … … 541 519 #endif 542 520 #if H_3D_IV_MERGE 543 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc 544 #if QC_DEPTH_IV_MRG_F0125 545 , Bool bIsDepth 546 #endif 547 #if MTK_SPIVMP_F0110 521 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth 522 523 #if H_3D_SPIVMP 548 524 , TComMvField* pcMFieldSP, UChar* puhInterDirSP 549 525 #endif … … 584 560 Void setDmmWedgeTabIdxSubParts ( UInt tabIdx, UInt dmmType, UInt uiAbsPartIdx, UInt uiDepth ); 585 561 586 #if !SEC_DMM3_RBC_F0147587 UInt* getDmm3IntraTabIdx () { return m_dmm3IntraTabIdx; }588 UInt getDmm3IntraTabIdx ( UInt uiIdx ) { return m_dmm3IntraTabIdx[uiIdx]; }589 Void setDmm3IntraTabIdx ( UInt uiIdx, UInt uh ) { m_dmm3IntraTabIdx[uiIdx] = uh; }590 Void setDmm3IntraTabIdxSubParts ( UInt uiTIdx, UInt uiAbsPartIdx, UInt uiDepth );591 #endif592 #endif593 #if H_3D_DIM_RBC594 UChar* getEdgeCode( UInt uiIdx ) { return &m_pucEdgeCode[uiIdx * RBC_MAX_EDGE_NUM_PER_4x4]; }595 596 UChar* getEdgeNumber( ) { return m_pucEdgeNumber; }597 UChar getEdgeNumber( UInt uiIdx ) { return m_pucEdgeNumber[uiIdx]; }598 Void setEdgeNumber( UInt uiIdx, UChar val ) { m_pucEdgeNumber[uiIdx] = val; }599 600 UChar* getEdgeStartPos( ) { return m_pucEdgeStartPos; }601 UChar getEdgeStartPos( UInt uiIdx ) { return m_pucEdgeStartPos[uiIdx]; }602 Void setEdgeStartPos( UInt uiIdx, UChar val ) { m_pucEdgeStartPos[uiIdx] = val; }603 604 Bool* getEdgeLeftFirst( ) { return m_pbEdgeLeftFirst; }605 Bool getEdgeLeftFirst( UInt uiIdx ) { return m_pbEdgeLeftFirst[uiIdx]; }606 Void setEdgeLeftFirst( UInt uiIdx, Bool val ) { m_pbEdgeLeftFirst[uiIdx] = val; }607 608 Bool* getEdgePartition( UInt uiIdx ) { return &m_pbEdgePartition[uiIdx * 16]; }609 610 Void reconPartition( UInt uiAbsPartIdx, UInt uiDepth, Bool bLeft, UChar ucStartPos, UChar ucNumEdge, UChar* pucEdgeCode, Bool* pbRegion );611 562 #endif 612 563 #if H_3D_DIM_SDC … … 704 655 Bool hasEqualMotion ( UInt uiAbsPartIdx, TComDataCU* pcCandCU, UInt uiCandAbsPartIdx ); 705 656 706 #if ETRIKHU_MERGE_REUSE_F0093657 #if H_3D 707 658 Bool getAvailableFlagA1() { return m_bAvailableFlagA1;} 708 659 Bool getAvailableFlagB1() { return m_bAvailableFlagB1;} … … 720 671 , InheritedVSPDisInfo* inheritedVSPDisInfo 721 672 #endif 722 #if MTK_SPIVMP_F0110673 #if H_3D_SPIVMP 723 674 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 724 675 #endif … … 729 680 inline Void xInheritVSPDisInfo(TComDataCU* pcCURef, UInt uiAbsPartIdx, Int iCount, InheritedVSPDisInfo* inheritedVSPDisInfo); 730 681 731 #if MTK_SPIVMP_F0110682 #if H_3D_SPIVMP 732 683 Bool* getSPIVMPFlag () { return m_pbSPIVMPFlag; } 733 684 Bool getSPIVMPFlag ( UInt uiIdx ) { return m_pbSPIVMPFlag[uiIdx]; } … … 753 704 Bool isBipredRestriction( UInt puIdx ); 754 705 755 #if LGE_IC_CTX_F0160706 #if H_3D_IC 756 707 Bool isIC ( UInt uiPartIdx ); 757 708 #endif -
trunk/source/Lib/TLibCommon/TComMotionInfo.cpp
r724 r773 40 40 #include "assert.h" 41 41 #include <stdlib.h> 42 #if MTK_SPIVMP_F011042 #if H_3D_SPIVMP 43 43 #include "TComDataCU.h" 44 44 #include "TComPic.h" … … 328 328 } 329 329 330 #if MTK_SPIVMP_F0110330 #if H_3D_SPIVMP 331 331 Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ) 332 332 { -
trunk/source/Lib/TLibCommon/TComMotionInfo.h
r724 r773 50 50 // ==================================================================================================================== 51 51 52 #if MTK_SPIVMP_F011052 #if H_3D_SPIVMP 53 53 class TComDataCU; 54 54 #endif … … 173 173 Void setAllRefIdx ( Int iRefIdx, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 174 174 Void setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 175 #if MTK_SPIVMP_F0110175 #if H_3D_SPIVMP 176 176 Void setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ); 177 177 #endif -
trunk/source/Lib/TLibCommon/TComPrediction.cpp
r758 r773 425 425 Bool dimDeltaDC = isDimDeltaDC( uiIntraMode ); 426 426 Bool isDmmMode = (dimType < DMM_NUM_TYPE); 427 #if !SEC_DMM3_RBC_F0147428 Bool isRbcMode = (dimType == RBC_IDX);429 #endif430 427 431 428 Bool* biSegPattern = NULL; … … 443 440 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ) ]); 444 441 } break; 445 #if !SEC_DMM3_RBC_F0147446 case( DMM3_IDX ):447 {448 UInt uiTabIdx = 0;449 if( bFastEnc ) { uiTabIdx = pcCU->getDmmWedgeTabIdx( dimType, uiAbsPartIdx ); }450 else451 {452 uiTabIdx = xPredWedgeFromTex( pcCU, uiAbsPartIdx, iWidth, iHeight, pcCU->getDmm3IntraTabIdx( uiAbsPartIdx ) );453 pcCU->setDmmWedgeTabIdxSubParts( uiTabIdx, dimType, uiAbsPartIdx, (pcCU->getDepth(0) + (pcCU->getPartitionSize(0) == SIZE_2Nx2N ? 0 : 1)) );454 }455 dmmSegmentation = &(g_dmmWedgeLists[ g_aucConvertToBit[iWidth] ][ uiTabIdx ]);456 } break;457 #endif458 442 case( DMM4_IDX ): 459 443 { … … 468 452 } 469 453 #endif 470 #if H_3D_DIM_RBC471 if( isRbcMode )472 {473 biSegPattern = pcCU->getEdgePartition( uiAbsPartIdx );474 patternStride = iWidth;475 }476 #endif477 454 478 455 // get predicted partition values 479 456 assert( biSegPattern ); 480 457 Int* piMask = NULL; 481 #if QC_DIM_DELTADC_UNIFY_F0132 || HHI_DIM_PREDSAMP_FIX_F0171482 458 piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering 483 #else484 if( isDmmMode ) piMask = pcCU->getPattern()->getAdiOrgBuf( iWidth, iHeight, m_piYuvExt ); // no filtering for DMM485 else piMask = pcCU->getPattern()->getPredictorPtr( 0, g_aucConvertToBit[ iWidth ] + 2, m_piYuvExt );486 #endif487 459 assert( piMask ); 488 460 Int maskStride = 2*iWidth + 1; … … 499 471 Pel deltaDC2 = pcCU->getDimDeltaDC( dimType, 1, uiAbsPartIdx ); 500 472 #if H_3D_DIM_DMM 501 #if QC_DIM_DELTADC_UNIFY_F0132 && !SEC_DMM3_RBC_F0147502 if( isDmmMode || isRbcMode)503 #else504 473 if( isDmmMode ) 505 #endif506 474 { 507 475 #if H_3D_DIM_DLT 508 #if DLT_DIFF_CODING_IN_PPS509 476 segDC1 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 ); 510 477 segDC2 = pcCU->getSlice()->getPPS()->getDLT()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getPPS()->getDLT()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 ); 511 478 #else 512 segDC1 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC1 ) + deltaDC1 );513 segDC2 = pcCU->getSlice()->getVPS()->idx2DepthValue( pcCU->getSlice()->getLayerIdInVps(), pcCU->getSlice()->getVPS()->depthValue2idx( pcCU->getSlice()->getLayerIdInVps(), predDC2 ) + deltaDC2 );514 #endif515 #else516 479 segDC1 = ClipY( predDC1 + deltaDC1 ); 517 480 segDC2 = ClipY( predDC2 + deltaDC2 ); 518 481 #endif 519 }520 #endif521 #if H_3D_DIM_RBC && !QC_DIM_DELTADC_UNIFY_F0132522 if( isRbcMode )523 {524 xDeltaDCQuantScaleUp( pcCU, deltaDC1 );525 xDeltaDCQuantScaleUp( pcCU, deltaDC2 );526 segDC1 = ClipY( predDC1 + deltaDC1 );527 segDC2 = ClipY( predDC2 + deltaDC2 );528 482 } 529 483 #endif … … 566 520 } 567 521 568 #if MTK_SPIVMP_F0110522 #if H_3D_SPIVMP 569 523 Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ) 570 524 { … … 677 631 else 678 632 { 679 #if MTK_SPIVMP_F0110633 #if H_3D_SPIVMP 680 634 if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 681 635 { … … 717 671 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 718 672 } 719 #if MTK_SPIVMP_F0110673 #if H_3D_SPIVMP 720 674 } 721 675 #endif … … 763 717 else 764 718 { 765 #if MTK_SPIVMP_F0110719 #if H_3D_SPIVMP 766 720 if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 767 721 { … … 802 756 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 803 757 } 804 #if MTK_SPIVMP_F0110758 #if H_3D_SPIVMP 805 759 } 806 760 #endif … … 830 784 pcCU->clipMv(cMv); 831 785 #if H_3D_ARP 832 #if QC_MTK_INTERVIEW_ARP_F0123_F0108833 786 if(pcCU->getARPW( uiPartAddr ) > 0 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()== pcCU->getSlice()->getPOC()) 834 787 { 835 788 xPredInterUniARPviewRef( pcCU , uiPartAddr , iWidth , iHeight , eRefPicList , rpcYuvPred , bi ); 836 789 } 837 790 else 838 #endif 839 if( pcCU->getARPW( uiPartAddr ) > 0840 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N841 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC()842 )843 {844 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi );845 }846 else847 {791 { 792 if( pcCU->getARPW( uiPartAddr ) > 0 793 && pcCU->getPartitionSize(uiPartAddr)==SIZE_2Nx2N 794 && pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() 795 ) 796 { 797 xPredInterUniARP( pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, rpcYuvPred, bi ); 798 } 799 else 800 { 848 801 #endif 849 802 #if H_3D_IC 850 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() );851 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi803 Bool bICFlag = pcCU->getICFlag( uiPartAddr ) && ( pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getViewIndex() != pcCU->getSlice()->getViewIndex() ); 804 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 852 805 #if H_3D_ARP 853 , false854 #endif 855 , bICFlag );856 bICFlag = bICFlag && (iWidth > 8);857 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi806 , false 807 #endif 808 , bICFlag ); 809 bICFlag = bICFlag && (iWidth > 8); 810 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi 858 811 #if H_3D_ARP 859 , false860 #endif 861 , bICFlag );812 , false 813 #endif 814 , bICFlag ); 862 815 #else 863 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );864 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi );816 xPredInterLumaBlk ( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 817 xPredInterChromaBlk( pcCU, pcCU->getSlice()->getRefPic( eRefPicList, iRefIdx )->getPicYuvRec(), uiPartAddr, &cMv, iWidth, iHeight, rpcYuvPred, bi ); 865 818 #endif 866 819 #if H_3D_ARP 820 } 867 821 } 868 822 #endif … … 918 872 pcBaseViewDepthPicYuv->extendPicBorder(); 919 873 920 #if MTK_F0109_LG_F0120_VSP_BLOCK921 874 Int vspSize=0; 922 875 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp,vspSize ); … … 924 877 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 925 878 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi, vspSize); 926 #else927 xGetVirtualDepth( pcCU, pcBaseViewDepthPicYuv, &cDv, uiPartAddr, iWidth, iHeight, &m_cYuvDepthOnVsp );928 // sub-PU based compensation929 xPredInterLumaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );930 xPredInterChromaBlkFromDM ( pcCU, pcBaseViewTxtPicYuv, &m_cYuvDepthOnVsp, pShiftLUT, &cDv, uiPartAddr, iWidth, iHeight, pcCU->getSlice()->getIsDepth(), rpcYuvPred, bi );931 #endif932 879 } 933 880 #endif … … 959 906 if( cDistparity.bDV ) 960 907 { 961 #if SHARP_ARP_REF_CHECK_F0105962 908 Int arpRefIdx = pcCU->getSlice()->getFirstTRefIdx(eRefPicList); 963 909 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC()!= pcCU->getSlice()->getPOC() ) 964 #else965 if( dW > 0 && pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC()!= pcCU->getSlice()->getPOC() )966 #endif967 910 { 968 911 bTobeScaled = true; … … 971 914 pcPicYuvBaseCol = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getPOC(), cDistparity.m_aVIdxCan ); 972 915 973 #if SHARP_ARP_REF_CHECK_F0105974 916 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC(), cDistparity.m_aVIdxCan ); 975 917 976 918 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, cDistparity.m_aVIdxCan)) 977 #else978 pcPicYuvBaseRef = pcCU->getSlice()->getBaseViewRefPic( pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC(), cDistparity.m_aVIdxCan );979 980 if( ( !pcPicYuvBaseCol || pcPicYuvBaseCol->getPOC() != pcCU->getSlice()->getPOC() ) || ( !pcPicYuvBaseRef || pcPicYuvBaseRef->getPOC() != pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() ) )981 #endif982 919 { 983 920 dW = 0; … … 986 923 else 987 924 { 988 #if SHARP_ARP_REF_CHECK_F0105989 925 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, arpRefIdx )->getPOC() ); 990 #else991 assert( pcPicYuvBaseCol->getPOC() == pcCU->getSlice()->getPOC() && pcPicYuvBaseRef->getPOC() == pcCU->getSlice()->getRefPic( eRefPicList, 0 )->getPOC() );992 #endif993 926 } 994 927 … … 1039 972 } 1040 973 } 1041 #if QC_MTK_INTERVIEW_ARP_F0123_F01081042 974 Void TComPrediction::xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled ) 1043 975 { … … 1061 993 1062 994 assert(dW > 0); 1063 #if SHARP_ARP_REF_CHECK_F01051064 995 if (!pcCU->getSlice()->getArpRefPicAvailable( eRefPicList, pcPicYuvBaseCol->getViewIndex())) 1065 996 { 1066 997 dW = 0; 1067 998 } 1068 #endif1069 999 Int uiLCUAddr,uiAbsPartAddr; 1070 1000 Int irefPUX = pcCU->getCUPelX() + g_auiRasterToPelX[g_auiZscanToRaster[uiPartAddr]] + iWidth/2 + ((cDMv.getHor() + 2)>>2); … … 1144 1074 } 1145 1075 } 1146 #endif1147 1076 1148 1077 #endif … … 1804 1733 #if H_3D_VSP 1805 1734 // not fully support iRatioTxtPerDepth* != 1 1806 #if MTK_F0109_LG_F0120_VSP_BLOCK1807 1735 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY ) 1808 #else1809 Void TComPrediction::xGetVirtualDepth( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *mv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int ratioTxtPerDepthX, Int ratioTxtPerDepthY )1810 #endif1811 1736 { 1812 1737 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; … … 1836 1761 Pel *depth = yuvDepth->getLumaAddr(); 1837 1762 1838 #if !SHARP_VSP_BLOCK_IN_AMP_F01021839 if( width<8 || height<8 )1840 { // no split1841 Int rightOffset = width - 1;1842 Int depStrideBlock = depStride * nTxtPerDepthY;1843 Pel *refDepthTop = refDepth;1844 Pel *refDepthBot = refDepthTop + (height-1)*refDepStride;1845 1846 Pel maxDepth = refDepthTop[0] > refDepthBot[0] ? refDepthTop[0] : refDepthBot[0];1847 if( maxDepth < refDepthTop[rightOffset] ) { maxDepth = refDepthTop[rightOffset]; }1848 if( maxDepth < refDepthBot[rightOffset] ) { maxDepth = refDepthBot[rightOffset]; }1849 1850 for( Int sY=0; sY<height; sY+=nTxtPerDepthY )1851 {1852 for( Int sX=0; sX<width; sX+=nTxtPerDepthX )1853 {1854 depth[sX] = maxDepth;1855 }1856 depth += depStrideBlock;1857 }1858 #if MTK_F0109_LG_F0120_VSP_BLOCK1859 if(width==4)1860 vspSize=0;1861 else1862 vspSize=1;1863 #endif1864 }1865 else1866 { // split to 4x8, or 8x41867 Int blocksize = 8;1868 Int subblocksize = 4;1869 Int depStrideBlock = depStride * blocksize;1870 Pel *depthTmp = NULL;1871 Int depStrideTmp = depStride * nTxtPerDepthY;1872 Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };1873 Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };1874 Pel repDepth4x8[2] = {0, 0};1875 Pel repDepth8x4[2] = {0, 0};1876 #endif1877 1878 #if !MTK_F0109_LG_F0120_VSP_BLOCK1879 #if SHARP_VSP_BLOCK_IN_AMP_F01021880 Int blocksize = 8;1881 Int subblocksize = 4;1882 Int depStrideBlock = depStride * blocksize;1883 Pel *depthTmp = NULL;1884 Int depStrideTmp = depStride * nTxtPerDepthY;1885 Int offset[4] = { 0, subblocksize-1, subblocksize, blocksize-1 };1886 Pel *refDepthTmp[4] = { NULL, NULL, NULL, NULL };1887 #endif1888 Int refDepStrideBlock = refDepStride * blocksize;1889 Int refDepStrideSubBlock = refDepStride * subblocksize;1890 1891 refDepthTmp[0] = refDepth;1892 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock;1893 refDepthTmp[1] = refDepthTmp[2] - refDepStride;1894 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock;1895 1896 #if SHARP_VSP_BLOCK_IN_AMP_F01021897 Int subBlockW, subBlockH;1898 Int blockW, blockH;1899 subBlockW = subBlockH = 8;1900 if (height % 8)1901 {1902 subBlockW = 8;1903 subBlockH = 4;1904 blockW = width; // no further split1905 blockH = height; // no further split1906 }1907 else if (width % 8)1908 {1909 subBlockW = 4;1910 subBlockH = 8;1911 blockW = width; // no further split1912 blockH = height; // no further split1913 }1914 else1915 {1916 blockW = blockH = 8;1917 }1918 for( Int y=0; y<height; y+=blockH )1919 {1920 for( Int x=0; x<width; x+=blockW )1921 {1922 if (blockW == 8 && blockH == 8)1923 {1924 Bool ULvsBR = false, URvsBL = false;1925 ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];1926 URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];1927 if( ULvsBR ^ URvsBL )1928 { // 4x81929 subBlockW = 4;1930 subBlockH = 8;1931 }1932 else1933 {1934 subBlockW = 8;1935 subBlockH = 4;1936 }1937 }1938 for( Int yy=0; yy<blockH; yy+=subBlockH )1939 {1940 for( Int xx=0; xx<blockW; xx+=subBlockW )1941 {1942 Pel maxDepthVal = 0;1943 Int xP0, xP1, yP0, yP1;1944 xP0 = x+xx;1945 xP1 = x+xx+subBlockW-1;1946 yP0 = yy;1947 yP1 = yy+subBlockH-1;1948 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP0*refDepStride]);1949 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP0*refDepStride]);1950 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP0+yP1*refDepStride]);1951 maxDepthVal = std::max( maxDepthVal, refDepthTmp[0][xP1+yP1*refDepStride]);1952 depthTmp = &depth[x+xx+yy*depStride];1953 for( Int sY=0; sY<subBlockH; sY+=nTxtPerDepthY )1954 {1955 for( Int sX=0; sX<subBlockW; sX+=nTxtPerDepthX )1956 {1957 depthTmp[sX] = maxDepthVal;1958 }1959 depthTmp += depStrideTmp;1960 }1961 }1962 }1963 }1964 refDepthTmp[0] += refDepStrideBlock;1965 depth += depStrideBlock;1966 }1967 #else // SHARP_VSP_BLOCK_IN_AMP_F01021968 for( Int y=0; y<height; y+=blocksize )1969 {1970 for( Int x=0; x<width; x+=blocksize )1971 {1972 Bool ULvsBR = false, URvsBL = false;1973 1974 ULvsBR = refDepthTmp[0][x+offset[0]] < refDepthTmp[3][x+offset[3]];1975 URvsBL = refDepthTmp[0][x+offset[3]] < refDepthTmp[3][x+offset[0]];1976 1977 if( ULvsBR ^ URvsBL )1978 { // 4x81979 repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]];1980 if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] )1981 {1982 repDepth4x8[0] = refDepthTmp[3][x+offset[0]];1983 }1984 if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] )1985 {1986 repDepth4x8[0] = refDepthTmp[3][x+offset[1]];1987 }1988 repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]];1989 if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] )1990 {1991 repDepth4x8[1] = refDepthTmp[3][x+offset[2]];1992 }1993 if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] )1994 {1995 repDepth4x8[1] = refDepthTmp[3][x+offset[3]];1996 }1997 1998 depthTmp = &depth[x];1999 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )2000 {2001 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )2002 {2003 depthTmp[sX] = repDepth4x8[0];2004 }2005 depthTmp += depStrideTmp;2006 }2007 depthTmp = &depth[x+subblocksize];2008 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY )2009 {2010 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX )2011 {2012 depthTmp[sX] = repDepth4x8[1];2013 }2014 depthTmp += depStrideTmp;2015 }2016 }2017 else2018 { // 8x42019 repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]];2020 if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] )2021 {2022 repDepth8x4[0] = refDepthTmp[1][x+offset[0]];2023 }2024 if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] )2025 {2026 repDepth8x4[0] = refDepthTmp[1][x+offset[3]];2027 }2028 repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]];2029 if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] )2030 {2031 repDepth8x4[1] = refDepthTmp[3][x+offset[0]];2032 }2033 if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] )2034 {2035 repDepth8x4[1] = refDepthTmp[3][x+offset[3]];2036 }2037 2038 depthTmp = &depth[x];2039 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )2040 {2041 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )2042 {2043 depthTmp[sX] = repDepth8x4[0];2044 }2045 depthTmp += depStrideTmp;2046 }2047 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY )2048 {2049 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX )2050 {2051 depthTmp[sX] = repDepth8x4[1];2052 }2053 depthTmp += depStrideTmp;2054 }2055 }2056 }2057 refDepthTmp[0] += refDepStrideBlock;2058 refDepthTmp[1] += refDepStrideBlock;2059 refDepthTmp[2] += refDepStrideBlock;2060 refDepthTmp[3] += refDepStrideBlock;2061 depth += depStrideBlock;2062 }2063 #endif // SHARP_VSP_BLOCK_IN_AMP_F01022064 #else2065 #if SHARP_VSP_BLOCK_IN_AMP_F01022066 1763 if ((height % 8)) 2067 1764 { … … 2115 1812 } 2116 1813 } 2117 } 2118 #else // SHARP_VSP_BLOCK_IN_AMP_F0102 2119 Int refDepStrideBlock = refDepStride * height; 2120 Int refDepStrideSubBlock = refDepStride * height/2; 2121 refDepthTmp[0] = refDepth; 2122 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 2123 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 2124 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 2125 offset[3] = width-1; 2126 Bool ULvsBR = false, URvsBL = false; 2127 ULvsBR = refDepthTmp[0][0+offset[0]] < refDepthTmp[3][0+offset[3]]; 2128 URvsBL = refDepthTmp[0][0+offset[3]] < refDepthTmp[3][0+offset[0]]; 2129 refDepStrideBlock = refDepStride * blocksize; 2130 refDepStrideSubBlock = refDepStride * subblocksize; 2131 refDepthTmp[0] = refDepth; 2132 refDepthTmp[2] = refDepthTmp[0] + refDepStrideSubBlock; 2133 refDepthTmp[1] = refDepthTmp[2] - refDepStride; 2134 refDepthTmp[3] = refDepthTmp[1] + refDepStrideSubBlock; 2135 offset[3] = blocksize-1; 2136 if( ULvsBR ^ URvsBL ) 2137 { 2138 vspSize = 0;//4x8 2139 for( Int y=0; y<height; y+=blocksize ) 2140 { 2141 for( Int x=0; x<width; x+=blocksize ) 2142 { 2143 { // 4x8 2144 repDepth4x8[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[1]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[1]]; 2145 if( repDepth4x8[0] < refDepthTmp[3][x+offset[0]] ) 2146 { 2147 repDepth4x8[0] = refDepthTmp[3][x+offset[0]]; 2148 } 2149 if( repDepth4x8[0] < refDepthTmp[3][x+offset[1]] ) 2150 { 2151 repDepth4x8[0] = refDepthTmp[3][x+offset[1]]; 2152 } 2153 repDepth4x8[1] = refDepthTmp[0][x+offset[2]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[2]] : refDepthTmp[0][x+offset[3]]; 2154 if( repDepth4x8[1] < refDepthTmp[3][x+offset[2]] ) 2155 { 2156 repDepth4x8[1] = refDepthTmp[3][x+offset[2]]; 2157 } 2158 if( repDepth4x8[1] < refDepthTmp[3][x+offset[3]] ) 2159 { 2160 repDepth4x8[1] = refDepthTmp[3][x+offset[3]]; 2161 } 2162 2163 depthTmp = &depth[x]; 2164 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 2165 { 2166 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2167 { 2168 depthTmp[sX] = repDepth4x8[0]; 2169 } 2170 depthTmp += depStrideTmp; 2171 } 2172 depthTmp = &depth[x+subblocksize]; 2173 for( Int sY=0; sY<blocksize; sY+=nTxtPerDepthY ) 2174 { 2175 for( Int sX=0; sX<subblocksize; sX+=nTxtPerDepthX ) 2176 { 2177 depthTmp[sX] = repDepth4x8[1]; 2178 } 2179 depthTmp += depStrideTmp; 2180 } 2181 } 2182 } 2183 refDepthTmp[0] += refDepStrideBlock; 2184 refDepthTmp[1] += refDepStrideBlock; 2185 refDepthTmp[2] += refDepStrideBlock; 2186 refDepthTmp[3] += refDepStrideBlock; 2187 depth += depStrideBlock; 2188 } 2189 } 2190 else 2191 { // 8x4 2192 vspSize = 1; 2193 for( Int y=0; y<height; y+=blocksize ) 2194 { 2195 for( Int x=0; x<width; x+=blocksize ) 2196 { 2197 repDepth8x4[0] = refDepthTmp[0][x+offset[0]] > refDepthTmp[0][x+offset[3]] ? refDepthTmp[0][x+offset[0]] : refDepthTmp[0][x+offset[3]]; 2198 if( repDepth8x4[0] < refDepthTmp[1][x+offset[0]] ) 2199 { 2200 repDepth8x4[0] = refDepthTmp[1][x+offset[0]]; 2201 } 2202 if( repDepth8x4[0] < refDepthTmp[1][x+offset[3]] ) 2203 { 2204 repDepth8x4[0] = refDepthTmp[1][x+offset[3]]; 2205 } 2206 repDepth8x4[1] = refDepthTmp[2][x+offset[0]] > refDepthTmp[2][x+offset[3]] ? refDepthTmp[2][x+offset[0]] : refDepthTmp[2][x+offset[3]]; 2207 if( repDepth8x4[1] < refDepthTmp[3][x+offset[0]] ) 2208 { 2209 repDepth8x4[1] = refDepthTmp[3][x+offset[0]]; 2210 } 2211 if( repDepth8x4[1] < refDepthTmp[3][x+offset[3]] ) 2212 { 2213 repDepth8x4[1] = refDepthTmp[3][x+offset[3]]; 2214 } 2215 2216 depthTmp = &depth[x]; 2217 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2218 { 2219 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2220 { 2221 depthTmp[sX] = repDepth8x4[0]; 2222 } 2223 depthTmp += depStrideTmp; 2224 } 2225 for( Int sY=0; sY<subblocksize; sY+=nTxtPerDepthY ) 2226 { 2227 for( Int sX=0; sX<blocksize; sX+=nTxtPerDepthX ) 2228 { 2229 depthTmp[sX] = repDepth8x4[1]; 2230 } 2231 depthTmp += depStrideTmp; 2232 } 2233 } 2234 refDepthTmp[0] += refDepStrideBlock; 2235 refDepthTmp[1] += refDepStrideBlock; 2236 refDepthTmp[2] += refDepStrideBlock; 2237 refDepthTmp[3] += refDepStrideBlock; 2238 depth += depStrideBlock; 2239 } 2240 } 2241 #endif 2242 #endif 2243 #if !SHARP_VSP_BLOCK_IN_AMP_F0102 2244 } 2245 #endif 2246 2247 2248 } 2249 #if MTK_F0109_LG_F0120_VSP_BLOCK 1814 } 1815 } 1816 2250 1817 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize) 2251 #else2252 Void TComPrediction::xPredInterLumaBlkFromDM( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )2253 #endif2254 1818 { 2255 1819 Int nTxtPerDepthX = H_3D_VSP_BLOCKSIZE; 2256 1820 Int nTxtPerDepthY = H_3D_VSP_BLOCKSIZE; 2257 1821 2258 #if MTK_F0109_LG_F0120_VSP_BLOCK2259 1822 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2260 1823 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2261 #endif 1824 2262 1825 Int refStride = picRef->getStride(); 2263 1826 Int dstStride = yuvDst->getStride(); … … 2365 1928 } 2366 1929 2367 #if MTK_F0109_LG_F0120_VSP_BLOCK2368 1930 Void TComPrediction::xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi, Int vspSize) 2369 #else2370 Void TComPrediction::xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&yuvDst, Bool isBi )2371 #endif2372 1931 { 2373 1932 #if (H_3D_VSP_BLOCKSIZE==1) … … 2379 1938 #endif 2380 1939 2381 #if MTK_F0109_LG_F0120_VSP_BLOCK2382 1940 nTxtPerDepthX = nTxtPerDepthX << vspSize; 2383 1941 nTxtPerDepthY = nTxtPerDepthY << (1-vspSize); 2384 #endif 1942 2385 1943 Int refStride = picRef->getCStride(); 2386 1944 Int dstStride = yuvDst->getCStride(); … … 2564 2122 2565 2123 #if H_3D_DIM_DMM 2566 #if !SEC_DMM3_RBC_F01472567 UInt TComPrediction::xPredWedgeFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt intraTabIdx )2568 {2569 TComPic* pcPicTex = pcCU->getSlice()->getTexturePic();2570 assert( pcPicTex != NULL );2571 TComDataCU* pcColTexCU = pcPicTex->getCU(pcCU->getAddr());2572 UInt uiTexPartIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx;2573 Int uiColTexIntraDir = pcColTexCU->isIntra( uiTexPartIdx ) ? pcColTexCU->getLumaIntraDir( uiTexPartIdx ) : 255;2574 2575 assert( uiColTexIntraDir > DC_IDX && uiColTexIntraDir < 35 );2576 return g_aauiWdgLstM3[g_aucConvertToBit[uiWidth]][uiColTexIntraDir-2].at(intraTabIdx);2577 }2578 #endif2579 2124 2580 2125 Void TComPrediction::xPredContourFromTex( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge ) … … 2628 2173 #endif 2629 2174 2630 #if H_3D_DIM_RBC 2631 Void TComPrediction::xDeltaDCQuantScaleUp( TComDataCU* pcCU, Pel& rDeltaDC ) 2632 { 2633 Int iSign = rDeltaDC < 0 ? -1 : 1; 2634 UInt uiAbs = abs( rDeltaDC ); 2635 2636 Int iQp = pcCU->getQP(0); 2637 Double dMax = (Double)( 1<<( g_bitDepthY - 1 ) ); 2638 Double dStepSize = Clip3( 1.0, dMax, pow( 2.0, iQp/10.0 - 2.0 ) ); 2639 2640 rDeltaDC = iSign * roftoi( uiAbs * dStepSize ); 2641 return; 2642 } 2643 2644 Void TComPrediction::xDeltaDCQuantScaleDown( TComDataCU* pcCU, Pel& rDeltaDC ) 2645 { 2646 Int iSign = rDeltaDC < 0 ? -1 : 1; 2647 UInt uiAbs = abs( rDeltaDC ); 2648 2649 Int iQp = pcCU->getQP(0); 2650 Double dMax = (Double)( 1<<( g_bitDepthY - 1 ) ); 2651 Double dStepSize = Clip3( 1.0, dMax, pow( 2.0, iQp/10.0 - 2.0 ) ); 2652 2653 rDeltaDC = iSign * roftoi( uiAbs / dStepSize ); 2654 return; 2655 } 2656 #endif 2175 2657 2176 #if H_3D_DIM_SDC 2658 2177 Void TComPrediction::analyzeSegmentsSDC( Pel* pOrig, UInt uiStride, UInt uiSize, Pel* rpSegMeans, UInt uiNumSegments, Bool* pMask, UInt uiMaskStride -
trunk/source/Lib/TLibCommon/TComPrediction.h
r724 r773 93 93 #if H_3D_ARP 94 94 Void xPredInterUniARP ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false, TComMvField * pNewMvFiled = NULL ); 95 #if QC_MTK_INTERVIEW_ARP_F0123_F010896 95 Void xPredInterUniARPviewRef( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi, TComMvField * pNewMvFiled = NULL ); 97 #endif98 96 #endif 99 97 Void xPredInterUni ( TComDataCU* pcCU, UInt uiPartAddr, Int iWidth, Int iHeight, RefPicList eRefPicList, TComYuv*& rpcYuvPred, Bool bi=false ); … … 123 121 124 122 #if H_3D_VSP 125 #if MTK_F0109_LG_F0120_VSP_BLOCK126 123 Void xGetVirtualDepth ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int &vspSize, Int txtPerDepthX=1, Int txtPerDepthY=1 ); 127 124 Void xPredInterLumaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize); 128 125 Void xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi, Int vspSize); 129 #else130 Void xGetVirtualDepth ( TComDataCU *cu, TComPicYuv *picRefDepth, TComMv *dv, UInt partAddr, Int width, Int height, TComYuv *yuvDepth, Int txtPerDepthX=1, Int txtPerDepthY=1 );131 Void xPredInterLumaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );132 Void xPredInterChromaBlkFromDM ( TComDataCU *cu, TComPicYuv *picRef, TComYuv *yuvDepth, Int* shiftLUT, TComMv *mv, UInt partAddr, Int width, Int height, Bool isDepth, TComYuv *&pcYuvDst, Bool isBi );133 #endif134 126 #endif 135 127 … … 142 134 Void xDCPredFiltering( Int* pSrc, Int iSrcStride, Pel*& rpDst, Int iDstStride, Int iWidth, Int iHeight ); 143 135 Bool xCheckIdenticalMotion ( TComDataCU* pcCU, UInt PartAddr); 144 #if MTK_SPIVMP_F0110136 #if H_3D_SPIVMP 145 137 Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 ); 146 138 Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ); … … 154 146 Void xPredContourFromTex ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, TComWedgelet* pcContourWedge ); 155 147 Void xCopyTextureLumaBlock ( TComDataCU* pcCU, UInt uiAbsPartIdx, Pel* piDestBlockY, UInt uiWidth, UInt uiHeight ); 156 #endif157 #if H_3D_DIM_RBC158 Void xDeltaDCQuantScaleUp ( TComDataCU* pcCU, Pel& rDeltaDC );159 Void xDeltaDCQuantScaleDown ( TComDataCU* pcCU, Pel& rDeltaDC );160 148 #endif 161 149 #endif -
trunk/source/Lib/TLibCommon/TComRom.cpp
r738 r773 573 573 #if H_MV_ENC_DEC_TRAC 574 574 #if ENC_DEC_TRACE 575 #if H_MV_FIX_TRACE_FILE576 575 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ) 577 #else578 Void writeToTraceFile( Char* symbolName, Int val, Bool doIt )579 #endif580 576 { 581 577 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) … … 592 588 } 593 589 594 #if H_MV_FIX_TRACE_FILE595 590 Void writeToTraceFile( const Char* symbolName, Bool doIt ) 596 #else597 Void writeToTraceFile( Char* symbolName, Bool doIt )598 #endif599 591 { 600 592 if ( ( ( g_nSymbolCounter >= COUNTER_START && g_nSymbolCounter <= COUNTER_END )|| g_bJustDoIt ) && doIt ) … … 612 604 std::vector< std::vector<TComWedgeRef> > g_dmmWedgeRefLists; 613 605 std::vector< std::vector<TComWedgeNode> > g_dmmWedgeNodeLists; 614 #if !SEC_DMM3_RBC_F0147615 std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;616 #endif617 606 618 607 Void initWedgeLists( Bool initNodeList ) … … 733 722 } 734 723 735 #if !SEC_DMM3_RBC_F0147 736 UInt uiThrSz = DMM3_SIMPLIFY_TR; 737 std::vector< std::vector<UInt> > auiWdgListSz; 738 for( Int idxM=2; idxM<=34 ; idxM++) 739 { 740 std::vector<UInt> auiWdgList; 741 for( Int idxW=0; idxW<racWedgeList.size(); idxW++) 742 { 743 UInt uiAbsDiff = abs(idxM-(Int)racWedgeList[idxW].getAng()); 744 if( uiAbsDiff <= uiThrSz ) 745 { 746 auiWdgList.push_back(idxW); 747 } 748 } 749 auiWdgListSz.push_back(auiWdgList); 750 } 751 g_aauiWdgLstM3.push_back(auiWdgListSz); 752 #endif 724 753 725 } 754 726 -
trunk/source/Lib/TLibCommon/TComRom.h
r738 r773 172 172 extern std::vector< std::vector<TComWedgeRef> > g_dmmWedgeRefLists; 173 173 extern std::vector< std::vector<TComWedgeNode> > g_dmmWedgeNodeLists; 174 #if !SEC_DMM3_RBC_F0147175 extern std::vector< std::vector< std::vector<UInt> > > g_aauiWdgLstM3;176 #endif177 174 178 175 Void initWedgeLists( Bool initNodeList = false ); … … 236 233 237 234 238 #if H_MV_FIX_TRACE_FILE239 235 Void writeToTraceFile( const Char* symbolName, Int val, Bool doIt ); 240 236 Void writeToTraceFile( const Char* symbolName, Bool doIt ); 241 #else242 Void writeToTraceFile( Char* symbolName, Int val, Bool doIt );243 Void writeToTraceFile( Char* symbolName, Bool doIt );244 #endif245 237 #endif 246 238 #else -
trunk/source/Lib/TLibCommon/TComSlice.cpp
r758 r773 110 110 #endif 111 111 , m_pocResetFlag (false) 112 #if H_MV _6_RALS_O0149_11112 #if H_MV 113 113 , m_crossLayerBlaFlag (false) 114 114 #endif … … 753 753 { 754 754 if ( this->getNumRefIdx( RefPicList( uiRefListIdx ) ) == 0) 755 { 755 756 continue; 756 #if !SHARP_ARP_REF_CHECK_F0105 757 // move the following to setARPStepNum() to define ARP related thing in ARP function. 758 #if QC_MTK_INTERVIEW_ARP_F0123_F0108 759 for(Int i = 0; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) 760 { 761 if ( this->getRefPic(RefPicList(uiRefListIdx), i)->getPOC() != getPOC() ) 762 { 763 this->setFirstTRefIdx (RefPicList(uiRefListIdx), i); 764 break; 765 } 766 } 767 #endif 768 #endif 757 } 769 758 Bool bZeroIdxLtFlag = this->getRefPic(RefPicList(uiRefListIdx), 0)->getIsLongTerm(); 770 759 for(Int i = 1; i < this->getNumRefIdx(RefPicList(uiRefListIdx)); i++ ) … … 782 771 Void TComSlice::setCamparaSlice( Int** aaiScale, Int** aaiOffset ) 783 772 { 784 #if CAM_HLS_F0136_F0045_F0082785 773 if( m_pcVPS->hasCamParInSliceHeader( m_viewIndex ) ) 786 #else787 if( m_pcSPS->hasCamParInSliceHeader() )788 #endif789 774 { 790 775 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < m_viewIndex; uiBaseViewIndex++ ) … … 1716 1701 , m_hrdOpSetIdx (NULL) 1717 1702 , m_cprmsPresentFlag (NULL) 1718 #if H_MV _6_HRD_O0217_131703 #if H_MV 1719 1704 , m_dpbSize (NULL) 1720 #endif1721 #if H_MV1722 1705 , m_vpsVUI ( NULL ) 1723 1706 #endif … … 1734 1717 for( Int layerId = 0; layerId < MAX_VPS_NUH_LAYER_ID_PLUS1; layerId++ ) 1735 1718 { 1736 #if H_MV_6_HRD_O0217_131737 1719 m_layerIdIncludedFlag[lsIdx][layerId] = (( lsIdx == 0 ) && ( layerId == 0 )) ; 1738 #else1739 m_layerIdIncludedFlag[lsIdx][layerId] = false;1740 #endif1741 1720 } 1742 1721 } … … 1752 1731 m_moreOutputLayerSetsThanDefaultFlag = false; 1753 1732 m_numAddOutputLayerSetsMinus1 = -1; 1754 #if H_MV_6_PS_0109_251755 1733 m_defaultOneTargetOutputLayerIdc = 0; 1756 #else1757 m_defaultOneTargetOutputLayerFlag = false;1758 #endif1759 1734 1760 1735 for ( Int i = 0; i < MAX_VPS_OUTPUTLAYER_SETS; i++) … … 1767 1742 } 1768 1743 } 1769 #if H_MV_6_GEN_0153_281770 1744 m_altOutputLayerFlag = false; 1771 #endif1772 1745 m_maxOneActiveRefLayerFlag = false; 1773 1746 m_directDepTypeLenMinus2 = 0; … … 1806 1779 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1807 1780 m_numDirectRefLayers[i] = 0; 1808 #if !H_MV_6_ILDDS_O0225_301809 m_maxTidIlRefPicPlus1[i] = 7;1810 #endif1811 1781 m_vpsRepFormatIdx [i] = 0; 1812 #if H_MV_6_MISC_O0062_311813 1782 m_pocLsbNotPresentFlag[i] = 0; 1814 #endif1815 1783 m_repFormat [i] = NULL; 1816 1784 m_viewIdVal [i] = 0; … … 1819 1787 m_viewIndex [i] = -1; 1820 1788 m_vpsDepthModesFlag [i] = false; 1821 #if H_3D_DIM_DLT1822 #if !DLT_DIFF_CODING_IN_PPS1823 m_bUseDLTFlag [i] = false;1824 1825 // allocate some memory and initialize with default mapping1826 m_iNumDepthmapValues[i] = ((1 << g_bitDepthY)-1)+1;1827 m_iBitsPerDepthValue[i] = numBitsForValue(m_iNumDepthmapValues[i]);1828 1829 m_iDepthValue2Idx[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);1830 m_iIdx2DepthValue[i] = (Int*) xMalloc(Int, m_iNumDepthmapValues[i]);1831 1832 //default mapping1833 for (Int d=0; d<m_iNumDepthmapValues[i]; d++)1834 {1835 m_iDepthValue2Idx[i][d] = d;1836 m_iIdx2DepthValue[i][d] = d;1837 }1838 #endif1839 #endif1840 #if H_3D1841 1789 m_ivMvScalingFlag = true; 1842 #endif1843 1790 #endif 1844 1791 … … 1848 1795 m_directDependencyType[i][j] = -1; 1849 1796 m_refLayerId[i][j] = -1; 1850 #if H_MV_6_ILDDS_O0225_301851 1797 m_maxTidIlRefPicsPlus1[i][j] = 7; 1852 #endif1853 1798 } 1854 1799 … … 1863 1808 } 1864 1809 m_vpsVUI = new TComVPSVUI; 1865 #if H_MV_6_HRD_O0217_131866 1810 m_dpbSize = new TComDpbSize; 1867 #endif 1868 # 1811 1869 1812 #if H_3D 1870 1813 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) … … 1872 1815 #if H_3D_IV_MERGE 1873 1816 m_ivMvPredFlag [ i ] = false; 1874 #if MTK_SPIVMP_F01101817 #if H_3D_SPIVMP 1875 1818 m_iSubPULog2Size [ i ] = 0; 1876 1819 #endif … … 1885 1828 m_bInterSDCFlag [ i ] = false; 1886 1829 #endif 1887 #if SEC_MPI_ENABLING_MERGE_F01501830 #if H_3D_IV_MERGE 1888 1831 m_bMPIFlag [ i ] = false; 1889 1832 #endif … … 1895 1838 TComVPS::~TComVPS() 1896 1839 { 1897 if( m_hrdParameters != NULL ) delete[] m_hrdParameters;1840 if( m_hrdParameters != NULL ) delete[] m_hrdParameters; 1898 1841 if( m_hrdOpSetIdx != NULL ) delete[] m_hrdOpSetIdx; 1899 1842 if( m_cprmsPresentFlag != NULL ) delete[] m_cprmsPresentFlag; 1900 1843 #if H_MV 1901 1844 if ( m_vpsVUI != NULL ) delete m_vpsVUI; 1902 #if H_MV_6_HRD_O0217_131903 1845 if ( m_dpbSize != NULL ) delete m_dpbSize; 1904 #endif1905 1846 1906 1847 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 1907 1848 { 1908 1849 if (m_repFormat[ i ] != NULL ) delete m_repFormat[ i ]; 1909 #if H_3D_DIM_DLT 1910 #if !DLT_DIFF_CODING_IN_PPS 1911 if ( m_iDepthValue2Idx[i] != 0 ) 1912 { 1913 xFree( m_iDepthValue2Idx[i] ); 1914 m_iDepthValue2Idx[i] = 0; 1915 } 1916 1917 if ( m_iIdx2DepthValue[i] != 0 ) 1918 { 1919 xFree( m_iIdx2DepthValue[i] ); 1920 m_iIdx2DepthValue[i] = 0; 1921 } 1922 #endif 1923 #endif 1924 } 1925 #endif 1926 #if CAM_HLS_F0136_F0045_F0082 1850 } 1851 #endif 1852 #if H_3D 1927 1853 deleteCamPars(); 1928 1854 #endif 1929 1855 } 1930 1931 #if H_3D_DIM_DLT1932 #if !DLT_DIFF_CODING_IN_PPS1933 Void TComVPS::setDepthLUTs(Int layerIdInVps, Int* idxToDepthValueTable, Int iNumDepthValues)1934 {1935 if( idxToDepthValueTable == NULL || iNumDepthValues == 0 ) // default mapping only1936 return;1937 1938 // copy idx2DepthValue to internal array1939 memcpy(m_iIdx2DepthValue[layerIdInVps], idxToDepthValueTable, iNumDepthValues*sizeof(UInt));1940 1941 UInt uiMaxDepthValue = ((1 << g_bitDepthY)-1);1942 for(Int p=0; p<=uiMaxDepthValue; p++)1943 {1944 Int iIdxDown = 0;1945 Int iIdxUp = iNumDepthValues-1;1946 Bool bFound = false;1947 1948 // iterate over indices to find lower closest depth1949 Int i = 1;1950 while(!bFound && i<iNumDepthValues)1951 {1952 if( m_iIdx2DepthValue[layerIdInVps][i] > p )1953 {1954 iIdxDown = i-1;1955 bFound = true;1956 }1957 1958 i++;1959 }1960 // iterate over indices to find upper closest depth1961 i = iNumDepthValues-2;1962 bFound = false;1963 while(!bFound && i>=0)1964 {1965 if( m_iIdx2DepthValue[layerIdInVps][i] < p )1966 {1967 iIdxUp = i+1;1968 bFound = true;1969 }1970 1971 i--;1972 }1973 1974 // assert monotony1975 assert(iIdxDown<=iIdxUp);1976 1977 // assign closer depth value/idx1978 if( abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxDown]) < abs(p-m_iIdx2DepthValue[layerIdInVps][iIdxUp]) )1979 {1980 m_iDepthValue2Idx[layerIdInVps][p] = iIdxDown;1981 }1982 else1983 {1984 m_iDepthValue2Idx[layerIdInVps][p] = iIdxUp;1985 }1986 1987 }1988 1989 // update DLT variables1990 m_iNumDepthmapValues[layerIdInVps] = iNumDepthValues;1991 m_iBitsPerDepthValue[layerIdInVps] = numBitsForValue(m_iNumDepthmapValues[layerIdInVps]);1992 }1993 #endif1994 #endif1995 1856 1996 1857 #if H_MV … … 2079 1940 return foundLayerIdinNuh; 2080 1941 } 2081 #if CAM_HLS_F0136_F0045_F0082 1942 2082 1943 Void TComVPS::createCamPars(Int iNumViews) 2083 1944 { … … 2168 2029 } 2169 2030 } 2170 #endif // CAM_HLS_F0136_F0045_F00822171 2031 2172 2032 #endif // H_3D … … 2204 2064 assert( lsIdx >= 0 ); 2205 2065 assert( lsIdx <= getVpsNumLayerSetsMinus1() ); 2206 #if H_MV_6_HRD_O0217_132207 2066 return (Int) m_layerSetLayerIdList[ lsIdx ].size(); 2208 #else 2209 Int numLayersInIdList = 0; 2210 for (Int layerId = 0; layerId < getVpsMaxLayerId(); layerId++ ) 2211 { 2212 numLayersInIdList += ( getLayerIdIncludedFlag( lsIdx, layerId ) ); 2213 } 2214 return numLayersInIdList; 2215 #endif 2216 } 2217 2218 #if H_MV_6_HRD_O0217_13 2067 } 2068 2219 2069 Int TComVPS::getNumOutputLayerSets() 2220 2070 { … … 2226 2076 return numOutputLayerSets; 2227 2077 } 2228 #endif2229 2078 2230 2079 Int TComVPS::getNumViews() … … 2258 2107 } 2259 2108 2260 #if H_MV_6_HRD_O0217_132261 2109 Void TComVPS::deriveLayerSetLayerIdList() 2262 2110 { … … 2294 2142 } 2295 2143 } 2296 #endif2297 2144 #endif // H_MV 2298 2145 … … 2349 2196 , m_spsScalingListRefLayerId ( 0 ) 2350 2197 2351 #if !H_MV_6_PS_REP_FORM_18_19_202352 , m_updateRepFormatFlag ( true )2353 #else2354 2198 , m_updateRepFormatFlag ( false ) 2355 2199 , m_spsRepFormatIdx ( 0 ) 2356 #endif2357 2200 , m_interViewMvVertConstraintFlag (false) 2358 2201 #endif … … 2370 2213 ::memset(m_ltRefPicPocLsbSps, 0, sizeof(m_ltRefPicPocLsbSps)); 2371 2214 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2372 #if H_MV _6_PSEM_O0142_32215 #if H_MV 2373 2216 m_spsExtensionFlag = false; 2374 2217 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ ) … … 2376 2219 m_spsExtensionTypeFlag[ i ] = false; 2377 2220 } 2378 #endif2379 #if H_MV_6_SHVC_O0098_362380 2221 m_numScaledRefLayerOffsets = 0; 2381 2222 … … 2548 2389 , m_ppsInferScalingListFlag(false) 2549 2390 , m_ppsScalingListRefLayerId(0) 2550 #if DLT_DIFF_CODING_IN_PPS2391 #if H_3D 2551 2392 , m_pcDLT(NULL) 2552 2393 #endif … … 2571 2412 } 2572 2413 2573 #if DLT_DIFF_CODING_IN_PPS2414 #if H_3D 2574 2415 TComDLT::TComDLT() 2575 2416 : m_bDltPresentFlag(false) … … 2753 2594 if ( layerIdCurr > 0 ) 2754 2595 { 2755 #if H_MV_6_PS_REP_FORM_18_19_202756 2596 Int repFormatIdx = getUpdateRepFormatFlag() ? getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ; 2757 2597 TComRepFormat* repFormat = vps->getRepFormat( repFormatIdx ); 2758 #else2759 TComRepFormat* repFormat = vps->getRepFormat( vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) );2760 if ( !getUpdateRepFormatFlag() )2761 {2762 #endif2763 2598 setChromaFormatIdc( repFormat->getChromaFormatVpsIdc() ); 2764 2599 //// ToDo: add when supported: … … 2773 2608 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 2774 2609 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 2775 #if !H_MV_6_PS_REP_FORM_18_19_202776 }2777 else2778 #else2779 2610 if ( getLayerId() > 0 && getUpdateRepFormatFlag() ) 2780 #endif2781 2611 { 2782 2612 assert( getChromaFormatIdc() <= repFormat->getChromaFormatVpsIdc() ); … … 2808 2638 } 2809 2639 #endif 2810 #if H_3D 2811 #if !CAM_HLS_F0136_F0045_F0082 2812 Void 2813 TComSPS::initCamParaSPS( UInt uiViewIndex, UInt uiCamParPrecision, Bool bCamParSlice, Int** aaiScale, Int** aaiOffset ) 2814 { 2815 AOT( uiViewIndex != 0 && !bCamParSlice && ( aaiScale == 0 || aaiOffset == 0 ) ); 2816 2817 m_uiCamParPrecision = ( uiViewIndex ? uiCamParPrecision : 0 ); 2818 m_bCamParInSliceHeader = ( uiViewIndex ? bCamParSlice : false ); 2819 ::memset( m_aaiCodedScale, 0x00, sizeof( m_aaiCodedScale ) ); 2820 ::memset( m_aaiCodedOffset, 0x00, sizeof( m_aaiCodedOffset ) ); 2821 2822 if( !m_bCamParInSliceHeader ) 2823 { 2824 for( UInt uiBaseViewIndex = 0; uiBaseViewIndex < uiViewIndex; uiBaseViewIndex++ ) 2825 { 2826 m_aaiCodedScale [ 0 ][ uiBaseViewIndex ] = aaiScale [ uiBaseViewIndex ][ uiViewIndex ]; 2827 m_aaiCodedScale [ 1 ][ uiBaseViewIndex ] = aaiScale [ uiViewIndex ][ uiBaseViewIndex ]; 2828 m_aaiCodedOffset[ 0 ][ uiBaseViewIndex ] = aaiOffset[ uiBaseViewIndex ][ uiViewIndex ]; 2829 m_aaiCodedOffset[ 1 ][ uiBaseViewIndex ] = aaiOffset[ uiViewIndex ][ uiBaseViewIndex ]; 2830 } 2831 } 2832 } 2833 #endif 2834 #endif 2640 2835 2641 TComReferencePictureSet::TComReferencePictureSet() 2836 2642 : m_numberOfPictures (0) … … 3150 2956 { 3151 2957 TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc ); 3152 #if H_MV_LAYER_WISE_STARTUP3153 2958 if ( pcPic ) 3154 2959 { 3155 #endif3156 2960 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 3157 2961 { … … 3176 2980 } 3177 2981 } 3178 #if H_MV_LAYER_WISE_STARTUP 3179 } 3180 #endif 2982 } 3181 2983 } 3182 2984 } … … 3236 3038 3237 3039 3238 #if H_MV_6_ILDDS_ILREFPICS_27_343239 3040 Int TComSlice::getRefLayerPicFlag( Int i ) 3240 3041 { … … 3279 3080 return numRefLayerPics; 3280 3081 } 3281 #endif3282 3082 3283 3083 … … 3293 3093 else if (getVPS()->getAllRefLayersActiveFlag() ) 3294 3094 { 3295 #if H_MV_6_ILDDS_ILREFPICS_27_343296 3095 numActiveRefLayerPics = getNumRefLayerPics(); 3297 #else3298 numActiveRefLayerPics = getVPS()->getNumDirectRefLayers( getLayerId() );3299 #endif3300 3096 } 3301 3097 else if ( !getInterLayerPredEnabledFlag() ) … … 3305 3101 else if( getVPS()->getMaxOneActiveRefLayerFlag() || getVPS()->getNumDirectRefLayers( getLayerId() ) == 1 ) 3306 3102 { 3307 #if H_MV_6_ILDDS_ILREFPICS_27_343308 3103 numActiveRefLayerPics = getRefLayerPicFlag( 0 ) ? 1 : 0; 3309 #else3310 numActiveRefLayerPics = 1;3311 #endif3312 3104 } 3313 3105 else … … 3324 3116 3325 3117 #if H_3D_ARP 3326 #if SHARP_ARP_REF_CHECK_F01053327 3118 Void TComSlice::setARPStepNum( TComPicLists*ivPicLists ) 3328 #else 3329 Void TComSlice::setARPStepNum() 3330 #endif 3331 { 3332 #if SHARP_ARP_REF_CHECK_F0105 3119 { 3333 3120 Bool tempRefPicInListsFlag = false; 3334 #else3335 Bool bAllIvRef = true;3336 #endif3337 #if QC_MTK_INTERVIEW_ARP_F0123_F01083338 3121 if(!getVPS()->getUseAdvRP(getLayerId()) || this->isIRAP()) 3339 #else3340 if(!getVPS()->getUseAdvRP(getLayerId()))3341 #endif3342 3122 { 3343 3123 m_nARPStepNum = 0; … … 3345 3125 else 3346 3126 { 3347 #if SHARP_ARP_REF_CHECK_F01053348 3127 setFirstTRefIdx (REF_PIC_LIST_0, -1); 3349 3128 setFirstTRefIdx (REF_PIC_LIST_1, -1); … … 3361 3140 tempRefPicInListsFlag = getFirstTRefIdx(REF_PIC_LIST_0) >= 0 || getFirstTRefIdx(REF_PIC_LIST_1) >= 0; 3362 3141 m_nARPStepNum = tempRefPicInListsFlag ? getVPS()->getARPStepNum(getLayerId()) : 0; 3363 #else 3364 for( Int iRefListId = 0; iRefListId < 2; iRefListId++ ) 3365 { 3366 RefPicList eRefPicList = RefPicList( iRefListId ); 3367 Int iNumRefIdx = getNumRefIdx(eRefPicList); 3368 3369 if( iNumRefIdx <= 0 ) 3370 { 3371 continue; 3372 } 3373 3374 for ( Int i = 0; i < iNumRefIdx; i++ ) 3375 { 3376 if( getRefPic( eRefPicList, i)->getPOC() != getPOC() ) 3377 { 3378 bAllIvRef = false; 3379 break; 3380 } 3381 } 3382 3383 if( bAllIvRef == false ) { break; } 3384 } 3385 m_nARPStepNum = !bAllIvRef ? getVPS()->getARPStepNum(getLayerId()) : 0; 3386 #endif 3387 } 3388 #if SHARP_ARP_REF_CHECK_F0105 3142 } 3143 3389 3144 if (tempRefPicInListsFlag) 3390 3145 { … … 3407 3162 } 3408 3163 } 3409 } 3410 } 3411 #endif 3164 } 3165 } 3412 3166 } 3413 3167 #endif … … 3514 3268 #endif 3515 3269 3516 #if QC_DEPTH_IV_MRG_F01253270 #if H_3D_IV_MERGE 3517 3271 setupLUT = setupLUT || ( getVPS()->getIvMvPredFlag(layerIdInVPS ) && getIsDepth() ); 3518 3272 #endif … … 3543 3297 assert( m_depthToDisparityF != NULL ); 3544 3298 3545 #if CAM_HLS_F0136_F0045_F00823546 3299 TComVPS* vps = getVPS(); 3547 #else 3548 TComSPS* sps = getSPS(); 3549 #endif 3550 3551 #if CAM_HLS_F0136_F0045_F0082 3300 3552 3301 Int log2Div = g_bitDepthY - 1 + vps->getCamParPrecision(); 3553 3302 Int viewIndex = getViewIndex(); … … 3559 3308 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : vps->getInvCodedScale ( viewIndex ); 3560 3309 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : vps->getInvCodedOffset( viewIndex ); 3561 #else3562 Int log2Div = g_bitDepthY - 1 + sps->getCamParPrecision();3563 3564 Bool camParaSH = m_pcSPS->hasCamParInSliceHeader();3565 3566 Int* codScale = camParaSH ? m_aaiCodedScale [ 0 ] : sps->getCodedScale ();3567 Int* codOffset = camParaSH ? m_aaiCodedOffset[ 0 ] : sps->getCodedOffset ();3568 Int* invCodScale = camParaSH ? m_aaiCodedScale [ 1 ] : sps->getInvCodedScale ();3569 Int* invCodOffset = camParaSH ? m_aaiCodedOffset[ 1 ] : sps->getInvCodedOffset();3570 #endif3571 3310 3572 3311 for (Int i = 0; i <= ( getViewIndex() - 1); i++) … … 3925 3664 TComVPSVUI::TComVPSVUI() 3926 3665 { 3927 #if H_MV_6_PS_O0223_293928 3666 m_crossLayerIrapAlignedFlag = true; 3929 #endif3930 3667 m_bitRatePresentVpsFlag = false; 3931 3668 m_picRatePresentVpsFlag = false; … … 3955 3692 } 3956 3693 } 3957 #if H_MV_6_PS_O0118_333958 3694 for ( Int i = 0; i < MAX_NUM_VIDEO_SIGNAL_INFO; i++ ) 3959 3695 { 3960 3696 m_videoSignalInfo [i] = NULL; 3961 3697 } 3962 #endif 3963 3964 #if H_MV_6_HRD_O0164_15 3698 3965 3699 m_vpsVuiBspHrdPresentFlag = false; 3966 3700 m_vpsVuiBspHrdParameters = new TComVpsVuiBspHrdParameters(); 3967 #endif 3968 } 3969 3970 #if H_MV_6_PS_O0118_33 3701 } 3702 3971 3703 TComVPSVUI::~TComVPSVUI() 3972 3704 { … … 3977 3709 } 3978 3710 3979 #if H_MV_6_HRD_O0164_153980 3711 if ( m_vpsVuiBspHrdParameters ) delete m_vpsVuiBspHrdParameters; 3981 3712 m_vpsVuiBspHrdParameters = NULL; 3982 #endif 3983 } 3984 #endif 3985 3986 #if H_MV_6_PS_REP_FORM_18_19_20 3713 } 3714 3987 3715 Void TComRepFormat::inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag ) 3988 3716 { … … 4002 3730 } 4003 3731 } 4004 #endif 4005 4006 #if H_MV_6_HRD_O0164_15 3732 4007 3733 Void TComVpsVuiBspHrdParameters::checkLayerInBspFlag( TComVPS* vps, Int h ) 4008 3734 { … … 4031 3757 } 4032 3758 } 4033 #endif 4034 #endif 3759 3760 Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) 3761 { 3762 if ( layerIdCurr == 0 || !vps->getVpsVuiPresentFlag() ) 3763 { 3764 return; 3765 } 3766 3767 TComVPSVUI* vpsVUI = vps->getVPSVUI(); 3768 assert( vpsVUI != NULL ); 3769 3770 TComVideoSignalInfo* videoSignalInfo = vpsVUI->getVideoSignalInfo( vpsVUI->getVpsVideoSignalInfoIdx( vps->getLayerIdInVps( layerIdCurr ) ) ); 3771 assert( videoSignalInfo != NULL ); 3772 3773 setVideoFormat ( videoSignalInfo->getVideoVpsFormat () ); 3774 setVideoFullRangeFlag ( videoSignalInfo->getVideoFullRangeVpsFlag () ); 3775 setColourPrimaries ( videoSignalInfo->getColourPrimariesVps () ); 3776 setTransferCharacteristics( videoSignalInfo->getTransferCharacteristicsVps() ); 3777 setMatrixCoefficients ( videoSignalInfo->getMatrixCoeffsVps () ); 3778 } 3779 #endif -
trunk/source/Lib/TLibCommon/TComSlice.h
r758 r773 53 53 #if H_MV 54 54 class TComPicLists; 55 class TComVPS; 55 56 #endif 56 57 // ==================================================================================================================== … … 62 63 // ==================================================================================================================== 63 64 64 #if H_MV_6_HRD_O0164_1565 class TComVPS;66 #endif67 65 /// Reference Picture Set class 68 66 class TComReferencePictureSet … … 407 405 #if H_MV 408 406 409 #if H_MV_6_PS_O0118_33410 407 class TComVideoSignalInfo 411 408 { … … 432 429 Int getMatrixCoeffsVps( ) { return m_matrixCoeffsVps; } 433 430 }; 434 #endif435 #if H_MV_6_HRD_O0164_15436 431 class TComVpsVuiBspHrdParameters 437 432 { … … 473 468 }; 474 469 475 #endif476 470 class TComVPSVUI 477 471 { 478 472 private: 479 #if H_MV_6_PS_O0223_29480 473 Bool m_crossLayerPicTypeAlignedFlag; 481 474 Bool m_crossLayerIrapAlignedFlag; 482 #endif483 475 Bool m_bitRatePresentVpsFlag; 484 476 Bool m_picRatePresentVpsFlag; … … 489 481 Int m_constantPicRateIdc [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 490 482 Int m_avgPicRate [MAX_VPS_OP_SETS_PLUS1][MAX_TLAYER]; 491 #if H_MV_6_O0226_37492 483 Bool m_tilesNotInUseFlag; 493 484 Bool m_tilesInUseFlag [MAX_NUM_LAYERS]; 494 485 Bool m_loopFilterNotAcrossTilesFlag[MAX_NUM_LAYERS]; 495 #endif496 486 Bool m_tileBoundariesAlignedFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 497 #if H_MV_6_O0226_37498 487 Bool m_wppNotInUseFlag; 499 488 Bool m_wppInUseFlag [MAX_NUM_LAYERS]; 500 #endif501 489 Bool m_ilpRestrictedRefLayersFlag; 502 490 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 503 491 Bool m_ctuBasedOffsetEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 504 492 Int m_minHorizontalCtuOffsetPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 505 #if H_MV_6_PS_O0118_33506 493 Bool m_videoSignalInfoIdxPresentFlag; 507 494 Int m_vpsNumVideoSignalInfoMinus1; 508 495 TComVideoSignalInfo* m_videoSignalInfo[MAX_NUM_VIDEO_SIGNAL_INFO]; 509 496 Int m_vpsVideoSignalInfoIdx [MAX_NUM_VIDEO_SIGNAL_INFO]; 510 #endif511 #if H_MV_6_HRD_O0164_15512 497 Bool m_vpsVuiBspHrdPresentFlag; 513 498 TComVpsVuiBspHrdParameters* m_vpsVuiBspHrdParameters; 514 #endif515 499 516 500 public: 517 501 TComVPSVUI(); 518 502 ~TComVPSVUI(); 519 #if H_MV_6_PS_O0223_29520 503 Void setCrossLayerPicTypeAlignedFlag( Bool flag ) { m_crossLayerPicTypeAlignedFlag = flag; } 521 504 Bool getCrossLayerPicTypeAlignedFlag( ) { return m_crossLayerPicTypeAlignedFlag; } … … 523 506 Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; } 524 507 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; } 525 #endif526 508 527 509 Void setBitRatePresentVpsFlag( Bool flag ) { m_bitRatePresentVpsFlag = flag; } … … 549 531 Int getAvgPicRate( Int i, Int j ) { return m_avgPicRate[i][j]; } 550 532 551 #if H_MV_6_O0226_37552 533 Void setTilesNotInUseFlag( Bool flag ) { m_tilesNotInUseFlag = flag; } 553 534 Bool getTilesNotInUseFlag( ) { return m_tilesNotInUseFlag; } … … 558 539 Void setLoopFilterNotAcrossTilesFlag( Int i, Int val ) { m_loopFilterNotAcrossTilesFlag[i] = val; } 559 540 Bool getLoopFilterNotAcrossTilesFlag( Int i ) { return m_loopFilterNotAcrossTilesFlag[i]; } 560 #endif561 541 562 542 Void setTileBoundariesAlignedFlag( Int i, Int j, Bool flag ) { m_tileBoundariesAlignedFlag[i][j] = flag; } 563 543 Bool getTileBoundariesAlignedFlag( Int i, Int j ) { return m_tileBoundariesAlignedFlag[i][j]; } 564 544 565 #if H_MV_6_O0226_37566 545 Void setWppNotInUseFlag( Bool flag ) { m_wppNotInUseFlag = flag; } 567 546 Bool getWppNotInUseFlag( ) { return m_wppNotInUseFlag; } … … 569 548 Void setWppInUseFlag( Int i, Bool flag ) { m_wppInUseFlag[i] = flag; } 570 549 Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; } 571 #endif572 550 573 551 Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } … … 583 561 Int getMinHorizontalCtuOffsetPlus1( Int i, Int j ) { return m_minHorizontalCtuOffsetPlus1[i][j]; } 584 562 585 #if H_MV_6_PS_O0118_33586 563 Void setVideoSignalInfoIdxPresentFlag( Bool flag ) { m_videoSignalInfoIdxPresentFlag = flag; } 587 564 Bool getVideoSignalInfoIdxPresentFlag( ) { return m_videoSignalInfoIdxPresentFlag; } … … 595 572 Void setVpsVideoSignalInfoIdx( Int i, Int val ) { m_vpsVideoSignalInfoIdx[i] = val; } 596 573 Int getVpsVideoSignalInfoIdx( Int i ) { return m_vpsVideoSignalInfoIdx[i]; } 597 #endif 598 599 #if H_MV_6_HRD_O0164_15 574 600 575 Void setVpsVuiBspHrdPresentFlag( Bool flag ) { m_vpsVuiBspHrdPresentFlag = flag; } 601 576 Bool getVpsVuiBspHrdPresentFlag( ) { return m_vpsVuiBspHrdPresentFlag; } … … 603 578 Void setVpsVuiBspHrdParameters( TComVpsVuiBspHrdParameters* val) { m_vpsVuiBspHrdParameters = val; } 604 579 TComVpsVuiBspHrdParameters* getVpsVuiBspHrdParameters( ) { return m_vpsVuiBspHrdParameters; } 605 #endif606 580 }; 607 581 … … 609 583 { 610 584 private: 611 #if H_MV_6_PS_REP_FORM_18_19_20612 585 Bool m_chromaAndBitDepthVpsPresentFlag; 613 #endif614 586 Int m_chromaFormatVpsIdc; 615 587 Bool m_separateColourPlaneVpsFlag; … … 622 594 TComRepFormat() { }; 623 595 624 #if H_MV_6_PS_REP_FORM_18_19_20625 596 Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } 626 597 Bool getChromaAndBitDepthVpsPresentFlag( ) { return m_chromaAndBitDepthVpsPresentFlag; } 627 598 Void checkChromaAndBitDepthVpsPresentFlag( Int i ) { assert( i != 0 || m_chromaAndBitDepthVpsPresentFlag ); } // The value of chroma_and_bit_depth_vps_present_flag of the first rep_format( ) syntax structure in the VPS shall be equal to 1. 628 599 Void inferChromaAndBitDepth( TComRepFormat* prevRepFormat, Bool encoderFlag ); 629 #endif630 600 631 601 Void setChromaFormatVpsIdc( Int val ) { m_chromaFormatVpsIdc = val; } … … 647 617 Int getBitDepthVpsChromaMinus8( ) { return m_bitDepthVpsChromaMinus8; } 648 618 }; 649 #endif 650 651 #if H_MV_6_HRD_O0217_13 619 620 652 621 class TComDpbSize 653 622 { … … 696 665 }; 697 666 #endif 698 699 667 class TComVPS 700 668 { … … 748 716 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 749 717 750 #if H_MV_6_PS_O0109_22751 718 Int m_viewIdLen; 752 #else753 Int m_viewIdLenMinus1;754 #endif755 719 Int m_viewIdVal [MAX_NUM_LAYERS]; 756 720 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 757 #if H_MV_6_ILDSD_O0120_26758 721 Bool m_vpsSubLayersMaxMinus1PresentFlag; 759 722 Int m_subLayersVpsMaxMinus1 [MAX_NUM_LAYERS]; 760 #endif761 723 Bool m_maxTidRefPresentFlag; 762 #if H_MV_6_ILDDS_O0225_30763 724 Int m_maxTidIlRefPicsPlus1 [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 764 #else765 Int m_maxTidIlRefPicPlus1 [MAX_NUM_LAYERS];766 #endif767 725 Bool m_allRefLayersActiveFlag; 768 726 Int m_vpsNumberLayerSetsMinus1; … … 772 730 Bool m_moreOutputLayerSetsThanDefaultFlag; 773 731 Int m_numAddOutputLayerSetsMinus1; 774 #if H_MV_6_PS_0109_25775 732 Int m_defaultOneTargetOutputLayerIdc; 776 #else777 Bool m_defaultOneTargetOutputLayerFlag;778 #endif779 733 Int m_outputLayerSetIdxMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 780 734 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 781 735 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 782 #if H_MV_6_GEN_0153_28783 736 Bool m_altOutputLayerFlag; 784 #endif785 737 Bool m_repFormatIdxPresentFlag; 786 738 Int m_vpsNumRepFormatsMinus1; … … 788 740 TComRepFormat* m_repFormat [MAX_NUM_LAYERS]; 789 741 Bool m_maxOneActiveRefLayerFlag; 790 #if H_MV_6_MISC_O0062_31791 742 Bool m_pocLsbNotPresentFlag [MAX_NUM_LAYERS]; 792 #endif 793 794 #if H_MV_6_HRD_O0217_13 743 795 744 TComDpbSize* m_dpbSize; 796 #endif797 #if !H_MV_6_PS_O0223_29798 Bool m_crossLayerIrapAlignedFlag;799 #endif800 745 Int m_directDepTypeLenMinus2; 801 #if H_MV_6_PS_O0096_21802 746 Bool m_defaultDirectDependencyFlag; 803 747 Int m_defaultDirectDependencyType; 804 #endif805 748 Bool m_vpsVuiPresentFlag; 806 749 TComVPSVUI* m_vpsVUI; … … 822 765 Int m_viewIndex [MAX_NUM_LAYERS ]; 823 766 824 #if H_MV_6_HRD_O0217_13825 767 std::vector< std::vector< Int> > m_targetDecLayerIdLists; //[TargetOptLayerSetIdx][i] 826 768 std::vector< std::vector< Int> > m_targetOptLayerIdLists; 827 769 std::vector< std::vector< Int> > m_layerSetLayerIdList; 828 #endif829 770 830 771 … … 838 779 #if H_3D_IV_MERGE 839 780 Bool m_ivMvPredFlag [ MAX_NUM_LAYERS ]; 840 #if MTK_SPIVMP_F0110781 #if H_3D_SPIVMP 841 782 Int m_iSubPULog2Size [MAX_NUM_LAYERS ]; 842 783 #endif … … 850 791 Bool m_vpsDepthModesFlag [MAX_NUM_LAYERS ]; 851 792 852 #if H_3D_DIM_DLT853 #if !DLT_DIFF_CODING_IN_PPS854 Bool m_bUseDLTFlag [MAX_NUM_LAYERS ];855 856 Int m_iBitsPerDepthValue [MAX_NUM_LAYERS ];857 Int m_iNumDepthmapValues [MAX_NUM_LAYERS ];858 Int* m_iDepthValue2Idx [MAX_NUM_LAYERS ];859 Int* m_iIdx2DepthValue [MAX_NUM_LAYERS ];860 #endif861 #endif862 863 793 #if H_3D 864 #if CAM_HLS_F0136_F0045_F0082865 794 UInt m_uiCamParPrecision; 866 795 Bool* m_bCamParInSliceHeader; … … 868 797 Int ***m_aaaiCodedScale ; 869 798 Int ***m_aaaiCodedOffset; 870 #endif871 799 Bool m_ivMvScalingFlag; 872 800 #endif … … 874 802 Bool m_bInterSDCFlag[MAX_NUM_LAYERS ]; 875 803 #endif 876 #if SEC_MPI_ENABLING_MERGE_F0150804 #if H_3D_IV_MERGE 877 805 Bool m_bMPIFlag[MAX_NUM_LAYERS ]; 878 806 #endif … … 901 829 UInt getMaxTLayers () { return m_uiMaxTLayers; } 902 830 Void setMaxTLayers (UInt t) { m_uiMaxTLayers = t; } 903 #if H_MV_6_HRD_O0164_15 831 832 #if H_MV 904 833 UInt getMaxSubLayersMinus1() { return m_uiMaxTLayers - 1; } // For consistency with draft spec 905 #endif906 #if H_MV907 834 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; 908 835 Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } … … 978 905 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } 979 906 980 #if H_MV_6_PS_O0109_22981 907 Void setViewIdLen( Int val ) { m_viewIdLen = val; } 982 908 Int getViewIdLen( ) { return m_viewIdLen; } 983 #else984 Void setViewIdLenMinus1( Int val ) { m_viewIdLenMinus1 = val; }985 Int getViewIdLenMinus1( ) { return m_viewIdLenMinus1; }986 #endif987 909 988 910 Void setViewIdVal( Int viewOrderIndex, Int val ) { m_viewIdVal[viewOrderIndex] = val; } … … 990 912 Void setDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Bool val ) { m_directDependencyFlag[depLayeridInVps][refLayeridInVps] = val; } 991 913 Bool getDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps ) { return m_directDependencyFlag[depLayeridInVps][refLayeridInVps]; } 992 #if H_MV_6_ILDSD_O0120_26993 914 Void setVpsSubLayersMaxMinus1PresentFlag( Bool flag ) { m_vpsSubLayersMaxMinus1PresentFlag = flag; } 994 915 Bool getVpsSubLayersMaxMinus1PresentFlag( ) { return m_vpsSubLayersMaxMinus1PresentFlag; } … … 996 917 Int getSubLayersVpsMaxMinus1( Int i ) { return m_subLayersVpsMaxMinus1[i]; } 997 918 Void checkSubLayersVpsMaxMinus1( Int i ) { assert( m_subLayersVpsMaxMinus1[i] >= 0 && m_subLayersVpsMaxMinus1[i] <= m_uiMaxTLayers - 1 ); } 998 #endif999 919 Void setMaxTidRefPresentFlag( Bool flag ) { m_maxTidRefPresentFlag = flag; } 1000 920 Bool getMaxTidRefPresentFlag( ) { return m_maxTidRefPresentFlag; } 1001 #if H_MV_6_ILDDS_O0225_301002 921 Void setMaxTidIlRefPicsPlus1( Int i, Int j, Int val ) { m_maxTidIlRefPicsPlus1[i][j] = val; } 1003 922 Int getMaxTidIlRefPicsPlus1( Int i, Int j ) { return m_maxTidIlRefPicsPlus1[i][j]; } 1004 #else1005 Void setMaxTidIlRefPicPlus1( Int layerIdInVps, Int val ) { m_maxTidIlRefPicPlus1[ layerIdInVps ] = val; }1006 Int getMaxTidIlRefPicPlus1( Int layerIdInVps ) { return m_maxTidIlRefPicPlus1[ layerIdInVps ]; }1007 #endif1008 923 Void setAllRefLayersActiveFlag( Bool flag ) { m_allRefLayersActiveFlag = flag; } 1009 924 Bool getAllRefLayersActiveFlag( ) { return m_allRefLayersActiveFlag; } … … 1019 934 Void setProfileRefMinus1( Int profileTierLevelIdx, Int val ) { m_profileRefMinus1[ profileTierLevelIdx ] = val; } 1020 935 Int getProfileRefMinus1( Int profileTierLevelIdx ) { return m_profileRefMinus1[ profileTierLevelIdx ]; } 1021 #if H_MV_6_PS_O0109_231022 936 Void checkProfileRefMinus1( Int i ) { assert( getProfileRefMinus1( i ) + 1 <= i ); }; // The value of profile_ref_minus1[ i ] + 1 shall be less than or equal to i. 1023 #endif1024 937 Void setMoreOutputLayerSetsThanDefaultFlag( Bool flag ) { m_moreOutputLayerSetsThanDefaultFlag = flag; } 1025 938 Bool getMoreOutputLayerSetsThanDefaultFlag() { return m_moreOutputLayerSetsThanDefaultFlag; } … … 1028 941 Int getNumAddOutputLayerSetsMinus1( ) { return m_numAddOutputLayerSetsMinus1; } 1029 942 1030 #if H_MV_6_PS_0109_251031 943 Void setDefaultOneTargetOutputLayerIdc( Int val ) { m_defaultOneTargetOutputLayerIdc = val; } 1032 944 Int getDefaultOneTargetOutputLayerIdc( ) { return m_defaultOneTargetOutputLayerIdc; } 1033 945 Void checkDefaultOneTargetOutputLayerIdc( ) { assert( m_defaultOneTargetOutputLayerIdc >= 0 && m_defaultOneTargetOutputLayerIdc <= 1 ); } 1034 #else1035 Void setDefaultOneTargetOutputLayerFlag( Bool flag ) { m_defaultOneTargetOutputLayerFlag = flag; }1036 Bool getDefaultOneTargetOutputLayerFlag( ) { return m_defaultOneTargetOutputLayerFlag; }1037 #endif1038 946 1039 947 Void setOutputLayerSetIdxMinus1( Int outLayerSetIdx, Int val ) { m_outputLayerSetIdxMinus1[ outLayerSetIdx ] = val; } … … 1042 950 Void setOutputLayerFlag( Int outLayerSetIdx, Int i, Bool flag ) { m_outputLayerFlag[ outLayerSetIdx ][ i ] = flag; } 1043 951 Bool getOutputLayerFlag( Int outLayerSetIdx, Int i ) { return m_outputLayerFlag[ outLayerSetIdx ][ i ]; } 1044 #if H_MV_6_HRD_O0217_131045 952 Bool inferOutputLayerFlag( Int layerSetIdx, Int i ) { return ( getDefaultOneTargetOutputLayerIdc( ) == 0 || ( ( getDefaultOneTargetOutputLayerIdc( ) == 1 ) && ( i == m_layerSetLayerIdList[layerSetIdx].size() - 1 ) )); } 1046 #endif1047 953 1048 954 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx = val ]; } 1049 955 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 1050 #if H_MV_6_GEN_0153_281051 956 Void setAltOutputLayerFlag( Bool flag ) { m_altOutputLayerFlag = flag; } 1052 957 Bool getAltOutputLayerFlag( ) { return m_altOutputLayerFlag; } 1053 #endif1054 958 1055 959 Void setRepFormatIdxPresentFlag( Bool flag ) { m_repFormatIdxPresentFlag = flag; } … … 1067 971 Bool getMaxOneActiveRefLayerFlag( ) { return m_maxOneActiveRefLayerFlag; } 1068 972 1069 #if H_MV_6_HRD_O0217_131070 973 Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } 1071 974 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1072 #endif 1073 1074 #if H_MV_6_MISC_O0062_31 975 1075 976 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } 1076 977 Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } 1077 #endif1078 #if !H_MV_6_PS_O0223_291079 Void setCrossLayerIrapAlignedFlag( Bool flag ) { m_crossLayerIrapAlignedFlag = flag; }1080 Bool getCrossLayerIrapAlignedFlag( ) { return m_crossLayerIrapAlignedFlag; }1081 #endif1082 978 Void setDirectDepTypeLenMinus2( Int val) { m_directDepTypeLenMinus2 = val; } 1083 979 Int getDirectDepTypeLenMinus2( ) { return m_directDepTypeLenMinus2; } 1084 980 1085 #if H_MV_6_PS_O0096_211086 981 Void setDefaultDirectDependencyFlag( Bool flag ) { m_defaultDirectDependencyFlag = flag; } 1087 982 Bool getDefaultDirectDependencyFlag( ) { return m_defaultDirectDependencyFlag; } … … 1089 984 Void setDefaultDirectDependencyType( Int val ) { m_defaultDirectDependencyType = val; } 1090 985 Int getDefaultDirectDependencyType( ) { return m_defaultDirectDependencyType; } 1091 #endif1092 986 Void setDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps, Int val) { m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ] = val; } 1093 987 Int getDirectDependencyType( Int depLayeridInVps, Int refLayeridInVps) { return m_directDependencyType[ depLayeridInVps ][ refLayeridInVps ]; } … … 1096 990 1097 991 TComVPSVUI* getVPSVUI( ) { return m_vpsVUI; } 1098 // VPS EXTENSION SEMANTICS VARIABLES 992 993 // VPS EXTENSION SEMANTICS VARIABLES 1099 994 Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } 1100 995 Int getLayerIdInVps( Int layerIdInNuh ) { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; } 1101 996 1102 997 Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); 1103 #if H_MV_6_FIX_GET_VIEW_ID1104 998 Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( layerIdInNuh )]; } 1105 #else1106 Int getViewId ( Int layerIdInNuh ) { return m_viewIdVal[ getViewIndex( getLayerIdInVps( layerIdInNuh) )]; }1107 #endif1108 999 Void setRefLayers(); 1109 1000 … … 1120 1011 Int getNumLayersInIdList ( Int lsIdx ); 1121 1012 1122 #if H_MV_6_HRD_O0217_131123 1013 Int getNumOutputLayerSets() ; 1124 1014 Int getNumSubDpbs( Int i ) { return getNumLayersInIdList( i ); }; 1125 1015 Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); 1126 #if H_MV_6_HRD_O0217_131127 1016 Void deriveLayerSetLayerIdList(); 1128 1017 Void deriveTargetLayerIdLists(); 1129 1018 std::vector<Int> getTargetDecLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1130 1019 std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetDecLayerIdLists[targetOptLayerSetIdx]; }; 1131 #endif1132 #endif1133 1020 1134 1021 … … 1150 1037 Void setARPStepNum( Int layerIdInVps, UInt val ) { m_uiARPStepNum[layerIdInVps] = val; } 1151 1038 #endif 1152 #if CAM_HLS_F0136_F0045_F0082 1039 1153 1040 Void createCamPars(Int iNumViews); 1154 1041 Void deleteCamPars(); … … 1162 1049 Int* getInvCodedScale ( Int viewIndex ) { return m_aaaiCodedScale [viewIndex][1]; } 1163 1050 Int* getInvCodedOffset ( Int viewIndex ) { return m_aaaiCodedOffset[viewIndex][1]; } 1164 #endif1165 1051 1166 1052 #if H_3D_IV_MERGE 1167 1053 Void setIvMvPredFlag ( Int layerIdInVps, Bool val ) { m_ivMvPredFlag[ layerIdInVps ] = val; } 1168 1054 Bool getIvMvPredFlag ( Int layerIdInVps ) { return m_ivMvPredFlag[ layerIdInVps ]; }; 1169 #if MTK_SPIVMP_F01101055 #if H_3D_SPIVMP 1170 1056 Int getSubPULog2Size(Int layerIdInVps) { return m_iSubPULog2Size[layerIdInVps]; } 1171 1057 Void setSubPULog2Size(Int layerIdInVps, Int u) { m_iSubPULog2Size[layerIdInVps] = u;} … … 1182 1068 Void setVpsDepthModesFlag( Int layerIdInVps, Bool val ) { m_vpsDepthModesFlag[ layerIdInVps ] = val; } 1183 1069 Bool getVpsDepthModesFlag( Int layerIdInVps ) { return m_vpsDepthModesFlag[ layerIdInVps ]; } 1184 1185 #if H_3D_DIM_DLT1186 #if !DLT_DIFF_CODING_IN_PPS1187 Bool getUseDLTFlag ( Int layerIdInVps ) { return m_bUseDLTFlag[ layerIdInVps ]; }1188 Void setUseDLTFlag ( Int layerIdInVps, Bool b ) { m_bUseDLTFlag[ layerIdInVps ] = b; }1189 1190 Int getBitsPerDepthValue( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iBitsPerDepthValue[layerIdInVps]:g_bitDepthY; }1191 Int getNumDepthValues( Int layerIdInVps ) { return getUseDLTFlag(layerIdInVps)?m_iNumDepthmapValues[layerIdInVps]:((1 << g_bitDepthY)-1); }1192 Int depthValue2idx( Int layerIdInVps, Pel value ) { return getUseDLTFlag(layerIdInVps)?m_iDepthValue2Idx[layerIdInVps][value]:value; }1193 Pel idx2DepthValue( Int layerIdInVps, UInt uiIdx ) { return getUseDLTFlag(layerIdInVps)?m_iIdx2DepthValue[layerIdInVps][uiIdx]:uiIdx; }1194 Void setDepthLUTs( Int layerIdInVps, Int* idx2DepthValue = NULL, Int iNumDepthValues = 0 );1195 #endif1196 #endif1197 1070 1198 1071 Bool getIvMvScalingFlag ( ) { return m_ivMvScalingFlag; } … … 1202 1075 Void setInterSDCFlag ( Int layerIdInVps, Bool bval ){ m_bInterSDCFlag[layerIdInVps] = bval; } 1203 1076 #endif 1204 #if SEC_MPI_ENABLING_MERGE_F01501077 #if H_3D_IV_MERGE 1205 1078 Bool getMPIFlag ( Int layerIdInVps ) { return m_bMPIFlag[layerIdInVps]; } 1206 1079 Void setMPIFlag ( Int layerIdInVps, Bool bval ){ m_bMPIFlag[layerIdInVps] = bval; } … … 1210 1083 }; 1211 1084 1212 #if DLT_DIFF_CODING_IN_PPS1085 #if H_3D 1213 1086 class TComDLT 1214 1087 { … … 1481 1354 TComHRD* getHrdParameters () { return &m_hrdParameters; } 1482 1355 TimingInfo* getTimingInfo() { return &m_timingInfo; } 1483 1484 #if H_MV_6_PS_O0118_33 1485 Void inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) 1486 { 1487 if ( layerIdCurr == 0 || !vps->getVpsVuiPresentFlag() ) 1488 { 1489 return; 1490 } 1491 1492 TComVPSVUI* vpsVUI = vps->getVPSVUI(); 1493 assert( vpsVUI != NULL ); 1494 1495 TComVideoSignalInfo* videoSignalInfo = vpsVUI->getVideoSignalInfo( vpsVUI->getVpsVideoSignalInfoIdx( vps->getLayerIdInVps( layerIdCurr ) ) ); 1496 assert( videoSignalInfo != NULL ); 1497 1498 setVideoFormat ( videoSignalInfo->getVideoVpsFormat () ); 1499 setVideoFullRangeFlag ( videoSignalInfo->getVideoFullRangeVpsFlag () ); 1500 setColourPrimaries ( videoSignalInfo->getColourPrimariesVps () ); 1501 setTransferCharacteristics( videoSignalInfo->getTransferCharacteristicsVps() ); 1502 setMatrixCoefficients ( videoSignalInfo->getMatrixCoeffsVps () ); 1503 } 1356 #if H_MV 1357 Void inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ); 1504 1358 #endif 1505 1359 }; … … 1588 1442 TComVPS* m_pcVPS; 1589 1443 // SPS 1590 #if H_MV_6_PSEM_O0142_31591 1444 Bool m_spsExtensionFlag; 1592 1445 Bool m_spsExtensionTypeFlag[PS_EX_T_MAX_NUM]; 1593 #endif1594 1446 Bool m_spsInferScalingListFlag; 1595 1447 Int m_spsScalingListRefLayerId; 1596 1448 Bool m_updateRepFormatFlag; 1597 #if H_MV_6_PS_REP_FORM_18_19_201598 1449 Int m_spsRepFormatIdx; 1599 #endif1600 1450 // SPS Extension 1601 1451 Bool m_interViewMvVertConstraintFlag; 1602 #if H_MV_6_SHVC_O0098_361603 1452 Int m_numScaledRefLayerOffsets; 1604 1453 Int m_scaledRefLayerId [MAX_NUM_SCALED_REF_LAYERS]; … … 1607 1456 Int m_scaledRefLayerRightOffset [MAX_NUM_LAYERS]; 1608 1457 Int m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS]; 1609 #endif1610 1458 #endif 1611 1459 #if H_3D … … 1744 1592 TComPTL* getPTL() { return &m_pcPTL; } 1745 1593 #if H_MV 1746 #if H_MV_6_PSEM_O0142_31747 1594 Void setSpsExtensionFlag( Bool flag ) { m_spsExtensionFlag = flag; } 1748 1595 Bool getSpsExtensionFlag( ) { return m_spsExtensionFlag; } … … 1750 1597 Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; } 1751 1598 Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; } 1752 #endif1753 1599 Void setVPS ( TComVPS* pcVPS ) { m_pcVPS = pcVPS; } 1754 1600 TComVPS* getVPS () { return m_pcVPS; } … … 1762 1608 Void setUpdateRepFormatFlag( Bool flag ) { m_updateRepFormatFlag = flag; } 1763 1609 Bool getUpdateRepFormatFlag( ) { return m_updateRepFormatFlag; } 1764 #if H_MV_6_PS_REP_FORM_18_19_201765 1610 Void setSpsRepFormatIdx( Int val ) { m_spsRepFormatIdx = val; } 1766 1611 Int getSpsRepFormatIdx( ) { return m_spsRepFormatIdx; } 1767 #endif1768 1612 // SPS Extension 1769 1613 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } 1770 1614 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1771 1615 1772 #if H_MV_6_SHVC_O0098_361773 1616 Void setNumScaledRefLayerOffsets( Int val ) { m_numScaledRefLayerOffsets = val; } 1774 1617 Int getNumScaledRefLayerOffsets( ) { return m_numScaledRefLayerOffsets; } … … 1788 1631 Void setScaledRefLayerBottomOffset( Int j, Int val ) { m_scaledRefLayerBottomOffset[j] = val; } 1789 1632 Int getScaledRefLayerBottomOffset( Int j ) { return m_scaledRefLayerBottomOffset[j]; } 1790 #endif1791 1633 // Inference 1792 1634 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); … … 1799 1641 Void setUsePC ( Bool b ) { m_bUsePC = b; } 1800 1642 Bool getUsePC () { return m_bUsePC; } 1801 #endif1802 #if H_3D1803 #if !CAM_HLS_F0136_F0045_F00821804 Void initCamParaSPS ( UInt uiViewIndex, UInt uiCamParPrecision = 0, Bool bCamParSlice = false, Int** aaiScale = 0, Int** aaiOffset = 0 );1805 UInt getCamParPrecision () { return m_uiCamParPrecision; }1806 Bool hasCamParInSliceHeader() { return m_bCamParInSliceHeader; }1807 #if QC_DEPTH_IV_MRG_F01251808 Void setHasCamParInSliceHeader( Bool b ) { m_bCamParInSliceHeader = b; }1809 #endif1810 Int* getCodedScale () { return m_aaiCodedScale [0]; }1811 Int* getCodedOffset () { return m_aaiCodedOffset[0]; }1812 Int* getInvCodedScale () { return m_aaiCodedScale [1]; }1813 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; }1814 #endif1815 1643 #endif 1816 1644 #if H_MV … … 1919 1747 #endif 1920 1748 1921 #if DLT_DIFF_CODING_IN_PPS1749 #if H_3D 1922 1750 TComDLT* m_pcDLT; 1923 1751 #endif … … 1948 1776 UInt getMinCuDQPSize () { return m_uiMinCuDQPSize; } 1949 1777 1950 #if DLT_DIFF_CODING_IN_PPS1778 #if H_3D 1951 1779 Void setDLT ( TComDLT* pcDLT ) { m_pcDLT = pcDLT; } 1952 1780 TComDLT* getDLT () { return m_pcDLT; } … … 2201 2029 // Additional slice header syntax elements 2202 2030 Bool m_pocResetFlag; 2203 #if H_MV_6_RALS_O0149_112204 2031 Bool m_crossLayerBlaFlag; 2205 #endif2206 2032 Bool m_discardableFlag; 2207 2033 Bool m_interLayerPredEnabledFlag; … … 2214 2040 #endif 2215 2041 #if H_3D_ARP 2216 #if SHARP_ARP_REF_CHECK_F01052217 2042 Bool m_arpRefPicAvailable[2][MAX_NUM_LAYERS]; 2218 #endif2219 2043 TComList<TComPic*> * m_pBaseViewRefPicList[MAX_NUM_LAYERS]; 2220 2044 UInt m_nARPStepNum; 2221 #if QC_MTK_INTERVIEW_ARP_F0123_F01082222 2045 Int m_aiFirstTRefIdx [2]; 2223 #endif2224 2046 #endif 2225 2047 #if H_3D_IC … … 2308 2130 #if H_3D_ARP 2309 2131 Void setBaseViewRefPicList( TComList<TComPic*> *pListPic, Int iViewIdx ) { m_pBaseViewRefPicList[iViewIdx] = pListPic; } 2310 #if SHARP_ARP_REF_CHECK_F01052311 2132 Void setARPStepNum( TComPicLists*ivPicLists ); 2312 #else2313 Void setARPStepNum();2314 #endif2315 2133 TComPic* getBaseViewRefPic ( UInt uiPOC , Int iViewIdx ) { return xGetRefPic( *m_pBaseViewRefPicList[iViewIdx], uiPOC ); } 2316 2134 UInt getARPStepNum( ) { return m_nARPStepNum; } … … 2513 2331 Int getAlterRefIdx ( RefPicList e ) { return m_aiAlterRefIdx[e]; } 2514 2332 #endif 2515 #if QC_MTK_INTERVIEW_ARP_F0123_F01082333 #if H_3D_ARP 2516 2334 Int getFirstTRefIdx ( RefPicList e ) { return m_aiFirstTRefIdx[e]; } 2517 2335 Void setFirstTRefIdx ( RefPicList e, Int i ) { m_aiFirstTRefIdx[e] = i; } 2518 #endif2519 #if SHARP_ARP_REF_CHECK_F01052520 2336 Bool getArpRefPicAvailable( RefPicList e, Int viewIdx) {return m_arpRefPicAvailable[e][getVPS()->getLayerIdInNuh(viewIdx, 0)]; } 2521 2337 #endif … … 2541 2357 // Additional slice header syntax elements 2542 2358 2543 #if H_MV_6_RALS_O0149_112544 2359 Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; } 2545 2360 Bool getCrossLayerBlaFlag( ) { return m_crossLayerBlaFlag; } … … 2552 2367 } 2553 2368 } 2554 #endif2555 2369 2556 2370 Void setPocResetFlag( Bool flag ) { m_pocResetFlag = flag; } 2557 2371 Bool getPocResetFlag( ) { return m_pocResetFlag; } 2558 2372 2559 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; }2560 Bool getDiscardableFlag( ) { return m_discardableFlag; }2561 2562 Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; }2563 Bool getInterLayerPredEnabledFlag( ) { return m_interLayerPredEnabledFlag; }2564 2565 Void setNumInterLayerRefPicsMinus1( Int val ) { m_numInterLayerRefPicsMinus1 = val; }2566 Int getNumInterLayerRefPicsMinus1( ) { return m_numInterLayerRefPicsMinus1; }2567 2568 Void setInterLayerPredLayerIdc( Int i, Int val ) { m_interLayerPredLayerIdc[i] = val; }2569 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; }2373 Void setDiscardableFlag( Bool flag ) { m_discardableFlag = flag; } 2374 Bool getDiscardableFlag( ) { return m_discardableFlag; } 2375 2376 Void setInterLayerPredEnabledFlag( Bool flag ) { m_interLayerPredEnabledFlag = flag; } 2377 Bool getInterLayerPredEnabledFlag( ) { return m_interLayerPredEnabledFlag; } 2378 2379 Void setNumInterLayerRefPicsMinus1( Int val ) { m_numInterLayerRefPicsMinus1 = val; } 2380 Int getNumInterLayerRefPicsMinus1( ) { return m_numInterLayerRefPicsMinus1; } 2381 2382 Void setInterLayerPredLayerIdc( Int i, Int val ) { m_interLayerPredLayerIdc[i] = val; } 2383 Int getInterLayerPredLayerIdc( Int i ) { return m_interLayerPredLayerIdc[i]; } 2570 2384 2571 2385 // Additional variables derived in slice header semantics … … 2573 2387 Int getInterLayerPredLayerIdcLen ( ) { return gCeilLog2( getVPS()->getNumDirectRefLayers( getLayerId() )); } 2574 2388 2575 #if H_MV_6_ILDDS_ILREFPICS_27_342576 2389 Int getRefLayerPicFlag( Int i ); 2577 2390 Int getRefLayerPicIdc ( Int j ); 2578 2391 Int getNumRefLayerPics( ); 2579 #endif2580 2392 2581 2393 Int getNumActiveRefLayerPics( ); -
trunk/source/Lib/TLibCommon/TComWedgelet.h
r724 r773 50 50 enum DIM_IDX 51 51 { 52 #if SEC_DMM3_RBC_F014753 52 DMM1_IDX = 0, 54 53 DMM4_IDX = 1, 55 #else56 DMM1_IDX = 0,57 DMM3_IDX = 1,58 DMM4_IDX = 2,59 RBC_IDX = 360 #endif61 54 }; 62 55 63 #if SEC_DMM3_RBC_F014764 56 #define DMM_NUM_TYPE 2 65 57 #define DIM_NUM_TYPE (DMM_NUM_TYPE) 66 #else67 #define DMM_NUM_TYPE 368 #define RBC_NUM_TYPE 169 #define DIM_NUM_TYPE (DMM_NUM_TYPE+RBC_NUM_TYPE)70 #endif71 58 #define DIM_NO_IDX MAX_UINT 72 59 … … 76 63 #endif 77 64 78 #if H_3D_DIM_RBC79 #define RBC_THRESHOLD 2080 #define RBC_MAX_EDGE_NUM_PER_4x4 881 #define RBC_MAX_DISTANCE 25582 #endif83 84 65 #if H_3D_DIM_DMM 85 66 #define DMM_NO_WEDGEINDEX MAX_UINT 86 67 #define DMM_NUM_WEDGE_REFINES 8 87 #if !SEC_DMM3_RBC_F014788 #define DMM3_SIMPLIFY_TR 189 #endif90 68 91 69 enum WedgeResolution -
trunk/source/Lib/TLibCommon/TypeDef.h
r758 r773 69 69 /////////////////////////////////// MAJOR DEFINES /////////////////////////////////// 70 70 ///////////////////////////////////////////////////////////////////////////////////////// 71 71 72 #if H_MV 72 73 #define H_MV_ENC_DEC_TRAC 1 //< CU/PU level tracking … … 98 99 // MTK_TEXTURE_MRGCAND_BUGFIX_E0182 Bug fix for TEXTURE MERGING CANDIDATE , JCT3V-E0182 99 100 #define H_3D_ARP 1 // Advanced residual prediction (ARP), JCT3V-D0177 101 // QC_MTK_INTERVIEW_ARP_F0123_F0108 JCT3V-F0123; JCT3V-F0108 102 // SHARP_ARP_REF_CHECK_F0105 ARP reference picture selection and DPB check 103 // LGE_ARP_CTX_F0161 JCT3V-F0161 100 104 #define H_3D_IC 1 // Illumination Compensation, JCT3V-B0045, JCT3V-C0046, JCT3V-D0060 101 105 // Unifying rounding offset, for IC part, JCT3V-D0135 … … 103 107 // SHARP_ILLUCOMP_REFINE_E0046 104 108 // MTK_CLIPPING_ALIGN_IC_E0168 // To support simplify bi-prediction PU with identical motion checking, JCT3V-E0168 109 // LGE_IC_CTX_F0160 //JCT3V-F0160 110 // SEC_ONLY_TEXTURE_IC_F0151 105 111 106 112 #if H_3D_NBDV … … 111 117 // NBDV_DEFAULT_VIEWIDX_BUGFIX Bug fix for invalid default view index for NBDV 112 118 // NTT_DoNBDV_VECTOR_CLIP_E0141 disparity vector clipping in DoNBDV, JCT3V-E0141 and JCT3V-E0209 113 114 119 #endif 115 120 … … 124 129 // NTT_VSP_DC_BUGFIX_E0208 bugfix for sub-PU based DC in VSP, JCT3V-E0208 125 130 // NTT_VSP_COMMON_E0207_E0208 common part of JCT3V-E0207 and JCT3V-E0208 131 // MTK_F0109_LG_F0120_VSP_BLOCK MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 132 // SHARP_VSP_BLOCK_IN_AMP_F0102 VSP partitioning for AMP 133 // MTK_VSP_SIMPLIFICATION_F0111 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss 134 // LGE_SHARP_VSP_INHERIT_F0104 135 126 136 #define H_3D_IV_MERGE 1 // Inter-view motion merge candidate 127 137 // HHI_INTER_VIEW_MOTION_PRED … … 133 143 // TEXTURE MERGING CANDIDATE , JCT3V-C0137 134 144 // QC_INRIA_MTK_MRG_E0126 135 136 145 // ETRIKHU_MERGE_REUSE_F0093 QC_DEPTH_IV_MRG_F0125, JCT3V-F0125: Depth oriented Inter-view MV candidate 146 // EC_MPI_ENABLING_MERGE_F0150, MPI flag in VPS and enabling in Merge mode 137 147 #define H_3D_TMVP 1 // QC_TMVP_C0047 138 148 // Sony_M23639 … … 159 169 // LGE_SDC_REMOVE_DC_E0158 Removal of DC mode from SDC 160 170 // LGE_PKU_DMM3_OVERLAP_E0159_HHIFIX 1 Removal of overlap between DMM3 and DMM1 171 // LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 JCT3V-F0159 172 // HHI_DIM_PREDSAMP_FIX_F0171 173 // SEC_DMM3_RBC_F0147 Removal of DMM3 and RBC from DMMs 174 // QC_DIM_DELTADC_UNIFY_F0132 Unify delta DC coding in depth intra modes 161 175 162 176 #define H_3D_INTER_SDC 1 // INTER SDC, Inter simplified depth coding 163 177 // LGE_INTER_SDC_E0156 Enable inter SDC for depth coding 178 #define H_3D_SPIVMP 1 // H_3D_SPIVMP // JCT3V-F0110: Sub-PU level inter-view motion prediction 164 179 #define H_3D_FCO 0 // Flexible coding order for 3D 180 165 181 166 182 … … 175 191 #endif 176 192 177 #define CAM_HLS_F0136_F0045_F0082 1 // JCT3V-F0136/F0045: view order index based camera parameter signaling178 // JCT3V-F0082: the cp_in_slice_segment_layer_flag to be view specific and used as a condition of the presence of slice header level camera parameters179 #define CAM_HLS_F0044 1 // JCT3V-F0044: move camera parameter from slice header extension to slice header180 181 182 193 // Rate Control 183 194 #define KWU_FIX_URQ 1 … … 203 214 #endif 204 215 205 //// ****** neighbouring block-based disparity vector*********216 //// ****** NEIGHBOURING BLOCK-BASED DISPARITY VECTOR ********* 206 217 #if H_3D_NBDV 207 218 #define DVFROM_LEFT 0 … … 222 233 223 234 #if H_3D_DIM_DLT 224 #define DLT_DIFF_CODING_IN_PPS 1 // moving DLT syntax elements from VPS to PPS and differential coding of DLT values225 // JCT3V-F0131, JCT3V-F0139226 #if DLT_DIFF_CODING_IN_PPS227 #define Log2( n ) ( log((double)n) / log(2.0) )228 #endif229 235 #define H_3D_DELTA_DLT 1 230 236 #endif … … 258 264 #endif 259 265 260 /////////////////////////////////////////////////////////////////////////////////////////261 /////////////////////////////////// HTM-9.2 Integrations //////////////////////////////262 /////////////////////////////////////////////////////////////////////////////////////////263 264 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!265 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!266 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!267 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!268 // !!! PLEASE PUT MACROS RELATED TO HTM-9.2 INTEGRATIONS HERE !!!269 270 /////////////////////////////////////////////////////////////////////////////////////////271 /////////////////////////////////// HTM-9.1 Integrations //////////////////////////////272 /////////////////////////////////////////////////////////////////////////////////////////273 274 #define H_MV_FIX_TRACE_FILE 1 // Fix linux compilation error related const char conversion275 276 #define H_MV_LAYER_WISE_STARTUP 1 // Basic version of layer wise startup.277 #define H_MV_FIX_SKIP_PICTURES 1 // Fix related to skipping pictures.278 #define H_MV_6_HRD_O0164_15 1 // (HRD/O0164/Multilayer HRD) #15 Decision: Adopt, modified as follows: It was suggested to constrain the stalling based on the relative cpb removal times, which must be in decoding order. The "du_based_bpb_sync_flag" is not needed, in view of this. SEI in the highest layer of the layer set or (inclusive "or") VPS VUI is used to carry the parameters (at encoder discretion). SEI in higher layer and SEI in VUI do not need to repeat information available in some lower layer. Shall be after APS SEI and buffering period SEI and before all other SEI of all layers except other HRD related SEI.279 #define H_MV_6_HRD_O0217_13 1 // (HRD/O0217/Sub-DPB based DPB operations) #13 Decision: Adopt ?Specify a separate DPB capacity for each layer ?no sharing of capacity across layers ?each layer has its own parameters (max pictures, max latency, max reordering). This proposal would specify distinct parameters for each "output layer set" and to change the definition of an operation point to be specific to an output layer set instead of a 'layer set". Decision: Adopted this aspect as well.280 #define H_MV_6_SHVC_O0098_36 1 // (SHVC/O0098/Scaled ref layer offset) #36 Modify signalling of scaled reference layer offsets to allow signalling of any lower layer, rather than just a direct reference layer, in order to enable alignment of auxiliary pictures. In further JCT-VC and JCT-3V discussion, it was also agreed to use the same offset signalling for MV-HEVC as well as SHVC281 #define H_MV_6_GEN_0153_28 1 //(Gen/O0153/output highest layer) #28 Add a flag in the VPS to indicate if startup process should output the highest available layer if the target output layer is not available.282 #define H_MV_6_PS_0109_25 1 //XXX(PS/O0109/default_one_target_output_layer_idc) #25 To change default_one_target_output_layer_flag to a two-bit default_one_target_output_layer_idc, and reserve the values 2 and 3283 #define H_MV_6_O0226_37 1 //(VUI/O0226/Mod tile WPP) #37 Modifications to the VUI indicators of tile and WPP alignment related syntax elements, from the r1.284 #define H_MV_6_RALS_O0149_11 1 //XXX (RALS/O0149/Prop2): #11 Proposal: A new slice_reserved_flag is taken into use to indicate if a base-layer IDR picture initiates the layer-wise start-up process. Decision: Adopt (the bit should not be required to be present; if present should be the bit after the discardable_flag, and discardable_flag should be the first one of the three, and the poc reset flag is not required to be present).285 #define H_MV_6_PSEM_O0142_3 1 // (PSEM/O0142/Conditional extension syntax) #3 Adopt JCTVC-O0142 (as a structure to be used to switch whatever extensions we define in SPS, not necessarily committing to having these extensions be separate for each extension, but the current plan unless decided otherwise is to use one flag for range extensions syntax presence and one flag for SHVC+MV-HEVC extension syntax presence)286 #define H_MV_6_FIX_GET_VIEW_ID 1 // Fix get view id287 #define H_MV_6_LAYER_ID_32 1 // (Gen/O0137,O0200,O0223,Layer id) #32 Add (editorial equivalent of) "The value of nuh_layer_id shall be in the range of 0 to 62. The value of 63 for nuh_layer_id is reserved for future use by ITU-T | ISO/IEC. Decoders shall ignore all data that follow the value 63 for nuh_layer_id in a NAL unit." and specify that vps_max_layers_minus1 shall not be equal to 63, but decoders shall allow that value to appear in the bitstream. Specify that the value 63 is interpreted the same as the value 62 (e.g., MaxLayersMinus1 = Min( 62, vps_max_layers_minus1) and subsequently refer to MaxLayersMinus1 instead of vps_max_layers_minus1)288 #define H_MV_6_PS_O0118_33 1 // (PS/O0118/visual signal info in vui per layer) #33 Add visual signal information (video_format, video_full_range_flag, colour_primaries, transfer_characteristics, matrix_coeffs) per layer to the VPS VUI, from v2 version of JCTVC-O0118.289 #define H_MV_6_POC_31_35_38 1 //XXX Various related to POC290 // (Misc/O0062/POC LSB present) (SH changes)291 // (POC/O0117/Modify PicOrderCntVal of prevTid0Pic) #35 Modification of the PicOrderCntVal of prevTid0Pic and modification to the decoding process for reference picture set, to address problems found for cross-layer POC alignment.292 // (POC/O0211/Fix ambiguity) #38 Modify POC derivation to correct an ambiguity in the spec.293 #define H_MV_6_MISC_O0062_31 1 // (Misc/O0062/POC LSB present) (without SH changes ) #31 The proposal's "option 3" is to add a flag in the VPS for each EL to control whether these LSBs are present or not (for IDR pictures), and when not present, the LSBs are inferred to be equal to 0. Decision: Adopted (as described herein).294 #define H_MV_6_ILDDS_ILREFPICS_27_34 1 // Various inter layer reference picture derivation295 // (ILDSD/O0225/max_tid_il_ref_pics RPL const.) #27 Change derivation of NumActiveRefLayerPics to consider max_tid_il_ref_pics.296 // (ILDSD/O0120/sub_layers_vps_max_minus1 RPL const) #34 Modify inter-layer reference picture list default construction to incorporate max temporal sub-layers per layer syntax elements in VPS extension, from r2 version of JCTVC-O0120297 #define H_MV_6_ILDDS_O0225_30 1 // (ILDSD/O0225/signal max_tid_il_ref_pics per layer ) #30 2nd proposal of JCTVC-O0225 regarding signalling of max_tid_il_ref_pics per layer, based upon relation to SCE2 on single loop decoding. Decision: Adopted.298 #define H_MV_6_ILDSD_O0120_26 1 // (ILDSD/O0120/sub_layers_vps_max_minus1) #26 Add syntax elements to signal max temporal sub-layers for each layer in the VPS, with a gating flag, from JCTVC- option 2.299 #define H_MV_6_PS_O0223_29 1 // (PS/O0223/Cross layer alignment type) #29 Add a flag in VPS VUI to indicate cross layer pic type alignment. Move cross_layer_irap_aligned_flag to VPS VUI and make presence condition on added flag300 #define H_MV_6_PS_0092_17 1 // (PS/O0092/Sharing SPS PPS) #17 Restrict sharing of SPS and PPS across layers to avoid creating problems during sub-bitstream extraction, based on modification of proposals in JCTVC-O0059 and JCTVC-O0092, reflected in the v2 version of O0092.301 #define H_MV_6_PS_REP_FORM_18_19_20 1 // Various Rep format302 // (PS/O0096/rep format syntax element length ) #20 Modification of length to 8 bit as decided later in trac.303 // (PS/O0179/Rep. Format) #18 Add flag in rep_format( ) syntax structure to control sending of chroma and bit depth related parameters, as proposed in the v2 version of JCTVC-O0179.304 // (PS/O0096/rep format) #20 Modify the SPS syntax for layers with nuh_layer_id > 0 to signal a reference to a rep_format index in the VPS, rather than signalling explicit representation format data in the SPS, from the v2 version of JCTVC-O0096.305 // (PS/FIX/N0092/Rep. Format) #19 Inferences.306 #define H_MV_6_PS_O0096_21 1 // (PS/O0096/direct_dependency_type gating flag) #21 Add a gating flag in VPS extension to condition the presence of direct dependency type, with a default type signalled, from JCTVC-O0096307 #define H_MV_6_PS_O0109_22 1 // (PS/O0109/view_id_len) #22 Modify the VPS extension syntax and semantics to replace view_id_len_minus1 with view_id_len, always signal that syntax element, add a constraint that (1<<view_id_len) >= NumViews, and modify view_id_val semantics to infer value of 0 when not present, from discussion of JCTVC-O0109308 #define H_MV_6_PS_O0109_23 1 // (PS/O0109/profile_ref_minus1 constraint) #23 Modify the semantics of profile_ref_minus1[ i ] to replace shall be less than i?with shall be less than or equal to i? from discussion of JCTVC-O0109309 #define H_MV_6_PS_O0109_24 1 // (PS/O0109/vps_vui_present_flag move) #24 Move the vps_vui_present_flag to precede vps_vui_offset, and make vps_vui_offset conditional on that flag, from JCTVC-O0109310 /////////////////////////////////////////////////////////////////////////////////////////311 /////////////////////////////////// HTM-9.0 Integrations //////////////////////////////312 /////////////////////////////////////////////////////////////////////////////////////////313 314 266 #if H_3D 315 316 #define FIX_MISSING_MACRO_R690 1 // Missing macro in integration to revision 690 317 318 #define SEC_MPI_ENABLING_MERGE_F0150 1 // MPI flag in VPS and enabling in Merge mode 319 #define ETRIKHU_MERGE_REUSE_F0093 1 // Reuse HEVC merge candidate list construction for base candidates, JCT3V-F0093 320 321 #if H_3D_ARP 322 #define QC_MTK_INTERVIEW_ARP_F0123_F0108 1 //JCT3V-F0123; JCT3V-F0108 323 #define SHARP_ARP_REF_CHECK_F0105 1 // ARP reference picture selection and DPB check 324 #define LGE_ARP_CTX_F0161 1 //JCT3V-F0161 325 #endif 326 327 #if H_3D_IV_MERGE 328 #define QC_DEPTH_IV_MRG_F0125 1 // JCT3V-F0125: Depth oriented Inter-view MV candidate 329 #define MTK_SPIVMP_F0110 1 // JCT3V-F0110: Sub-PU level inter-view motion prediction 330 #define MTK_F0110_FIX 1 // Disable Sub-PU IVMP in Depth, fix some delete problems 331 #define BUGFIX_F0093 1 // bug fix for F0093 for depth IvMC pruning 332 #define BUGFIX_2_F0093 1 // bug fix for VSP inheritance 333 #endif 334 335 #if H_3D_VSP 336 #define MTK_F0109_LG_F0120_VSP_BLOCK 1 // MTK_LG_SIMPLIFY_VSP_BLOCK_PARTITION_F0109_F0120 337 #define SHARP_VSP_BLOCK_IN_AMP_F0102 1 // VSP partitioning for AMP 338 #define MTK_VSP_SIMPLIFICATION_F0111 1 // 1. Inherited VSP also use NBDV of current CU, 2. VSP cannot be inherited from above LCU rowss 339 #define LGE_SHARP_VSP_INHERIT_F0104 1 340 #endif 341 342 #define LGE_BUGFIX_F0158 1 //JCT3V-F0158 343 #define LGE_IC_CTX_F0160 1 //JCT3V-F0160 344 #define SEC_ONLY_TEXTURE_IC_F0151 1 345 346 #if H_3D_DIM 347 #define SEC_DMM3_RBC_F0147 1 // Removal of DMM3 and RBC from DMMs 348 #if !SEC_DMM3_RBC_F0147 349 #define H_3D_DIM_RBC 1 // Region Boundary Chain mode 350 #endif 351 #define QC_DIM_DELTADC_UNIFY_F0132 1 // Unify delta DC coding in depth intra modes 352 #define HHI_DIM_PREDSAMP_FIX_F0171 1 353 #define LGE_PRED_RES_CODING_DLT_DOMAIN_F0159 1 //JCT3V-F0159 354 #endif 355 #endif 356 267 #define PPS_FIX_DEPTH 1 268 #endif 269 270 271 ///////////////////////////////////////////////////////////////////////////////////////// 272 /////////////////////////////////// HTM-10.0 Integrations ////////////////////////////// 273 ///////////////////////////////////////////////////////////////////////////////////////// 274 275 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 276 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 277 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 278 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 279 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 280 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 281 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 282 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 283 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 284 // !!! PLEASE PUT MACROS RELATED TO HTM-10.0 INTEGRATIONS HERE !!! 357 285 358 286 ///////////////////////////////////////////////////////////////////////////////////////// … … 370 298 #define MAX_VPS_OP_SETS_PLUS1 1024 371 299 #if H_MV 372 #if H_MV_6_LAYER_ID_32373 300 #define MAX_VPS_NUH_LAYER_ID_PLUS1 63 374 #else375 #define MAX_VPS_NUH_LAYER_ID_PLUS1 64376 #endif377 301 #define MAX_NUM_SCALABILITY_TYPES 16 378 302 #define ENC_CFG_CONSOUT_SPACE 29 … … 398 322 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) 399 323 #if H_MV 400 #if H_MV_6_LAYER_ID_32401 324 #define MAX_NUM_LAYER_IDS 63 402 325 #define MAX_NUM_LAYERS 63 403 #else404 #define MAX_NUM_LAYER_IDS 64405 #define MAX_NUM_LAYERS 64406 #endif407 326 #define MAX_VPS_PROFILE_TIER_LEVEL 64 408 327 #define MAX_VPS_ADD_OUTPUT_LAYER_SETS 1024 409 328 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 ) 410 #if H_MV_6_PS_O0118_33411 329 #define MAX_NUM_VIDEO_SIGNAL_INFO 16 412 #endif413 #if H_MV_6_SHVC_O0098_36414 330 #define MAX_NUM_SCALED_REF_LAYERS MAX_NUM_LAYERS-1 415 #endif416 #if H_MV_6_HRD_O0164_15417 331 #define MAX_NUM_BSP_HRD_PARAMETERS 100 ///< Maximum value is actually not specified 418 332 #define MAX_NUM_BITSTREAM_PARTITIONS 100 ///< Maximum value is actually not specified 419 333 #define MAX_NUM_BSP_SCHED_COMBINATION 100 ///< Maximum value is actually not specified 420 #endif 334 #else 335 #define MAX_NUM_LAYER_IDS 64 421 336 #endif 422 337 … … 896 811 #if H_MV 897 812 898 #if H_MV_6_PSEM_O0142_3899 813 enum PsExtensionTypes 900 814 { … … 906 820 PS_EX_T_MAX_NUM = 8 907 821 }; 908 #endif909 822 910 823 /// scalability types … … 937 850 }; 938 851 939 940 #endif 941 #endif 852 #define Log2( n ) ( log((double)n) / log(2.0) ) // Ed.(GT): This is very very bad and should be fixed to used integer arithmetics ( see gCeilLog2 ) moreover it should not be defined in the tool macro section! 853 #endif 854 #endif
Note: See TracChangeset for help on using the changeset viewer.