Changeset 367 in 3DVCSoftware for branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon
- Timestamp:
- 3 May 2013, 17:09:57 (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
r364 r367 56 56 // ==================================================================================================================== 57 57 58 #if H_MV59 #define NV_VERSION "0.1" ///< Current software version60 #define HM_VERSION "10.1" ///<61 #else62 58 #define NV_VERSION "10.1" ///< Current software version 63 #endif64 59 65 60 // ==================================================================================================================== … … 157 152 } 158 153 159 #if H_MV160 161 #define AOF( exp ) \162 { \163 if( !( exp ) ) \164 { \165 assert( 0 ); \166 } \167 }168 169 #endif170 154 171 155 // ==================================================================================================================== -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/NAL.h
r364 r367 47 47 NalUnitType m_nalUnitType; ///< nal_unit_type 48 48 UInt m_temporalId; ///< temporal_id 49 #if H_MV50 Int m_layerId; ///< layer id51 #else52 49 UInt m_reservedZero6Bits; ///< reserved_zero_6bits 53 #endif54 50 55 51 /** construct an NALunit structure with given header values. */ … … 57 53 NalUnitType nalUnitType, 58 54 Int temporalId = 0, 59 #if H_MV60 Int layerId = 0)61 #else62 55 Int reservedZero6Bits = 0) 63 #endif64 56 :m_nalUnitType (nalUnitType) 65 57 ,m_temporalId (temporalId) 66 #if H_MV67 ,m_layerId (layerId)68 #else69 58 ,m_reservedZero6Bits(reservedZero6Bits) 70 #endif71 59 {} 72 60 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.cpp
r365 r367 64 64 , m_pNDBFilterYuvTmp (NULL) 65 65 , m_bCheckLTMSB (false) 66 #if H_MV67 , m_layerId (0)68 , m_viewId (0)69 #if H_3D70 , m_isDepth (false)71 #endif72 #endif73 66 { 74 67 m_apcPicYuv[0] = NULL; … … 471 464 472 465 } 473 #if H_MV474 Void TComPic::print( Bool legend )475 {476 if ( legend )477 std::cout << "LId" << "\t" << "POC" << "\t" << "Rec" << "\t" << "Ref" << "\t" << "LT" << std::endl;478 else479 std::cout << getLayerId() << "\t" << getPOC()<< "\t" << getReconMark() << "\t" << getSlice(0)->isReferenced() << "\t" << getIsLongTerm() << std::endl;480 }481 #endif482 466 483 467 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComPic.h
r364 r367 86 86 SEIMessages m_SEIs; ///< Any SEI messages that have been received. If !NULL we own the object. 87 87 88 #if H_MV89 Int m_layerId;90 Int m_viewId;91 #if H_3D92 Bool m_isDepth;93 #endif94 #endif95 88 public: 96 89 TComPic(); … … 105 98 Void setTLayer( UInt uiTLayer ) { m_uiTLayer = uiTLayer; } 106 99 107 #if H_MV108 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_3D113 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; }114 Bool getIsDepth () { return m_isDepth; }115 #endif116 #endif117 100 Bool getUsedByCurr() { return m_bUsedByCurr; } 118 101 Void setUsedByCurr( Bool bUsed ) { m_bUsedByCurr = bUsed; } … … 181 164 std::vector<TComDataCU*>& getOneSliceCUDataForNDBFilter (Int sliceID) { return m_vSliceCUDataLink[sliceID];} 182 165 183 #if H_MV184 Void print( Bool legend );185 #endif186 166 /** transfer ownership of seis to this picture */ 187 167 void setSEIs(SEIMessages& seis) { m_SEIs = seis; } … … 199 179 };// END CLASS DEFINITION TComPic 200 180 201 #if H_MV202 class TComPicLists203 {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 TComPicLists246 247 #endif248 181 //! \} 249 182 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.cpp
r366 r367 107 107 , m_temporalLayerNonReferenceFlag ( false ) 108 108 , m_enableTMVPFlag ( true ) 109 #if H_MV110 , m_layerId (0)111 , m_viewId (0)112 #if H_3D113 , m_isDepth (false)114 #endif115 #endif116 109 { 117 110 #if L0034_COMBINED_LIST_CLEANUP … … 145 138 m_aiRefPOCList [0][iNumCount] = 0; 146 139 m_aiRefPOCList [1][iNumCount] = 0; 147 #if H_MV148 m_aiRefLayerIdList[0][iNumCount] = 0;149 m_aiRefLayerIdList[1][iNumCount] = 0;150 #endif151 140 } 152 141 resetWpScaling(); … … 320 309 { 321 310 m_aiRefPOCList[iDir][iNumRefIdx] = m_apcRefPicList[iDir][iNumRefIdx]->getPOC(); 322 #if H_MV323 m_aiRefLayerIdList[iDir][iNumRefIdx] = m_apcRefPicList[iDir][iNumRefIdx]->getLayerId();324 #endif325 311 } 326 312 } … … 368 354 for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ ) 369 355 { 370 #if H_MV371 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 #else374 356 if ( m_apcRefPicList[REF_PIC_LIST_0][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() ) 375 #endif376 357 { 377 358 m_iRefIdxOfL1FromRefIdxOfL0[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC]; … … 395 376 for ( Int iRefIdxLC = 0; iRefIdxLC < m_aiNumRefIdx[REF_PIC_LIST_C]; iRefIdxLC++ ) 396 377 { 397 #if H_MV398 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 #else401 378 if ( m_apcRefPicList[REF_PIC_LIST_1][iNumRefIdx]->getPOC() == m_apcRefPicList[m_eListIdFromIdxOfLC[iRefIdxLC]][m_iRefIdxFromIdxOfLC[iRefIdxLC]]->getPOC() ) 402 #endif403 379 { 404 380 m_iRefIdxOfL0FromRefIdxOfL1[iNumRefIdx] = m_iRefIdxFromIdxOfLC[iRefIdxLC]; … … 420 396 #endif 421 397 422 #if H_MV423 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& refPicSetInterLayer , Bool checkNumPocTotalCurr)424 #else425 398 #if FIX1071 426 399 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr ) … … 428 401 Void TComSlice::setRefPicList( TComList<TComPic*>& rcListPic ) 429 402 #endif 430 #endif431 403 { 432 404 #if FIX1071 … … 442 414 } 443 415 444 #if !H_MV445 416 m_aiNumRefIdx[0] = getNumRefIdx(REF_PIC_LIST_0); 446 417 m_aiNumRefIdx[1] = getNumRefIdx(REF_PIC_LIST_1); 447 #endif448 418 } 449 419 … … 455 425 UInt NumPocStCurr1 = 0; 456 426 UInt NumPocLtCurr = 0; 457 #if H_MV458 Int numDirectRefLayers = getVPS()->getNumDirectRefLayers( getLayerIdInVps() );459 assert( numDirectRefLayers == refPicSetInterLayer.size() );460 #endif461 427 Int i; 462 428 … … 507 473 TComPic* rpsCurrList0[MAX_NUM_REF+1]; 508 474 TComPic* rpsCurrList1[MAX_NUM_REF+1]; 509 #if H_MV510 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + numDirectRefLayers;511 assert( numPocTotalCurr == getNumRpsCurrTempList() );512 #else513 475 Int numPocTotalCurr = NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr; 514 #endif515 476 #if FIX1071 516 477 if (checkNumPocTotalCurr) … … 552 513 rpsCurrList0[cIdx] = RefPicSetLtCurr[i]; 553 514 } 554 #if H_MV555 for ( i=0; i<numDirectRefLayers; i++, cIdx++)556 {557 if( cIdx <= MAX_NUM_REF )558 {559 rpsCurrList0[cIdx] = refPicSetInterLayer[i];560 }561 }562 #endif563 515 564 516 if (m_eSliceType==B_SLICE) … … 577 529 rpsCurrList1[cIdx] = RefPicSetLtCurr[i]; 578 530 } 579 #if H_MV580 for ( i=0; i<numDirectRefLayers; i++, cIdx++)581 {582 if( cIdx <= MAX_NUM_REF )583 {584 rpsCurrList1[cIdx] = refPicSetInterLayer[i];585 }586 }587 #endif588 531 } 589 532 … … 627 570 } 628 571 } 629 #if H_MV630 numRpsCurrTempList = numRpsCurrTempList + getVPS()->getNumDirectRefLayers( getLayerIdInVps() );631 #endif632 572 return numRpsCurrTempList; 633 573 } … … 792 732 m_iPOC = pSrc->m_iPOC; 793 733 m_eNalUnitType = pSrc->m_eNalUnitType; 794 #if H_MV795 m_layerId = pSrc->m_layerId;796 #endif797 734 m_eSliceType = pSrc->m_eSliceType; 798 735 m_iSliceQp = pSrc->m_iSliceQp; … … 847 784 m_apcRefPicList[i][j] = pSrc->m_apcRefPicList[i][j]; 848 785 m_aiRefPOCList[i][j] = pSrc->m_aiRefPOCList[i][j]; 849 #if H_MV850 m_aiRefLayerIdList[i][j] = pSrc->m_aiRefLayerIdList[i][j];851 #endif852 786 } 853 787 } … … 865 799 866 800 // access channel 867 #if H_MV868 m_pcVPS = pSrc->m_pcVPS;869 #endif870 801 m_pcSPS = pSrc->m_pcSPS; 871 802 m_pcPPS = pSrc->m_pcPPS; … … 1381 1312 , m_bTemporalIdNestingFlag (false) 1382 1313 , m_numHrdParameters ( 0) 1383 #if H_MV1384 , m_maxNuhLayerId ( 0)1385 #else1386 1314 , m_maxNuhReservedZeroLayerId ( 0) 1387 #endif1388 1315 , m_hrdParameters (NULL) 1389 1316 , m_hrdOpSetIdx (NULL) … … 1400 1327 m_uiMaxLatencyIncrease[i] = 0; 1401 1328 } 1402 #if H_MV1403 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 #endif1449 1329 } 1450 1330 … … 1456 1336 } 1457 1337 1458 #if H_MV1459 1460 Bool TComVPS::checkVPSExtensionSyntax()1461 {1462 // check splitting flag constraint1463 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 constraint1489 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 #endif1545 1338 // ------------------------------------------------------------------------------------------------ 1546 1339 // Sequence parameter set (SPS) … … 1589 1382 , m_vuiParametersPresentFlag (false) 1590 1383 , m_vuiParameters () 1591 #if H_MV1592 , m_interViewMvVertConstraintFlag (false)1593 #endif1594 1384 { 1595 1385 for ( Int i = 0; i < MAX_TLAYER; i++ ) … … 2055 1845 } 2056 1846 2057 #if H_MV2058 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 shortterm2079 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 #endif2144 1847 /** get scaling matrix from RefMatrixID 2145 1848 * \param sizeId size index … … 2364 2067 { 2365 2068 Int spsId = pps->getSPSId(); 2366 #if H_MV2367 // active parameter sets per layer should be used here2368 #else2369 2069 if (!isIRAP && (spsId != m_activeSPSId)) 2370 2070 { … … 2372 2072 return false; 2373 2073 } 2374 #endif2375 2074 TComSPS *sps = m_spsMap.getPS(spsId); 2376 2075 if (sps) … … 2427 2126 } 2428 2127 2429 #if H_MV2430 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 #endif2440 2128 #if SIGNAL_BITRATE_PICRATE_IN_VPS 2441 2129 TComBitRatePicRateInfo::TComBitRatePicRateInfo() -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TComSlice.h
r366 r367 51 51 class TComPic; 52 52 class TComTrQuant; 53 #if H_MV54 class TComPicLists;55 #endif56 53 // ==================================================================================================================== 57 54 // Constants … … 248 245 ProfileTierLevel* getGeneralPTL() { return &m_generalPTL; } 249 246 ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } 250 #if H_MV251 Void copyLevelFrom( TComPTL* source );252 #endif253 247 }; 254 248 /// VPS class … … 486 480 487 481 UInt m_numHrdParameters; 488 #if H_MV489 UInt m_maxNuhLayerId;490 #else491 482 UInt m_maxNuhReservedZeroLayerId; 492 #endif493 483 TComHRD* m_hrdParameters; 494 484 UInt* m_hrdOpSetIdx; 495 485 Bool* m_cprmsPresentFlag; 496 486 UInt m_numOpSets; 497 #if H_MV498 Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_LAYER_ID_PLUS1];499 #else500 487 Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; 501 #endif 502 503 #if H_MV 504 TComPTL m_pcPTL[MAX_VPS_OP_SETS_PLUS1]; 505 #else 488 506 489 TComPTL m_pcPTL; 507 #endif508 490 #if SIGNAL_BITRATE_PICRATE_IN_VPS 509 491 TComBitRatePicRateInfo m_bitRatePicRateInfo; … … 513 495 #endif 514 496 515 #if H_MV516 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 #endif537 497 public: 538 498 TComVPS(); … … 576 536 Void setNumHrdParameters(UInt v) { m_numHrdParameters = v; } 577 537 578 #if H_MV579 UInt getMaxNuhLayerId() { return m_maxNuhLayerId; }580 Void setMaxNuhLayerId(UInt v) { m_maxNuhLayerId = v; }581 #else582 538 UInt getMaxNuhReservedZeroLayerId() { return m_maxNuhReservedZeroLayerId; } 583 539 Void setMaxNuhReservedZeroLayerId(UInt v) { m_maxNuhReservedZeroLayerId = v; } 584 #endif585 540 586 541 UInt getMaxOpSets() { return m_numOpSets; } … … 589 544 Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } 590 545 591 #if H_MV592 TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; }593 #else594 546 TComPTL* getPTL() { return &m_pcPTL; } 595 #endif596 547 #if SIGNAL_BITRATE_PICRATE_IN_VPS 597 548 TComBitRatePicRateInfo *getBitratePicrateInfo() { return &m_bitRatePicRateInfo; } … … 599 550 #if L0043_TIMING_INFO 600 551 TimingInfo* getTimingInfo() { return &m_timingInfo; } 601 #endif602 #if H_MV603 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_3D637 Int getDepthId ( Int layerIdInVps ) { return getScalabilityId( layerIdInVps, DEPTH_ID ); }638 #endif639 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 );666 552 #endif 667 553 }; … … 967 853 static const Int m_winUnitY[MAX_CHROMA_FORMAT_IDC+1]; 968 854 TComPTL m_pcPTL; 969 #if H_MV970 Bool m_interViewMvVertConstraintFlag;971 #endif972 855 public: 973 856 TComSPS(); … … 1100 983 1101 984 TComPTL* getPTL() { return &m_pcPTL; } 1102 #if H_MV1103 Void setInterViewMvVertConstraintFlag(Bool val) { m_interViewMvVertConstraintFlag = val; }1104 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;}1105 #endif1106 985 }; 1107 986 … … 1130 1009 Void setRefPicSetIdxL1(UInt idx, UInt refPicSetIdx) { m_RefPicSetIdxL1[idx] = refPicSetIdx; } 1131 1010 UInt getRefPicSetIdxL1(UInt idx) { return m_RefPicSetIdxL1[idx]; } 1132 #if H_MV1133 // 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 #endif1137 1011 }; 1138 1012 … … 1389 1263 TComPic* m_apcRefPicList [2][MAX_NUM_REF+1]; 1390 1264 Int m_aiRefPOCList [2][MAX_NUM_REF+1]; 1391 #if H_MV1392 Int m_aiRefLayerIdList[2][MAX_NUM_REF+1];1393 #endif1394 1265 Bool m_bIsUsedAsLongTerm[2][MAX_NUM_REF+1]; 1395 1266 Int m_iDepth; … … 1457 1328 1458 1329 Bool m_enableTMVPFlag; 1459 #if H_MV1460 Int m_layerId;1461 Int m_viewId;1462 #if H_3D1463 Bool m_isDepth;1464 #endif1465 #endif1466 1330 public: 1467 1331 TComSlice(); … … 1570 1434 Void setDepth ( Int iDepth ) { m_iDepth = iDepth; } 1571 1435 1572 #if H_MV1573 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 #endif1576 #if H_MV1577 Void setRefPicList ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& interLayerRefPicSet , Bool checkNumPocTotalCurr = false );1578 #else1579 1436 #if FIX1071 1580 1437 Void setRefPicList ( TComList<TComPic*>& rcListPic, Bool checkNumPocTotalCurr = false ); 1581 1438 #else 1582 1439 Void setRefPicList ( TComList<TComPic*>& rcListPic ); 1583 #endif1584 1440 #endif 1585 1441 Void setRefPOCList (); … … 1629 1485 Void decodingMarking( TComList<TComPic*>& rcListPic, Int iGOPSIze, Int& iMaxRefPicNum ); 1630 1486 Void applyReferencePictureSet( TComList<TComPic*>& rcListPic, TComReferencePictureSet *RPSList); 1631 #if H_MV1632 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 #endif1639 1487 Bool isTemporalLayerSwitchingPoint( TComList<TComPic*>& rcListPic ); 1640 1488 Bool isStepwiseTemporalLayerSwitchingPointCandidate( TComList<TComPic*>& rcListPic ); … … 1712 1560 Bool getEnableTMVPFlag () { return m_enableTMVPFlag;} 1713 1561 1714 #if H_MV1715 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_3D1721 Void setIsDepth ( Bool isDepth ) { m_isDepth = isDepth; }1722 Bool getIsDepth () { return m_isDepth; }1723 #endif1724 #endif1725 1562 protected: 1726 1563 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, 1727 1564 Int poc); 1728 1565 TComPic* xGetLongTermRefPic(TComList<TComPic*>& rcListPic, Int poc, Bool pocHasMsb); 1729 #if H_MV1730 TComPic* xGetInterLayerRefPic( std::vector<TComPic*>& rcListIlPic, Int layerId );1731 #endif1732 1566 };// END CLASS DEFINITION TComSlice 1733 1567 -
branches/HTM-DEV-0.1-dev/source/Lib/TLibCommon/TypeDef.h
r364 r367 45 45 46 46 47 #if H_MV48 #define H_3D 049 #endif50 47 51 48 ///// ***** HM 10.1 ********* … … 91 88 #define MAX_VPS_NUM_HRD_PARAMETERS 1 92 89 #define MAX_VPS_OP_SETS_PLUS1 1024 93 #if H_MV94 #define MAX_VPS_NUH_LAYER_ID_PLUS1 6495 #define MAX_NUM_SCALABILITY_TYPES 1696 #define ENC_CFG_CONSOUT_SPACE 2997 #else98 90 #define MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1 1 99 #endif100 91 101 92 #define RATE_CONTROL_LAMBDA_DOMAIN 1 ///< JCTVC-K0103, rate control by R-lambda model … … 104 95 #define MAX_CPB_CNT 32 ///< Upper bound of (cpb_cnt_minus1 + 1) 105 96 #define MAX_NUM_LAYER_IDS 64 106 #if H_MV107 #define MAX_NUM_LAYERS 64108 #endif109 97 110 98 #define COEF_REMAIN_BIN_REDUCTION 3 ///< indicates the level at which the VLC … … 521 509 MAIN10 = 2, 522 510 MAINSTILLPICTURE = 3, 523 #if H_MV524 MAINSTEREO = 4,525 MAINMULTIVIEW = 5,526 #if H_3D527 MAIN3D = 6,528 #endif529 #endif530 511 }; 531 512 } … … 559 540 //! \} 560 541 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 542 #endif
Note: See TracChangeset for help on using the changeset viewer.