Changeset 368 in 3DVCSoftware for branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon
- Timestamp:
- 3 May 2013, 17:16:12 (12 years ago)
- Location:
- branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/CommonDef.h
r367 r368 56 56 // ==================================================================================================================== 57 57 58 #if H_MV 59 #define NV_VERSION "0.1" ///< Current software version 60 #define HM_VERSION "10.1" ///< 61 #else 58 62 #define NV_VERSION "10.1" ///< Current software version 63 #endif 59 64 60 65 // ==================================================================================================================== … … 152 157 } 153 158 159 #if H_MV 160 161 #define AOF( exp ) \ 162 { \ 163 if( !( exp ) ) \ 164 { \ 165 assert( 0 ); \ 166 } \ 167 } 168 169 #endif 154 170 155 171 // ==================================================================================================================== -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/NAL.h
r367 r368 47 47 NalUnitType m_nalUnitType; ///< nal_unit_type 48 48 UInt m_temporalId; ///< temporal_id 49 #if H_MV 50 Int m_layerId; ///< layer id 51 #else 49 52 UInt m_reservedZero6Bits; ///< reserved_zero_6bits 53 #endif 50 54 51 55 /** construct an NALunit structure with given header values. */ … … 53 57 NalUnitType nalUnitType, 54 58 Int temporalId = 0, 59 #if H_MV 60 Int layerId = 0) 61 #else 55 62 Int reservedZero6Bits = 0) 63 #endif 56 64 :m_nalUnitType (nalUnitType) 57 65 ,m_temporalId (temporalId) 66 #if H_MV 67 ,m_layerId (layerId) 68 #else 58 69 ,m_reservedZero6Bits(reservedZero6Bits) 70 #endif 59 71 {} 60 72 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.cpp
r367 r368 64 64 , m_pNDBFilterYuvTmp (NULL) 65 65 , m_bCheckLTMSB (false) 66 #if H_MV 67 , m_layerId (0) 68 , m_viewId (0) 69 #if H_3D 70 , m_isDepth (false) 71 #endif 72 #endif 66 73 { 67 74 m_apcPicYuv[0] = NULL; … … 464 471 465 472 } 473 #if H_MV 474 Void TComPic::print( Bool legend ) 475 { 476 if ( legend ) 477 std::cout << "LId" << "\t" << "POC" << "\t" << "Rec" << "\t" << "Ref" << "\t" << "LT" << std::endl; 478 else 479 std::cout << getLayerId() << "\t" << getPOC()<< "\t" << getReconMark() << "\t" << getSlice(0)->isReferenced() << "\t" << getIsLongTerm() << std::endl; 480 } 481 #endif 466 482 467 483 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.h
r367 r368 86 86 SEIMessages m_SEIs; ///< Any SEI messages that have been received. If !NULL we own the object. 87 87 88 #if H_MV 89 Int m_layerId; 90 Int m_viewId; 91 #if H_3D 92 Bool m_isDepth; 93 #endif 94 #endif 88 95 public: 89 96 TComPic(); … … 98 105 Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 99 106 107 #if H_MV 108 Void setLayerId ( Int layerId ) { m_layerId = layerId; } 109 Int getLayerId () { return m_layerId; } 110 Void setViewId ( Int viewId ) { m_viewId = viewId; } 111 Int getViewId () { return m_viewId; } 112 #if H_3D 113 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 114 Bool getIsDepth () { return m_isDepth; } 115 #endif 116 #endif 100 117 Bool getUsedByCurr() { return m_bUsedByCurr; } 101 118 Void setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; } … … 164 181 std::vector<TComDataCU*>& getOneSliceCUDataForNDBFilter (Int sliceID) { return m_vSliceCUDataLink[sliceID];} 165 182 183 #if H_MV 184 Void print( Bool legend ); 185 #endif 166 186 /** transfer ownership of seis to this picture */ 167 187 void setSEIs(SEIMessages& seis) { m_SEIs = seis; } … … 179 199 };// END CLASS DEFINITION TComPic 180 200 201 #if H_MV 202 class TComPicLists 203 { 204 private: 205 TComList<TComList<TComPic*>*> m_lists; 206 public: 207 208 Void push_back( TComList<TComPic*>* list ) { m_lists.push_back( list ); } 209 Int size () { return (Int) m_lists.size (); } 210 211 TComPic* getPic( Int layerIdInNuh, Int poc ) 212 { 213 TComPic* pcPic = NULL; 214 for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() && pcPic == NULL ); itL++) 215 { 216 for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() && pcPic == NULL ); itP++) 217 { 218 if ( ( (*itP)->getPOC() == poc ) && ( (*itP)->getLayerId() == layerIdInNuh ) ) 219 { 220 pcPic = *itP ; 221 } 222 } 223 } 224 return pcPic; 225 } 226 227 Void print( ) 228 { 229 Bool first = true; 230 for(TComList<TComList<TComPic*>*>::iterator itL = m_lists.begin(); ( itL != m_lists.end() ); itL++) 231 { 232 for(TComList<TComPic*>::iterator itP=(*itL)->begin(); ( itP!=(*itL)->end() ); itP++) 233 { 234 if ( first ) 235 { 236 (*itP)->print( true ); 237 first = false; 238 } 239 (*itP)->print( false ); 240 } 241 } 242 } 243 244 245 }; // END CLASS DEFINITION TComPicLists 246 247 #endif 181 248 //! \} 182 249 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r367 r368 107 107 , m_temporalLayerNonReferenceFlag ( false ) 108 108 , m_enableTMVPFlag ( true ) 109 #if H_MV 110 , m_layerId (0) 111 , m_viewId (0) 112 #if H_3D 113 , m_isDepth (false) 114 #endif 115 #endif 109 116 { 110 117 #if L0034_COMBINED_LIST_CLEANUP … … 138 145 m_aiRefPOCList [0][iNumCount] = 0; 139 146 m_aiRefPOCList [1][iNumCount] = 0; 147 #if H_MV 148 m_aiRefLayerIdList[0][iNumCount] = 0; 149 m_aiRefLayerIdList[1][iNumCount] = 0; 150 #endif 140 151 } 141 152 resetWpScaling(); … … 309 320 { 310 321 m_aiRefPOCList[iDir][iNumRefIdx] = m_apcRefPicList[iDir][iNumRefIdx]->getPOC(); 322 #if H_MV 323 m_aiRefLayerIdList[iDir][iNumRefIdx] = m_apcRefPicList[iDir][iNumRefIdx]->getLayerId(); 324 #endif 311 325 } 312 326 } … … 354 368 for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ ) 355 369 { 370 #if H_MV 371 if ( m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() && 372 m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getLayerId() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getLayerId() ) 373 #else 356 374 if ( m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() ) 375 #endif 357 376 { 358 377 m_iRefIdxOfL1FromRefIdxOfL0[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC]; … … 376 395 for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ ) 377 396 { 397 #if H_MV 398 if ( m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() && 399 m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getLayerId() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getLayerId() ) 400 #else 378 401 if ( m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() ) 402 #endif 379 403 { 380 404 m_iRefIdxOfL0FromRefIdxOfL1[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC]; … … 396 420 #endif 397 421 422 #if H_MV 423 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr) 424 #else 398 425 #if FIX1071 399 426 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr ) … … 401 428 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic ) 402 429 #endif 430 #endif 403 431 { 404 432 #if FIX1071 … … 414 442 } 415 443 444 #if !H_MV 416 445 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 417 446 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 447 #endif 418 448 } 419 449 … … 425 455 UInt NumPocStCurr1 = 0; 426 456 UInt NumPocLtCurr = 0; 457 #if H_MV 458 Int numDirectRefLayers = getVPS()->getNumDirectRefLayers( getLayerIdInVps() ); 459 assert( numDirectRefLayers == refPicSetInterLayer.size() ); 460 #endif 427 461 Int i; 428 462 … … 473 507 TComPic* rpsCurrList0[MAX_NUM_REF+1]; 474 508 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 509 #if H_MV 510 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + numDirectRefLayers; 511 assert( numPocTotalCurr == getNumRpsCurrTempList() ); 512 #else 475 513 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 514 #endif 476 515 #if FIX1071 477 516 if (checkNumPocTotalCurr) … … 513 552 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 514 553 } 554 #if H_MV 555 for ( i=0; i<numDirectRefLayers; i++, cIdx++) 556 { 557 if( cIdx <= MAX_NUM_REF ) 558 { 559 rpsCurrList0[cIdx] = refPicSetInterLayer[i]; 560 } 561 } 562 #endif 515 563 516 564 if (m_eSliceType==B_SLICE) … … 529 577 rpsCurrList1[cIdx] = RefPicSetLtCurr[i]; 530 578 } 579 #if H_MV 580 for ( i=0; i<numDirectRefLayers; i++, cIdx++) 581 { 582 if( cIdx <= MAX_NUM_REF ) 583 { 584 rpsCurrList1[cIdx] = refPicSetInterLayer[i]; 585 } 586 } 587 #endif 531 588 } 532 589 … … 570 627 } 571 628 } 629 #if H_MV 630 numRpsCurrTempList = numRpsCurrTempList + getVPS()->getNumDirectRefLayers( getLayerIdInVps() ); 631 #endif 572 632 return numRpsCurrTempList; 573 633 } … … 732 792 m_iPOC = pSrc->m_iPOC; 733 793 m_eNalUnitType = pSrc->m_eNalUnitType; 794 #if H_MV 795 m_layerId = pSrc->m_layerId; 796 #endif 734 797 m_eSliceType = pSrc->m_eSliceType; 735 798 m_iSliceQp = pSrc->m_iSliceQp; … … 784 847 m_apcRefPicList[i][j] = pSrc->m_apcRefPicList[i][j]; 785 848 m_aiRefPOCList[i][j] = pSrc->m_aiRefPOCList[i][j]; 849 #if H_MV 850 m_aiRefLayerIdList[i][j] = pSrc->m_aiRefLayerIdList[i][j]; 851 #endif 786 852 } 787 853 } … … 799 865 800 866 // access channel 867 #if H_MV 868 m_pcVPS = pSrc->m_pcVPS; 869 #endif 801 870 m_pcSPS = pSrc->m_pcSPS; 802 871 m_pcPPS = pSrc->m_pcPPS; … … 1312 1381 , m_bTemporalIdNestingFlag (false) 1313 1382 , m_numHrdParameters ( 0) 1383 #if H_MV 1384 , m_maxNuhLayerId ( 0) 1385 #else 1314 1386 , m_maxNuhReservedZeroLayerId ( 0) 1387 #endif 1315 1388 , m_hrdParameters (NULL) 1316 1389 , m_hrdOpSetIdx (NULL) … … 1327 1400 m_uiMaxLatencyIncrease[i] = 0; 1328 1401 } 1402 #if H_MV 1403 m_avcBaseLayerFlag = false; 1404 m_splittingFlag = false; 1405 1406 for( Int i = 0; i < MAX_NUM_SCALABILITY_TYPES; i++ ) 1407 { 1408 m_scalabilityMask[i] = false; 1409 m_dimensionIdLen [i] = -1; 1410 } 1411 1412 m_vpsNuhLayerIdPresentFlag = false; 1413 m_numOutputLayerSets = 0; 1414 1415 for( Int i = 0; i < MAX_VPS_OP_SETS_PLUS1; i++ ) 1416 { 1417 m_vpsProfilePresentFlag [i] = false; 1418 m_profileLayerSetRefMinus1[i] = 0; 1419 m_outputLayerSetIdx [i] = 0; 1420 for( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++ ) 1421 { 1422 m_outputLayerFlag[i][j] = false; 1423 } 1424 } 1425 1426 for( Int i = 0; i < MAX_NUM_LAYER_IDS; i++ ) 1427 { 1428 m_layerIdInVps[i] = (i == 0 ) ? 0 : -1; 1429 } 1430 1431 for( Int i = 0; i < MAX_NUM_LAYERS; i++ ) 1432 { 1433 m_layerIdInNuh [i] = ( i == 0 ) ? 0 : -1; 1434 m_numDirectRefLayers[i] = 0; 1435 1436 for( Int j = 0; j < MAX_NUM_LAYERS; j++ ) 1437 { 1438 m_directDependencyFlag[i][j] = false; 1439 m_refLayerId[i][j] = -1; 1440 } 1441 1442 for( Int j = 0; j < MAX_NUM_SCALABILITY_TYPES; j++ ) 1443 { 1444 m_dimensionId[i][j] = 0; 1445 } 1446 1447 } 1448 #endif 1329 1449 } 1330 1450 … … 1336 1456 } 1337 1457 1458 #if H_MV 1459 1460 Bool TComVPS::checkVPSExtensionSyntax() 1461 { 1462 // check splitting flag constraint 1463 if ( getSplittingFlag() ) 1464 { 1465 // Derive dimBitOffset[j] 1466 Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; 1467 Int numScalabilityTypes = getNumScalabilityTypes(); 1468 dimBitOffset[0] = 0; 1469 1470 for (Int type = 1; type <= numScalabilityTypes; type++ ) 1471 { 1472 dimBitOffset[ type ] = 0; 1473 for (Int dimIdx = 0; dimIdx <= type - 1; dimIdx++) 1474 dimBitOffset[ type ] += ( getDimensionIdLen( dimIdx ) ); 1475 } 1476 1477 for (Int type = 0; type < getNumScalabilityTypes(); type++ ) 1478 { 1479 for( Int layer = 1; layer < getMaxLayers(); layer++ ) 1480 { 1481 assert( getDimensionId( layer, type ) == ( ( getLayerIdInNuh( layer ) & ( (1 << dimBitOffset[ type + 1 ] ) - 1) ) >> dimBitOffset[ type ] ) ); 1482 }; 1483 }; 1484 } 1485 1486 for( Int layer = 1; layer < getMaxLayers(); layer++ ) 1487 { 1488 // check layer_id_in_nuh constraint 1489 assert( getLayerIdInNuh( layer ) > getLayerIdInNuh( layer -1 ) ); 1490 } 1491 return true; 1492 } 1493 1494 Int TComVPS::getNumScalabilityTypes() 1495 { 1496 return scalTypeToScalIdx( ScalabilityType(MAX_NUM_SCALABILITY_TYPES) ); 1497 } 1498 1499 Int TComVPS::scalTypeToScalIdx( ScalabilityType scalType ) 1500 { 1501 assert( scalType >= 0 && scalType <= MAX_NUM_SCALABILITY_TYPES ); 1502 assert( scalType == MAX_NUM_SCALABILITY_TYPES || getScalabilityMask( scalType ) ); 1503 1504 Int scalIdx = 0; 1505 for( Int curScalType = 0; curScalType < scalType; curScalType++ ) 1506 { 1507 scalIdx += ( getScalabilityMask( curScalType ) ? 1 : 0 ); 1508 } 1509 1510 return scalIdx; 1511 } 1512 1513 1514 1515 Void TComVPS::setScalabilityMask( UInt val ) 1516 { 1517 for ( Int scalType = 0; scalType < MAX_NUM_SCALABILITY_TYPES; scalType++ ) 1518 setScalabilityMask( scalType, ( val & (1 << scalType ) ) == 1 ); 1519 } 1520 1521 Void TComVPS::calcIvRefLayers() 1522 { 1523 for( Int i = 1; i <= getMaxLayers(); i++ ) 1524 { 1525 m_numDirectRefLayers[ i ] = 0; 1526 for( Int j = 0 ; j < i; j++ ) 1527 if( m_directDependencyFlag[ i ][ j ]) 1528 m_refLayerId[ i ][ m_numDirectRefLayers[ i ]++ ] = m_layerIdInNuh[ j ]; 1529 } 1530 } 1531 1532 Int TComVPS::getRefLayerId( Int layerIdInVps, Int idx ) 1533 { 1534 assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInVps] ); 1535 Int layerIdInNuh = m_refLayerId[ layerIdInVps ][ idx ]; 1536 assert ( layerIdInNuh >= 0 ); 1537 return layerIdInNuh; 1538 } 1539 1540 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType ) 1541 { 1542 return ( ( layerIdInVps != 0 )&& getScalabilityMask( scalType ) ) ? getDimensionId( layerIdInVps, scalTypeToScalIdx( scalType ) ) : 0; 1543 } 1544 #endif 1338 1545 // ------------------------------------------------------------------------------------------------ 1339 1546 // Sequence parameter set (SPS) … … 1382 1589 , m_vuiParametersPresentFlag (false) 1383 1590 , m_vuiParameters () 1591 #if H_MV 1592 , m_interViewMvVertConstraintFlag (false) 1593 #endif 1384 1594 { 1385 1595 for ( Int i = 0; i < MAX_TLAYER; i++ ) … … 1845 2055 } 1846 2056 2057 #if H_MV 2058 Void TComSlice::createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ) 2059 { 2060 refPicSetInterLayer.clear(); 2061 2062 for( Int i = 0; i < getVPS()->getNumDirectRefLayers( getLayerIdInVps() ); i++ ) 2063 { 2064 Int layerIdRef = getVPS()->getRefLayerId( getLayerIdInVps(), i ); 2065 TComPic* picRef = ivPicLists->getPic( layerIdRef, getPOC() ) ; 2066 assert ( picRef != 0 ); 2067 2068 picRef->getPicYuvRec()->extendPicBorder(); 2069 picRef->setIsLongTerm( true ); 2070 picRef->getSlice(0)->setReferenced( true ); 2071 2072 refPicSetInterLayer.push_back( picRef ); 2073 } 2074 } 2075 2076 Void TComSlice::markIvRefPicsAsShortTerm( std::vector<TComPic*> refPicSetInterLayer ) 2077 { 2078 // Mark as shortterm 2079 for ( Int i = 0; i < refPicSetInterLayer.size(); i++ ) 2080 { 2081 refPicSetInterLayer[i]->setIsLongTerm( false ); 2082 } 2083 } 2084 2085 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ) 2086 { 2087 // Fill targetDecLayerIdSet with all layers if empty. 2088 if (targetDecLayerIdSet.size() == 0 ) 2089 { 2090 for ( Int layerIdInVps = 0; layerIdInVps < vps->getMaxLayers(); layerIdInVps++ ) 2091 { 2092 targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) ); 2093 } 2094 } 2095 2096 Int numTargetDecLayers = (Int) targetDecLayerIdSet.size(); 2097 Int latestDecIdx; 2098 for ( latestDecIdx = 0; latestDecIdx < numTargetDecLayers; latestDecIdx++) 2099 { 2100 if ( targetDecLayerIdSet[ latestDecIdx ] == curLayerId ) 2101 break; 2102 } 2103 2104 for( Int i = 0; i <= latestDecIdx; i++ ) 2105 { 2106 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ i ] ) ) 2107 { 2108 TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc ); 2109 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() ) 2110 { 2111 Bool remainingInterLayerReferencesFlag = false; 2112 for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ ) 2113 { 2114 TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS(); 2115 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) ) 2116 { 2117 Int targetDecLayerIdinVPS = vpsSlice->getLayerIdInVps( targetDecLayerIdSet[ j ] ); 2118 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdinVPS ); k++ ) 2119 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdinVPS, k ) ) 2120 remainingInterLayerReferencesFlag = true; 2121 } 2122 } 2123 if( !remainingInterLayerReferencesFlag ) 2124 pcPic->getSlice(0)->setReferenced( false ); 2125 } 2126 } 2127 } 2128 } 2129 2130 Void TComSlice::xPrintRefPicList() 2131 { 2132 for ( Int li = 0; li < 2; li++) 2133 { 2134 std::cout << std::endl << "RefPicListL" << li << ":" << std::endl; 2135 for (Int rIdx = 0; rIdx <= (m_aiNumRefIdx[li]-1); rIdx ++) 2136 { 2137 if (rIdx == 0 && li == 0) m_apcRefPicList[li][rIdx]->print( true ); 2138 2139 m_apcRefPicList[li][rIdx]->print( false ); 2140 } 2141 } 2142 } 2143 #endif 1847 2144 /** get scaling matrix from RefMatrixID 1848 2145 * \param sizeId size index … … 2067 2364 { 2068 2365 Int spsId = pps->getSPSId(); 2366 #if H_MV 2367 // active parameter sets per layer should be used here 2368 #else 2069 2369 if (!isIRAP && (spsId != m_activeSPSId)) 2070 2370 { … … 2072 2372 return false; 2073 2373 } 2374 #endif 2074 2375 TComSPS *sps = m_spsMap.getPS(spsId); 2075 2376 if (sps) … … 2126 2427 } 2127 2428 2429 #if H_MV 2430 Void TComPTL::copyLevelFrom( TComPTL* source ) 2431 { 2432 getGeneralPTL()->setLevelIdc( source->getGeneralPTL()->getLevelIdc() ); 2433 for( Int subLayer = 0; subLayer < 6; subLayer++ ) 2434 { 2435 setSubLayerLevelPresentFlag( subLayer, source->getSubLayerLevelPresentFlag( subLayer ) ); 2436 getSubLayerPTL( subLayer )->setLevelIdc( source->getSubLayerPTL( subLayer )->getLevelIdc() ); 2437 } 2438 } 2439 #endif 2128 2440 #if SIGNAL_BITRATE_PICRATE_IN_VPS 2129 2441 TComBitRatePicRateInfo::TComBitRatePicRateInfo() -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.h
r367 r368 51 51 class TComPic; 52 52 class TComTrQuant; 53 #if H_MV 54 class TComPicLists; 55 #endif 53 56 // ==================================================================================================================== 54 57 // Constants … … 245 248 ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } 246 249 ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } 250 #if H_MV 251 Void copyLevelFrom( TComPTL* source ); 252 #endif 247 253 }; 248 254 /// VPS class … … 480 486 481 487 UInt m_numHrdParameters; 488 #if H_MV 489 UInt m_maxNuhLayerId; 490 #else 482 491 UInt m_maxNuhReservedZeroLayerId; 492 #endif 483 493 TComHRD* m_hrdParameters; 484 494 UInt* m_hrdOpSetIdx; 485 495 Bool* m_cprmsPresentFlag; 486 496 UInt m_numOpSets; 497 #if H_MV 498 Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1]; 499 #else 487 500 Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; 488 501 #endif 502 503 #if H_MV 504 TComPTL m_pcPTL[MAX_VPS_OP_SETS_PLUS1]; 505 #else 489 506 TComPTL m_pcPTL; 507 #endif 490 508 #if SIGNAL_BITRATE_PICRATE_IN_VPS 491 509 TComBitRatePicRateInfo m_bitRatePicRateInfo; … … 495 513 #endif 496 514 515 #if H_MV 516 Bool m_avcBaseLayerFlag; 517 Bool m_splittingFlag; 518 Bool m_scalabilityMask [MAX_NUM_SCALABILITY_TYPES]; 519 Int m_dimensionIdLen [MAX_NUM_SCALABILITY_TYPES]; 520 Bool m_vpsNuhLayerIdPresentFlag; 521 Int m_layerIdInNuh [MAX_NUM_LAYER_IDS]; 522 Int m_layerIdInVps [MAX_NUM_LAYERS ]; 523 Int m_dimensionId [MAX_NUM_LAYER_IDS][MAX_NUM_SCALABILITY_TYPES]; 524 525 526 Bool m_vpsProfilePresentFlag [MAX_VPS_OP_SETS_PLUS1]; 527 Int m_profileLayerSetRefMinus1 [MAX_VPS_OP_SETS_PLUS1]; 528 Int m_numOutputLayerSets; 529 Int m_outputLayerSetIdx [MAX_VPS_OP_SETS_PLUS1]; 530 Bool m_outputLayerFlag [MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1]; 531 Bool m_directDependencyFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 532 533 Int m_numDirectRefLayers [ MAX_NUM_LAYERS ]; 534 Int m_refLayerId [ MAX_NUM_LAYERS ][MAX_NUM_LAYERS]; 535 536 #endif 497 537 public: 498 538 TComVPS(); … … 536 576 Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } 537 577 578 #if H_MV 579 UInt getMaxNuhLayerId() { return m_maxNuhLayerId; } 580 Void setMaxNuhLayerId(UInt v) { m_maxNuhLayerId = v; } 581 #else 538 582 UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } 539 583 Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } 584 #endif 540 585 541 586 UInt getMaxOpSets() { return m_numOpSets; } … … 544 589 Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } 545 590 591 #if H_MV 592 TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; } 593 #else 546 594 TComPTL* getPTL() { return &m_pcPTL; } 595 #endif 547 596 #if SIGNAL_BITRATE_PICRATE_IN_VPS 548 597 TComBitRatePicRateInfo *getBitratePicrateInfo() { return &m_bitRatePicRateInfo; } … … 550 599 #if L0043_TIMING_INFO 551 600 TimingInfo* getTimingInfo() { return &m_timingInfo; } 601 #endif 602 #if H_MV 603 Void setAvcBaseLayerFlag( Bool val ) { m_avcBaseLayerFlag = val; } 604 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 605 606 Void setSplittingFlag( Bool val ) { m_splittingFlag = val; } 607 Bool getSplittingFlag() { return m_splittingFlag; } 608 609 Void setScalabilityMask( UInt val ); 610 611 Void setScalabilityMask( Int scalType, Bool val ) { m_scalabilityMask[scalType] = val; } 612 Bool getScalabilityMask( Int scalType ) { return m_scalabilityMask[scalType]; } 613 614 Int getNumScalabilityTypes( ); 615 616 Void setDimensionIdLen( Int sIdx, Int val ) { m_dimensionIdLen[sIdx] = val; } 617 Int getDimensionIdLen( Int sIdx ) { assert( m_dimensionIdLen[sIdx] > 0) ; return m_dimensionIdLen[sIdx]; } 618 619 Void setVpsNuhLayerIdPresentFlag( Bool val ) { m_vpsNuhLayerIdPresentFlag = val; } 620 Bool getVpsNuhLayerIdPresentFlag() { return m_vpsNuhLayerIdPresentFlag; } 621 622 Void setLayerIdInNuh( Int layerIdInVps, Int val ) { m_layerIdInNuh[layerIdInVps] = val; } 623 Int getLayerIdInNuh( Int layerIdInVps ) { assert( m_layerIdInNuh[layerIdInVps] >= 0 ); return m_layerIdInNuh[layerIdInVps]; } 624 625 Void setLayerIdInVps( Int layerIdInNuh, Int val ) { m_layerIdInVps[layerIdInNuh] = val; } 626 Int getLayerIdInVps( Int layerIdInNuh ) { assert( m_layerIdInVps[layerIdInNuh] >= 0 ); return m_layerIdInVps[layerIdInNuh]; } 627 628 Bool nuhLayerIdIncluded( Int layerIdinNuh ) { return ( m_layerIdInVps[ layerIdinNuh ] > 0 ); } 629 630 Void setDimensionId( Int layerIdInVps, Int scalIdx, Int val ) { m_dimensionId[layerIdInVps][scalIdx] = val; } 631 Int getDimensionId( Int layerIdInVps, Int scalIdx ) { return m_dimensionId[layerIdInVps][scalIdx]; } 632 633 Int getScalabilityId ( Int layerIdInVps, ScalabilityType scalType ); 634 635 Int getViewId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, VIEW_ID ); } 636 #if H_3D 637 Int getDepthId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, DEPTH_ID ); } 638 #endif 639 640 641 Void setVpsProfilePresentFlag( Int layerSet, Bool val ) { m_vpsProfilePresentFlag[layerSet] = val; } 642 Bool getVpsProfilePresentFlag( Int layerSet ) { return m_vpsProfilePresentFlag[layerSet]; } 643 644 Void setProfileLayerSetRefMinus1( Int layerSet, Int val ) { m_profileLayerSetRefMinus1[layerSet] = val; } 645 Bool getProfileLayerSetRefMinus1( Int layerSet ) { return m_profileLayerSetRefMinus1[layerSet]; } 646 647 Void setNumOutputLayerSets( Int val ) { m_numOutputLayerSets = val; } 648 Int getNumOutputLayerSets() { return m_numOutputLayerSets; } 649 650 Void setOutputLayerSetIdx( Int layerSet, Int val ) { m_outputLayerSetIdx[layerSet] = val; } 651 Int getOutputLayerSetIdx( Int layerSet ) { return m_outputLayerSetIdx[layerSet]; } 652 653 Void setOutputLayerFlag( Int layerSet, Int layer, Bool val ) { m_outputLayerFlag[layerSet][layer] = val; } 654 Bool getOutputLayerFlag( Int layerSet, Int layer ) { return m_outputLayerFlag[layerSet][layer]; } 655 656 Void setDirectDependencyFlag( Int layerHigh, Int layerLow, Bool val ) { m_directDependencyFlag[layerHigh][layerLow] = val; } 657 Bool getDirectDependencyFlag( Int layerHigh, Int layerLow ) { return m_directDependencyFlag[layerHigh][layerLow]; } 658 659 Void calcIvRefLayers(); 660 661 Int getNumDirectRefLayers( Int layerIdInVps ) { return m_numDirectRefLayers[ layerIdInVps ]; }; 662 Int getRefLayerId ( Int layerIdInVps, Int idx );; 663 664 Bool checkVPSExtensionSyntax(); 665 Int scalTypeToScalIdx ( ScalabilityType scalType ); 552 666 #endif 553 667 }; … … 853 967 static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; 854 968 TComPTL m_pcPTL; 969 #if H_MV 970 Bool m_interViewMvVertConstraintFlag; 971 #endif 855 972 public: 856 973 TComSPS(); … … 983 1100 984 1101 TComPTL* getPTL() { return &m_pcPTL; } 1102 #if H_MV 1103 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; } 1104 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1105 #endif 985 1106 }; 986 1107 … … 1009 1130 Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } 1010 1131 UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } 1132 #if H_MV 1133 // Why not an listIdx for all members, would avoid code duplication?? 1134 Void setRefPicSetIdxL(UInt li, UInt idx, UInt refPicSetIdx) {( li==0 ? m_RefPicSetIdxL0[idx] : m_RefPicSetIdxL1[idx] ) = refPicSetIdx; }; 1135 Void setRefPicListModificationFlagL(UInt li, Bool flag) { ( li==0 ? m_bRefPicListModificationFlagL0 : m_bRefPicListModificationFlagL1 ) = flag; }; 1136 #endif 1011 1137 }; 1012 1138 … … 1263 1389 TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; 1264 1390 Int m_aiRefPOCList [2][MAX_NUM_REF+1]; 1391 #if H_MV 1392 Int m_aiRefLayerIdList[2][MAX_NUM_REF+1]; 1393 #endif 1265 1394 Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; 1266 1395 Int m_iDepth; … … 1328 1457 1329 1458 Bool m_enableTMVPFlag; 1459 #if H_MV 1460 Int m_layerId; 1461 Int m_viewId; 1462 #if H_3D 1463 Bool m_isDepth; 1464 #endif 1465 #endif 1330 1466 public: 1331 1467 TComSlice(); … … 1434 1570 Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } 1435 1571 1572 #if H_MV 1573 Int getRefLayerId ( RefPicList e, Int iRefIdx) { return m_aiRefLayerIdList[e][iRefIdx]; } 1574 Void setRefLayerId ( Int i, RefPicList e, Int iRefIdx ) { m_aiRefLayerIdList[e][iRefIdx] = i; } 1575 #endif 1576 #if H_MV 1577 Void setRefPicList ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet , Bool checkNumPocTotalCurr = false ); 1578 #else 1436 1579 #if FIX1071 1437 1580 Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); 1438 1581 #else 1439 1582 Void setRefPicList ( TComList<TComPic*>& rcListPic ); 1583 #endif 1440 1584 #endif 1441 1585 Void setRefPOCList (); … … 1485 1629 Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); 1486 1630 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 1631 #if H_MV 1632 Void createAndApplyIvReferencePictureSet( TComPicLists* ivPicLists, std::vector<TComPic*>& refPicSetInterLayer ); 1633 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer ); 1634 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc ); 1635 1636 1637 Void xPrintRefPicList(); 1638 #endif 1487 1639 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); 1488 1640 Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); … … 1560 1712 Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} 1561 1713 1714 #if H_MV 1715 Void setLayerId ( Int layerId ) { m_layerId = layerId; } 1716 Int getLayerId () { return m_layerId; } 1717 Int getLayerIdInVps () { return getVPS()->getLayerIdInVps( m_layerId ); }; 1718 Void setViewId ( Int viewId ) { m_viewId = viewId; } 1719 Int getViewId () { return m_viewId; } 1720 #if H_3D 1721 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; } 1722 Bool getIsDepth () { return m_isDepth; } 1723 #endif 1724 #endif 1562 1725 protected: 1563 1726 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, 1564 1727 Int poc); 1565 1728 TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); 1729 #if H_MV 1730 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId ); 1731 #endif 1566 1732 };// END CLASS DEFINITION TComSlice 1567 1733 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TypeDef.h
r367 r368 45 45 46 46 47 #if H_MV 48 #define H_3D 0 49 #endif 47 50 48 51 ///// ***** HM 10.1 ********* … … 88 91 #define MAX_VPS_NUM_HRD_PARAMETERS 1 89 92 #define MAX_VPS_OP_SETS_PLUS1 1024 93 #if H_MV 94 #define MAX_VPS_NUH_LAYER_ID_PLUS1 64 95 #define MAX_NUM_SCALABILITY_TYPES 16 96 #define ENC_CFG_CONSOUT_SPACE 29 97 #else 90 98 #define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 1 99 #endif 91 100 92 101 #define RATE_CONTROL_LAMBDA_DOMAIN 1 ///< JCTVC-K0103, rate control by R-lambda model … … 95 104 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) 96 105 #define MAX_NUM_LAYER_IDS 64 106 #if H_MV 107 #define MAX_NUM_LAYERS 64 108 #endif 97 109 98 110 #define COEF_REMAIN_BIN_REDUCTION 3 ///< indicates the level at which the VLC … … 509 521 MAIN10 = 2, 510 522 MAINSTILLPICTURE = 3, 523 #if H_MV 524 MAINSTEREO = 4, 525 MAINMULTIVIEW = 5, 526 #if H_3D 527 MAIN3D = 6, 528 #endif 529 #endif 511 530 }; 512 531 } … … 540 559 //! \} 541 560 542 #endif 561 #if H_MV 562 /// scalability types 563 enum ScalabilityType 564 { 565 VIEW_ID = 0, 566 #if H_3D 567 DEPTH_ID = 1, 568 #endif 569 }; 570 #endif 571 #endif
Note: See TracChangeset for help on using the changeset viewer.