Changeset 941 in SHVCSoftware for branches/SHM-dev/source/App/TAppEncoder
- Timestamp:
- 30 Dec 2014, 18:47:09 (10 years ago)
- Location:
- branches/SHM-dev/source/App/TAppEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
r925 r941 608 608 string* cfg_outputLayerSetIdx = new string; 609 609 #endif 610 #if MULTIPLE_PTL_SUPPORT 611 string* cfg_listOfLayerPTLOfOlss = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; 612 #endif 610 613 #if AVC_BASE 611 614 string cfg_BLInputFile; … … 837 840 838 841 // Profile and level 842 #if !MULTIPLE_PTL_SUPPORT 839 843 ("Profile", m_profile, Profile::NONE, "Profile to be used when encoding (Incomplete)") 840 844 ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1 (Incomplete)") … … 845 849 ("NonPackedSource", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing") 846 850 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 851 #else 852 ("NumProfileTierLevel", m_numPTLInfo, 2, "Number of Profile, Tier and Level information") 853 ("Profile%d", m_profileList, Profile::NONE, NUM_POSSIBLE_LEVEL, "Profile to be used when encoding (Incomplete)") 854 ("Level%d", m_levelList, Level::NONE, NUM_POSSIBLE_LEVEL, "Level limit to be used, eg 5.1 (Incomplete)") 855 ("Tier%d", m_levelTierList, Level::MAIN, NUM_POSSIBLE_LEVEL, "Tier to use for interpretation of --Level") 856 857 ("ProgressiveSource%d", m_progressiveSourceFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source is progressive") 858 ("InterlacedSource%d", m_interlacedSourceFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source is interlaced") 859 ("NonPackedSource%d", m_nonPackedConstraintFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that source does not contain frame packing") 860 ("FrameOnly%d", m_frameOnlyConstraintFlagList, false, MAX_VPS_LAYER_ID_PLUS1, "Indicate that the bitstream contains only frames") 861 862 ("LayerPTLIndex%d", m_layerPTLIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer") 863 ("ListOfProfileTierLevelOls%d", cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_LAYER_ID_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1") 864 #endif 847 865 848 866 #if LAYER_CTB … … 1922 1940 // Layers in the output layer set 1923 1941 m_listOfOutputLayers.resize(m_numOutputLayerSets); 1942 1943 #if MULTIPLE_PTL_SUPPORT 1944 m_listOfLayerPTLofOlss.resize(m_numOutputLayerSets); 1945 #endif 1946 1924 1947 Int startOlsCtr = 1; 1925 1948 if( m_defaultTargetOutputLayerIdc == 0 || m_defaultTargetOutputLayerIdc == 1 ) … … 1941 1964 assert( scanStringToArray( cfg_listOfOutputLayers[olsCtr], m_numLayersInOutputLayerSet[olsCtr], "ListOfOutputLayers", m_listOfOutputLayers[olsCtr] ) ); 1942 1965 } 1943 } 1966 #if MULTIPLE_PTL_SUPPORT 1967 if (olsCtr > m_numLayerSets) 1968 { 1969 scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[m_outputLayerSetIdx[olsCtr - m_numLayerSets]], "ListOfOutputLayers", m_listOfLayerPTLofOlss[olsCtr] ); 1970 } 1971 else 1972 { 1973 scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsCtr], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] ); 1974 } 1975 #endif 1976 } 1977 #if MULTIPLE_PTL_SUPPORT 1978 m_listOfLayerPTLofOlss[0].push_back(m_layerPTLIdx[0]); 1979 delete [] cfg_listOfLayerPTLOfOlss; 1980 #endif 1944 1981 delete cfg_numLayersInOutputLayerSet; 1945 1982 delete [] cfg_listOfOutputLayers; … … 2503 2540 fprintf(stderr, "******************************************************************\n"); 2504 2541 } 2542 2543 #if !MULTIPLE_PTL_SUPPORT 2505 2544 if( m_profile==Profile::NONE ) 2506 2545 { … … 2515 2554 fprintf(stderr, "***************************************************************************\n"); 2516 2555 } 2556 #else 2557 int ii = 0; 2558 while ( ii < m_numPTLInfo ) 2559 { 2560 if( m_profileList[ii] == Profile::NONE ) 2561 { 2562 fprintf(stderr, "***************************************************************************\n"); 2563 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n"); 2564 fprintf(stderr, "***************************************************************************\n"); 2565 } 2566 if( m_levelList[ii] == Level::NONE ) 2567 { 2568 fprintf(stderr, "***************************************************************************\n"); 2569 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set! **\n"); 2570 fprintf(stderr, "***************************************************************************\n"); 2571 } 2572 ii++; 2573 } 2574 #endif 2517 2575 2518 2576 Bool check_failed = false; /* abort if there is a fatal configuration problem */ -
branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
r912 r941 120 120 121 121 // profile/level 122 #if !MULTIPLE_PTL_SUPPORT 122 123 Profile::Name m_profile; 123 124 Level::Tier m_levelTier; … … 127 128 Bool m_nonPackedConstraintFlag; 128 129 Bool m_frameOnlyConstraintFlag; 129 130 #else 131 Int m_numPTLInfo; 132 Int m_layerPTLIdx[MAX_VPS_LAYER_ID_PLUS1]; ///< scalability_mask 133 Profile::Name m_profileList[NUM_POSSIBLE_LEVEL]; 134 Level::Tier m_levelTierList[NUM_POSSIBLE_LEVEL]; 135 Level::Name m_levelList[NUM_POSSIBLE_LEVEL]; 136 Bool m_progressiveSourceFlagList[NUM_POSSIBLE_LEVEL]; 137 Bool m_interlacedSourceFlagList[NUM_POSSIBLE_LEVEL]; 138 Bool m_nonPackedConstraintFlagList[NUM_POSSIBLE_LEVEL]; 139 Bool m_frameOnlyConstraintFlagList[NUM_POSSIBLE_LEVEL]; 140 141 std::vector< std::vector<Int> > m_listOfLayerPTLofOlss; 142 #endif 130 143 // coding structure 131 144 #if !SVC_EXTENSION -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r924 r941 200 200 #endif 201 201 202 #if MULTIPLE_PTL_SUPPORT 203 //Populate PTL in VPS 204 TComVPS *pVPS = m_acTEncTop[0].getVPS(); 205 ProfileTierLevel& profileTierLevel = *(pVPS->getPTL(0)->getGeneralPTL()); 206 for (int ii = 0; ii < m_numPTLInfo; ii++) 207 { 208 profileTierLevel = *(pVPS->getPTL(ii)->getGeneralPTL()); 209 210 profileTierLevel.setLevelIdc(m_levelList[ii]); 211 profileTierLevel.setTierFlag(m_levelTierList[ii]); 212 profileTierLevel.setProfileIdc(m_profileList[ii]); 213 profileTierLevel.setProfileCompatibilityFlag(m_profileList[ii], 1); 214 profileTierLevel.setProgressiveSourceFlag(m_progressiveSourceFlagList[ii]); 215 profileTierLevel.setInterlacedSourceFlag(m_interlacedSourceFlagList[ii]); 216 profileTierLevel.setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[ii]); 217 profileTierLevel.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[ii]); 218 } 219 pVPS->setNumProfileTierLevel(m_numPTLInfo); 220 221 std::vector<int> myvector; 222 vps->getProfileLevelTierIdx()->resize(m_numOutputLayerSets); 223 for (int ii = 0; ii < m_numOutputLayerSets; ii++) 224 { 225 myvector = m_listOfLayerPTLofOlss[ii]; 226 vps->getProfileLevelTierIdx()->resize(myvector.size()); 227 for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it) 228 { 229 pVPS->addProfileLevelTierIdx(ii, it[0]); 230 } 231 } 232 233 //pVPS->setProfileLevelTierIdx( 234 #endif 235 202 236 assert( m_numLayers <= MAX_LAYERS ); 203 237 … … 228 262 m_acTEncTop[layer].setFramesToBeEncoded ( m_framesToBeEncoded ); 229 263 264 #if !MULTIPLE_PTL_SUPPORT 230 265 m_acTEncTop[layer].setProfile(m_profile); 231 266 m_acTEncTop[layer].setLevel(m_levelTier, m_level); … … 234 269 m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlag); 235 270 m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlag); 271 #else 272 m_acTEncTop[layer].setProfile(m_profileList[m_layerPTLIdx[layer]]); 273 m_acTEncTop[layer].setLevel(m_levelTierList[m_layerPTLIdx[layer]], m_levelList[m_layerPTLIdx[layer]]); 274 m_acTEncTop[layer].setProgressiveSourceFlag(m_progressiveSourceFlagList[m_layerPTLIdx[layer]]); 275 m_acTEncTop[layer].setInterlacedSourceFlag(m_interlacedSourceFlagList[m_layerPTLIdx[layer]]); 276 m_acTEncTop[layer].setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[m_layerPTLIdx[layer]]); 277 m_acTEncTop[layer].setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[m_layerPTLIdx[layer]]); 278 #endif 236 279 237 280 #if REF_IDX_MFM … … 1385 1428 vps->setIlpSshSignalingEnabledFlag(false); 1386 1429 #if VPS_EXTN_PROFILE_INFO 1387 1430 #if !MULTIPLE_PTL_SUPPORT 1388 1431 #if LIST_OF_PTL 1389 1432 vps->getPTLForExtnPtr()->resize(1); // Dummy object - unused. … … 1414 1457 *(vps->getPTLForExtn(setId)) = *(m_acTEncTop[setId].getSPS()->getPTL()); 1415 1458 } 1459 #endif 1416 1460 #endif 1417 1461 #endif … … 1524 1568 #endif 1525 1569 // Target output layer 1570 #if !MULTIPLE_PTL_SUPPORT 1526 1571 #if LIST_OF_PTL 1527 1572 vps->setNumProfileTierLevel( vps->getPTLForExtnPtr()->size() ); // +1 for the base VPS PTL() … … 1529 1574 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 1530 1575 vps->setNumProfileTierLevel(vps->getNumLayerSets()); 1576 #endif 1531 1577 #endif 1532 1578 #if !OUTPUT_LAYER_SETS_CONFIG // Taken care by configuration file parameter … … 1619 1665 vps->checkNecessaryLayerFlagCondition(); 1620 1666 #endif 1667 #if !MULTIPLE_PTL_SUPPORT 1621 1668 #if PER_LAYER_PTL 1622 1669 vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets()); … … 1639 1686 } 1640 1687 } 1688 #endif 1641 1689 #endif 1642 1690 #if SUB_LAYERS_IN_LAYER_SET
Note: See TracChangeset for help on using the changeset viewer.