Changeset 1182 in SHVCSoftware for branches/SHM-dev/source/App
- Timestamp:
- 8 Jul 2015, 03:09:51 (10 years ago)
- Location:
- branches/SHM-dev/source/App/TAppEncoder
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r1172 r1182 65 65 MAINREXT = 4, 66 66 HIGHTHROUGHPUTREXT = 5, // Placeholder profile for development 67 #if MULTIPLE_PTL_SUPPORT67 #if SVC_EXTENSION 68 68 MULTIVIEWMAIN = 6, 69 69 SCALABLEMAIN = 7, … … 307 307 {"main-RExt", Profile::MAINREXT }, 308 308 {"high-throughput-RExt", Profile::HIGHTHROUGHPUTREXT }, 309 #if MULTIPLE_PTL_SUPPORT309 #if SVC_EXTENSION 310 310 {"multiview-main", Profile::MULTIVIEWMAIN }, //This is not used in this software 311 311 {"scalable-main", Profile::SCALABLEMAIN }, … … 346 346 {"main_444_12_intra", MAIN_444_12_INTRA}, 347 347 {"main_444_16_intra", MAIN_444_16_INTRA}, 348 #if MULTIPLE_PTL_SUPPORT348 #if SVC_EXTENSION 349 349 {"multiview-main", MULTIVIEWMAIN }, 350 350 {"scalable-main", SCALABLEMAIN }, … … 495 495 } 496 496 497 #if MULTIPLE_PTL_SUPPORT497 #if SVC_EXTENSION 498 498 namespace Profile 499 499 { … … 835 835 Int* cfg_layerSwitchOffEnd[MAX_LAYERS]; 836 836 837 #if MULTIPLE_PTL_SUPPORT838 837 Bool tmpIntraConstraintFlag; 839 838 Bool tmpLowerBitRateConstraintFlag; 840 839 UInt tmpBitDepthConstraint; 841 840 Int* cfg_layerPTLIdx[MAX_VPS_LAYER_IDX_PLUS1]; 842 #endif 843 844 for(UInt layer = 0; layer < MAX_LAYERS; layer++) 841 842 for( UInt layer = 0; layer < MAX_LAYERS; layer++ ) 845 843 { 846 844 cfg_InputFile[layer] = &m_acLayerCfg[layer].m_cInputFile; … … 931 929 cfg_layerSwitchOffBegin[layer] = &m_acLayerCfg[layer].m_layerSwitchOffBegin; 932 930 cfg_layerSwitchOffEnd[layer] = &m_acLayerCfg[layer].m_layerSwitchOffEnd; 933 #if MULTIPLE_PTL_SUPPORT934 931 cfg_layerPTLIdx[layer] = &m_acLayerCfg[layer].m_layerPTLIdx; 935 #endif936 932 } 937 933 … … 954 950 string* cfg_listOfOutputLayers = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; 955 951 string* cfg_outputLayerSetIdx = new string; 956 #if MULTIPLE_PTL_SUPPORT957 952 string* cfg_listOfLayerPTLOfOlss = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; 958 #endif959 953 #if AVC_BASE 960 954 string cfg_BLInputFile; … … 978 972 Int tmpConstraintChromaFormat; 979 973 string inputColourSpaceConvert; 980 #if MULTIPLE_PTL_SUPPORT974 #if SVC_EXTENSION 981 975 ExtendedProfileName extendedProfile[MAX_NUM_LAYER_IDS + 1]; 982 976 #else … … 1207 1201 1208 1202 // Profile and level 1209 #if MULTIPLE_PTL_SUPPORT1203 #if SVC_EXTENSION 1210 1204 ("NumProfileTierLevel", m_numPTLInfo, 1, "Number of Profile, Tier and Level information") 1211 1205 ("Profile%d", extendedProfile, NONE, (MAX_NUM_LAYER_IDS + 1), "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none") … … 1876 1870 1877 1871 #if SVC_EXTENSION 1878 for (Int layer = 0; layer < MAX_LAYERS; layer++)1879 { 1880 if (m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd)1881 { 1882 if (m_iGOPSize > 0 && (m_acLayerCfg[layer].m_layerSwitchOffBegin % m_iGOPSize) != 0)1872 for( Int layer = 0; layer < MAX_LAYERS; layer++) 1873 { 1874 if( m_acLayerCfg[layer].m_layerSwitchOffBegin < m_acLayerCfg[layer].m_layerSwitchOffEnd ) 1875 { 1876 if( m_iGOPSize > 0 && (m_acLayerCfg[layer].m_layerSwitchOffBegin % m_iGOPSize) != 0 ) 1883 1877 { 1884 1878 printf("LayerSwitchOffBegin%d: Must be multiple of GOP size.\n", layer); 1885 1879 exit(EXIT_FAILURE); 1886 1880 } 1887 if (m_acLayerCfg[layer].m_iIntraPeriod > 0 && (m_acLayerCfg[layer].m_layerSwitchOffEnd % m_acLayerCfg[layer].m_iIntraPeriod) != 0)1881 if( m_acLayerCfg[layer].m_iIntraPeriod > 0 && (m_acLayerCfg[layer].m_layerSwitchOffEnd % m_acLayerCfg[layer].m_iIntraPeriod) != 0 ) 1888 1882 { 1889 1883 printf("LayerSwitchOffEnd%d: Must be IRAP picture.\n", layer); … … 1891 1885 } 1892 1886 } 1893 } 1894 #endif 1895 1896 #if MULTIPLE_PTL_SUPPORT 1897 for( Int layer = 0; layer < MAX_LAYERS; layer++ ) 1898 { 1887 1899 1888 m_acLayerCfg[layer].m_bitDepthConstraint = tmpBitDepthConstraint; 1900 1889 m_acLayerCfg[layer].m_intraConstraintFlag = tmpIntraConstraintFlag; … … 2006 1995 } 2007 1996 2008 #if SVC_EXTENSION2009 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC;2010 #endif2011 2012 1997 if (m_profile == Profile::HIGHTHROUGHPUTREXT ) 2013 1998 { … … 2019 2004 if (m_bitDepthConstraint == 0 && tmpConstraintChromaFormat == 0) 2020 2005 { 2021 #if SVC_EXTENSION2022 Bool m_useExtendedPrecision = m_acLayerCfg[0].m_useExtendedPrecision;2023 Int m_internalBitDepth[] = {m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_CHROMA]};2024 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC;2025 #endif2026 2006 // produce a valid combination, if possible. 2027 2007 const Bool bUsingGeneralRExtTools = m_useResidualRotation || … … 2066 2046 for(Int layer = 0; layer < MAX_LAYERS; layer++) 2067 2047 { 2068 #if !MULTIPLE_PTL_SUPPORT2069 m_acLayerCfg[layer].m_chromaFormatConstraint = m_chromaFormatConstraint;2070 m_acLayerCfg[layer].m_bitDepthConstraint = m_bitDepthConstraint;2071 #endif2072 2073 2048 // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified 2074 2049 if(m_acLayerCfg[layer].m_numRefLayerLocationOffsets) … … 2464 2439 scanStringToArray( *cfg_numOutputLayersInOutputLayerSet, m_numOutputLayerSets - 1, "NumOutputLayersInOutputLayerSets", m_numOutputLayersInOutputLayerSet ); 2465 2440 m_numOutputLayersInOutputLayerSet.insert(m_numOutputLayersInOutputLayerSet.begin(), 1); 2441 2466 2442 // Layers in the output layer set 2467 2443 m_listOfOutputLayers.resize(m_numOutputLayerSets); 2468 2469 #if MULTIPLE_PTL_SUPPORT2470 2444 m_listOfLayerPTLofOlss.resize(m_numOutputLayerSets); 2471 #endif2472 2445 2473 2446 Int startOlsCtr = 1; … … 2477 2450 startOlsCtr = m_numLayerSets; 2478 2451 } 2452 2479 2453 for( Int olsCtr = 1; olsCtr < m_numOutputLayerSets; olsCtr++ ) 2480 2454 { … … 2490 2464 assert( scanStringToArray( cfg_listOfOutputLayers[olsCtr], m_numOutputLayersInOutputLayerSet[olsCtr], "ListOfOutputLayers", m_listOfOutputLayers[olsCtr] ) ); 2491 2465 } 2492 #if MULTIPLE_PTL_SUPPORT 2466 2493 2467 Int olsToLsIndex = (olsCtr >= (m_numLayerSets + m_numAddLayerSets)) ? m_outputLayerSetIdx[olsCtr - (m_numLayerSets + m_numAddLayerSets)] : olsCtr; 2494 2468 2495 2469 // This is a fix to allow setting of PTL for additional layer sets 2496 if (olsCtr >= m_numLayerSets && olsCtr < (m_numLayerSets + m_numAddLayerSets))2470 if( olsCtr >= m_numLayerSets && olsCtr < (m_numLayerSets + m_numAddLayerSets) ) 2497 2471 { 2498 2472 scanStringToArrayNumEntries(cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsToLsIndex], "List of PTL for each layers in OLS", m_listOfLayerPTLofOlss[olsCtr]); … … 2521 2495 } 2522 2496 } 2523 #endif 2524 } 2525 #if MULTIPLE_PTL_SUPPORT 2497 } 2498 2526 2499 m_listOfLayerPTLofOlss[0].push_back(*cfg_layerPTLIdx[0]); 2527 2500 delete [] cfg_listOfLayerPTLOfOlss; 2528 #endif2529 2501 delete cfg_numOutputLayersInOutputLayerSet; 2530 2502 delete [] cfg_listOfOutputLayers; … … 2905 2877 m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerIdx].m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]; 2906 2878 2907 #if MULTIPLE_PTL_SUPPORT2908 2879 Int layerPTLIdx = m_acLayerCfg[layerIdx].m_layerPTLIdx; 2909 2880 Profile::Name m_profile = m_profileList[layerPTLIdx]; … … 2911 2882 Bool m_intraConstraintFlag = m_acLayerCfg[layerIdx].m_intraConstraintFlag; 2912 2883 Bool m_lowerBitRateConstraintFlag = m_acLayerCfg[layerIdx].m_lowerBitRateConstraintFlag; 2913 #endif2914 2884 #else 2915 2885 Void TAppEncCfg::xCheckParameter() … … 2925 2895 fprintf(stderr, "******************************************************************\n"); 2926 2896 } 2927 #if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT2897 #if SVC_EXTENSION 2928 2898 Int ii = 0; 2929 2899 while( ii < m_numPTLInfo ) … … 3019 2989 else 3020 2990 { 3021 #if MULTIPLE_PTL_SUPPORT2991 #if SVC_EXTENSION 3022 2992 xConfirmPara(m_bitDepthConstraint!=((m_profile==Profile::MAIN10 || m_profile==Profile::SCALABLEMAIN10)?10:8), "BitDepthConstraint must be 8 for MAIN profile and 10 for MAIN10 or Scalable-main10 profile."); 3023 2993 #else … … 4434 4404 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 4435 4405 } 4436 #if ! MULTIPLE_PTL_SUPPORT4406 #if !SVC_EXTENSION 4437 4407 if (m_profile == Profile::MAINREXT) 4438 4408 { -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r1172 r1182 124 124 Bool m_cabacZeroWordPaddingEnabled; 125 125 126 #if MULTIPLE_PTL_SUPPORT126 #if SVC_EXTENSION 127 127 Int m_numPTLInfo; 128 128 Profile::Name m_profileList[MAX_NUM_LAYER_IDS + 1]; -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r1147 r1182 220 220 #endif 221 221 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 222 #if MULTIPLE_PTL_SUPPORT223 222 printf("PTL index : %d\n", m_layerPTLIdx ); 224 #endif225 223 #if O0194_DIFFERENT_BITDEPTH_EL_BL 226 224 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
r1149 r1182 147 147 Int m_layerSwitchOffEnd; 148 148 149 #if MULTIPLE_PTL_SUPPORT150 149 // profile/level 151 150 Int m_layerPTLIdx; 152 #endif153 151 154 152 public: -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1173 r1182 193 193 #endif 194 194 195 #if MULTIPLE_PTL_SUPPORT196 195 //Populate PTL in VPS 197 196 TComVPS *pVPS = m_acTEncTop[0].getVPS(); … … 209 208 pVPS->setNumProfileTierLevel(m_numPTLInfo); 210 209 211 std::vector< int> myvector;210 std::vector<Int> myvector; 212 211 vps->getProfileLevelTierIdx()->resize(m_numOutputLayerSets); 213 for (int ii = 0; ii < m_numOutputLayerSets; ii++)212 for( Int ii = 0; ii < m_numOutputLayerSets; ii++ ) 214 213 { 215 214 myvector = m_listOfLayerPTLofOlss[ii]; 216 215 217 for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it)216 for( std::vector<Int>::iterator it = myvector.begin() ; it != myvector.end(); ++it ) 218 217 { 219 218 pVPS->addProfileLevelTierIdx(ii, it[0]); 220 219 } 221 220 } 222 #endif223 221 224 222 assert( m_numLayers <= MAX_LAYERS ); … … 243 241 #endif 244 242 245 #if MULTIPLE_PTL_SUPPORT246 243 Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx; 247 244 m_acTEncTop[layer].setProfile ( m_profileList[layerPTLIdx] ); … … 255 252 m_acTEncTop[layer].setIntraConstraintFlag ( m_acLayerCfg[layer].m_intraConstraintFlag ); 256 253 m_acTEncTop[layer].setLowerBitRateConstraintFlag ( m_acLayerCfg[layer].m_lowerBitRateConstraintFlag ); 257 #else258 m_acTEncTop[layer].setProfile ( m_profile );259 m_acTEncTop[layer].setLevel ( m_levelTier, m_level );260 m_acTEncTop[layer].setProgressiveSourceFlag ( m_progressiveSourceFlag );261 m_acTEncTop[layer].setInterlacedSourceFlag ( m_interlacedSourceFlag );262 m_acTEncTop[layer].setNonPackedConstraintFlag ( m_nonPackedConstraintFlag );263 m_acTEncTop[layer].setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlag );264 m_acTEncTop[layer].setBitDepthConstraintValue ( m_bitDepthConstraint );265 m_acTEncTop[layer].setChromaFormatConstraintValue ( m_acLayerCfg[layer].m_chromaFormatConstraint );266 m_acTEncTop[layer].setIntraConstraintFlag ( m_intraConstraintFlag );267 m_acTEncTop[layer].setLowerBitRateConstraintFlag ( m_lowerBitRateConstraintFlag );268 #endif269 254 270 255 m_acTEncTop[layer].setPrintMSEBasedSequencePSNR ( m_printMSEBasedSequencePSNR); … … 1555 1540 vps->deriveNecessaryLayerFlag(); 1556 1541 vps->checkNecessaryLayerFlagCondition(); 1557 1558 #if !MULTIPLE_PTL_SUPPORT1559 vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets());1560 vps->getProfileLevelTierIdx(0)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? 1 : 0 ); // Default 0-th output layer set1561 for(i = 1; i < vps->getNumOutputLayerSets(); i++)1562 {1563 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx( i );1564 Int numLayerInLayerSet = vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet );1565 for(Int j = 0; j < numLayerInLayerSet; j++)1566 {1567 Int layerIdxInVps = vps->getLayerIdxInVps( vps->getLayerSetLayerIdList(layerSetIdxForOutputLayerSet, j) );1568 if( vps->getNecessaryLayerFlag(i, j) )1569 {1570 vps->getProfileLevelTierIdx(i)->push_back( vps->getBaseLayerInternalFlag() && vps->getMaxLayers() > 1 ? layerIdxInVps + 1 : layerIdxInVps);1571 }1572 else1573 {1574 vps->getProfileLevelTierIdx(i)->push_back( -1 );1575 }1576 }1577 }1578 #endif1579 1580 1542 vps->calculateMaxSLInLayerSets(); 1581 1543 1582 1544 // Initialize dpb_size_table() for all ouput layer sets in the VPS extension 1583 for( i = 1; i < vps->getNumOutputLayerSets(); i++)1545 for( i = 1; i < vps->getNumOutputLayerSets(); i++ ) 1584 1546 { 1585 1547 Int layerSetIdxForOutputLayerSet = vps->getOutputLayerSetIdx( i ); … … 1601 1563 } 1602 1564 #endif 1565 1603 1566 vps->setMaxOneActiveRefLayerFlag(maxDirectRefLayers > 1 ? false : true); 1604 1567 #if O0062_POC_LSB_NOT_PRESENT_FLAG
Note: See TracChangeset for help on using the changeset viewer.