Changeset 1076 in 3DVCSoftware
- Timestamp:
- 21 Oct 2014, 21:25:42 (10 years ago)
- Location:
- branches/HTM-12.1-dev0/source
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.1-dev0/source/App/TAppDecoder/TAppDecCfg.cpp
r1066 r1076 95 95 ("RespectDefDispWindow,w", m_respectDefDispWindow, 0, "Only output content inside the default display window\n") 96 96 #if H_MV 97 #if H_MV_HLS10_GEN_FIX98 97 ("OutputVpsInfo,v", m_outputVpsInfo, false, "Output information about the layer dependencies and layer sets") 99 #endif100 98 #endif 101 99 ; -
branches/HTM-12.1-dev0/source/App/TAppDecoder/TAppDecCfg.h
r1066 r1076 80 80 81 81 #if H_MV 82 #if H_MV_HLS10_GEN_FIX83 82 Bool m_outputVpsInfo; ///< Output VPS information 84 #endif85 83 Void xAppendToFileNameEnd( Char* pchInputFileName, const Char* pchStringToAppend, Char*& rpchOutputFileName); ///< create filenames 86 84 #endif -
branches/HTM-12.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp
r1066 r1076 257 257 m_targetDecLayerIdSet = vps->getTargetDecLayerIdList( m_targetOptLayerSetIdx ); 258 258 } 259 #if H_MV_HLS10_GEN_FIX260 259 if (m_outputVpsInfo ) 261 260 { 262 #if H_MV_HLS10_AUX263 261 m_vps->printScalabilityId(); 264 #endif265 262 m_vps->printLayerDependencies(); 266 263 m_vps->printLayerSets(); 267 264 m_vps->printPTL(); 268 265 } 269 #endif270 266 } 271 267 #if H_3D … … 580 576 Int dpbFullness = 0; 581 577 #if H_MV 582 #if H_MV_HLS10_ADD_LAYERSETS583 578 TComSPS* activeSPS = m_tDecTop[ decIdx ]->getActiveSPS(); 584 #else585 // preliminary fix586 TComSPS* activeSPS = m_tDecTop[0]->getActiveSPS();587 #endif588 579 #else 589 580 TComSPS* activeSPS = m_cTDecTop.getActiveSPS(); … … 1155 1146 Int curLayerId = m_tDecTop[dIdx]->getLayerId(); 1156 1147 Int curLayerIdxInVps = m_vps->getLayerIdInNuh( curLayerId ); 1157 #if H_MV_HLS10_REF_PRED_LAYERS1158 1148 if ( m_vps->getDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) ) 1159 #else1160 if ( m_vps->getInDirectDependencyFlag(optLayerIdxInVps, curLayerIdxInVps ) )1161 #endif1162 1149 { 1163 1150 TComPic* curPic = m_ivPicLists.getPic( curLayerId, pocLastPic ); -
branches/HTM-12.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
r1074 r1076 241 241 {"main-still-picture", Profile::MAINSTILLPICTURE}, 242 242 #if H_MV 243 #if H_MV_HLS10_PTL244 243 {"multiview-main", Profile::MULTIVIEWMAIN}, 245 244 #if H_3D … … 247 246 #endif 248 247 249 #else250 {"main-stereo", Profile::MAINSTEREO},251 {"main-multiview", Profile::MAINMULTIVIEW},252 #if H_3D253 {"main-3d" , Profile::MAIN3D},254 #endif255 #endif256 248 #endif 257 249 }; … … 341 333 #if H_MV 342 334 vector<Int> cfg_dimensionLength; 343 #if H_MV_HLS10_PTL344 335 string cfg_profiles; 345 336 string cfg_levels; 346 337 string cfg_tiers; 347 #endif348 338 #if H_3D 349 339 cfg_dimensionLength.push_back( 2 ); // depth … … 380 370 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 381 371 #if !H_3D 382 #if H_MV_HLS10_AUX383 372 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary") 384 #else385 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask")386 #endif387 373 #else 388 374 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ") … … 391 377 ("ViewOrderIndex", m_viewOrderIndex , std::vector<Int>(1,0), "View Order Index per layer") 392 378 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id per View Order Index") 393 #if H_MV_HLS10_AUX394 379 ("AuxId", m_auxId , std::vector<Int>(1,0), "AuxId per layer") 395 #endif396 380 #if H_3D 397 381 ("DepthFlag", m_depthFlag , std::vector<Int>(1,0), "Depth Flag") … … 406 390 #endif 407 391 #endif 408 #if H_MV_HLS10_GEN_FIX409 392 ("TargetEncLayerIdList", m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded") 410 #endif411 393 ("LayerIdInNuh", m_layerIdInNuh , std::vector<Int>(1,0), "LayerId in Nuh") 412 394 ("SplittingFlag", m_splittingFlag , false , "Splitting Flag") … … 415 397 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 416 398 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 417 #if H_MV_HLS10_ADD_LAYERSETS418 399 ("NumAddLayerSets" , m_numAddLayerSets , 0 , "NumAddLayerSets ") 419 400 ("HighestLayerIdxPlus1_%d", m_highestLayerIdxPlus1, std::vector< Int >(0,0) ,MAX_VPS_NUM_ADD_LAYER_SETS, "HighestLayerIdxPlus1") 420 #endif421 401 ("DefaultTargetOutputLayerIdc" , m_defaultOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 422 402 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") … … 426 406 ("AltOutputLayerFlag", m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag") 427 407 428 #if H_MV_HLS10_PTL429 408 ("ProfileTierLevelIdx_%d", m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols") 430 #else431 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")432 #endif433 409 // Layer dependencies 434 410 ("DirectRefLayers_%d", m_directRefLayers , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers") … … 460 436 461 437 // Profile and level 462 #if H_MV_HLS10_PTL463 438 ("Profile", cfg_profiles, string(""), "Profile in VpsProfileTierLevel (Indication only)") 464 439 ("Level", cfg_levels , string(""), "Level indication in VpsProfileTierLevel (Indication only)") 465 440 ("Tier", cfg_tiers , string(""), "Tier indication in VpsProfileTierLevel (Indication only)") 466 441 ("InblFlag",m_inblFlag , std::vector<Bool>(0), "InblFlags in VpsProfileTierLevel (Indication only)" ) 467 #else468 ("Profile", m_profile, Profile::NONE, "Profile to be used when encoding (Incomplete)")469 ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1 (Incomplete)")470 ("Tier", m_levelTier, Level::MAIN, "Tier to use for interpretation of --Level")471 #endif472 442 ("ProgressiveSource", m_progressiveSourceFlag, false, "Indicate that source is progressive") 473 443 ("InterlacedSource", m_interlacedSourceFlag, false, "Indicate that source is interlaced") … … 648 618 #endif 649 619 #if H_MV 650 #if H_MV_HLS10_GEN_FIX651 620 // A lot of this stuff could should actually be derived by the encoder. 652 #endif // H_MV_HLS10_GEN653 621 // VPS VUI 654 622 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") … … 674 642 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer") 675 643 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int >(1,0) ,MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer") 676 #if H_MV_HLS10_VPS_VUI677 644 ("SingleLayerForNonIrapFlag", m_singleLayerForNonIrapFlag, false , "SingleLayerForNonIrapFlag") 678 645 ("HigherLayerIrapSkipFlag" , m_higherLayerIrapSkipFlag , false , "HigherLayerIrapSkipFlag ") 679 #endif680 646 #endif 681 647 … … 784 750 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 785 751 786 #if H_MV_HLS10_GEN_FIX787 752 ("OutputVpsInfo", m_outputVpsInfo, false ,"Output information about the layer dependencies and layer sets") 788 #endif789 753 #endif 790 754 #if H_3D … … 1073 1037 } 1074 1038 m_iNumberOfViews = (Int) uniqueViewOrderIndices.size(); 1075 #if H_MV_HLS10_AUX1076 1039 xResizeVector( m_auxId ); 1077 #endif1078 1040 1079 1041 #if H_3D … … 1109 1071 xResizeVector( m_wppInUseFlag ); 1110 1072 1111 #if H_MV_HLS10_ADD_LAYERSETS1112 1073 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + m_numAddLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++) 1113 #else1114 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++)1115 #endif1116 1074 { 1117 1075 m_altOutputLayerFlag.push_back( false ); … … 1225 1183 1226 1184 #if H_MV 1227 #if H_MV_HLS10_PTL1228 1185 // parse PTL 1229 1186 Bool anyEmpty = false; … … 1272 1229 xReadStrToEnum( cfg_levels, m_level ); 1273 1230 xReadStrToEnum( cfg_tiers , m_levelTier ); 1274 #endif1275 1231 #endif 1276 1232 #if H_3D … … 1390 1346 1391 1347 1392 #if !H_MV_HLS10_PTL1393 if( m_profile==Profile::NONE )1394 {1395 fprintf(stderr, "***************************************************************************\n");1396 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n");1397 fprintf(stderr, "***************************************************************************\n");1398 }1399 if( m_level==Level::NONE )1400 {1401 fprintf(stderr, "***************************************************************************\n");1402 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set! **\n");1403 fprintf(stderr, "***************************************************************************\n");1404 }1405 #endif1406 1348 1407 1349 Bool check_failed = false; /* abort if there is a fatal configuration problem */ … … 1422 1364 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. "); 1423 1365 #else 1424 #if H_MV_HLS10_AUX1425 1366 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 8 && m_scalabilityMask != 10, "Scalability Mask must be equal to 2, 8 or 10"); 1426 #else1427 xConfirmPara( m_scalabilityMask != 2 , "Scalability Mask must be equal to 2. ");1428 #endif1429 1367 #endif 1430 1368 … … 1437 1375 1438 1376 m_dimIds.push_back( m_viewOrderIndex ); 1439 #if H_MV_HLS10_AUX1440 1377 for (Int i = 0; i < m_auxId.size(); i++) 1441 1378 { … … 1446 1383 m_dimIds.push_back ( m_auxId ); 1447 1384 } 1448 #endif1449 1385 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); 1450 1386 Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; … … 1540 1476 { 1541 1477 Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ]; 1542 #if H_MV_HLS10_ADD_LAYERSETS1543 1478 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." ); 1544 #else1545 xConfirmPara( refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets." );1546 #endif1547 #if !H_MV_HLS10_ADD_LAYERSETS1548 for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++)1549 {1550 Bool isAlsoInLayerSet = false;1551 for (Int j = 0; j < m_layerIdsInSets[ refLayerSetIdx ].size(); j++ )1552 {1553 if ( m_layerIdsInSets[ refLayerSetIdx ][ j ] == m_layerIdsInAddOutputLayerSet[ lsIdx ][ i ] )1554 {1555 isAlsoInLayerSet = true;1556 break;1557 }1558 }1559 xConfirmPara( !isAlsoInLayerSet, "All output layers of a output layer set be included in corresponding layer set.");1560 }1561 #endif1562 1479 } 1563 1480 … … 1571 1488 anyDefaultOutputFlag = anyDefaultOutputFlag || ( m_layerIdsInDefOutputLayerSet[lsIdx].size() != 0 ); 1572 1489 } 1573 #if H_MV_HLS10_ADD_LAYERSETS1574 1490 if ( anyDefaultOutputFlag ) 1575 1491 { 1576 1492 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" ); 1577 1493 } 1578 #else1579 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" );1580 #endif1581 1494 } 1582 1495 else … … 1600 1513 } 1601 1514 1602 #if H_MV_HLS10_ADD_LAYERSETS1603 1515 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" ); 1604 #else1605 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" );1606 #endif1607 1516 1608 1517 // PTL 1609 #if H_MV_HLS10_PTL1610 1518 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." ); 1611 1519 … … 1620 1528 } 1621 1529 } 1622 #else1623 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" );1624 #endif1625 1530 1626 1531 // Layer Dependencies … … 2486 2391 #endif 2487 2392 #if H_MV 2488 #if H_MV_HLS10_GEN_FIX2489 2393 xPrintParaVector( "NuhLayerId" , m_layerIdInNuh ); 2490 2394 if ( m_targetEncLayerIdList.size() > 0) … … 2492 2396 xPrintParaVector( "TargetEncLayerIdList" , m_targetEncLayerIdList ); 2493 2397 } 2494 #endif2495 2398 xPrintParaVector( "ViewIdVal" , m_viewId ); 2496 2399 xPrintParaVector( "ViewOrderIndex", m_viewOrderIndex ); 2497 #if H_MV_HLS10_AUX2498 2400 xPrintParaVector( "AuxId", m_auxId ); 2499 #endif2500 2401 #endif 2501 2402 #if H_3D -
branches/HTM-12.1-dev0/source/App/TAppEncoder/TAppEncCfg.h
r1074 r1076 78 78 std::vector<Int> m_viewId; ///< view id 79 79 std::vector<Int> m_viewOrderIndex; ///< view order index 80 #if H_MV_HLS10_AUX81 80 std::vector<Int> m_auxId; ///< auxiliary id 82 #endif83 81 #if H_3D 84 82 std::vector<Int> m_depthFlag; ///< depth flag 85 83 #endif 86 #if H_MV_HLS10_GEN_FIX87 84 std::vector<Int> m_targetEncLayerIdList; ///< layer Ids in Nuh to be encoded 88 #endif89 85 std::vector<Int> m_layerIdInNuh; ///< layer Id in Nuh for each layer 90 86 Bool m_splittingFlag; ///< Splitting Flag … … 95 91 Int m_vpsNumLayerSets; ///< Number of layer sets 96 92 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 97 #if H_MV_HLS10_ADD_LAYERSETS98 93 Int m_numAddLayerSets; ///< Number of additional layer sets 99 94 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 #endif101 95 Int m_defaultOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 102 96 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 103 97 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 104 98 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 105 #if H_MV_HLS10_ADD_LAYERSETS106 99 std::vector< std::vector< Int > > m_profileTierLevelIdx; ///< Indices of of profile, per layer in layer set 107 #else108 std::vector<Int> m_profileLevelTierIdx; ///< Indices of of profile level tier109 #endif110 100 std::vector<Bool> m_altOutputLayerFlag; ///< Alt output layer flag 111 101 … … 138 128 std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag; 139 129 std::vector< std::vector<Int > > m_minHorizontalCtuOffsetPlus1; 140 #if H_MV_HLS10_VPS_VUI141 130 Bool m_singleLayerForNonIrapFlag; 142 131 Bool m_higherLayerIrapSkipFlag; 143 #endif // H_MV_HLS10_VPS_VUI144 132 145 133 … … 193 181 194 182 // profile/level 195 #if H_MV_HLS10_PTL196 183 #if H_MV 197 184 std::vector< Profile::Name > m_profile; … … 203 190 Level::Tier m_levelTier; 204 191 Level::Name m_level; 205 #endif206 192 #endif 207 193 … … 468 454 std::vector<Int> m_sbPropAvgBitRate; 469 455 std::vector<Int> m_sbPropMaxBitRate; 470 #if H_MV_HLS10_GEN_FIX471 456 Bool m_outputVpsInfo; 472 #endif473 457 #endif 474 458 #if H_3D … … 531 515 #if H_MV 532 516 533 #if H_MV_HLS10_PTL534 517 template<typename T> 535 518 Void xReadStrToEnum(string in, std::vector<T> &val) … … 552 535 delete[] cString; 553 536 } 554 #endif555 537 556 538 -
branches/HTM-12.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r1074 r1076 144 144 xDeriveDltArray ( vps, dlt ); 145 145 #endif 146 #if H_MV_HLS10_GEN_FIX147 146 if ( m_targetEncLayerIdList.size() == 0 ) 148 147 { … … 166 165 } 167 166 } 168 #endif 169 170 #if H_MV_HLS10_ADD_LAYERSETS 167 171 168 if ( m_outputVpsInfo ) 172 169 { 173 #if H_MV_HLS10_AUX174 170 vps.printScalabilityId(); 175 #endif176 171 vps.printLayerDependencies(); 177 172 vps.printLayerSets(); 178 173 vps.printPTL(); 179 174 } 180 #endif181 175 182 176 for(Int layerIdInVps = 0; layerIdInVps < m_numberOfLayers; layerIdInVps++) … … 829 823 830 824 #if H_MV 831 #if H_MV_HLS10_GEN_FIX832 825 while ( (m_targetEncLayerIdList.size() != 0 ) && !allEos ) 833 #else834 while ( !allEos )835 #endif836 826 { 837 827 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 838 828 { 839 #if H_MV_HLS10_GEN_FIX840 829 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 841 830 { 842 831 continue; 843 832 } 844 #endif845 833 846 834 Int frmCnt = 0; … … 883 871 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 884 872 { 885 #if H_MV_HLS10_GEN_FIX886 873 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 887 874 { 888 875 continue; 889 876 } 890 #endif891 877 892 878 #if H_3D_VSO … … 916 902 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 917 903 { 918 #if H_MV_HLS10_GEN_FIX919 904 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 920 905 { 921 906 continue; 922 907 } 923 #endif924 908 m_acTEncTopList[layer]->printSummary( m_acTEncTopList[layer]->getNumAllPicCoded(), m_isField ); 925 909 } … … 1385 1369 // Max sub layers, + presence flag 1386 1370 Bool subLayersMaxMinus1PresentFlag = false; 1387 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS11388 Int subLayersMaxMinus1 = -1;1389 #endif1390 1371 for (Int curLayerIdInVps = 0; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++ ) 1391 1372 { … … 1398 1379 1399 1380 vps.setSubLayersVpsMaxMinus1( curLayerIdInVps, curSubLayersMaxMinus1 ); 1400 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS11401 if ( subLayersMaxMinus1 == -1 )1402 {1403 subLayersMaxMinus1 = curSubLayersMaxMinus1;1404 }1405 else1406 {1407 subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != subLayersMaxMinus1 );1408 }1409 #else1410 1381 subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != vps.getMaxSubLayersMinus1() ); 1411 #endif1412 1382 } 1413 1383 … … 1422 1392 { 1423 1393 Int maxTid = -1; 1424 #if H_MV_FIX_LOOP_GOPSIZE1425 1394 for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 1426 1395 { 1427 1396 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][( i < getGOPSize() ? i : MAX_GOP )]; 1428 1397 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][( i < getGOPSize() ? i : MAX_GOP )]; 1429 #else1430 for( Int i = 0; i < getGOPSize(); i++ )1431 {1432 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][i];1433 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][i];1434 #endif1435 1398 for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++) 1436 1399 { 1437 1400 if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps ) 1438 1401 { 1439 #if H_MV_FIX_LOOP_GOPSIZE1440 1402 Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 ); 1441 1403 Bool refLayerZero = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 ); 1442 1404 maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 1443 #else1444 maxTid = std::max( maxTid, geRef.m_temporalId );1445 #endif1446 1405 } 1447 1406 } … … 1569 1528 Void TAppEncTop::xSetProfileTierLevel( TComVPS& vps ) 1570 1529 { 1571 #if H_MV_HLS10_PTL1572 1530 1573 1531 // SET PTL … … 1587 1545 m_nonPackedConstraintFlag, m_frameOnlyConstraintFlag, m_inblFlag[ptlIdx] ); 1588 1546 } 1589 #else 1590 const Int vpsNumProfileTierLevelMinus1 = 0; //TBD 1591 vps.setVpsNumProfileTierLevelMinus1( vpsNumProfileTierLevelMinus1 ); 1592 1593 for (Int i = 0; i <= vps.getVpsNumProfileTierLevelMinus1(); i++ ) 1594 { 1595 vps.setVpsProfilePresentFlag( i, true ); 1596 } 1597 #endif 1598 } 1599 1600 #if H_MV_HLS10_PTL 1547 } 1548 1601 1549 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) 1602 1550 { … … 1620 1568 ptl->setLevelIdc ( level ); 1621 1569 ptl->setProfileCompatibilityFlag( profile, true ); 1622 #if H_MV_HLS10_PTL_INBL_FIX1623 1570 ptl->setInbldFlag( inbldFlag ); 1624 #endif1625 1571 1626 1572 switch ( profile ) … … 1648 1594 } 1649 1595 } 1650 #endif1651 1596 1652 1597 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) … … 1666 1611 //repFormat->setSeparateColourPlaneVpsFlag( ); 1667 1612 1668 #if H_MV_HLS10_GEN_VSP_CONF_WIN1669 1613 repFormat->setConformanceWindowVpsFlag( true ); 1670 1614 repFormat->setConfWinVpsLeftOffset ( m_confLeft / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); … … 1672 1616 repFormat->setConfWinVpsTopOffset ( m_confTop / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1673 1617 repFormat->setConfWinVpsBottomOffset ( m_confBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1674 #endif1675 1618 1676 1619 assert( vps.getRepFormat( 0 ) == NULL ); … … 1689 1632 { 1690 1633 Int currLsIdx = vps.olsIdxToLsIdx( i ); 1691 #if !H_MV_HLS10_ADD_LAYERSETS1692 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );1693 #endif1694 1634 Bool subLayerFlagInfoPresentFlag = false; 1695 1635 … … 1697 1637 { 1698 1638 Bool subLayerDpbInfoPresentFlag = false; 1699 #if !H_MV_HLS10_ADD_LAYERSETS1700 assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() );1701 #endif1702 1639 for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ ) 1703 1640 { 1704 #if H_MV_HLS10_DBP_SIZE1705 1641 Int layerIdInVps = vps.getLayerIdInVps( vps.getLayerSetLayerIdList( currLsIdx, k ) ); 1706 1642 if ( vps.getNecessaryLayerFlag( i,k ) && ( vps.getVpsBaseLayerInternalFlag() || vps.getLayerSetLayerIdList( currLsIdx, k ) != 0 ) ) … … 1719 1655 } 1720 1656 } 1721 #else1722 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );1723 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );1724 1725 if ( j > 0 )1726 {1727 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) );1728 }1729 #endif1730 1657 } 1731 1658 1732 1659 Int maxNumReorderPics = MIN_INT; 1733 #if H_MV_HLS10_DBP_SIZE1734 1660 for ( Int idx = 0; idx < vps.getNumLayersInIdList( currLsIdx ); idx++ ) 1735 1661 { … … 1740 1666 } 1741 1667 } 1742 #else1743 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )1744 {1745 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] );1746 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] );1747 }1748 #endif1749 1668 assert( maxNumReorderPics != MIN_INT ); 1750 1669 … … 1793 1712 // Additional output layer sets + profileLevelTierIdx 1794 1713 vps.setDefaultOutputLayerIdc ( m_defaultOutputLayerIdc ); 1795 #if H_MV_HLS10_ADD_LAYERSETS1796 1714 if( vps.getNumIndependentLayers() == 0 && m_numAddLayerSets > 0 ) 1797 1715 { … … 1827 1745 } 1828 1746 } 1829 #else1830 vps.setNumAddLayerSets ( 0 );1831 #endif1832 1747 vps.setNumAddOlss ( numAddOuputLayerSets ); 1833 1748 vps.initTargetLayerIdLists(); 1834 1749 1835 #if H_MV_HLS10_ADD_LAYERSETS1836 1750 for (Int olsIdx = 0; olsIdx < vps.getNumLayerSets() + numAddOuputLayerSets; olsIdx++) 1837 1751 { 1838 1752 Int addOutLsIdx = olsIdx - vps.getNumLayerSets(); 1839 #else1840 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)1841 {1842 Int addOutLsIdx = olsIdx - m_vpsNumLayerSets;1843 #endif1844 1753 vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 1845 1754 1846 #if H_MV_HLS10_ADD_LAYERSETS1847 1755 Int lsIdx = vps.olsIdxToLsIdx( olsIdx ); 1848 #else1849 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ];1850 #endif1851 1756 if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 ) 1852 1757 { 1853 #if H_MV_HLS10_ADD_LAYERSETS1854 1758 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1855 #else1856 for ( Int i = 0; i < layerIdList.size(); i++)1857 #endif1858 1759 { 1859 1760 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 ! … … 1865 1766 for (Int j = 0; j < outLayerIdList.size(); j++) 1866 1767 { 1867 #if H_MV_HLS10_ADD_LAYERSETS1868 1768 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1869 1769 { 1870 1770 if ( vps.getLayerSetLayerIdList( lsIdx, i ) == outLayerIdList[ j ] ) 1871 #else1872 for (Int i = 0; i < layerIdList.size(); i++ )1873 {1874 if ( layerIdList[ i ] == outLayerIdList[ j ] )1875 #endif1876 1771 { 1877 1772 vps.setOutputLayerFlag( olsIdx, i, true ); … … 1880 1775 } 1881 1776 } 1882 #if H_MV_HLS10_ADD_LAYERSETS1883 1777 if ( !outputLayerInLayerSetFlag ) 1884 1778 { … … 1886 1780 exit(EXIT_FAILURE); 1887 1781 } 1888 #else1889 assert( outputLayerInLayerSetFlag ); // The output layer is not in the layer set.1890 #endif1891 1782 } 1892 1783 } 1893 1784 else 1894 1785 { 1895 #if H_MV_HLS10_ADD_LAYERSETS1896 1786 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1897 #else1898 for ( Int i = 0; i < layerIdList.size(); i++)1899 #endif1900 1787 { 1901 1788 vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) ); … … 1903 1790 } 1904 1791 1905 #if H_MV_HLS10_NESSECARY_LAYER1906 1792 vps.deriveNecessaryLayerFlags( olsIdx ); 1907 #endif1908 1793 vps.deriveTargetLayerIdList( olsIdx ); 1909 1794 1910 #if H_MV_HLS10_PTL1911 1795 // SET profile_tier_level_index. 1912 1796 if ( olsIdx == 0 ) … … 1925 1809 { 1926 1810 vps.setProfileTierLevelIdx(olsIdx, j, m_profileTierLevelIdx[olsIdx][j] ); 1927 #if H_MV_HLS10_PTL_FIX1928 1811 if( !vps.getNecessaryLayerFlag(olsIdx,j) && m_profileTierLevelIdx[ olsIdx ][ j ] != -1 ) 1929 1812 { … … 1932 1815 } 1933 1816 else if ( vps.getNecessaryLayerFlag(olsIdx,j) ) 1934 #else1935 }1936 else1937 #endif1938 1817 { 1939 1818 // setting default values … … 1951 1830 } 1952 1831 } 1953 #else1954 if ( olsIdx > 0 )1955 {1956 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] );1957 }1958 #endif1959 1832 1960 1833 if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 && … … 1994 1867 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1995 1868 { 1996 #if H_MV_HLS10_VPS_VUI1997 1869 for( Int i = 0; i < vps.getNumLayerSets(); i++ ) 1998 #else1999 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ )2000 #endif2001 1870 { 2002 1871 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 2047 1916 for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ) ; j++ ) 2048 1917 { 2049 #if H_MV_HLS10_REF_PRED_LAYERS2050 1918 Int layerIdx = vps.getLayerIdInVps( vps.getIdDirectRefLayer(vps.getLayerIdInNuh( i ) , j )); 2051 #else2052 Int layerIdx = vps.getLayerIdInVps( vps.getRefLayerId(vps.getLayerIdInNuh( i ) , j ));2053 #endif2054 1919 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 2055 1920 { … … 2070 1935 } 2071 1936 2072 #if H_MV_HLS10_VPS_VUI2073 1937 pcVPSVUI->setSingleLayerForNonIrapFlag( m_singleLayerForNonIrapFlag ); 2074 1938 pcVPSVUI->setHigherLayerIrapSkipFlag( m_higherLayerIrapSkipFlag ); 2075 #endif2076 1939 2077 1940 pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag ); … … 2130 1993 } 2131 1994 } 2132 #if H_MV_HLS10_GEN_FIX2133 1995 Bool TAppEncTop::xLayerIdInTargetEncLayerIdList(Int nuhLayerId) 2134 1996 { 2135 1997 return ( std::find(m_targetEncLayerIdList.begin(), m_targetEncLayerIdList.end(), nuhLayerId) != m_targetEncLayerIdList.end()) ; 2136 1998 } 2137 #endif2138 1999 2139 2000 -
branches/HTM-12.1-dev0/source/App/TAppEncoder/TAppEncTop.h
r1066 r1076 133 133 Void xSetProfileTierLevel ( TComVPS& vps ); 134 134 135 #if H_MV_HLS10_PTL136 135 Void xSetProfileTierLevel( TComVPS& vps, Int profileTierLevelIdx, Int subLayer, 137 136 Profile::Name profile, Level::Name level, Level::Tier tier, … … 139 138 Bool nonPackedConstraintFlag, Bool frameOnlyConstraintFlag, 140 139 Bool inbldFlag ); 141 #endif142 140 Void xSetRepFormat ( TComVPS& vps ); 143 141 Void xSetDpbSize ( TComVPS& vps ); … … 145 143 GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc ); 146 144 Int xGetMax( std::vector<Int>& vec); 147 #if H_MV_HLS10_GEN_FIX148 145 Bool xLayerIdInTargetEncLayerIdList( Int nuhLayerId ); 149 #endif150 146 #endif 151 147 #if H_3D -
branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
r1075 r1076 1873 1873 #if H_MV 1874 1874 m_vpsBaseLayerInternalFlag = true; 1875 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL1876 1875 m_vpsBaseLayerAvailableFlag = true; 1877 #endif1878 1876 #endif 1879 1877 … … 1901 1899 { 1902 1900 m_layerSetIdxForOlsMinus1[i] = -1; 1903 #if !H_MV_HLS10_PTL1904 m_profileLevelTierIdx[i] = 0;1905 #endif1906 1901 for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++) 1907 1902 { 1908 #if H_MV_HLS10_PTL1909 #if H_MV_HLS10_PTL_FIX1910 1903 m_profileTierLevelIdx[i][j] = -1; 1911 #else1912 m_profileTierLevelIdx[i][j] = false;1913 #endif1914 #endif1915 1904 m_outputLayerFlag[i][j] = false; 1916 1905 } … … 1970 1959 m_directDependencyFlag[i][j] = false; 1971 1960 m_directDependencyType[i][j] = -1; 1972 #if H_MV_HLS10_REF_PRED_LAYERS1973 1961 m_dependencyFlag [i][j] = false; 1974 1962 m_idDirectRefLayer[i][j] = -1; 1975 1963 m_idPredictedLayer[i][j] = -1; 1976 1964 m_idRefLayer [i][j] = -1; 1977 #else1978 m_refLayerId[i][j] = -1;1979 #endif1980 1965 m_maxTidIlRefPicsPlus1[i][j] = 7; 1981 1966 } … … 2061 2046 assert( getVpsNumRepFormatsMinus1() <= 255 ); 2062 2047 2063 #if H_MV_HLS10_ADD_LAYERSETS2064 2048 // The value of num_add_layer_sets shall be in the range of 0 to 1023, inclusive. 2065 2049 assert( getNumAddLayerSets() >= 0 && getNumAddLayerSets() <= 1023 ); 2066 #endif2067 2050 return true; 2068 2051 } … … 2097 2080 { 2098 2081 2099 #if H_MV_HLS10_REF_PRED_LAYERS2100 2082 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2101 2083 { … … 2167 2149 } 2168 2150 m_numIndependentLayers = k; 2169 #else // H_MV_HLS10_GEN 2170 2171 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2172 { 2173 Int iNuhLId = getLayerIdInNuh( i ); 2174 m_numDirectRefLayers[ iNuhLId ] = 0; 2175 for( Int j = 0; j < i; j++ ) 2176 { 2177 if( getDirectDependencyFlag(i , j) ) 2178 { 2179 m_refLayerId[ iNuhLId ][m_numDirectRefLayers[ iNuhLId ]++ ] = getLayerIdInNuh( j ); 2180 } 2181 } 2182 } 2183 2184 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2185 { 2186 m_numRefLayers[i] = 0; 2187 } 2188 2189 for (Int currLayerId = 0; currLayerId <= 62; currLayerId++ ) 2190 { 2191 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2192 { 2193 m_recursiveRefLayerFlag[currLayerId][i] = 0; 2194 } 2195 } 2196 2197 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2198 { 2199 Int iNuhLId = getLayerIdInNuh( i ); 2200 xSetRefLayerFlags( iNuhLId ); 2201 for( Int j = 0; j < 63; j++ ) 2202 { 2203 m_numRefLayers[ iNuhLId ] += m_recursiveRefLayerFlag[ iNuhLId ][ j ]; 2204 } 2205 } 2206 2207 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) // Bug in spec "<" instead of "<=" 2208 { 2209 Int iNuhLId = getLayerIdInNuh( i ); 2210 Int predIdx = 0; 2211 for( Int j = iNuhLId + 1; j < 63; j++ ) 2212 { 2213 if( m_recursiveRefLayerFlag[ j ][ iNuhLId ] ) 2214 { 2215 m_predictedLayerId[ iNuhLId ][ predIdx++ ] = j; 2216 } 2217 } 2218 m_numPredictedLayers[ iNuhLId ] = predIdx; 2219 } 2220 2221 Bool countedLayerIdxFlag[ MAX_NUM_LAYERS ]; 2222 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2223 { 2224 countedLayerIdxFlag[ i ] = 0; 2225 } 2226 for( Int i = 0, k = 0; i <= getMaxLayersMinus1(); i++ ) 2227 { 2228 Int iNuhLId = getLayerIdInNuh( i ); 2229 if( m_numDirectRefLayers[ iNuhLId ] == 0 ) 2230 { 2231 m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId; 2232 m_numLayersInTreePartition[ k ] = 1; 2233 2234 for( Int j = 0; j < m_numPredictedLayers[ iNuhLId ]; j++ ) 2235 { 2236 if( !countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] ) 2237 { 2238 m_treePartitionLayerIdList[ k ][ m_numLayersInTreePartition[ k ] ] = m_predictedLayerId[ iNuhLId ][ j ]; 2239 m_numLayersInTreePartition[ k ]++; 2240 countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] = 1; 2241 } 2242 } 2243 k++; 2244 2245 m_numIndependentLayers = k; 2246 } 2247 } 2248 #endif // H_MV_HLS10_GEN 2249 } 2250 2251 #if !H_MV_HLS10_REF_PRED_LAYERS 2252 Int TComVPS::getRefLayerId( Int layerIdInNuh, Int idx ) 2253 { 2254 assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInNuh] ); 2255 Int refLayerIdInNuh = m_refLayerId[ layerIdInNuh ][ idx ]; 2256 assert ( refLayerIdInNuh >= 0 ); 2257 return refLayerIdInNuh; 2258 } 2259 #endif 2151 } 2152 2260 2153 2261 2154 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType ) … … 2408 2301 { 2409 2302 assert( lsIdx >= 0 ); 2410 #if H_MV_HLS10_ADD_LAYERSETS2411 2303 assert( lsIdx <= getNumLayerSets() ); 2412 #else2413 assert( lsIdx <= getVpsNumLayerSetsMinus1() );2414 #endif2415 2304 return (Int) m_layerSetLayerIdList[ lsIdx ].size(); 2416 2305 } … … 2436 2325 } 2437 2326 2438 #if !H_MV_HLS10_REF_PRED_LAYERS2439 Bool TComVPS::getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth /*= 0 */ )2440 {2441 #if H_MV_HLS10_REF_PRED_LAYERS2442 // TBD: Remove getInDirectDependencyFlag entirely.2443 return getDependencyFlag( depLayeridInVps, refLayeridInVps );2444 #else2445 assert( depth < 65 );2446 Bool dependentFlag = getDirectDependencyFlag( depLayeridInVps, refLayeridInVps );2447 2448 for( Int i = 0; i < depLayeridInVps && !dependentFlag; i++ )2449 {2450 if ( getDirectDependencyFlag( depLayeridInVps, i ) )2451 {2452 dependentFlag = getInDirectDependencyFlag( i, refLayeridInVps, depth++ );2453 }2454 }2455 return dependentFlag;2456 #endif2457 }2458 #endif2459 2327 2460 2328 Void TComVPS::deriveLayerSetLayerIdList() … … 2485 2353 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2486 2354 { 2487 #if H_MV_HLS10_NESSECARY_LAYER2488 2355 if ( getNecessaryLayerFlag( i , j )) 2489 2356 { 2490 #endif2491 2357 m_targetDecLayerIdLists[i].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2492 #if H_MV_HLS10_NESSECARY_LAYER 2493 } 2494 #endif 2358 } 2495 2359 2496 2360 if( getOutputLayerFlag( i, j )) … … 2541 2405 } 2542 2406 2543 #if !H_MV_HLS10_ADD_LAYERSETS2544 Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder )2545 {2546 for( Int j = 0; j <= getMaxSubLayersInLayerSetMinus1( 0 ); j++ )2547 {2548 Int maxDecPicBufferingMinus1 = sps->getMaxDecPicBuffering( j ) - 1;2549 Int numReorderPics = sps->getNumReorderPics ( j );2550 Int maxLatencyIncreasePlus1 = sps->getMaxLatencyIncrease( j );2551 2552 if ( encoder )2553 {2554 assert( getDpbSize()->getMaxVpsDecPicBufferingMinus1(0, 0, j ) == maxDecPicBufferingMinus1 );2555 assert( getDpbSize()->getMaxVpsNumReorderPics (0, j ) == numReorderPics );2556 assert( getDpbSize()->getMaxVpsLatencyIncreasePlus1 (0, j ) == maxLatencyIncreasePlus1 );2557 }2558 else2559 {2560 getDpbSize()->setMaxVpsDecPicBufferingMinus1(0, 0, j, maxDecPicBufferingMinus1 );2561 getDpbSize()->setMaxVpsNumReorderPics (0, j, numReorderPics );2562 getDpbSize()->setMaxVpsLatencyIncreasePlus1 (0, j, maxLatencyIncreasePlus1 );2563 }2564 }2565 }2566 #endif2567 2407 Bool TComVPS::getAltOutputLayerFlagVar( Int i ) 2568 2408 { … … 2578 2418 } 2579 2419 2580 #if !H_MV_HLS10_MAXNUMPICS 2581 Int TComVPS::getMaxNumPics( Int layerId ) 2582 { 2583 Int maxNumPics = MAX_INT; 2584 for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++) 2585 { 2586 Int lsIdx = olsIdxToLsIdx( olsIdx ); 2587 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2588 { 2589 if( getLayerSetLayerIdList(lsIdx, j ) == layerId ) 2590 { 2591 Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx ); 2592 maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j, maxSL ) ); 2593 } 2594 } 2595 } 2596 assert( maxNumPics != MAX_INT ); 2597 return maxNumPics; 2598 } 2599 #endif 2600 2601 #if !H_MV_HLS10_REF_PRED_LAYERS 2602 Void TComVPS::xSetRefLayerFlags( Int currLayerId ) 2603 { 2604 for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ ) 2605 { 2606 Int refLayerId = m_refLayerId[ currLayerId ][ j ]; 2607 m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1; 2608 for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 2609 { 2610 m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ] || m_recursiveRefLayerFlag[ refLayerId ][ k ]; 2611 } 2612 } 2613 } 2614 2615 #endif 2616 2617 #if H_MV_HLS10_PTL_FIX 2420 2421 2618 2422 Int TComVPS::inferProfileTierLevelIdx(Int i, Int j) 2619 2423 { … … 2635 2439 return ptlIdx; 2636 2440 } 2637 #endif 2638 2639 #if H_MV_HLS10_ADD_LAYERSETS 2441 2640 2442 Void TComVPS::deriveAddLayerSetLayerIdList(Int i) 2641 2443 { … … 2660 2462 } 2661 2463 2662 #endif 2663 2664 #if H_MV_HLS10_NESSECARY_LAYER 2464 2665 2465 Void TComVPS::deriveNecessaryLayerFlags(Int olsIdx) 2666 2466 { … … 2693 2493 } 2694 2494 } 2695 #endif 2696 2697 #if H_MV_HLS10_ADD_LAYERSETS 2495 2698 2496 Void TComVPS::printPTL() 2699 2497 { … … 2741 2539 #endif 2742 2540 2743 #if H_MV_HLS10_AUX2744 2541 vector<Int> viewOrderIndex; 2745 2542 vector<Int> auxId; 2746 2543 vector<Int> dependencyId; 2747 2544 vector<Int> viewId; 2748 #endif2749 2545 for (Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2750 2546 { 2751 2547 fullArray.push_back( getMaxLayersMinus1() + 1 ); 2752 2548 range.push_back( i ); 2753 #if H_MV_HLS10_AUX2754 2549 viewOrderIndex.push_back( getViewIndex ( i ) ); 2755 2550 dependencyId .push_back( getDependencyId( i ) ); … … 2758 2553 #if H_3D 2759 2554 depthId.push_back( getDepthId( i ) ); 2760 #endif2761 2555 #endif 2762 2556 } … … 2771 2565 } 2772 2566 2773 #if H_MV_HLS10_AUX2774 2567 Void TComVPS::printScalabilityId() 2775 2568 { … … 2809 2602 std::cout << std::endl; 2810 2603 } 2811 #endif2812 2604 2813 2605 Void TComVPS::printLayerSets() … … 2864 2656 } 2865 2657 2866 #endif2867 2658 2868 2659 #endif // H_MV … … 2942 2733 #endif 2943 2734 2944 #if !H_MV_HLS10_PPS2945 m_numScaledRefLayerOffsets = 0;2946 2947 for (Int i = 0; i < MAX_NUM_SCALED_REF_LAYERS; i++ )2948 {2949 m_scaledRefLayerId [i] = -1;2950 }2951 2952 for (Int i = 0; i < MAX_NUM_LAYERS; i++ )2953 {2954 m_scaledRefLayerLeftOffset [i] = 0;2955 m_scaledRefLayerTopOffset [i] = 0;2956 m_scaledRefLayerRiFghtOffset [i] = 0;2957 m_scaledRefLayerBottomOffset [i] = 0;2958 }2959 #endif2960 2735 #endif 2961 2736 } … … 3324 3099 Void TComSPS::inferRepFormat( TComVPS* vps, Int layerIdCurr ) 3325 3100 { 3326 #if H_MV_HLS10_MULTILAYERSPS3327 3101 if ( getMultiLayerExtSpsFlag() ) 3328 #else3329 if ( layerIdCurr > 0 )3330 #endif3331 3102 { 3332 3103 Int repFormatIdx = getUpdateRepFormatFlag() ? getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ; … … 3344 3115 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 3345 3116 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 3346 #if H_MV_HLS10_GEN_VSP_CONF_WIN3347 3117 Window &spsConf = getConformanceWindow(); 3348 3118 … … 3353 3123 spsConf.setWindowTopOffset ( repFormat->getConfWinVpsTopOffset() ); 3354 3124 spsConf.setWindowBottomOffset( repFormat->getConfWinVpsBottomOffset() ); 3355 #endif 3356 3357 #if H_MV_HLS10_MULTILAYERSPS 3125 3358 3126 if ( getMultiLayerExtSpsFlag() && getUpdateRepFormatFlag() ) 3359 #else3360 if ( getLayerId() > 0 && getUpdateRepFormatFlag() )3361 #endif3362 3127 { 3363 3128 assert( getChromaFormatIdc() <= repFormat->getChromaFormatVpsIdc() ); … … 3393 3158 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 3394 3159 3395 #if H_MV_HLS10_MULTILAYERSPS3396 3160 if ( getMultiLayerExtSpsFlag() ) 3397 #else3398 if (getLayerId() > 0 )3399 #endif3400 3161 { 3401 3162 Int layerIdx = 0; … … 3415 3176 Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ; 3416 3177 3417 #if H_MV_HLS10_MULTILAYERSPS3418 3178 // This preliminary fix needs to be checked. 3419 3179 Int maxNumReorderPics = vps->getDpbSize()->getMaxVpsNumReorderPics( targetOptLayerSetIdx, i ); 3420 3180 Int maxLatencyIncreasePlus1 = vps->getDpbSize()->getMaxVpsLatencyIncreasePlus1( targetOptLayerSetIdx, i ); 3421 #endif3422 3181 if ( encoder ) 3423 3182 { 3424 3183 assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 ); 3425 #if H_MV_HLS10_MULTILAYERSPS3426 3184 // This preliminary fix needs to be checked. 3427 3185 assert( getNumReorderPics( i ) == maxNumReorderPics ); 3428 3186 assert( getMaxLatencyIncrease( i ) == maxLatencyIncreasePlus1 ); 3429 #endif3430 3187 3431 3188 } 3432 3189 else 3433 3190 { 3434 #if !H_MV_HLS10_MULTILAYERSPS3435 setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 );3436 #else3437 3191 // This preliminary fix needs to be checked. 3438 3192 setMaxDecPicBuffering( maxDecPicBufferingMinus1 + 1 , i); 3439 3193 setNumReorderPics ( maxNumReorderPics, i ); 3440 3194 setMaxLatencyIncrease( maxLatencyIncreasePlus1 - 1 , i); 3441 #endif3442 3195 } 3443 3196 } … … 3447 3200 Void TComSPS::checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ) 3448 3201 { 3449 #if !H_MV_HLS10_MAXNUMPICS3450 // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead3451 // of nuh_layer_id of slice (currLayerId), this seems to be a bug.3452 #endif3453 3202 for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ ) 3454 3203 { … … 3456 3205 if ( !rps->getInterRPSPrediction() ) 3457 3206 { 3458 #if H_MV_HLS10_MAXNUMPICS3459 3207 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), MAX_INT, getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); // INT_MAX to be replaced by DpbSize 3460 #else 3461 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ), 3462 getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 3463 #endif 3464 } 3465 } 3466 } 3467 3468 #if H_MV_HLS10_MULTILAYERSPS 3208 } 3209 } 3210 } 3211 3469 3212 Void TComSPS::inferSpsMaxSubLayersMinus1(Bool atPsActivation, TComVPS* vps) 3470 3213 { … … 3487 3230 } 3488 3231 } 3489 #endif3490 3232 #endif 3491 3233 … … 3850 3592 { 3851 3593 TComVPS* vps = getVPS(); 3852 #if H_MV_HLS10_REF_PRED_LAYERS3853 3594 Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) ); 3854 #else3855 Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) );3856 #endif3857 3595 3858 3596 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) && ( getTLayer() == 0 ) && … … 3925 3663 Int TComSlice::getRefPicLayerId( Int i ) 3926 3664 { 3927 #if H_MV_HLS10_REF_PRED_LAYERS3928 3665 return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) ); 3929 #else3930 return getVPS()->getRefLayerId( getLayerId(), getInterLayerPredLayerIdc( i ) );3931 #endif3932 3666 } 3933 3667 … … 4648 4382 , m_nonPackedConstraintFlag(false) 4649 4383 , m_frameOnlyConstraintFlag(false) 4650 #if H_MV_HLS10_PTL4651 4384 , m_max12bitConstraintFlag ( false ) 4652 4385 , m_max10bitConstraintFlag ( false ) … … 4659 4392 , m_lowerBitRateConstraintFlag ( false ) 4660 4393 , m_inbldFlag ( false ) 4661 #endif4662 4394 { 4663 4395 ::memset(m_profileCompatibilityFlag, 0, sizeof(m_profileCompatibilityFlag)); 4664 4396 } 4665 4397 4666 #if H_MV_HLS10_PTL_INFER_FIX4667 4398 Bool ProfileTierLevel::getV2ConstraintsPresentFlag() 4668 4399 { … … 4710 4441 } 4711 4442 4712 #endif4713 4443 4714 4444 TComPTL::TComPTL() … … 4719 4449 4720 4450 #if H_MV 4721 #if !H_MV_HLS10_PTL_INFER_FIX4722 Void TComPTL::copyLevelFrom( TComPTL* source )4723 {4724 getGeneralPTL()->setLevelIdc( source->getGeneralPTL()->getLevelIdc() );4725 for( Int subLayer = 0; subLayer < 6; subLayer++ )4726 {4727 setSubLayerLevelPresentFlag( subLayer, source->getSubLayerLevelPresentFlag( subLayer ) );4728 getSubLayerPTL( subLayer )->setLevelIdc( source->getSubLayerPTL( subLayer )->getLevelIdc() );4729 }4730 }4731 #else4732 4451 Void TComPTL::inferGeneralValues(Bool profilePresentFlag, Int k, TComPTL* refPTL) 4733 4452 { … … 4817 4536 } 4818 4537 4819 #endif4820 4538 #endif 4821 4539 //! \} … … 4860 4578 4861 4579 m_vpsVuiBspHrdPresentFlag = false; 4862 #if H_MV_HLS10_VPS_VUI_BSP4863 4580 m_vpsVuiBspHrdParameters = NULL; 4864 #else4865 m_vpsVuiBspHrdParameters = new TComVpsVuiBspHrdParameters();4866 #endif4867 4581 } 4868 4582 … … 4910 4624 } 4911 4625 4912 #if !H_MV_HLS10_VPS_VUI_BSP 4913 Void TComVpsVuiBspHrdParameters::checkLayerInBspFlag( TComVPS* vps, Int h ) 4914 { 4915 // It is a requirement of bitstream conformance that bitstream partition with index j shall not include 4916 // direct or indirect reference layers of any layers in bitstream partition i for any values of i and j 4917 // in the range of 0 to num_bitstream_partitions[ h ] ?1, inclusive, such that i is less than j. 4918 4919 for ( Int partJ = 0; partJ < getNumBitstreamPartitions( h ); partJ++ ) 4920 { 4921 for ( Int partI = 0; partI < partJ; partI++ ) 4922 { 4923 for ( Int layerJ = 0; layerJ < vps->getMaxLayersMinus1(); layerJ++ ) 4924 { 4925 if ( m_layerInBspFlag[ h ][partJ][layerJ ] ) 4926 { 4927 for ( Int layerI = 0; layerI < vps->getMaxLayersMinus1(); layerI++ ) 4928 { 4929 if ( m_layerInBspFlag[ h ][partI][layerI] ) 4930 { 4931 assert( !vps->getInDirectDependencyFlag( layerI, layerJ ) ); 4932 } 4933 } 4934 } 4935 } 4936 } 4937 } 4938 4939 // --------------- 4940 // To be added: 4941 // When vps_base_layer_internal_flag is equal to 0 and layer_in_bsp_flag[ h ][ i ][ 0 ] is equal to 1 for any value of h in the 4942 // range of 1 to vps_num_layer_sets_minus1, inclusive, and any value of i in the range of 0 to num_bitstream_partitions[ h ] - 1, 4943 // inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] for at least one value of j in the range of 1 to 4944 // NumLayersInIdList[ h ] - 1, inclusive, shall be equal to 1. 4945 // --------------- 4946 4947 4948 // When num_bitstream_partitions[ h ] is equal to 1 for any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, 4949 // the value of layer_in_bsp_flag[ h ][ 0 ][ j ] should be equal to 0 for at least one value of j in the range 0 to 4950 // NumLayersInIdList[ h ] ? 1, inclusive. 4951 4952 4953 if ( getNumBitstreamPartitions( h ) == 1 ) 4954 { 4955 Bool atLeastOneZero = false; 4956 for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ ) 4957 { 4958 atLeastOneZero = atLeastOneZero || !getLayerInBspFlag( h, 0, j ); 4959 } 4960 assert( atLeastOneZero ); 4961 } 4962 4963 4964 // For any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] 4965 // shall be equal to 1 for at most one value of i in the range of 0 to num_bitstream_partitions[ h ] ? 1, inclusive. 4966 4967 for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ ) 4968 { 4969 Int numLayerInBsp = 0; 4970 for ( Int i = 0; i <= getNumBitstreamPartitions( h ) - 1; i++ ) 4971 { 4972 numLayerInBsp += ( getLayerInBspFlag( h, i, j ) ? 1 : 0 ); 4973 } 4974 assert( numLayerInBsp <= 1 ); 4975 } 4976 4977 } 4978 4979 Void TComVpsVuiBspHrdParameters::checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ) 4980 { 4981 // bsp_comb_hrd_idx 4982 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4983 assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() ); 4984 4985 // bsp_comb_sched_idx 4986 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4987 4988 //* This check needs to activated, when HighestTid is available here 4989 // assert( getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) ); 4990 } 4991 #endif 4992 4993 #if H_MV_HLS10_VPS_VUI_BSP 4626 4994 4627 4995 4628 TComVpsVuiBspHrdParameters::~TComVpsVuiBspHrdParameters() … … 5089 4722 } 5090 4723 5091 #endif5092 4724 5093 4725 Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) … … 5125 4757 for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 5126 4758 { 5127 #if H_MV_HLS10_ADD_LAYERSETS5128 4759 m_maxVpsDecPicBufferingMinus1[i][k][j] = MIN_INT; 5129 #else5130 m_maxVpsDecPicBufferingMinus1[i][k][j] = 0;5131 #endif5132 4760 } 5133 4761 } -
branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.h
r1075 r1076 45 45 #include "TComRom.h" 46 46 #include "TComList.h" 47 #if H_MV_HLS10_GEN_FIX48 47 #if H_MV 49 48 #include <ios> 50 49 #include <iostream> 51 50 #include <iomanip> 52 #endif53 51 #endif 54 52 //! \ingroup TLibCommon … … 207 205 Bool m_frameOnlyConstraintFlag; 208 206 209 #if H_MV_HLS10_PTL210 207 #if H_MV 211 208 Bool m_max12bitConstraintFlag; … … 220 217 Bool m_inbldFlag; 221 218 #endif 222 #endif223 219 public: 224 220 ProfileTierLevel(); … … 252 248 253 249 #if H_MV 254 #if H_MV_HLS10_PTL255 250 Void setMax12bitConstraintFlag( Bool flag ) { m_max12bitConstraintFlag = flag; } 256 251 Bool getMax12bitConstraintFlag( ) { return m_max12bitConstraintFlag; } … … 281 276 Void setInbldFlag( Bool flag ) { m_inbldFlag = flag; } 282 277 Bool getInbldFlag( ) { return m_inbldFlag; } 283 #endif284 #if H_MV_HLS10_PTL_INFER_FIX285 278 Bool getV2ConstraintsPresentFlag(); 286 279 Bool getInbldPresentFlag(); 287 280 Void copyV2ConstraintFlags( ProfileTierLevel* ptlRef ); 288 281 Void copyProfile( ProfileTierLevel* ptlRef ); 289 #endif290 282 #endif 291 283 }; … … 310 302 ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } 311 303 #if H_MV 312 #if H_MV_HLS10_PTL_INFER_FIX313 304 Void inferGeneralValues ( Bool profilePresentFlag , Int k, TComPTL* refPTL );; 314 305 Void inferSubLayerValues( Int maxNumSubLayersMinus1, Int k, TComPTL* refPTL );; 315 #else316 Void copyLevelFrom( TComPTL* source );317 #endif318 306 #endif 319 307 }; … … 501 489 class TComVpsVuiBspHrdParameters 502 490 { 503 #if H_MV_HLS10_VPS_VUI_BSP504 491 505 492 /* Not yet tested */ … … 563 550 Void setHrdParametermeters( Int k, TComHRD* val ) { *(m_hrdParameters + k ) = *val; }; 564 551 TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters + k; }; 565 #else566 private:567 Int m_vpsNumBspHrdParametersMinus1;568 Bool m_bspCprmsPresentFlag[MAX_NUM_BSP_HRD_PARAMETERS];569 Int m_numBitstreamPartitions[MAX_VPS_OP_SETS_PLUS1];570 Bool m_layerInBspFlag[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_LAYERS];571 Int m_numBspSchedCombinationsMinus1[MAX_VPS_OP_SETS_PLUS1];572 Int m_bspCombHrdIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION];573 Int m_bspCombSchedIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION];574 TComHRD* m_hrdParameters[MAX_NUM_BSP_HRD_PARAMETERS];575 public:576 577 Void setVpsNumBspHrdParametersMinus1( Int val ) { m_vpsNumBspHrdParametersMinus1 = val; }578 Int getVpsNumBspHrdParametersMinus1( ) { return m_vpsNumBspHrdParametersMinus1; }579 580 Void setBspCprmsPresentFlag( Int i, Bool flag ) { m_bspCprmsPresentFlag[i] = flag; }581 Bool getBspCprmsPresentFlag( Int i ) { return m_bspCprmsPresentFlag[i]; }582 583 Void setNumBitstreamPartitions( Int h, Int val ) { m_numBitstreamPartitions[h] = val; }584 Int getNumBitstreamPartitions( Int h ) { return m_numBitstreamPartitions[h]; }585 586 Void setLayerInBspFlag( Int h, Int i, Int j, Bool flag ) { m_layerInBspFlag[h][i][j] = flag; }587 Bool getLayerInBspFlag( Int h, Int i, Int j ) { return m_layerInBspFlag[h][i][j]; }588 Void checkLayerInBspFlag ( TComVPS* vps, Int h );589 590 Void setNumBspSchedCombinationsMinus1( Int h, Int val ) { m_numBspSchedCombinationsMinus1[h] = val; }591 Int getNumBspSchedCombinationsMinus1( Int h ) { return m_numBspSchedCombinationsMinus1[h]; }592 593 Void setBspCombHrdIdx( Int h, Int i, Int j, Int val ) { m_bspCombHrdIdx[h][i][j] = val; }594 Int getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; }595 Int getBspCombHrdIdxLen() { return gCeilLog2( getVpsNumBspHrdParametersMinus1() + 1); };596 597 598 Void setBspCombSchedIdx( Int h, Int i, Int j, Int val ) { m_bspCombSchedIdx[h][i][j] = val; }599 Int getBspCombSchedIdx( Int h, Int i, Int j ) { return m_bspCombSchedIdx[h][i][j]; }600 601 Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j );602 603 Void setHrdParametermeters( Int k, TComHRD* val ) { m_hrdParameters[k] = val; };604 TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters[k]; };605 #endif606 552 }; 607 553 … … 630 576 Bool m_wppNotInUseFlag; 631 577 Bool m_wppInUseFlag [MAX_NUM_LAYERS]; 632 #if H_MV_HLS10_VPS_VUI633 578 Bool m_singleLayerForNonIrapFlag; 634 579 Bool m_higherLayerIrapSkipFlag; 635 #endif636 580 Bool m_ilpRestrictedRefLayersFlag; 637 581 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; … … 708 652 Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; } 709 653 710 #if H_MV_HLS10_VPS_VUI711 654 Void setSingleLayerForNonIrapFlag( Bool flag ) { m_singleLayerForNonIrapFlag = flag; } 712 655 Bool getSingleLayerForNonIrapFlag( ) { return m_singleLayerForNonIrapFlag; } … … 714 657 Void setHigherLayerIrapSkipFlag( Bool flag ) { m_higherLayerIrapSkipFlag = flag; } 715 658 Bool getHigherLayerIrapSkipFlag( ) { return m_higherLayerIrapSkipFlag; } 716 #endif717 659 718 660 Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } … … 750 692 Int m_bitDepthVpsLumaMinus8; 751 693 Int m_bitDepthVpsChromaMinus8; 752 #if H_MV_HLS10_GEN_VSP_CONF_WIN753 694 Bool m_conformanceWindowVpsFlag; 754 695 Int m_confWinVpsLeftOffset; … … 756 697 Int m_confWinVpsTopOffset; 757 698 Int m_confWinVpsBottomOffset; 758 #endif759 699 760 700 public: 761 701 762 #if H_MV_HLS10_GEN_VSP_CONF_WIN763 702 TComRepFormat() 764 703 { … … 769 708 m_confWinVpsBottomOffset = 0; 770 709 }; 771 #else772 TComRepFormat() { };773 #endif774 710 775 711 Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } … … 796 732 Int getBitDepthVpsChromaMinus8( ) { return m_bitDepthVpsChromaMinus8; } 797 733 798 #if H_MV_HLS10_GEN_VSP_CONF_WIN799 734 Void setConformanceWindowVpsFlag( Bool flag ) { m_conformanceWindowVpsFlag = flag; } 800 735 Bool getConformanceWindowVpsFlag( ) { return m_conformanceWindowVpsFlag; } … … 811 746 Void setConfWinVpsBottomOffset( Int val ) { m_confWinVpsBottomOffset = val; } 812 747 Int getConfWinVpsBottomOffset( ) { return m_confWinVpsBottomOffset; } 813 #endif814 748 }; 815 749 … … 834 768 835 769 Void setMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsDecPicBufferingMinus1[i][k][j] = val; } 836 #if H_MV_HLS10_ADD_LAYERSETS837 770 Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { assert( m_maxVpsDecPicBufferingMinus1[i][k][j] >= 0 ); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } 838 #else839 Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { return m_maxVpsDecPicBufferingMinus1[i][k][j]; }840 #endif841 771 842 772 Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } … … 853 783 #if H_MV 854 784 Bool m_vpsBaseLayerInternalFlag; 855 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL856 785 Bool m_vpsBaseLayerAvailableFlag; 857 #endif // H_MV_HLS10_GEN858 786 #endif 859 787 … … 925 853 Int m_layerSetIdxForOlsMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 926 854 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 927 #if H_MV_HLS10_PTL928 855 Int m_profileTierLevelIdx [MAX_VPS_OUTPUTLAYER_SETS ][MAX_NUM_LAYERS]; 929 #else930 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ];931 #endif932 856 Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; 933 857 Bool m_repFormatIdxPresentFlag; … … 958 882 // VPS EXTENSION SEMANTICS VARIABLES 959 883 Int m_layerIdInVps [MAX_NUM_LAYERS ]; 960 #if H_MV_HLS10_REF_PRED_LAYERS961 884 Int m_dependencyFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 962 #endif963 885 964 886 Int m_numDirectRefLayers [MAX_NUM_LAYERS]; 965 #if H_MV_HLS10_REF_PRED_LAYERS966 887 Int m_idDirectRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 967 #else968 Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS];969 #endif970 888 971 889 Int m_numRefLayers [MAX_NUM_LAYER_IDS]; 972 #if H_MV_HLS10_REF_PRED_LAYERS973 890 Int m_idRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 974 #endif975 891 976 892 977 893 Int m_numPredictedLayers [MAX_NUM_LAYERS ]; 978 #if !H_MV_HLS10_REF_PRED_LAYERS979 Int m_predictedLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS];980 #else981 894 Int m_idPredictedLayer [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 982 #endif983 895 Int m_numIndependentLayers; 984 896 Int m_numLayersInTreePartition [MAX_NUM_LAYER_IDS]; 985 897 Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 986 #if H_MV_HLS10_REF_PRED_LAYERS987 898 Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 988 #endif989 899 Int m_viewIndex [MAX_NUM_LAYERS ]; 990 900 … … 993 903 std::vector< std::vector< Int> > m_layerSetLayerIdList; 994 904 995 #if H_MV_HLS10_NESSECARY_LAYER996 905 Int m_numNecessaryLayers [MAX_VPS_OUTPUTLAYER_SETS]; 997 906 Bool m_necessaryLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYERS]; 998 #endif999 907 1000 908 Int xGetDimBitOffset( Int j ); 1001 #if H_MV_HLS10_REF_PRED_LAYERS1002 909 Void xSetRefLayerFlags( Int currLayerId ); 1003 #endif1004 910 // VPS EXTENSION 2 SYNTAX ELEMENTS 1005 911 #if H_3D_ARP … … 1069 975 Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } 1070 976 Bool getVpsBaseLayerInternalFlag( ) { return m_vpsBaseLayerInternalFlag; } 1071 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL1072 977 Void setVpsBaseLayerAvailableFlag( Bool flag ) { m_vpsBaseLayerAvailableFlag = flag; } 1073 978 Bool getVpsBaseLayerAvailableFlag( ) { return m_vpsBaseLayerAvailableFlag; } 1074 979 #endif 1075 #endif1076 980 1077 981 UInt getMaxTLayers () { return m_uiMaxTLayers; } … … 1080 984 #if H_MV 1081 985 UInt getMaxSubLayersMinus1() { return m_uiMaxTLayers - 1; } // For consistency with draft spec 1082 #if H_MV_HLS10_GEN_FIX1083 986 Void setMaxSubLayersMinus1(UInt val) { m_uiMaxTLayers = (val + 1); }; 1084 #endif1085 987 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; 1086 988 Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } … … 1122 1024 1123 1025 #if H_MV 1124 #if H_MV_HLS10_PTL1125 1026 TComPTL* getPTL( Int idx = 0 ) { return &m_pcPTL[idx]; } 1126 #else1127 TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; }1128 #endif1129 1027 #else 1130 1028 TComPTL* getPTL() { return &m_pcPTL; } … … 1213 1111 Bool inferOutputLayerFlag( Int i, Int j ); 1214 1112 1215 #if H_MV_HLS10_PTL1216 1113 Void setProfileTierLevelIdx( Int i, Int j, Int val ) { m_profileTierLevelIdx[ i ][ j ] = val; } 1217 1114 Int getProfileTierLevelIdx( Int i, Int j ) { return m_profileTierLevelIdx[ i ][ j ]; } 1218 #if H_MV_HLS10_PTL_FIX1219 1115 Int inferProfileTierLevelIdx( Int i, Int j ); 1220 #endif1221 #else1222 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx ] = val; }1223 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; }1224 #endif1225 1116 1226 1117 Void setAltOutputLayerFlag( Int i, Bool flag ) { m_altOutputLayerFlag[i] = flag; } … … 1252 1143 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1253 1144 1254 #if !H_MV_HLS10_ADD_LAYERSETS1255 Void inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder );1256 #endif1257 1145 1258 1146 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } … … 1285 1173 1286 1174 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 1287 #if H_MV_HLS10_AUX1288 1175 Int getAuxId ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), AUX_ID ); } 1289 1176 Int getDependencyId ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPENDENCY_ID ); } 1290 #endif1291 1177 Int getNumViews(); 1292 1178 1293 #if H_MV_HLS10_REF_PRED_LAYERS1294 1179 Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } 1295 #endif1296 1180 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; 1297 #if !H_MV_HLS10_REF_PRED_LAYERS1298 Int getRefLayerId ( Int layerIdInNuh, Int idx );;1299 #endif1300 1181 Int getNumRefLayers ( Int i ) { return m_numRefLayers[i]; } 1301 1182 Int getNumPredictedLayers ( Int i ) { return m_numPredictedLayers[i]; } 1302 1183 1303 #if !H_MV_HLS10_REF_PRED_LAYERS1304 Int getPredictedLayerId ( Int i, Int j ) { return m_predictedLayerId[i][j]; }1305 #else1306 1184 Int getIdRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumRefLayers ( i )); return m_idRefLayer [i][j]; } 1307 1185 Int getIdPredictedLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; } 1308 1186 Int getIdDirectRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; } 1309 #endif1310 1187 Int getNumIndependentLayers ( ) { return m_numIndependentLayers; } 1311 1188 Int getNumLayersInTreePartition( Int i ) { return m_numLayersInTreePartition[i]; } … … 1314 1191 Int getNumLayerSets( ) { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; 1315 1192 1316 #if H_MV_HLS10_ADD_LAYERSETS1317 1193 Int getFirstAddLayerSetIdx() { return getVpsNumLayerSetsMinus1() + 1; } 1318 1194 Int getLastAddLayerSetIdx() { return getFirstAddLayerSetIdx() + getNumAddLayerSets() - 1; } 1319 #endif1320 1195 Bool checkVPSExtensionSyntax(); 1321 1196 Int scalTypeToScalIdx ( ScalabilityType scalType ); 1322 1197 1323 #if H_MV_HLS10_PTL1324 1198 Int getProfileTierLevelIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 1325 #else1326 Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };1327 #endif1328 1199 Int getVpsRepFormatIdxLen() { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); }; 1329 1200 … … 1336 1207 Void deriveLayerSetLayerIdList(); 1337 1208 1338 #if H_MV_HLS10_ADD_LAYERSETS1339 1209 Int olsIdxToLsIdx( Int i ) { return ( i < getNumLayerSets() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; }; 1340 #else1341 Int olsIdxToLsIdx( Int i ) { return ( i <= getVpsNumLayerSetsMinus1() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; };1342 #endif1343 1210 Void initTargetLayerIdLists ( ); 1344 1211 Void deriveTargetLayerIdList ( Int i ); … … 1349 1216 Int getOlsHighestOutputLayerId( Int i ) { return getTargetOptLayerIdList( i ).back(); }; 1350 1217 1351 #if H_MV_HLS10_ADD_LAYERSETS1352 1218 Void deriveAddLayerSetLayerIdList( Int i ); 1353 #endif1354 #if H_MV_HLS10_NESSECARY_LAYER1355 1219 Void deriveNecessaryLayerFlags( Int olsIdx );; 1356 1220 Int getNecessaryLayerFlag( Int i, Int j ) { AOF( i >= 0 && i < getNumOutputLayerSets() ); AOF( j >= 0 && j < getNumLayersInIdList( olsIdxToLsIdx( i ) ) ); return m_necessaryLayerFlag[i][j]; }; 1357 #endif1358 1221 1359 1222 Int getMaxSubLayersInLayerSetMinus1( Int i ); … … 1366 1229 1367 1230 // helpers 1368 #if !H_MV_HLS10_REF_PRED_LAYERS1369 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 );1370 #endif1371 #if !H_MV_HLS10_MAXNUMPICS1372 Int getMaxNumPics( Int layerId );1373 #endif1374 #if H_MV_HLS10_ADD_LAYERSETS1375 1231 Void printPTL(); 1376 1232 Void printLayerDependencies(); 1377 #if H_MV_HLS10_AUX1378 1233 Void printScalabilityId();; 1379 #endif1380 1234 Void printLayerSets();; 1381 1235 … … 1422 1276 xPrintArray( name, 1, idx2, numElemDim2, vec2, printNumber, false ); 1423 1277 } 1424 #endif1425 1278 1426 1279 … … 1837 1690 TComVPS* m_pcVPS; 1838 1691 // SPS 1839 #if H_MV_HLS10_MULTILAYERSPS1840 1692 Int m_spsMaxSubLayersMinus1; 1841 1693 Int m_spsExtOrMaxSubLayersMinus1; 1842 #endif1843 1694 Bool m_spsExtensionPresentFlag; 1844 1695 … … 1858 1709 // SPS Extension 1859 1710 Bool m_interViewMvVertConstraintFlag; 1860 #if !H_MV_HLS10_PPS1861 Int m_numScaledRefLayerOffsets;1862 Int m_scaledRefLayerId [MAX_NUM_SCALED_REF_LAYERS];1863 Int m_scaledRefLayerLeftOffset [MAX_NUM_LAYERS];1864 Int m_scaledRefLayerTopOffset [MAX_NUM_LAYERS];1865 Int m_scaledRefLayerRightOffset [MAX_NUM_LAYERS];1866 Int m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS];1867 #endif1868 1711 #endif 1869 1712 #if H_3D … … 1969 1812 #if H_MV 1970 1813 UInt getSpsMaxSubLayersMinus1() { return ( m_uiMaxTLayers - 1); } 1971 #if H_MV_HLS10_MULTILAYERSPS1972 1814 Void setSpsMaxSubLayersMinus1( UInt val ) { setMaxTLayers( val + 1 ); } 1973 #endif1974 1815 #endif 1975 1816 … … 2004 1845 TComPTL* getPTL() { return &m_pcPTL; } 2005 1846 #if H_MV 2006 #if H_MV_HLS10_MULTILAYERSPS2007 1847 Void setSpsExtOrMaxSubLayersMinus1( Int val ) { m_spsExtOrMaxSubLayersMinus1 = val; } 2008 1848 Int getSpsExtOrMaxSubLayersMinus1( ) { return m_spsExtOrMaxSubLayersMinus1; } … … 2010 1850 2011 1851 Bool getMultiLayerExtSpsFlag() { return ( getLayerId() != 0 && getSpsExtOrMaxSubLayersMinus1() == 7 ); } 2012 #endif2013 1852 Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ); 2014 1853 … … 2049 1888 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 2050 1889 2051 #if !H_MV_HLS10_PPS2052 Void setNumScaledRefLayerOffsets( Int val ) { m_numScaledRefLayerOffsets = val; }2053 Int getNumScaledRefLayerOffsets( ) { return m_numScaledRefLayerOffsets; }2054 2055 Void setScaledRefLayerId( Int i, Int val ) { m_scaledRefLayerId[i] = val; }2056 Int getScaledRefLayerId( Int i ) { return m_scaledRefLayerId[i]; }2057 2058 Void setScaledRefLayerLeftOffset( Int j, Int val ) { m_scaledRefLayerLeftOffset[j] = val; }2059 Int getScaledRefLayerLeftOffset( Int j ) { return m_scaledRefLayerLeftOffset[j]; }2060 2061 Void setScaledRefLayerTopOffset( Int j, Int val ) { m_scaledRefLayerTopOffset[j] = val; }2062 Int getScaledRefLayerTopOffset( Int j ) { return m_scaledRefLayerTopOffset[j]; }2063 2064 Void setScaledRefLayerRightOffset( Int j, Int val ) { m_scaledRefLayerRightOffset[j] = val; }2065 Int getScaledRefLayerRightOffset( Int j ) { return m_scaledRefLayerRightOffset[j]; }2066 2067 Void setScaledRefLayerBottomOffset( Int j, Int val ) { m_scaledRefLayerBottomOffset[j] = val; }2068 Int getScaledRefLayerBottomOffset( Int j ) { return m_scaledRefLayerBottomOffset[j]; }2069 #endif2070 1890 // Inference 2071 1891 -
branches/HTM-12.1-dev0/source/Lib/TLibCommon/TypeDef.h
r1075 r1076 368 368 // TBD: Check if integration is necessary. 369 369 370 #define H_MV_HLS10_GEN 0 // General changes (not tested)371 372 #define H_MV_HLS10_AUX 1 // Auxiliary pictures373 #define H_MV_HLS10_GEN_FIX 1374 #define H_MV_FIX_LOOP_GOPSIZE 1375 #define H_MV_FIX_SUB_LAYERS_MAX_MINUS1 1376 377 #define H_MV_HLS10_GEN_VSP_CONF_WIN 1 // VPS conformance window378 #define H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 1 // vps_base_layer_available379 #define H_MV_HLS10_REF_PRED_LAYERS 1 // reference and predicted layer derivation380 #define H_MV_HLS10_NESSECARY_LAYER 1 // necessary layers381 #define H_MV_HLS10_ADD_LAYERSETS 1 // additional layer sets382 #define H_MV_HLS10_DBP_SIZE 1 // dpb size syntax structure383 #define H_MV_HLS10_MAXNUMPICS 1 // constraint on number of pictures in rps384 #define H_MV_HLS10_PTL 1 // profile tier level385 #define H_MV_HLS10_PTL_FIX 1 // profile tier level fix386 #define H_MV_HLS10_PTL_INBL_FIX 1 // profile tier level fix387 #define H_MV_HLS10_PTL_INFER_FIX 1 // fix inference ptl388 #define H_MV_HLS10_MULTILAYERSPS 1 // multilayer SPS extension389 #define H_MV_HLS10_VPS_VUI 1 // vsp vui390 #define H_MV_HLS10_VPS_VUI_BSP 1 // vsp vui bsp391 #define H_MV_HLS10_PPS 1 // PPS modifications392 393 #define H_MV_HLS10_VPS_VUI_BSP_STORE 0 // Currently bsp vui bsp hrd parameters are not stored, some dynamic memory allocation with upper bounds is required.394 395 396 370 #define H_MV_HLS7_GEN 0 // General changes (not tested) 397 371 … … 459 433 #define MAX_NESTING_NUM_LAYER 64 460 434 461 #if H_MV_HLS10_VPS_VUI_BSP462 435 #define MAX_VPS_NUM_HRD_PARAMETERS 1024 463 436 #define MAX_NUM_SUB_LAYERS 7 464 437 #define MAX_NUM_SIGNALLED_PARTITIONING_SCHEMES 16 465 #else466 #define MAX_VPS_NUM_HRD_PARAMETERS 1467 #endif468 438 469 439 #define MAX_VPS_OP_SETS_PLUS1 1024 470 440 #if H_MV 471 #if H_MV_HLS10_ADD_LAYERSETS472 441 #define MAX_VPS_NUM_ADD_LAYER_SETS 1024 473 #endif474 442 #define MAX_VPS_NUH_LAYER_ID_PLUS1 63 475 443 #define MAX_NUM_SCALABILITY_TYPES 16 … … 486 454 #define MAX_VPS_PROFILE_TIER_LEVEL 64 487 455 #define MAX_VPS_ADD_OUTPUT_LAYER_SETS 1024 488 #if H_MV_HLS10_ADD_LAYERSETS489 456 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 + MAX_VPS_OP_SETS_PLUS1 ) 490 #else491 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 )492 #endif493 457 #define MAX_NUM_VIDEO_SIGNAL_INFO 16 494 458 #define MAX_NUM_SCALED_REF_LAYERS MAX_NUM_LAYERS-1 495 #if !H_MV_HLS10_VPS_VUI_BSP496 #define MAX_NUM_BSP_HRD_PARAMETERS 100 ///< Maximum value is actually not specified497 #define MAX_NUM_BITSTREAM_PARTITIONS 100 ///< Maximum value is actually not specified498 #define MAX_NUM_BSP_SCHED_COMBINATION 100 ///< Maximum value is actually not specified499 #define MAX_SUB_STREAMS 1024500 #endif501 459 #else 502 460 #define MAX_NUM_LAYER_IDS 64 … … 969 927 MAINSTILLPICTURE = 3, 970 928 #if H_MV 971 #if H_MV_HLS10_PTL972 929 MULTIVIEWMAIN = 6, 973 930 #if H_3D 974 931 MAIN3D = 8, 975 #endif976 #else977 MAINSTEREO = 4,978 MAINMULTIVIEW = 5,979 #if H_3D980 MAIN3D = 6,981 #endif982 932 #endif 983 933 #endif … … 1022 972 #endif 1023 973 VIEW_ORDER_INDEX = 1, 1024 #if H_MV_HLS10_AUX1025 974 DEPENDENCY_ID = 2, 1026 975 AUX_ID = 3, 1027 #endif1028 976 }; 1029 977 #endif -
branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1075 r1076 53 53 } 54 54 // To avoid mismatches 55 #if H_MV_HLS10_GEN_FIX56 55 fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() ); 57 56 #else 58 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );59 #endif60 #else61 57 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); 62 58 #endif … … 70 66 return; 71 67 } 72 #if H_MV_HLS10_GEN_FIX73 68 fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() ); 74 #else75 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );76 #endif77 69 #else 78 70 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); … … 342 334 } 343 335 } 344 #if !H_MV_HLS10_PPS345 #if H_MV346 if ( pcPPS->getLayerId() > 0 )347 {348 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 );349 }350 351 if( pcPPS->getPpsInferScalingListFlag( ) )352 {353 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode );354 }355 else356 {357 #endif358 #endif359 336 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 360 337 if(pcPPS->getScalingListPresentFlag ()) … … 362 339 parseScalingList( pcPPS->getScalingList() ); 363 340 } 364 #if !H_MV_HLS10_PPS365 #if H_MV366 }367 #endif368 #endif369 341 READ_FLAG( uiCode, "lists_modification_present_flag"); 370 342 pcPPS->setListsModificationPresentFlag(uiCode); … … 400 372 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 401 373 { 402 #if H_MV_HLS10_PPS403 374 parsePPSMultilayerExtension( pcPPS ); 404 #else405 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 );406 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" );407 #endif408 375 } 409 376 #if !H_3D … … 775 742 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 776 743 assert(uiCode <= 6); 777 #if H_MV_HLS10_MULTILAYERSPS778 744 #if H_MV 779 745 } … … 786 752 { 787 753 #endif 788 #endif789 754 790 755 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); … … 796 761 797 762 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 798 #if H_MV_HLS10_PTL_INFER_FIX799 763 pcSPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 800 764 pcSPS->getPTL()->inferSubLayerValues( pcSPS->getMaxTLayers() - 1, 0, NULL ); 801 #endif802 765 #if H_MV 803 766 } … … 806 769 assert(uiCode <= 15); 807 770 #if H_MV 808 #if H_MV_HLS10_MULTILAYERSPS809 771 if ( pcSPS->getMultiLayerExtSpsFlag() ) 810 #else811 if ( pcSPS->getLayerId() > 0 )812 #endif813 772 { 814 773 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); … … 832 791 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 833 792 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 834 #if !H_MV_HLS10_MULTILAYERSPS835 #if H_MV836 }837 #endif838 #endif839 793 READ_FLAG( uiCode, "conformance_window_flag"); 840 794 if (uiCode != 0) … … 848 802 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 849 803 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 850 #if H_MV_HLS10_MULTILAYERSPS 851 } 852 #endif 804 } 853 805 #else 854 806 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); … … 860 812 861 813 #if H_MV 862 #if H_MV_HLS10_MULTILAYERSPS863 814 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 864 #else // H_MV_HLS10_GEN865 if ( pcSPS->getLayerId() == 0 )866 #endif // H_MV_HLS10_GEN867 815 { 868 816 #endif … … 884 832 885 833 #if H_MV 886 #if H_MV_HLS10_MULTILAYERSPS887 834 if ( !pcSPS->getMultiLayerExtSpsFlag()) 888 #else889 if ( pcSPS->getLayerId() == 0 )890 #endif891 835 { 892 836 #endif … … 947 891 { 948 892 #if H_MV 949 #if H_MV_HLS10_MULTILAYERSPS950 893 if ( pcSPS->getMultiLayerExtSpsFlag() ) 951 #else952 if ( pcSPS->getLayerId() > 0 )953 #endif954 894 { 955 895 READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setSpsInferScalingListFlag( uiCode == 1 ); … … 1079 1019 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false); 1080 1020 1081 #if !H_MV_HLS10_PPS1082 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode );1083 1084 for( Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets( ); i++)1085 {1086 READ_CODE( 6, uiCode, "scaled_ref_layer_id" ); pcSPS->setScaledRefLayerId( i, uiCode );1087 1088 Int j = pcSPS->getScaledRefLayerId( i );1089 Int iCode;1090 READ_SVLC( iCode, "scaled_ref_layer_left_offset" ); pcSPS->setScaledRefLayerLeftOffset( j, iCode );1091 READ_SVLC( iCode, "scaled_ref_layer_top_offset" ); pcSPS->setScaledRefLayerTopOffset( j, iCode );1092 READ_SVLC( iCode, "scaled_ref_layer_right_offset" ); pcSPS->setScaledRefLayerRightOffset( j, iCode );1093 READ_SVLC( iCode, "scaled_ref_layer_bottom_offset" ); pcSPS->setScaledRefLayerBottomOffset( j, iCode );1094 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" );1095 }1096 #endif1097 1021 } 1098 1022 … … 1104 1028 #endif 1105 1029 1106 #if H_MV_HLS10_PPS1107 1030 Void TDecCavlc::parsePPSMultilayerExtension(TComPPS* pcPPS) 1108 1031 { … … 1115 1038 1116 1039 #endif 1117 #endif1118 1040 1119 1041 Void TDecCavlc::parseVPS(TComVPS* pcVPS) … … 1124 1046 #if H_MV 1125 1047 READ_FLAG( uiCode, "vps_base_layer_internal_flag" ); pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 ); 1126 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL1127 1048 READ_FLAG( uiCode, "vps_base_layer_available_flag" ); pcVPS->setVpsBaseLayerAvailableFlag( uiCode == 1 ); 1128 #else1129 READ_FLAG( uiCode, "vps_reserved_one_bit" ); assert( uiCode == 1 );1130 #endif1131 1049 #else 1132 1050 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); … … 1143 1061 READ_CODE( 16, uiCode, "vps_reserved_ffff_16bits" ); assert(uiCode == 0xffff); 1144 1062 parsePTL ( pcVPS->getPTL(), true, pcVPS->getMaxTLayers()-1); 1145 #if H_MV_HLS10_PTL_INFER_FIX1146 1063 #if H_MV 1147 1064 pcVPS->getPTL()->inferGeneralValues ( true, 0, NULL ); 1148 1065 pcVPS->getPTL()->inferSubLayerValues( pcVPS->getMaxTLayers() - 1, 0, NULL ); 1149 #endif1150 1066 #endif 1151 1067 UInt subLayerOrderingInfoPresentFlag; … … 1174 1090 READ_CODE( 6, uiCode, "vps_max_layer_id" ); pcVPS->setVpsMaxLayerId( uiCode ); 1175 1091 1176 #if H_MV_HLS10_GEN_FIX1177 1092 READ_UVLC( uiCode, "vps_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode ); 1178 #else1179 READ_UVLC( uiCode, "vps_max_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode );1180 #endif1181 1093 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 1182 1094 { … … 1267 1179 UInt uiCode; 1268 1180 1269 #if H_MV_HLS10_PTL1270 1181 if( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) 1271 1182 { 1272 1183 parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1273 1184 1274 #if !H_MV_HLS10_PTL_INFER_FIX1275 // Copy Profile info1276 TComPTL temp = *pcVPS->getPTL( 1 );1277 *pcVPS->getPTL( 1 ) = *pcVPS->getPTL( 0 );1278 pcVPS->getPTL( 1 )->copyLevelFrom( &temp );1279 #else1280 1185 pcVPS->getPTL( 1 )->inferGeneralValues ( false, 1, pcVPS->getPTL( 0 ) ); 1281 1186 pcVPS->getPTL( 1 )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1(), 1, pcVPS->getPTL( 0 ) ); 1282 #endif 1283 } 1284 #endif 1187 } 1285 1188 1286 1189 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); … … 1356 1259 pcVPS->setRefLayers(); 1357 1260 1358 #if H_MV_HLS10_ADD_LAYERSETS1359 1261 if ( pcVPS->getNumIndependentLayers() > 1 ) 1360 1262 { … … 1369 1271 pcVPS->deriveAddLayerSetLayerIdList( i ); 1370 1272 } 1371 #endif1372 1273 1373 1274 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); … … 1406 1307 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1407 1308 1408 #if H_MV_HLS10_PTL1409 1309 Int offsetVal = ( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1; 1410 1310 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) … … 1412 1312 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1413 1313 parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1414 #if H_MV_HLS10_PTL_INFER_FIX1415 1314 pcVPS->getPTL( offsetVal )->inferGeneralValues ( pcVPS->getVpsProfilePresentFlag( i ), offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1416 1315 pcVPS->getPTL( offsetVal )->inferSubLayerValues( pcVPS->getMaxSubLayersMinus1() , offsetVal, pcVPS->getPTL( offsetVal - 1 ) ); 1417 #else1418 if( !pcVPS->getVpsProfilePresentFlag( i ) )1419 {1420 TComPTL temp = *pcVPS->getPTL( offsetVal );1421 *pcVPS->getPTL( offsetVal ) = *pcVPS->getPTL( offsetVal - 1 );1422 pcVPS->getPTL( offsetVal )->copyLevelFrom( &temp );1423 }1424 #endif1425 1316 offsetVal++; 1426 1317 } 1427 #else 1428 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1429 { 1430 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1431 parsePTL ( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1432 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1433 { 1434 TComPTL temp = *pcVPS->getPTL( i ); 1435 *pcVPS->getPTL( i ) = *pcVPS->getPTL( i - 1 ); 1436 pcVPS->getPTL( i )->copyLevelFrom( &temp ); 1437 } 1438 } 1439 #endif 1440 1441 #if !H_MV_HLS10_ADD_LAYERSETS 1442 if ( pcVPS->getNumIndependentLayers() > 1 ) 1443 { 1444 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1445 } 1446 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1447 { 1448 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1449 { 1450 READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode ); 1451 } 1452 } 1453 #endif 1318 1454 1319 1455 1320 if (pcVPS->getNumLayerSets() > 1) … … 1465 1330 pcVPS->setLayerSetIdxForOlsMinus1(0, -1); 1466 1331 1467 #if H_MV_HLS10_NESSECARY_LAYER1468 1332 pcVPS->deriveNecessaryLayerFlags( 0 ); 1469 #endif1470 1333 pcVPS->deriveTargetLayerIdList( 0 ); 1471 1334 1472 #if H_MV_HLS10_PTL_FIX1473 1335 if (pcVPS->getVpsBaseLayerInternalFlag() ) 1474 1336 { 1475 1337 pcVPS->setProfileTierLevelIdx(0,0, pcVPS->inferProfileTierLevelIdx(0,0) ); 1476 1338 } 1477 #endif1478 1339 for( Int i = 1; i < pcVPS->getNumOutputLayerSets( ); i++ ) 1479 1340 { … … 1497 1358 } 1498 1359 } 1499 #if H_MV_HLS10_NESSECARY_LAYER1500 1360 pcVPS->deriveNecessaryLayerFlags( i ); 1501 #endif1502 1361 pcVPS->deriveTargetLayerIdList( i ); 1503 1362 1504 #if H_MV_HLS10_PTL1505 1363 for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ ) 1506 1364 { … … 1509 1367 READ_CODE( pcVPS->getProfileTierLevelIdxLen(), uiCode,"profile_tier_level_idx[ i ][ j ]" ); pcVPS->setProfileTierLevelIdx( i, j, uiCode ); 1510 1368 } 1511 #if H_MV_HLS10_PTL_FIX1512 1369 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 ) 1513 1370 { 1514 1371 pcVPS->setProfileTierLevelIdx( i , j, pcVPS->inferProfileTierLevelIdx( i, j) ); 1515 1372 } 1516 #endif 1517 } 1518 #else 1519 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1520 { 1521 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1522 } 1523 #endif 1373 } 1524 1374 1525 1375 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) … … 1571 1421 } 1572 1422 1573 #if !H_MV_HLS10_GEN_FIX1574 READ_FLAG( uiCode, "vps_reserved_zero_flag" );1575 #endif1576 1423 parseDpbSize( pcVPS ); 1577 1424 … … 1647 1494 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 1648 1495 } 1649 #if H_MV_HLS10_GEN_VSP_CONF_WIN1650 1496 READ_FLAG( uiCode, "conformance_window_vps_flag" ); pcRepFormat->setConformanceWindowVpsFlag( uiCode == 1 ); 1651 1497 if ( pcRepFormat->getConformanceWindowVpsFlag() ) … … 1656 1502 READ_UVLC( uiCode, "conf_win_vps_bottom_offset" ); pcRepFormat->setConfWinVpsBottomOffset( uiCode ); 1657 1503 } 1658 #endif1659 1504 } 1660 1505 … … 1682 1527 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1683 1528 { 1684 #if H_MV_HLS10_VPS_VUI1685 1529 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1686 #else1687 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ )1688 #endif1689 1530 { 1690 1531 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1719 1560 else 1720 1561 { 1721 #if H_MV_HLS10_VPS_VUI1722 1562 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 ); 1723 #else1724 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );1725 #endif1726 1563 } 1727 1564 … … 1771 1608 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) 1772 1609 { 1773 #if H_MV_HLS10_REF_PRED_LAYERS1774 1610 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdDirectRefLayer(pcVPS->getLayerIdInNuh( i ) , j )); 1775 #else1776 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j ));1777 #endif1778 1611 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1779 1612 { … … 1793 1626 } 1794 1627 } 1795 #if H_MV_HLS10_VPS_VUI1796 1628 READ_FLAG( uiCode, "single_layer_for_non_irap_flag" ); pcVPSVUI->setSingleLayerForNonIrapFlag( uiCode == 1 ); 1797 1629 READ_FLAG( uiCode, "higher_layer_irap_skip_flag" ); pcVPSVUI->setHigherLayerIrapSkipFlag( uiCode == 1 ); 1798 #else1799 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" );1800 #endif1801 1630 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1802 1631 … … 1807 1636 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1808 1637 { 1809 #if H_MV_HLS10_REF_PRED_LAYERS1810 1638 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdDirectRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1811 #else1812 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )1813 #endif1814 1639 { 1815 1640 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); … … 1851 1676 1852 1677 TComVpsVuiBspHrdParameters* vpsVuiBspHrdP = pcVPSVUI->getVpsVuiBspHrdParameters(); 1853 #if H_MV_HLS10_VPS_VUI_BSP1854 1678 assert( vpsVuiBspHrdP == NULL ); 1855 1679 vpsVuiBspHrdP = new TComVpsVuiBspHrdParameters; 1856 1680 pcVPSVUI->setVpsVuiBspHrdParameters( vpsVuiBspHrdP ); 1857 #else1858 assert ( vpsVuiBspHrdP );1859 #endif1860 1681 UInt uiCode; 1861 #if H_MV_HLS10_VPS_VUI_BSP1862 1682 READ_UVLC( uiCode, "vps_num_add_hrd_params" ); vpsVuiBspHrdP->setVpsNumAddHrdParams( uiCode ); 1863 1683 vpsVuiBspHrdP->createAfterVpsNumAddHrdParams( pcVPS ); … … 1948 1768 } 1949 1769 } 1950 #else1951 READ_UVLC( uiCode, "vps_num_bsp_hrd_parameters_minus1" ); vpsVuiBspHrdP->setVpsNumBspHrdParametersMinus1( uiCode );1952 for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )1953 {1954 if( i > 0 )1955 {1956 READ_FLAG( uiCode, "bsp_cprms_present_flag" ); vpsVuiBspHrdP->setBspCprmsPresentFlag( i, uiCode == 1 );1957 }1958 TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );1959 parseHrdParameters( hrdParameters, vpsVuiBspHrdP->getBspCprmsPresentFlag( i ), pcVPS->getMaxSubLayersMinus1() );1960 }1961 for( Int h = 1; h <= pcVPS->getVpsNumLayerSetsMinus1(); h++ )1962 {1963 READ_UVLC( uiCode, "num_bitstream_partitions" ); vpsVuiBspHrdP->setNumBitstreamPartitions( h, uiCode );1964 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ )1965 {1966 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ )1967 {1968 READ_FLAG( uiCode, "layer_in_bsp_flag" ); vpsVuiBspHrdP->setLayerInBspFlag( h, i, j, uiCode == 1 );1969 }1970 }1971 vpsVuiBspHrdP->checkLayerInBspFlag( pcVPS, h );1972 1973 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) )1974 {1975 READ_UVLC( uiCode, "num_bsp_sched_combinations_minus1" ); vpsVuiBspHrdP->setNumBspSchedCombinationsMinus1( h, uiCode );1976 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )1977 {1978 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )1979 {1980 READ_CODE( vpsVuiBspHrdP->getBspCombHrdIdxLen(), uiCode, "bsp_comb_hrd_idx" ); vpsVuiBspHrdP->setBspCombHrdIdx( h, i, j, uiCode );1981 READ_UVLC( uiCode, "bsp_comb_sched_idx" ); vpsVuiBspHrdP->setBspCombSchedIdx( h, i, j, uiCode );1982 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );1983 }1984 }1985 }1986 }1987 #endif1988 1770 } 1989 1771 … … 2018 1800 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 2019 1801 { 2020 #if H_MV_HLS10_DBP_SIZE2021 1802 if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) )) 2022 1803 { … … 2030 1811 } 2031 1812 } 2032 #else2033 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode );2034 #endif2035 1813 } 2036 1814 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); … … 2043 1821 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 2044 1822 { 2045 #if H_MV_HLS10_DBP_SIZE2046 1823 if ( vps->getNecessaryLayerFlag(i, k ) ) 2047 1824 { 2048 #endif2049 1825 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 2050 #if H_MV_HLS10_DBP_SIZE2051 1826 } 2052 #endif2053 1827 } 2054 1828 dpbSize->setMaxVpsNumReorderPics ( i, j, dpbSize->getMaxVpsNumReorderPics ( i, j - 1 ) ); … … 2204 1978 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2205 1979 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2206 #if !H_MV_HLS10_ADD_LAYERSETS2207 vps->inferDbpSizeLayerSetZero( sps, false );2208 #endif2209 1980 2210 1981 if ( sps->getVuiParametersPresentFlag() ) … … 2429 2200 rps->checkMaxNumPics( 2430 2201 vps->getVpsExtensionFlag(), 2431 #if H_MV_HLS10_MAXNUMPICS2432 2202 MAX_INT, // To be replaced by MaxDbpSize 2433 #else2434 vps->getMaxNumPics( rpcSlice->getLayerId() ),2435 #endif2436 2203 rpcSlice->getLayerId(), 2437 2204 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 2546 2313 rps->checkMaxNumPics( 2547 2314 vps->getVpsExtensionFlag(), 2548 #if H_MV_HLS10_MAXNUMPICS2549 2315 MAX_INT, // To be replaced by MaxDbpsize 2550 #else2551 vps->getMaxNumPics( rpcSlice->getLayerId() ),2552 #endif2553 2316 rpcSlice->getLayerId(), 2554 2317 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 3104 2867 READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode); 3105 2868 #if H_MV 3106 #if !H_MV_HLS10_PTL_INFER_FIX3107 rpcPTL->setSubLayerProfilePresentFlag( i, profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) );3108 #else3109 2869 // When profilePresentFlag is equal to 0, sub_layer_profile_present_flag[ i ] shall be equal to 0. 3110 2870 assert( profilePresentFlag || !rpcPTL->getSubLayerProfilePresentFlag(i) ); 3111 #endif3112 2871 #else 3113 2872 } … … 3127 2886 for(Int i = 0; i < maxNumSubLayersMinus1; i++) 3128 2887 { 3129 #if H_MV_HLS10_PTL_INFER_FIX3130 2888 #if H_MV 3131 2889 if( rpcPTL->getSubLayerProfilePresentFlag(i) ) 3132 2890 #else 3133 2891 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 3134 #endif3135 #else3136 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) )3137 2892 #endif 3138 2893 { … … 3168 2923 ptl->setFrameOnlyConstraintFlag(uiCode ? true : false); 3169 2924 3170 #if H_MV_HLS10_PTL3171 #if H_MV_HLS10_PTL_INFER_FIX3172 2925 if( ptl->getV2ConstraintsPresentFlag() ) 3173 #else3174 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) ||3175 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) ||3176 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) ||3177 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) )3178 #endif3179 2926 { 3180 2927 READ_FLAG( uiCode, "max_12bit_constraint_flag" ); ptl->setMax12bitConstraintFlag ( uiCode == 1 ); … … 3197 2944 READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]"); 3198 2945 } 3199 #if H_MV_HLS10_PTL_INFER_FIX3200 2946 if( ptl->getInbldPresentFlag() ) 3201 #else3202 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||3203 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) ||3204 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) ||3205 ptl->getProfileCompatibilityFlag( 5 ) )3206 #endif3207 2947 { 3208 2948 READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 ); … … 3212 2952 READ_FLAG(uiCode, "reserved_zero_bit"); 3213 2953 } 3214 #else3215 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]");3216 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[16..31]");3217 READ_CODE(12, uiCode, "XXX_reserved_zero_44bits[32..43]");3218 #endif3219 2954 } 3220 2955 -
branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.h
r1074 r1076 97 97 #endif 98 98 99 #if H_MV_HLS10_PPS100 99 #if H_MV 101 100 Void parsePPSMultilayerExtension( TComPPS* pcPPS ); 102 #endif103 101 #endif 104 102 -
branches/HTM-12.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
r1075 r1076 669 669 #if H_MV 670 670 sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false ); 671 #if !H_MV_HLS10_ADD_LAYERSETS672 vps->inferDbpSizeLayerSetZero( sps, false );673 #endif674 671 // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0 675 672 if ( vps->getVpsNumRepFormatsMinus1() == 0 ) … … 679 676 } 680 677 sps->checkRpsMaxNumPics( vps, getLayerId() ); 681 #if H_MV_HLS10_MULTILAYERSPS682 678 683 679 if( sps->getLayerId() != 0 ) … … 686 682 } 687 683 688 #if H_MV_HLS10_MULTILAYERSPS689 684 // It is a requirement of bitstream conformance that, when the SPS is referred to by 690 685 // any current picture that belongs to an independent non-base layer, the value of … … 695 690 assert( sps->getMultiLayerExtSpsFlag() == 0 ); 696 691 } 697 #endif698 692 699 693 if( sps->getMultiLayerExtSpsFlag() ) … … 701 695 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 702 696 } 703 #else704 if( m_layerId > 0 )705 {706 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true );707 }708 #endif709 697 #endif 710 698 … … 730 718 #if H_MV 731 719 m_apcSlicePilot->setVPS(vps); 732 #if H_MV_HLS10_REF_PRED_LAYERS733 720 // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 734 721 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, pps->getLayerId() ) ); 735 722 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA. 736 723 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getDependencyFlag( m_layerId, sps->getLayerId() ) ); 737 #else738 // The nuh_layer_id value of the NAL unit containing the PPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.739 assert( pps->getLayerId() == m_layerId || pps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, pps->getLayerId() ) );740 // The nuh_layer_id value of the NAL unit containing the SPS that is activated for a layer layerA with nuh_layer_id equal to nuhLayerIdA shall be equal to 0, or nuhLayerIdA, or the nuh_layer_id of a direct or indirect reference layer of layerA.741 assert( sps->getLayerId() == m_layerId || sps->getLayerId( ) == 0 || vps->getInDirectDependencyFlag( m_layerId, sps->getLayerId() ) );742 #endif743 724 sps->inferRepFormat ( vps , m_layerId ); 744 725 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); … … 1725 1706 for (Int i = 0; i < vps->getNumDirectRefLayers( getLayerId() ); i++ ) 1726 1707 { 1727 #if H_MV_HLS10_REF_PRED_LAYERS1728 1708 Int refLayerId = vps->getIdDirectRefLayer( m_layerId, i ); 1729 #else1730 Int refLayerId = vps->getRefLayerId( m_layerId, i );1731 #endif1732 1709 allRefLayersInitilizedFlag = allRefLayersInitilizedFlag && m_layerInitilizedFlag[ refLayerId ]; 1733 1710 } -
branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.cpp
r1075 r1076 49 49 { 50 50 #if H_MV_ENC_DEC_TRAC 51 #if H_MV_HLS10_GEN_FIX52 51 fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() ); 53 52 #else 54 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" );55 #endif56 #else57 53 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); 58 54 #endif … … 62 58 { 63 59 #if H_MV_ENC_DEC_TRAC 64 #if H_MV_HLS10_GEN_FIX65 60 fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() ); 66 #else67 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" );68 #endif69 61 #else 70 62 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); … … 249 241 } 250 242 } 251 #if !H_MV_HLS10_PPS252 #if H_MV253 if ( pcPPS->getLayerId() > 0 )254 {255 WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" );256 }257 258 if( pcPPS->getPpsInferScalingListFlag( ) )259 {260 WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" );261 }262 else263 {264 #endif265 #endif266 243 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 267 244 if( pcPPS->getScalingListPresentFlag() ) … … 269 246 codeScalingList( m_pcSlice->getScalingList() ); 270 247 } 271 #if !H_MV_HLS10_PPS272 #if H_MV273 }274 #endif275 #endif276 248 #if PPS_FIX_DEPTH 277 249 if( pcPPS->getSPS()->getVPS()->getDepthId(pcPPS->getSPS()->getLayerId()) ) … … 313 285 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 314 286 { 315 #if H_MV_HLS10_PPS316 287 codePPSMultilayerExtension( pcPPS ); 317 #else318 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" );319 WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" );320 #endif321 288 } 322 289 … … 686 653 #endif 687 654 WRITE_CODE( pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1" ); 688 #if H_MV_HLS10_MULTILAYERSPS689 655 #if H_MV 690 656 } … … 695 661 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 696 662 { 697 #endif698 663 #endif 699 664 … … 705 670 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 706 671 #if H_MV 707 #if H_MV_HLS10_MULTILAYERSPS708 672 if ( pcSPS->getMultiLayerExtSpsFlag() ) 709 #else710 if ( pcSPS->getLayerId() > 0 )711 #endif712 673 { 713 674 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" ); … … 730 691 WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (), "pic_width_in_luma_samples" ); 731 692 WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(), "pic_height_in_luma_samples" ); 732 #if !H_MV_HLS10_MULTILAYERSPS733 #if H_MV734 }735 #endif736 #endif737 693 Window conf = pcSPS->getConformanceWindow(); 738 694 … … 745 701 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 746 702 } 747 #if H_MV_HLS10_MULTILAYERSPS748 703 #if H_MV 749 704 } 750 705 #endif 751 #endif752 706 753 707 #if H_MV 754 #if H_MV_HLS10_MULTILAYERSPS755 708 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 756 #else757 if ( pcSPS->getLayerId() == 0 )758 #endif759 709 { 760 710 #endif … … 766 716 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 767 717 #if H_MV 768 #if H_MV_HLS10_MULTILAYERSPS769 718 if ( !pcSPS->getMultiLayerExtSpsFlag()) 770 #else771 if ( pcSPS->getLayerId() == 0 )772 #endif773 719 { 774 720 #endif … … 801 747 { 802 748 #if H_MV 803 #if H_MV_HLS10_MULTILAYERSPS804 749 if ( pcSPS->getMultiLayerExtSpsFlag() ) 805 #else806 if ( pcSPS->getLayerId() > 0 )807 #endif808 750 { 809 751 WRITE_FLAG( pcSPS->getSpsInferScalingListFlag( ) ? 1 : 0 , "sps_infer_scaling_list_flag" ); … … 912 854 { 913 855 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 914 #if !H_MV_HLS10_PPS 915 WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets( ), "num_scaled_ref_layer_offsets" ); 916 917 for( Int i = 0; i < pcSPS->getNumScaledRefLayerOffsets( ); i++) 918 { 919 WRITE_CODE( pcSPS->getScaledRefLayerId( i ), 6, "scaled_ref_layer_id" ); 920 921 Int j = pcSPS->getScaledRefLayerId( i ); 922 923 WRITE_SVLC( pcSPS->getScaledRefLayerLeftOffset( j ), "scaled_ref_layer_left_offset" ); 924 WRITE_SVLC( pcSPS->getScaledRefLayerTopOffset( j ), "scaled_ref_layer_top_offset" ); 925 WRITE_SVLC( pcSPS->getScaledRefLayerRightOffset( j ), "scaled_ref_layer_right_offset" ); 926 WRITE_SVLC( pcSPS->getScaledRefLayerBottomOffset( j ), "scaled_ref_layer_bottom_offset" ); 927 WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" ); 928 } 929 #endif 930 } 931 932 933 #if H_MV_HLS10_PPS 856 } 857 858 934 859 Void TEncCavlc::codePPSMultilayerExtension(TComPPS* pcPPS) 935 860 { … … 939 864 WRITE_UVLC( 0, "num_ref_loc_offsets" ); 940 865 } 941 #endif942 866 943 867 #endif … … 958 882 #if H_MV 959 883 WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" ); 960 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL961 884 WRITE_FLAG( pcVPS->getVpsBaseLayerAvailableFlag( ) ? 1 : 0 , "vps_base_layer_available_flag" ); 962 #else // H_MV_HLS10_GEN963 WRITE_FLAG( 1 , "vps_reserved_one_bit" );964 #endif // H_MV_HLS10_GEN965 885 #else 966 886 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); … … 992 912 assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 ); 993 913 WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6, "vps_max_layer_id" ); 994 #if H_MV_HLS10_GEN_FIX995 914 WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(), "vps_num_layer_sets_minus1" ); 996 #else997 WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(), "vps_max_num_layer_sets_minus1" );998 #endif999 915 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 1000 916 { … … 1073 989 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 1074 990 { 1075 #if H_MV_HLS10_PTL1076 991 if( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) 1077 992 { 1078 993 codePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1079 994 } 1080 #endif1081 995 1082 996 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); … … 1151 1065 } 1152 1066 1153 #if H_MV_HLS10_ADD_LAYERSETS1154 1067 if ( pcVPS->getNumIndependentLayers() > 1 ) 1155 1068 { … … 1164 1077 1165 1078 } 1166 #endif1167 1079 1168 1080 … … 1202 1114 WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" ); 1203 1115 1204 #if H_MV_HLS10_PTL1205 1116 Int offsetVal = ( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1; 1206 1117 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) … … 1210 1121 offsetVal++; 1211 1122 } 1212 #else 1213 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1214 { 1215 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1216 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1217 } 1218 #endif 1219 1220 #if !H_MV_HLS10_ADD_LAYERSETS 1221 if ( pcVPS->getNumIndependentLayers() > 1 ) 1222 { 1223 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1224 } 1225 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1226 { 1227 for (Int j = 0; j < pcVPS->getNumIndependentLayers(); j++) 1228 { 1229 WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j ) , "highest_layer_idx_plus1" ); 1230 } 1231 } 1232 #endif 1123 1233 1124 1234 1125 if (pcVPS->getNumLayerSets() > 1) … … 1242 1133 1243 1134 1244 #if H_MV_HLS10_PTL_FIX1245 1135 if (pcVPS->getVpsBaseLayerInternalFlag() ) 1246 1136 { 1247 1137 assert( pcVPS->getProfileTierLevelIdx(0,0) == pcVPS->inferProfileTierLevelIdx(0,0) ); 1248 1138 } 1249 #endif1250 1139 1251 1140 … … 1272 1161 } 1273 1162 1274 #if H_MV_HLS10_PTL1275 1163 for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ ) 1276 1164 { … … 1279 1167 WRITE_CODE( pcVPS->getProfileTierLevelIdx( i, j ), pcVPS->getProfileTierLevelIdxLen() ,"profile_tier_level_idx[ i ][ j ]" ); 1280 1168 } 1281 #if H_MV_HLS10_PTL_FIX1282 1169 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() == 0 ) 1283 1170 { 1284 1171 assert( pcVPS->getProfileTierLevelIdx( i , j ) == pcVPS->inferProfileTierLevelIdx( i, j ) ); 1285 1172 } 1286 #endif 1287 1288 } 1289 #else 1290 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1291 { 1292 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1293 } 1294 #endif 1173 1174 } 1295 1175 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1296 1176 { … … 1342 1222 } 1343 1223 1344 #if !H_MV_HLS10_GEN_FIX1345 WRITE_FLAG( 0, "vps_reserved_zero_flag" );1346 #endif1347 1224 codeDpbSize( pcVPS ); 1348 1225 … … 1421 1298 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1422 1299 { 1423 #if H_MV_HLS10_DBP_SIZE1424 1300 if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) )) 1425 1301 { … … 1433 1309 } 1434 1310 } 1435 #else1436 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" );1437 #endif1438 1311 } 1439 1312 WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" ); … … 1446 1319 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1447 1320 { 1448 #if H_MV_HLS10_DBP_SIZE1449 1321 if ( vps->getNecessaryLayerFlag(i, k ) ) 1450 1322 { 1451 #endif1452 1323 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 1453 #if H_MV_HLS10_DBP_SIZE1454 1324 } 1455 #endif1456 1325 } 1457 1326 assert( dpbSize->getMaxVpsNumReorderPics ( i, j ) == dpbSize->getMaxVpsNumReorderPics ( i, j - 1 ) ); … … 1488 1357 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, true ); 1489 1358 } 1490 #if H_MV_HLS10_GEN_VSP_CONF_WIN1491 1359 WRITE_FLAG( pcRepFormat->getConformanceWindowVpsFlag( ) ? 1 : 0 , "conformance_window_vps_flag" ); 1492 1360 if ( pcRepFormat->getConformanceWindowVpsFlag() ) … … 1497 1365 WRITE_UVLC( pcRepFormat->getConfWinVpsBottomOffset( ), "conf_win_vps_bottom_offset" ); 1498 1366 } 1499 #endif1500 1367 } 1501 1368 … … 1522 1389 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1523 1390 { 1524 #if H_MV_HLS10_VPS_VUI1525 1391 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1526 #else1527 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ )1528 #endif1529 1392 { 1530 1393 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1559 1422 else 1560 1423 { 1561 #if H_MV_HLS10_VPS_VUI1562 1424 assert( pcVPSVUI->getVpsNumVideoSignalInfoMinus1() == pcVPS->getMaxLayersMinus1() - ( pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1) ); 1563 #else1564 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() );1565 #endif1566 1425 } 1567 1426 … … 1596 1455 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) 1597 1456 { 1598 #if H_MV_HLS10_REF_PRED_LAYERS1599 1457 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdRefLayer(pcVPS->getLayerIdInNuh( i ) , j )); 1600 #else1601 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j ));1602 #endif1603 1458 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1604 1459 { … … 1618 1473 } 1619 1474 } 1620 #if H_MV_HLS10_VPS_VUI1621 1475 WRITE_FLAG( pcVPSVUI->getSingleLayerForNonIrapFlag( ) ? 1 : 0 , "single_layer_for_non_irap_flag" ); 1622 1476 WRITE_FLAG( pcVPSVUI->getHigherLayerIrapSkipFlag( ) ? 1 : 0 , "higher_layer_irap_skip_flag" ); 1623 #else1624 WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" );1625 #endif1626 1477 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1627 1478 … … 1632 1483 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1633 1484 { 1634 #if H_MV_HLS10_REF_PRED_LAYERS1635 1485 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1636 #else1637 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 )1638 #endif1639 1486 { 1640 1487 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); … … 1679 1526 assert ( vpsVuiBspHrdP ); 1680 1527 1681 #if H_MV_HLS10_VPS_VUI_BSP1682 1528 WRITE_UVLC( vpsVuiBspHrdP->getVpsNumAddHrdParams( ), "vps_num_add_hrd_params" ); 1683 1529 … … 1725 1571 } 1726 1572 1727 #else // H_MV_HLS10_GEN1728 WRITE_UVLC( vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ), "vps_num_bsp_hrd_parameters_minus1" );1729 for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ )1730 {1731 if( i > 0 )1732 {1733 WRITE_FLAG( vpsVuiBspHrdP->getBspCprmsPresentFlag( i ) ? 1 : 0 , "bsp_cprms_present_flag" );1734 }1735 TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i );1736 codeHrdParameters( hrdParameters, vpsVuiBspHrdP->getBspCprmsPresentFlag( i ), pcVPS->getMaxSubLayersMinus1() );1737 }1738 for( Int h = 1; h <= pcVPS->getVpsNumLayerSetsMinus1(); h++ )1739 {1740 WRITE_UVLC( vpsVuiBspHrdP->getNumBitstreamPartitions( h ), "num_bitstream_partitions" );1741 for( Int i = 0; i < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); i++ )1742 {1743 for( Int j = 0; j < pcVPS->getNumLayersInIdList( h ); j++ )1744 {1745 WRITE_FLAG( vpsVuiBspHrdP->getLayerInBspFlag( h, i, j ) ? 1 : 0 , "layer_in_bsp_flag" );1746 }1747 }1748 vpsVuiBspHrdP->checkLayerInBspFlag( pcVPS, h );1749 1750 if( vpsVuiBspHrdP->getNumBitstreamPartitions( h ) )1751 {1752 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ), "num_bsp_sched_combinations_minus1" );1753 for( Int i = 0; i <= vpsVuiBspHrdP->getNumBspSchedCombinationsMinus1( h ); i++ )1754 {1755 for( Int j = 0; j < vpsVuiBspHrdP->getNumBitstreamPartitions( h ); j++ )1756 {1757 WRITE_CODE( vpsVuiBspHrdP->getBspCombHrdIdx( h, i, j ), vpsVuiBspHrdP->getBspCombHrdIdxLen(), "bsp_comb_hrd_idx" );1758 WRITE_UVLC( vpsVuiBspHrdP->getBspCombSchedIdx( h, i, j ), "bsp_comb_sched_idx" );1759 1760 vpsVuiBspHrdP->checkBspCombHrdAndShedIdx( pcVPS, h, i, j );1761 }1762 }1763 }1764 }1765 #endif1766 1573 } 1767 1574 #endif … … 2493 2300 WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), "general_frame_only_constraint_flag"); 2494 2301 2495 #if H_MV_HLS10_PTL2496 #if H_MV_HLS10_PTL_INFER_FIX2497 2302 if( ptl->getV2ConstraintsPresentFlag() ) 2498 #else2499 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) ||2500 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) ||2501 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) ||2502 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) )2503 #endif2504 2303 { 2505 2304 WRITE_FLAG( ptl->getMax12bitConstraintFlag( ) ? 1 : 0 , "max_12bit_constraint_flag" ); … … 2522 2321 WRITE_CODE( 0, 11, "XXX_reserved_zero_43bits[32..42]"); 2523 2322 } 2524 #if H_MV_HLS10_PTL_INFER_FIX2525 2323 if( ptl->getInbldPresentFlag() ) 2526 #else2527 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) ||2528 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) ||2529 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) ||2530 ptl->getProfileCompatibilityFlag( 5 ) )2531 #endif2532 2324 { 2533 2325 WRITE_FLAG( ptl->getInbldFlag( ) ? 1 : 0 , "inbld_flag" ); … … 2537 2329 WRITE_FLAG(0, "reserved_zero_bit"); 2538 2330 } 2539 #else2540 WRITE_CODE(0 , 16, "XXX_reserved_zero_44bits[0..15]");2541 WRITE_CODE(0 , 16, "XXX_reserved_zero_44bits[16..31]");2542 WRITE_CODE(0 , 12, "XXX_reserved_zero_44bits[32..43]");2543 #endif2544 2331 } 2545 2332 -
branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncCavlc.h
r1074 r1076 107 107 Void codePPS ( TComPPS* pcPPS ); 108 108 109 #if H_MV_HLS10_PPS110 109 #if H_MV 111 110 Void codePPSMultilayerExtension( TComPPS* pcPPS ); 112 #endif113 111 #endif 114 112 -
branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
r1074 r1076 72 72 ContextModel::buildNextStateTable(); 73 73 #endif 74 #if H_MV_HLS10_GEN_FIX75 74 #if H_MV 76 75 m_iNumSubstreams = 0; 77 #endif78 76 #endif 79 77 … … 236 234 for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ ) 237 235 { 238 #if H_MV_HLS10_GEN_FIX239 236 #if H_MV 240 237 xDelete( false, m_pppcRDSbacCoder, iDepth, iCIIdx); … … 244 241 delete m_pppcBinCoderCABAC[iDepth][iCIIdx]; 245 242 #endif 246 #endif247 243 } 248 244 } … … 250 246 for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ ) 251 247 { 252 #if H_MV_HLS10_GEN_FIX253 248 #if H_MV 254 249 xDelete( true, m_pppcRDSbacCoder , iDepth); … … 258 253 delete [] m_pppcBinCoderCABAC[iDepth]; 259 254 #endif 260 #endif 261 } 262 263 #if H_MV_HLS10_GEN_FIX 255 } 256 264 257 #if H_MV 265 258 xDelete( true, m_pppcRDSbacCoder ); … … 269 262 delete [] m_pppcBinCoderCABAC; 270 263 #endif 271 #endif272 264 for ( UInt ui = 0; ui < m_iNumSubstreams; ui++ ) 273 265 { … … 276 268 for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ ) 277 269 { 278 #if H_MV_HLS10_GEN_FIX279 270 #if H_MV 280 271 xDelete(false, m_ppppcRDSbacCoders ,ui, iDepth, iCIIdx); … … 284 275 delete m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx]; 285 276 #endif 286 #endif287 277 } 288 278 } … … 290 280 for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ ) 291 281 { 292 #if H_MV_HLS10_GEN_FIX293 282 #if H_MV 294 283 xDelete(true, m_ppppcRDSbacCoders ,ui, iDepth); … … 298 287 delete [] m_ppppcBinCodersCABAC[ui][iDepth]; 299 288 #endif 300 #endif 301 } 302 303 304 #if H_MV_HLS10_GEN_FIX 289 } 290 291 305 292 #if H_MV 306 293 xDelete(true, m_ppppcRDSbacCoders, ui); … … 310 297 delete[] m_ppppcBinCodersCABAC[ui]; 311 298 #endif 312 #endif 313 } 314 #if H_MV_HLS10_GEN_FIX 299 } 315 300 #if H_MV 316 301 xDelete(true, m_ppppcRDSbacCoders ) ; … … 331 316 delete[] m_pcBitCounters; 332 317 delete[] m_pcRdCosts; 333 #endif334 318 #endif 335 319 … … 769 753 #if H_MV 770 754 m_cSPS.setUpdateRepFormatFlag ( false ); 771 #if H_MV_HLS10_MULTILAYERSPS772 755 Bool multiLayerExtensionFlag = ( getLayerId() > 0 ) && ( m_cVPS->getNumRefLayers( getLayerId() ) > 0 ); 773 756 … … 778 761 m_cSPS.setSpsScalingListRefLayerId( m_cVPS->getIdRefLayer( getLayerId(), 0 ) ); 779 762 } 780 #else781 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) );782 m_cSPS.setSpsScalingListRefLayerId ( 0 );783 #endif784 763 m_cSPS.setSpsExtensionPresentFlag ( true ); 785 764 m_cSPS.setSpsMultilayerExtensionFlag ( true ); … … 856 835 for( Int is = 0; is < targetDecLayerIdList.size(); is++ ) 857 836 { 858 #if H_MV_HLS10_ADD_LAYERSETS859 837 if ( m_cVPS->getNecessaryLayerFlag( ols, is ) ) 860 838 { 861 839 m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true ); 862 840 } 863 #else 864 m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true ); 865 #endif 866 } 867 } 868 #if !H_MV_HLS10_ADD_LAYERSETS 869 m_cVPS->inferDbpSizeLayerSetZero( &m_cSPS, true ); 870 #endif 841 } 842 } 871 843 #endif 872 844 m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma); -
branches/HTM-12.1-dev0/source/Lib/TLibEncoder/TEncTop.h
r1074 r1076 150 150 Void xInitPPSforTiles (); 151 151 Void xInitRPS (Bool isFieldCoding); ///< initialize PPS from encoder options 152 #if H_MV_HLS10_GEN_FIX153 152 #if H_MV 154 153 … … 193 192 194 193 #endif 195 #endif196 194 public: 197 195 TEncTop();
Note: See TracChangeset for help on using the changeset viewer.