Changeset 1066 in 3DVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 13 Oct 2014, 12:19:36 (10 years ago)
- Location:
- trunk/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r1039 r1066 241 241 {"main-still-picture", Profile::MAINSTILLPICTURE}, 242 242 #if H_MV 243 #if H_MV_HLS10_PTL 244 {"multiview-main", Profile::MULTIVIEWMAIN}, 245 #if H_3D 246 {"3d-main" , Profile::MAIN3D}, 247 #endif 248 249 #else 243 250 {"main-stereo", Profile::MAINSTEREO}, 244 251 {"main-multiview", Profile::MAINMULTIVIEW}, 245 252 #if H_3D 246 253 {"main-3d" , Profile::MAIN3D}, 254 #endif 247 255 #endif 248 256 #endif … … 333 341 #if H_MV 334 342 vector<Int> cfg_dimensionLength; 343 #if H_MV_HLS10_PTL 344 string cfg_profiles; 345 string cfg_levels; 346 string cfg_tiers; 347 #endif 335 348 #if H_3D 336 349 cfg_dimensionLength.push_back( 2 ); // depth … … 367 380 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 368 381 #if !H_3D 382 #if H_MV_HLS10_AUX 383 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary") 384 #else 369 385 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask") 386 #endif 370 387 #else 371 388 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ") … … 374 391 ("ViewOrderIndex", m_viewOrderIndex , std::vector<Int>(1,0), "View Order Index per layer") 375 392 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id per View Order Index") 393 #if H_MV_HLS10_AUX 394 ("AuxId", m_auxId , std::vector<Int>(1,0), "AuxId per layer") 395 #endif 376 396 #if H_3D 377 397 ("DepthFlag", m_depthFlag , std::vector<Int>(1,0), "Depth Flag") … … 388 408 #endif 389 409 #endif 390 ("LayerIdInNuh", m_layerIdInNuh , std::vector<Int>(1,0), "LayerId in Nuh") 410 #if H_MV_HLS10_GEN_FIX 411 ("TargetEncLayerIdList", m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded") 412 #endif 413 ("LayerIdInNuh", m_layerIdInNuh , std::vector<Int>(1,0), "LayerId in Nuh") 391 414 ("SplittingFlag", m_splittingFlag , false , "Splitting Flag") 392 415 … … 394 417 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 395 418 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 419 #if H_MV_HLS10_ADD_LAYERSETS 420 ("NumAddLayerSets" , m_numAddLayerSets , 0 , "NumAddLayerSets ") 421 ("HighestLayerIdxPlus1_%d", m_highestLayerIdxPlus1, std::vector< Int >(0,0) ,MAX_VPS_NUM_ADD_LAYER_SETS, "HighestLayerIdxPlus1") 422 #endif 396 423 ("DefaultTargetOutputLayerIdc" , m_defaultOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 397 424 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") … … 400 427 ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set") 401 428 ("AltOutputLayerFlag", m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag") 429 430 #if H_MV_HLS10_PTL 431 ("ProfileTierLevelIdx_%d", m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols") 432 #else 402 433 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier") 403 434 #endif 404 435 // Layer dependencies 405 436 ("DirectRefLayers_%d", m_directRefLayers , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers") … … 431 462 432 463 // Profile and level 464 #if H_MV_HLS10_PTL 465 ("Profile", cfg_profiles, string(""), "Profile in VpsProfileTierLevel (Indication only)") 466 ("Level", cfg_levels , string(""), "Level indication in VpsProfileTierLevel (Indication only)") 467 ("Tier", cfg_tiers , string(""), "Tier indication in VpsProfileTierLevel (Indication only)") 468 ("InblFlag",m_inblFlag , std::vector<Bool>(0), "InblFlags in VpsProfileTierLevel (Indication only)" ) 469 #else 433 470 ("Profile", m_profile, Profile::NONE, "Profile to be used when encoding (Incomplete)") 434 471 ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1 (Incomplete)") 435 472 ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level") 436 473 #endif 437 474 ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive") 438 475 ("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced") … … 613 650 #endif 614 651 #if H_MV 615 652 #if H_MV_HLS10_GEN_FIX 653 // A lot of this stuff could should actually be derived by the encoder. 654 #endif // H_MV_HLS10_GEN 616 655 // VPS VUI 617 656 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") … … 637 676 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer") 638 677 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int >(1,0) ,MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer") 678 #if H_MV_HLS10_VPS_VUI 679 ("SingleLayerForNonIrapFlag", m_singleLayerForNonIrapFlag, false , "SingleLayerForNonIrapFlag") 680 ("HigherLayerIrapSkipFlag" , m_higherLayerIrapSkipFlag , false , "HigherLayerIrapSkipFlag ") 681 #endif 639 682 #endif 640 683 … … 742 785 ("SEISubBitstreamAvgBitRate", m_sbPropAvgBitRate, std::vector< Int >(1,0) ,"Specifies average bit rate of the i-th sub-bitstream") 743 786 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 787 788 #if H_MV_HLS10_GEN_FIX 789 ("OutputVpsInfo", m_outputVpsInfo, false ,"Output information about the layer dependencies and layer sets") 790 #endif 744 791 #endif 745 792 #if H_3D … … 792 839 #endif //H_3D 793 840 ; 794 #if H_MV 841 842 #if H_MV 795 843 // parse coding structure 796 844 for( Int k = 0; k < MAX_NUM_LAYERS; k++ ) … … 1034 1082 } 1035 1083 m_iNumberOfViews = (Int) uniqueViewOrderIndices.size(); 1084 #if H_MV_HLS10_AUX 1085 xResizeVector( m_auxId ); 1086 #endif 1036 1087 1037 1088 #if H_3D … … 1067 1118 xResizeVector( m_wppInUseFlag ); 1068 1119 1120 #if H_MV_HLS10_ADD_LAYERSETS 1121 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + m_numAddLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++) 1122 #else 1069 1123 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++) 1124 #endif 1070 1125 { 1071 1126 m_altOutputLayerFlag.push_back( false ); … … 1177 1232 } 1178 1233 } 1234 1235 #if H_MV 1236 #if H_MV_HLS10_PTL 1237 // parse PTL 1238 Bool anyEmpty = false; 1239 if( cfg_profiles.empty() ) 1240 { 1241 #if H_3D 1242 cfg_profiles = string("main main 3d-main"); 1243 #else 1244 cfg_profiles = string("main main multiview-main"); 1245 #endif 1246 fprintf(stderr, "\nWarning: No profiles given, using defaults: %s", cfg_profiles.c_str() ); 1247 anyEmpty = true; 1248 } 1249 1250 if( cfg_levels.empty() ) 1251 { 1252 cfg_levels = string("none none none"); 1253 fprintf(stderr, "\nWarning: No levels given, using defaults: %s", cfg_levels.c_str() ); 1254 anyEmpty = true; 1255 } 1256 1257 if( cfg_tiers.empty() ) 1258 { 1259 cfg_tiers = string("main main main"); 1260 fprintf(stderr, "\nWarning: No tiers given, using defaults: %s", cfg_tiers.c_str()); 1261 anyEmpty = true; 1262 } 1263 1264 if( m_inblFlag.empty() ) 1265 { 1266 fprintf(stderr, "\nWarning: No inblFlags given, using defaults:"); 1267 for( Int i = 0; i < 3; i++) 1268 { 1269 m_inblFlag.push_back( false ); 1270 fprintf(stderr," %d", (Int) m_inblFlag[i]); 1271 } 1272 anyEmpty = true; 1273 } 1274 1275 if ( anyEmpty ) 1276 { 1277 fprintf( stderr, "\n" ); 1278 } 1279 1280 xReadStrToEnum( cfg_profiles, m_profile ); 1281 xReadStrToEnum( cfg_levels, m_level ); 1282 xReadStrToEnum( cfg_tiers , m_levelTier ); 1283 #endif 1284 #endif 1179 1285 #if H_3D 1180 1286 // set global varibles … … 1291 1397 fprintf(stderr, "******************************************************************\n"); 1292 1398 } 1399 1400 1401 #if !H_MV_HLS10_PTL 1293 1402 if( m_profile==Profile::NONE ) 1294 1403 { … … 1303 1412 fprintf(stderr, "***************************************************************************\n"); 1304 1413 } 1414 #endif 1305 1415 1306 1416 Bool check_failed = false; /* abort if there is a fatal configuration problem */ … … 1321 1431 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. "); 1322 1432 #else 1433 #if H_MV_HLS10_AUX 1434 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 8 && m_scalabilityMask != 10, "Scalability Mask must be equal to 2, 8 or 10"); 1435 #else 1323 1436 xConfirmPara( m_scalabilityMask != 2 , "Scalability Mask must be equal to 2. "); 1437 #endif 1324 1438 #endif 1325 1439 … … 1332 1446 1333 1447 m_dimIds.push_back( m_viewOrderIndex ); 1334 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; 1448 #if H_MV_HLS10_AUX 1449 for (Int i = 0; i < m_auxId.size(); i++) 1450 { 1451 xConfirmPara( !( ( m_auxId[i] >= 0 && m_auxId[i] <= 2 ) || ( m_auxId[i] >= 128 && m_auxId[i] <= 159 ) ) , "AuxId shall be in the range of 0 to 2, inclusive, or 128 to 159, inclusive"); 1452 } 1453 if ( m_scalabilityMask & ( 1 << AUX_ID ) ) 1454 { 1455 m_dimIds.push_back ( m_auxId ); 1456 } 1457 #endif 1458 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); 1459 Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; 1335 1460 1336 1461 dimBitOffset[ 0 ] = 0; … … 1428 1553 { 1429 1554 Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ]; 1555 #if H_MV_HLS10_ADD_LAYERSETS 1556 xConfirmPara( refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets + m_numAddLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets plus NumAddLayerSets." ); 1557 #else 1430 1558 xConfirmPara( refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets." ); 1431 1559 #endif 1560 #if !H_MV_HLS10_ADD_LAYERSETS 1432 1561 for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++) 1433 1562 { … … 1443 1572 xConfirmPara( !isAlsoInLayerSet, "All output layers of a output layer set be included in corresponding layer set."); 1444 1573 } 1574 #endif 1445 1575 } 1446 1576 … … 1454 1584 anyDefaultOutputFlag = anyDefaultOutputFlag || ( m_layerIdsInDefOutputLayerSet[lsIdx].size() != 0 ); 1455 1585 } 1586 #if H_MV_HLS10_ADD_LAYERSETS 1587 if ( anyDefaultOutputFlag ) 1588 { 1589 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" ); 1590 } 1591 #else 1456 1592 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" ); 1593 #endif 1457 1594 } 1458 1595 else … … 1476 1613 } 1477 1614 1615 #if H_MV_HLS10_ADD_LAYERSETS 1616 xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_numAddLayerSets + m_outputLayerSetIdx.size(), "The number of alt output layer flags must be equal to the number of layer set additional output layer sets plus the number of output layer set indices" ); 1617 #else 1478 1618 xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1479 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1480 1481 // Layer Dependencies 1619 #endif 1620 1621 // PTL 1622 #if H_MV_HLS10_PTL 1623 xConfirmPara( ( m_profile.size() != m_inblFlag.size() || m_profile.size() != m_level.size() || m_profile.size() != m_levelTier.size() ), "The number of Profiles, Levels, Tiers and InblFlags must be equal." ); 1624 1625 if ( m_numberOfLayers > 1) 1626 { 1627 xConfirmPara( m_profile.size() <= 1, "The number of profiles, tiers, levels, and inblFlags must be greater than 1."); 1628 xConfirmPara( m_inblFlag[0], "VpsProfileTierLevel[0] must have inblFlag equal to 0"); 1629 if (m_profile.size() > 1 ) 1630 { 1631 xConfirmPara( m_profile[0] != m_profile[1], "The profile in VpsProfileTierLevel[1] must be equal to the profile in VpsProfileTierLevel[0]."); 1632 xConfirmPara( m_inblFlag[0] != m_inblFlag[1], "inblFlag in VpsProfileTierLevel[1] must be equal to the inblFlag in VpsProfileTierLevel[0]."); 1633 } 1634 } 1635 #else 1636 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" ); 1637 #endif 1638 1639 // Layer Dependencies 1482 1640 for (Int i = 0; i < m_numberOfLayers; i++ ) 1483 1641 { … … 2341 2499 #endif 2342 2500 #if H_MV 2501 #if H_MV_HLS10_GEN_FIX 2502 xPrintParaVector( "NuhLayerId" , m_layerIdInNuh ); 2503 if ( m_targetEncLayerIdList.size() > 0) 2504 { 2505 xPrintParaVector( "TargetEncLayerIdList" , m_targetEncLayerIdList ); 2506 } 2507 #endif 2343 2508 xPrintParaVector( "ViewIdVal" , m_viewId ); 2344 2509 xPrintParaVector( "ViewOrderIndex", m_viewOrderIndex ); 2510 #if H_MV_HLS10_AUX 2511 xPrintParaVector( "AuxId", m_auxId ); 2512 #endif 2345 2513 #endif 2346 2514 #if H_3D -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r1039 r1066 78 78 std::vector<Int> m_viewId; ///< view id 79 79 std::vector<Int> m_viewOrderIndex; ///< view order index 80 #if H_MV_HLS10_AUX 81 std::vector<Int> m_auxId; ///< auxiliary id 82 #endif 80 83 #if H_3D 81 84 std::vector<Int> m_depthFlag; ///< depth flag 85 #endif 86 #if H_MV_HLS10_GEN_FIX 87 std::vector<Int> m_targetEncLayerIdList; ///< layer Ids in Nuh to be encoded 82 88 #endif 83 89 std::vector<Int> m_layerIdInNuh; ///< layer Id in Nuh for each layer … … 89 95 Int m_vpsNumLayerSets; ///< Number of layer sets 90 96 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 91 Int m_defaultOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 97 #if H_MV_HLS10_ADD_LAYERSETS 98 Int m_numAddLayerSets; ///< Number of additional layer sets 99 std::vector< std::vector<Int> > m_highestLayerIdxPlus1; ///< HighestLayerIdxPlus1 for each additional layer set and each independent layer (value with index 0 will be ignored) 100 #endif 101 Int m_defaultOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 92 102 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 93 103 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 94 104 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 105 #if H_MV_HLS10_ADD_LAYERSETS 106 std::vector< std::vector< Int > > m_profileTierLevelIdx; ///< Indices of of profile, per layer in layer set 107 #else 95 108 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier 109 #endif 96 110 std::vector<Bool> m_altOutputLayerFlag; ///< Alt output layer flag 97 111 … … 124 138 std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag; 125 139 std::vector< std::vector<Int > > m_minHorizontalCtuOffsetPlus1; 140 #if H_MV_HLS10_VPS_VUI 141 Bool m_singleLayerForNonIrapFlag; 142 Bool m_higherLayerIrapSkipFlag; 143 #endif // H_MV_HLS10_VPS_VUI 144 126 145 127 146 #if H_3D_IV_MERGE … … 174 193 175 194 // profile/level 195 #if H_MV_HLS10_PTL 196 #if H_MV 197 std::vector< Profile::Name > m_profile; 198 std::vector< Level::Tier > m_levelTier; 199 std::vector< Level::Name > m_level; 200 std::vector< Bool > m_inblFlag; 201 #else 176 202 Profile::Name m_profile; 177 203 Level::Tier m_levelTier; 178 204 Level::Name m_level; 205 #endif 206 #endif 207 179 208 Bool m_progressiveSourceFlag; 180 209 Bool m_interlacedSourceFlag; 181 210 Bool m_nonPackedConstraintFlag; 182 211 Bool m_frameOnlyConstraintFlag; 183 184 212 // coding structure 185 213 #if H_MV … … 440 468 std::vector<Int> m_sbPropAvgBitRate; 441 469 std::vector<Int> m_sbPropMaxBitRate; 470 #if H_MV_HLS10_GEN_FIX 471 Bool m_outputVpsInfo; 472 #endif 442 473 #endif 443 474 #if H_3D … … 506 537 Void xPrintUsage (); ///< print usage 507 538 #if H_MV 539 540 #if H_MV_HLS10_PTL 541 template<typename T> 542 Void xReadStrToEnum(string in, std::vector<T> &val) 543 { 544 val.clear(); 545 546 char* cElement = NULL; 547 char* cString = new char[in.size()+1]; 548 strcpy(cString, in.c_str()); 549 550 cElement = strtok( cString, " " ); 551 while ( cElement != NULL ) 552 { 553 T profile; 554 std::istringstream ss( cElement ); 555 ss >> profile; 556 val.push_back( profile ); 557 cElement = strtok( NULL, " " ); 558 } 559 delete[] cString; 560 } 561 #endif 562 563 508 564 template <typename T> 509 565 Void xResizeVector( std::vector<T> & rpcVector ) -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r1039 r1066 133 133 xSetLayerIds ( vps ); 134 134 xSetDimensionIdAndLength ( vps ); 135 xSetDependencies( vps ); 135 xSetDependencies ( vps ); 136 xSetRepFormat ( vps ); 136 137 xSetProfileTierLevel ( vps ); 137 xSetRepFormat ( vps );138 138 xSetLayerSets ( vps ); 139 139 xSetDpbSize ( vps ); … … 144 144 xDeriveDltArray ( vps, dlt ); 145 145 #endif 146 146 #if H_MV_HLS10_GEN_FIX 147 if ( m_targetEncLayerIdList.size() == 0 ) 148 { 149 for (Int i = 0; i < m_numberOfLayers; i++ ) 150 { 151 m_targetEncLayerIdList.push_back( vps.getLayerIdInNuh( i ) ); 152 } 153 } 154 for( Int i = (Int) m_targetEncLayerIdList.size()-1 ; i >= 0 ; i--) 155 { 156 Int iNuhLayerId = m_targetEncLayerIdList[i]; 157 Bool allRefLayersPresent = true; 158 for( Int j = 0; j < vps.getNumRefLayers( iNuhLayerId ); j++) 159 { 160 allRefLayersPresent = allRefLayersPresent && xLayerIdInTargetEncLayerIdList( vps.getIdRefLayer( iNuhLayerId, j) ); 161 } 162 if ( !allRefLayersPresent ) 163 { 164 printf("\nCannot encode layer with nuh_layer_id equal to %d since not all reference layers are in TargetEncLayerIdList\n", iNuhLayerId); 165 m_targetEncLayerIdList.erase( m_targetEncLayerIdList.begin() + i ); 166 } 167 } 168 #endif 169 170 #if H_MV_HLS10_ADD_LAYERSETS 171 if ( m_outputVpsInfo ) 172 { 173 #if H_MV_HLS10_AUX 174 vps.printScalabilityId(); 175 #endif 176 vps.printLayerDependencies(); 177 vps.printLayerSets(); 178 vps.printPTL(); 179 } 180 #endif 147 181 148 182 for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++) … … 200 234 m_cTEncTop.setUseDMM ( isDepth ? m_useDMM : false ); 201 235 #if SEPARATE_FLAG_I0085 236 #if LGE_FCO_I0116 237 m_cTEncTop.setUseIVP ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_useIVP : false ); 238 #else 202 239 m_cTEncTop.setUseIVP ( isDepth ? m_useIVP : false ); 240 #endif 203 241 #endif 204 242 m_cTEncTop.setUseSDC ( isDepth ? m_useSDC : false ); … … 210 248 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX 211 249 #if H_3D_QTLPC 250 #if LGE_FCO_I0116 251 m_cTEncTop.setUseQTL ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_bUseQTL : false ); 252 #else 212 253 m_cTEncTop.setUseQTL ( isDepth ? m_bUseQTL : false ); 254 #endif 213 255 #if !MTK_I0099_VPS_EX2 214 256 m_cTEncTop.setUsePC ( isDepth ? m_bUsePC : false ); … … 224 266 #endif 225 267 #if H_3D_IV_MERGE 226 m_cTEncTop.setUseMPI ( isDepth ? m_bMPIFlag : false ); 268 #if LGE_FCO_I0116 269 m_cTEncTop.setUseMPI ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_bMPIFlag : false ); 270 #else 271 m_cTEncTop.setUseMPI ( isDepth ? m_bMPIFlag : false ); 272 #endif 227 273 #endif 228 274 #endif // H_3D … … 236 282 #endif 237 283 284 #if H_MV 285 m_cTEncTop.setProfile(m_profile[0]); 286 m_cTEncTop.setLevel (m_levelTier[0], m_level[0]); 287 #else 238 288 m_cTEncTop.setProfile(m_profile); 239 289 m_cTEncTop.setLevel(m_levelTier, m_level); 290 #endif 240 291 m_cTEncTop.setProgressiveSourceFlag(m_progressiveSourceFlag); 241 292 m_cTEncTop.setInterlacedSourceFlag(m_interlacedSourceFlag); … … 789 840 790 841 #if H_MV 842 #if H_MV_HLS10_GEN_FIX 843 while ( (m_targetEncLayerIdList.size() != 0 ) && !allEos ) 844 #else 791 845 while ( !allEos ) 846 #endif 792 847 { 793 848 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 794 849 { 850 #if H_MV_HLS10_GEN_FIX 851 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 852 { 853 continue; 854 } 855 #endif 856 795 857 Int frmCnt = 0; 796 858 while ( !eos[layer] && !(frmCnt == gopSize)) … … 832 894 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 833 895 { 896 #if H_MV_HLS10_GEN_FIX 897 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 898 { 899 continue; 900 } 901 #endif 902 834 903 #if H_3D_VSO 835 904 if( m_bUseVSO && m_bUseEstimatedVSD && iNextPoc < m_framesToBeEncoded ) … … 858 927 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 859 928 { 929 #if H_MV_HLS10_GEN_FIX 930 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 931 { 932 continue; 933 } 934 #endif 860 935 m_acTEncTopList[layer]->printSummary( m_acTEncTopList[layer]->getNumAllPicCoded(), m_isField ); 861 936 } … … 1321 1396 // Max sub layers, + presence flag 1322 1397 Bool subLayersMaxMinus1PresentFlag = false; 1398 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS1 1323 1399 Int subLayersMaxMinus1 = -1; 1400 #endif 1324 1401 for (Int curLayerIdInVps = 0; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++ ) 1325 { 1326 Int curSubLayersMaxMinus1 = -1;1402 { 1403 Int curSubLayersMaxMinus1 = 0; 1327 1404 for( Int i = 0; i < getGOPSize(); i++ ) 1328 1405 { … … 1332 1409 1333 1410 vps.setSubLayersVpsMaxMinus1( curLayerIdInVps, curSubLayersMaxMinus1 ); 1411 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS1 1334 1412 if ( subLayersMaxMinus1 == -1 ) 1335 1413 { … … 1340 1418 subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != subLayersMaxMinus1 ); 1341 1419 } 1420 #else 1421 subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != vps.getMaxSubLayersMinus1() ); 1422 #endif 1342 1423 } 1343 1424 … … 1348 1429 Bool maxTidRefPresentFlag = false; 1349 1430 for ( Int refLayerIdInVps = 0; refLayerIdInVps < m_numberOfLayers; refLayerIdInVps++) 1350 1431 { 1351 1432 for ( Int curLayerIdInVps = 1; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++) 1352 1433 { 1353 1434 Int maxTid = -1; 1435 #if H_MV_FIX_LOOP_GOPSIZE 1436 for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 1437 { 1438 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][( i < getGOPSize() ? i : MAX_GOP )]; 1439 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][( i < getGOPSize() ? i : MAX_GOP )]; 1440 #else 1354 1441 for( Int i = 0; i < getGOPSize(); i++ ) 1355 1442 { 1356 1443 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][i]; 1357 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][i]; 1358 1444 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][i]; 1445 #endif 1359 1446 for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++) 1360 1447 { 1361 1448 if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps ) 1362 1449 { 1450 #if H_MV_FIX_LOOP_GOPSIZE 1451 Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 ); 1452 Bool refLayerZero = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 ); 1453 maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 1454 #else 1363 1455 maxTid = std::max( maxTid, geRef.m_temporalId ); 1456 #endif 1364 1457 } 1365 1458 } … … 1487 1580 Void TAppEncTop::xSetProfileTierLevel( TComVPS& vps ) 1488 1581 { 1582 #if H_MV_HLS10_PTL 1583 1584 // SET PTL 1585 assert( m_profile.size() == m_level.size() && m_profile.size() == m_levelTier.size() ); 1586 vps.setVpsNumProfileTierLevelMinus1( (Int) m_profile.size() - 1 ); 1587 for ( Int ptlIdx = 0; ptlIdx <= vps.getVpsNumProfileTierLevelMinus1(); ptlIdx++ ) 1588 { 1589 if ( ptlIdx > 1 ) 1590 { 1591 Bool vpsProfilePresentFlag = ( m_profile[ptlIdx] != m_profile[ptlIdx - 1] ) 1592 || ( m_inblFlag[ptlIdx ] != m_inblFlag[ptlIdx - 1] ); 1593 vps.setVpsProfilePresentFlag( ptlIdx, vpsProfilePresentFlag ); 1594 } 1595 1596 xSetProfileTierLevel( vps, ptlIdx, -1, m_profile[ptlIdx], m_level[ptlIdx], 1597 m_levelTier[ ptlIdx ], m_progressiveSourceFlag, m_interlacedSourceFlag, 1598 m_nonPackedConstraintFlag, m_frameOnlyConstraintFlag, m_inblFlag[ptlIdx] ); 1599 } 1600 #else 1489 1601 const Int vpsNumProfileTierLevelMinus1 = 0; //TBD 1490 1602 vps.setVpsNumProfileTierLevelMinus1( vpsNumProfileTierLevelMinus1 ); … … 1494 1606 vps.setVpsProfilePresentFlag( i, true ); 1495 1607 } 1496 } 1497 1608 #endif 1609 } 1610 1611 #if H_MV_HLS10_PTL 1612 Void TAppEncTop::xSetProfileTierLevel(TComVPS& vps, Int profileTierLevelIdx, Int subLayer, Profile::Name profile, Level::Name level, Level::Tier tier, Bool progressiveSourceFlag, Bool interlacedSourceFlag, Bool nonPackedConstraintFlag, Bool frameOnlyConstraintFlag, Bool inbldFlag) 1613 { 1614 TComPTL* ptlStruct = vps.getPTL( profileTierLevelIdx ); 1615 assert( ptlStruct != NULL ); 1616 1617 ProfileTierLevel* ptl; 1618 if ( subLayer == -1 ) 1619 { 1620 ptl = ptlStruct->getGeneralPTL(); 1621 } 1622 else 1623 { 1624 ptl = ptlStruct->getSubLayerPTL( subLayer ); 1625 } 1626 1627 assert( ptl != NULL ); 1628 1629 ptl->setProfileIdc( profile ); 1630 ptl->setTierFlag ( tier ); 1631 ptl->setLevelIdc ( level ); 1632 ptl->setProfileCompatibilityFlag( profile, true ); 1633 #if H_MV_HLS10_PTL_INBL_FIX 1634 ptl->setInbldFlag( inbldFlag ); 1635 #endif 1636 1637 switch ( profile ) 1638 { 1639 case Profile::MAIN: 1640 break; 1641 case Profile::MULTIVIEWMAIN: 1642 #if H_3D 1643 case Profile::MAIN3D: 1644 #endif 1645 ptl->setMax12bitConstraintFlag ( true ); 1646 ptl->setMax12bitConstraintFlag ( true ); 1647 ptl->setMax10bitConstraintFlag ( true ); 1648 ptl->setMax8bitConstraintFlag ( true ); 1649 ptl->setMax422chromaConstraintFlag ( true ); 1650 ptl->setMax420chromaConstraintFlag ( true ); 1651 ptl->setMaxMonochromeConstraintFlag ( false ); 1652 ptl->setIntraConstraintFlag ( false ); 1653 ptl->setOnePictureOnlyConstraintFlag( false ); 1654 ptl->setLowerBitRateConstraintFlag ( true ); 1655 break; 1656 default: 1657 assert( 0 ); // other profiles currently not supported 1658 break; 1659 } 1660 } 1661 #endif 1498 1662 1499 1663 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) … … 1513 1677 //repFormat->setSeparateColourPlaneVpsFlag( ); 1514 1678 1679 #if H_MV_HLS10_GEN_VSP_CONF_WIN 1680 repFormat->setConformanceWindowVpsFlag( true ); 1681 repFormat->setConfWinVpsLeftOffset ( m_confLeft / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); 1682 repFormat->setConfWinVpsRightOffset ( m_confRight / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); 1683 repFormat->setConfWinVpsTopOffset ( m_confTop / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1684 repFormat->setConfWinVpsBottomOffset ( m_confBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1685 #endif 1686 1515 1687 assert( vps.getRepFormat( 0 ) == NULL ); 1516 1688 vps.setRepFormat( 0 , repFormat ); … … 1528 1700 { 1529 1701 Int currLsIdx = vps.olsIdxToLsIdx( i ); 1702 #if !H_MV_HLS10_ADD_LAYERSETS 1530 1703 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1704 #endif 1531 1705 Bool subLayerFlagInfoPresentFlag = false; 1532 1706 … … 1534 1708 { 1535 1709 Bool subLayerDpbInfoPresentFlag = false; 1710 #if !H_MV_HLS10_ADD_LAYERSETS 1536 1711 assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() ); 1712 #endif 1537 1713 for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ ) 1538 1714 { 1715 #if H_MV_HLS10_DBP_SIZE 1716 Int layerIdInVps = vps.getLayerIdInVps( vps.getLayerSetLayerIdList( currLsIdx, k ) ); 1717 if ( vps.getNecessaryLayerFlag( i,k ) && ( vps.getVpsBaseLayerInternalFlag() || vps.getLayerSetLayerIdList( currLsIdx, k ) != 0 ) ) 1718 { 1719 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1720 if ( j > 0 ) 1721 { 1722 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) ); 1723 } 1724 } 1725 else 1726 { 1727 if (vps.getNecessaryLayerFlag(i,k) && j == 0 && k == 0 ) 1728 { 1729 dpbSize->setMaxVpsDecPicBufferingMinus1(i, k ,j, 0 ); 1730 } 1731 } 1732 #else 1539 1733 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1540 1734 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1735 1541 1736 if ( j > 0 ) 1542 1737 { 1543 1738 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) ); 1544 1739 } 1740 #endif 1545 1741 } 1546 1742 1547 1743 Int maxNumReorderPics = MIN_INT; 1744 #if H_MV_HLS10_DBP_SIZE 1745 for ( Int idx = 0; idx < vps.getNumLayersInIdList( currLsIdx ); idx++ ) 1746 { 1747 if (vps.getNecessaryLayerFlag(i, idx )) 1748 { 1749 Int layerIdInVps = vps.getLayerIdInVps( vps.getLayerSetLayerIdList(currLsIdx, idx) ); 1750 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 1751 } 1752 } 1753 #else 1548 1754 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ ) 1549 1755 { … … 1551 1757 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] ); 1552 1758 } 1759 #endif 1553 1760 assert( maxNumReorderPics != MIN_INT ); 1554 1761 … … 1576 1783 } 1577 1784 1578 1579 1785 Void TAppEncTop::xSetLayerSets( TComVPS& vps ) 1580 1786 { … … 1598 1804 // Additional output layer sets + profileLevelTierIdx 1599 1805 vps.setDefaultOutputLayerIdc ( m_defaultOutputLayerIdc ); 1806 #if H_MV_HLS10_ADD_LAYERSETS 1807 if( vps.getNumIndependentLayers() == 0 && m_numAddLayerSets > 0 ) 1808 { 1809 fprintf( stderr, "\nWarning: Ignoring additional layer sets since NumIndependentLayers is equal to 0.\n"); 1810 } 1811 else 1812 { 1813 vps.setNumAddLayerSets( m_numAddLayerSets ); 1814 if ( m_highestLayerIdxPlus1.size() < vps.getNumAddLayerSets() ) 1815 { 1816 fprintf(stderr, "\nError: Number of highestLayerIdxPlus1 parameters must be greater than or equal to NumAddLayerSets\n"); 1817 exit(EXIT_FAILURE); 1818 } 1819 1820 for (Int i = 0; i < vps.getNumAddLayerSets(); i++) 1821 { 1822 if ( m_highestLayerIdxPlus1[ i ].size() < vps.getNumIndependentLayers() ) 1823 { 1824 fprintf(stderr, "Error: Number of elements in highestLayerIdxPlus1[ %d ] parameters must be greater than or equal to NumIndependentLayers(= %d)\n", i, vps.getNumIndependentLayers()); 1825 exit(EXIT_FAILURE); 1826 } 1827 1828 for (Int j = 1; j < vps.getNumIndependentLayers(); j++) 1829 { 1830 if ( m_highestLayerIdxPlus1[ i ][ j ] < 0 || m_highestLayerIdxPlus1[ i ][ j ] > vps.getNumLayersInTreePartition( j ) ) 1831 { 1832 fprintf(stderr, "Error: highestLayerIdxPlus1[ %d ][ %d ] shall be in the range of 0 to NumLayersInTreePartition[ %d ] (= %d ), inclusive. \n", i, j, j, vps.getNumLayersInTreePartition( j ) ); 1833 exit(EXIT_FAILURE); 1834 } 1835 vps.setHighestLayerIdxPlus1( i, j, m_highestLayerIdxPlus1[ i ][ j ] ); 1836 } 1837 vps.deriveAddLayerSetLayerIdList( i ); 1838 } 1839 } 1840 #else 1600 1841 vps.setNumAddLayerSets ( 0 ); 1842 #endif 1601 1843 vps.setNumAddOlss ( numAddOuputLayerSets ); 1602 1844 vps.initTargetLayerIdLists(); 1603 1845 1846 #if H_MV_HLS10_ADD_LAYERSETS 1847 for (Int olsIdx = 0; olsIdx < vps.getNumLayerSets() + numAddOuputLayerSets; olsIdx++) 1848 { 1849 Int addOutLsIdx = olsIdx - vps.getNumLayerSets(); 1850 #else 1604 1851 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++) 1605 1852 { 1606 1853 Int addOutLsIdx = olsIdx - m_vpsNumLayerSets; 1607 1854 #endif 1608 1855 vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 1609 1856 1857 #if H_MV_HLS10_ADD_LAYERSETS 1858 Int lsIdx = vps.olsIdxToLsIdx( olsIdx ); 1859 #else 1610 1860 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ]; 1611 1861 #endif 1612 1862 if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 ) 1613 1863 { 1864 #if H_MV_HLS10_ADD_LAYERSETS 1865 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1866 #else 1614 1867 for ( Int i = 0; i < layerIdList.size(); i++) 1868 #endif 1615 1869 { 1616 1870 vps.setOutputLayerFlag( olsIdx, i, ( olsIdx == 0 && i == 0 ) ? vps.inferOutputLayerFlag(olsIdx, i ) : false ); // This is a software only fix for a bug in the spec. In spec outputLayerFlag neither present nor inferred for this case ! … … 1622 1876 for (Int j = 0; j < outLayerIdList.size(); j++) 1623 1877 { 1878 #if H_MV_HLS10_ADD_LAYERSETS 1879 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1880 { 1881 if ( vps.getLayerSetLayerIdList( lsIdx, i ) == outLayerIdList[ j ] ) 1882 #else 1624 1883 for (Int i = 0; i < layerIdList.size(); i++ ) 1625 1884 { 1626 1885 if ( layerIdList[ i ] == outLayerIdList[ j ] ) 1886 #endif 1627 1887 { 1628 1888 vps.setOutputLayerFlag( olsIdx, i, true ); … … 1631 1891 } 1632 1892 } 1633 assert( outputLayerInLayerSetFlag ); // The output layer is not not in the layer set. 1893 #if H_MV_HLS10_ADD_LAYERSETS 1894 if ( !outputLayerInLayerSetFlag ) 1895 { 1896 fprintf(stderr, "Error: Output layer %d in output layer set %d not in corresponding layer set %d \n", outLayerIdList[ j ], olsIdx , lsIdx ); 1897 exit(EXIT_FAILURE); 1898 } 1899 #else 1900 assert( outputLayerInLayerSetFlag ); // The output layer is not in the layer set. 1901 #endif 1634 1902 } 1635 1903 } 1636 1904 else 1637 1905 { 1906 #if H_MV_HLS10_ADD_LAYERSETS 1907 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1908 #else 1638 1909 for ( Int i = 0; i < layerIdList.size(); i++) 1910 #endif 1639 1911 { 1640 1912 vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) ); … … 1642 1914 } 1643 1915 1916 #if H_MV_HLS10_NESSECARY_LAYER 1917 vps.deriveNecessaryLayerFlags( olsIdx ); 1918 #endif 1644 1919 vps.deriveTargetLayerIdList( olsIdx ); 1645 1920 1921 #if H_MV_HLS10_PTL 1922 // SET profile_tier_level_index. 1923 if ( olsIdx == 0 ) 1924 { 1925 vps.setProfileTierLevelIdx( 0, 0 , vps.getMaxLayersMinus1() > 0 ? 1 : 0 ); 1926 } 1927 else 1928 { 1929 if( (Int) m_profileTierLevelIdx[ olsIdx ].size() < vps.getNumLayersInIdList( lsIdx ) ) 1930 { 1931 fprintf( stderr, "Warning: Not enough profileTierLevelIdx values given for the %d-th OLS. Inferring default values.\n", olsIdx ); 1932 } 1933 for (Int j = 0; j < vps.getNumLayersInIdList( lsIdx ); j++) 1934 { 1935 if( j < (Int) m_profileTierLevelIdx[ olsIdx ].size() ) 1936 { 1937 vps.setProfileTierLevelIdx(olsIdx, j, m_profileTierLevelIdx[olsIdx][j] ); 1938 #if H_MV_HLS10_PTL_FIX 1939 if( !vps.getNecessaryLayerFlag(olsIdx,j) && m_profileTierLevelIdx[ olsIdx ][ j ] != -1 ) 1940 { 1941 fprintf( stderr, "Warning: The %d-th layer in the %d-th OLS is not necessary such that profileTierLevelIdx[%d][%d] will be ignored. Set value to -1 to suppress warning.\n", j,olsIdx,olsIdx,j ); 1942 } 1943 } 1944 else if ( vps.getNecessaryLayerFlag(olsIdx,j) ) 1945 #else 1946 } 1947 else 1948 #endif 1949 { 1950 // setting default values 1951 if ( j == 0 || vps.getVpsNumProfileTierLevelMinus1() < 1 ) 1952 { 1953 // set base layer as default 1954 vps.setProfileTierLevelIdx(olsIdx, j, 1 ); 1955 } 1956 else 1957 { 1958 // set VpsProfileTierLevel[2] as default 1959 vps.setProfileTierLevelIdx(olsIdx, j, 2 ); 1960 } 1961 } 1962 } 1963 } 1964 #else 1646 1965 if ( olsIdx > 0 ) 1647 1966 { 1648 1967 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] ); 1649 1968 } 1969 #endif 1650 1970 1651 1971 if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 && … … 1685 2005 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1686 2006 { 2007 #if H_MV_HLS10_VPS_VUI 2008 for( Int i = 0; i < vps.getNumLayerSets(); i++ ) 2009 #else 1687 2010 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ ) 2011 #endif 1688 2012 { 1689 2013 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 1734 2058 for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ) ; j++ ) 1735 2059 { 2060 #if H_MV_HLS10_REF_PRED_LAYERS 2061 Int layerIdx = vps.getLayerIdInVps( vps.getIdDirectRefLayer(vps.getLayerIdInNuh( i ) , j )); 2062 #else 1736 2063 Int layerIdx = vps.getLayerIdInVps( vps.getRefLayerId(vps.getLayerIdInNuh( i ) , j )); 2064 #endif 1737 2065 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1738 2066 { … … 1752 2080 } 1753 2081 } 2082 2083 #if H_MV_HLS10_VPS_VUI 2084 pcVPSVUI->setSingleLayerForNonIrapFlag( m_singleLayerForNonIrapFlag ); 2085 pcVPSVUI->setHigherLayerIrapSkipFlag( m_higherLayerIrapSkipFlag ); 2086 #endif 1754 2087 1755 2088 pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag ); … … 1808 2141 } 1809 2142 } 1810 #endif 2143 #if H_MV_HLS10_GEN_FIX 2144 Bool TAppEncTop::xLayerIdInTargetEncLayerIdList(Int nuhLayerId) 2145 { 2146 return ( std::find(m_targetEncLayerIdList.begin(), m_targetEncLayerIdList.end(), nuhLayerId) != m_targetEncLayerIdList.end()) ; 2147 } 2148 #endif 2149 2150 2151 #endif 2152 2153 1811 2154 #if H_3D 1812 2155 Void TAppEncTop::xSetVPSExtension2( TComVPS& vps ) … … 1816 2159 Bool isDepth = ( vps.getDepthId( layer ) == 1 ) ; 1817 2160 Bool isLayerZero = ( layer == 0 ); 2161 #if LGE_FCO_I0116 2162 Bool isDepthFirst = (layer > 1 ? true : false); 2163 #endif 1818 2164 1819 2165 #if H_3D_ARP … … 1838 2184 vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useSDC || m_useDLT ) ); 1839 2185 #if SEPARATE_FLAG_I0085 2186 #if LGE_FCO_I0116 2187 vps.setIVPFlag ( layer, isDepth && !isLayerZero && m_useIVP && !isDepthFirst ); 2188 #else 1840 2189 vps.setIVPFlag ( layer, isDepth && !isLayerZero && m_useIVP ); 2190 #endif 1841 2191 #endif 1842 2192 #endif … … 1866 2216 #endif 1867 2217 #if MTK_I0099_VPS_EX2 2218 #if LGE_FCO_I0116 2219 vps.setLimQtPredFlag ( layer, isDepth && m_bLimQtPredFlag && !isDepthFirst ); 2220 #else 1868 2221 vps.setLimQtPredFlag ( layer, isDepth && m_bLimQtPredFlag ); 2222 #endif 1869 2223 #endif 1870 2224 #if H_3D_NBDV_REF … … 1881 2235 #endif 1882 2236 #if H_3D_IV_MERGE 2237 #if LGE_FCO_I0116 2238 vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag && !isDepthFirst ); 2239 #else 1883 2240 vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag ); 2241 #endif 1884 2242 #endif 1885 2243 } -
trunk/source/App/TAppEncoder/TAppEncTop.h
r976 r1066 132 132 Void xSetLayerSets ( TComVPS& vps ); 133 133 Void xSetProfileTierLevel ( TComVPS& vps ); 134 135 #if H_MV_HLS10_PTL 136 Void xSetProfileTierLevel( TComVPS& vps, Int profileTierLevelIdx, Int subLayer, 137 Profile::Name profile, Level::Name level, Level::Tier tier, 138 Bool progressiveSourceFlag, Bool interlacedSourceFlag, 139 Bool nonPackedConstraintFlag, Bool frameOnlyConstraintFlag, 140 Bool inbldFlag ); 141 #endif 134 142 Void xSetRepFormat ( TComVPS& vps ); 135 143 Void xSetDpbSize ( TComVPS& vps ); … … 137 145 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); 138 146 Int xGetMax( std::vector<Int>& vec); 147 #if H_MV_HLS10_GEN_FIX 148 Bool xLayerIdInTargetEncLayerIdList( Int nuhLayerId ); 149 #endif 139 150 #endif 140 151 #if H_3D
Note: See TracChangeset for help on using the changeset viewer.