Changeset 1084 in 3DVCSoftware for trunk/source/App/TAppEncoder
- Timestamp:
- 24 Oct 2014, 11:44:58 (10 years ago)
- Location:
- trunk/source/App/TAppEncoder
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/App/TAppEncoder/TAppEncCfg.cpp
r1066 r1084 72 72 #endif 73 73 , m_pchdQPFile() 74 , m_pColumnWidth()75 , m_pRowHeight()76 74 , m_scalingListFile() 77 75 { … … 139 137 #endif 140 138 free(m_pchdQPFile); 141 free(m_pColumnWidth);142 free(m_pRowHeight);143 139 free(m_scalingListFile); 144 140 #if H_MV … … 241 237 {"main-still-picture", Profile::MAINSTILLPICTURE}, 242 238 #if H_MV 243 #if H_MV_HLS10_PTL244 239 {"multiview-main", Profile::MULTIVIEWMAIN}, 245 240 #if H_3D … … 247 242 #endif 248 243 249 #else250 {"main-stereo", Profile::MAINSTEREO},251 {"main-multiview", Profile::MAINMULTIVIEW},252 #if H_3D253 {"main-3d" , Profile::MAIN3D},254 #endif255 #endif256 244 #endif 257 245 }; … … 341 329 #if H_MV 342 330 vector<Int> cfg_dimensionLength; 343 #if H_MV_HLS10_PTL344 331 string cfg_profiles; 345 332 string cfg_levels; 346 333 string cfg_tiers; 347 #endif348 334 #if H_3D 349 335 cfg_dimensionLength.push_back( 2 ); // depth … … 354 340 #endif 355 341 string cfg_dQPFile; 356 string cfg _ColumnWidth;357 string cfg _RowHeight;342 string cfgColumnWidth; 343 string cfgRowHeight; 358 344 string cfg_ScalingListFile; 359 345 string cfg_startOfCodedInterval; … … 380 366 ("NumberOfLayers", m_numberOfLayers , 1, "Number of layers") 381 367 #if !H_3D 382 #if H_MV_HLS10_AUX383 368 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary") 384 #else385 ("ScalabilityMask", m_scalabilityMask , 2 , "Scalability Mask")386 #endif387 369 #else 388 370 ("ScalabilityMask", m_scalabilityMask , 3 , "Scalability Mask, 1: Texture 3: Texture + Depth ") … … 391 373 ("ViewOrderIndex", m_viewOrderIndex , std::vector<Int>(1,0), "View Order Index per layer") 392 374 ("ViewId", m_viewId , std::vector<Int>(1,0), "View Id per View Order Index") 393 #if H_MV_HLS10_AUX394 375 ("AuxId", m_auxId , std::vector<Int>(1,0), "AuxId per layer") 395 #endif396 376 #if H_3D 397 377 ("DepthFlag", m_depthFlag , std::vector<Int>(1,0), "Depth Flag") 398 378 #if H_3D_DIM 399 379 ("DMM", m_useDMM, true, "Depth intra model modes") 400 #if SEPARATE_FLAG_I0085401 380 ("IVP", m_useIVP, true, "intra-view prediction") 402 #endif403 381 ("SDC", m_useSDC, true, "Simplified depth coding") 404 382 ("DLT", m_useDLT, true, "Depth lookup table") 405 383 #endif 406 #if MTK_SINGLE_DEPTH_MODE_I0095384 #if H_3D 407 385 ("SingleDepthMode", m_useSingleDepthMode, true, "Single depth mode") 408 386 #endif 409 387 #endif 410 #if H_MV_HLS10_GEN_FIX411 388 ("TargetEncLayerIdList", m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded") 412 #endif413 389 ("LayerIdInNuh", m_layerIdInNuh , std::vector<Int>(1,0), "LayerId in Nuh") 414 390 ("SplittingFlag", m_splittingFlag , false , "Splitting Flag") … … 417 393 ("VpsNumLayerSets", m_vpsNumLayerSets , 1 , "Number of layer sets") 418 394 ("LayerIdsInSet_%d", m_layerIdsInSets , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set") 419 #if H_MV_HLS10_ADD_LAYERSETS420 395 ("NumAddLayerSets" , m_numAddLayerSets , 0 , "NumAddLayerSets ") 421 396 ("HighestLayerIdxPlus1_%d", m_highestLayerIdxPlus1, std::vector< Int >(0,0) ,MAX_VPS_NUM_ADD_LAYER_SETS, "HighestLayerIdxPlus1") 422 #endif423 397 ("DefaultTargetOutputLayerIdc" , m_defaultOutputLayerIdc , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet") 424 398 ("OutputLayerSetIdx", m_outputLayerSetIdx , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets") … … 428 402 ("AltOutputLayerFlag", m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag") 429 403 430 #if H_MV_HLS10_PTL431 404 ("ProfileTierLevelIdx_%d", m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols") 432 #else433 ("ProfileLevelTierIdx", m_profileLevelTierIdx, std::vector<Int>(1,0), "Indices to profile level tier")434 #endif435 405 // Layer dependencies 436 406 ("DirectRefLayers_%d", m_directRefLayers , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIds of direct reference layers") … … 446 416 ("OutputBitDepthC", m_outputBitDepthC, 0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)") 447 417 ("InternalBitDepthC", m_internalBitDepthC, 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)") 448 ("ConformanceMode", m_conformanceMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 418 ("ConformanceMode", m_conformanceWindowMode, 0, "Deprecated alias of ConformanceWindowMode") 419 ("ConformanceWindowMode", m_conformanceWindowMode, 0, "Window conformance mode (0: no window, 1:automatic padding, 2:padding, 3:conformance") 449 420 ("HorizontalPadding,-pdx",m_aiPad[0], 0, "Horizontal source padding for conformance window mode 2") 450 421 ("VerticalPadding,-pdy", m_aiPad[1], 0, "Vertical source padding for conformance window mode 2") 451 ("ConfLeft", m_confLeft, 0, "Left offset for window conformance mode 3") 452 ("ConfRight", m_confRight, 0, "Right offset for window conformance mode 3") 453 ("ConfTop", m_confTop, 0, "Top offset for window conformance mode 3") 454 ("ConfBottom", m_confBottom, 0, "Bottom offset for window conformance mode 3") 422 ("ConfLeft", m_confWinLeft, 0, "Deprecated alias of ConfWinLeft") 423 ("ConfRight", m_confWinRight, 0, "Deprecated alias of ConfWinRight") 424 ("ConfTop", m_confWinTop, 0, "Deprecated alias of ConfWinTop") 425 ("ConfBottom", m_confWinBottom, 0, "Deprecated alias of ConfWinBottom") 426 ("ConfWinLeft", m_confWinLeft, 0, "Left offset for window conformance mode 3") 427 ("ConfWinRight", m_confWinRight, 0, "Right offset for window conformance mode 3") 428 ("ConfWinTop", m_confWinTop, 0, "Top offset for window conformance mode 3") 429 ("ConfWinBottom", m_confWinBottom, 0, "Bottom offset for window conformance mode 3") 455 430 ("FrameRate,-fr", m_iFrameRate, 0, "Frame rate") 456 431 ("FrameSkip,-fs", m_FrameSkip, 0u, "Number of frames to skip at start of input YUV") … … 462 437 463 438 // Profile and level 464 #if H_MV _HLS10_PTL439 #if H_MV 465 440 ("Profile", cfg_profiles, string(""), "Profile in VpsProfileTierLevel (Indication only)") 466 441 ("Level", cfg_levels , string(""), "Level indication in VpsProfileTierLevel (Indication only)") … … 609 584 ("WeightedPredB,-wpB", m_useWeightedBiPred, false, "Use weighted (bidirectional) prediction in B slices") 610 585 ("Log2ParallelMergeLevel", m_log2ParallelMergeLevel, 2u, "Parallel merge estimation region") 611 ("UniformSpacingIdc", m_iUniformSpacingIdr, 0, "Indicates if the column and row boundaries are distributed uniformly") 612 ("NumTileColumnsMinus1", m_iNumColumnsMinus1, 0, "Number of columns in a picture minus 1") 613 ("ColumnWidthArray", cfg_ColumnWidth, string(""), "Array containing ColumnWidth values in units of LCU") 614 ("NumTileRowsMinus1", m_iNumRowsMinus1, 0, "Number of rows in a picture minus 1") 615 ("RowHeightArray", cfg_RowHeight, string(""), "Array containing RowHeight values in units of LCU") 586 587 //deprecated copies of renamed tile parameters 588 ("UniformSpacingIdc", m_tileUniformSpacingFlag, false, "deprecated alias of TileUniformSpacing") 589 ("ColumnWidthArray", cfgColumnWidth, string(""), "deprecated alias of TileColumnWidthArray") 590 ("RowHeightArray", cfgRowHeight, string(""), "deprecated alias of TileRowHeightArray") 591 592 ("TileUniformSpacing", m_tileUniformSpacingFlag, false, "Indicates that tile columns and rows are distributed uniformly") 593 ("NumTileColumnsMinus1", m_numTileColumnsMinus1, 0, "Number of tile columns in a picture minus 1") 594 ("NumTileRowsMinus1", m_numTileRowsMinus1, 0, "Number of rows in a picture minus 1") 595 ("TileColumnWidthArray", cfgColumnWidth, string(""), "Array containing tile column width values in units of LCU") 596 ("TileRowHeightArray", cfgRowHeight, string(""), "Array containing tile row height values in units of LCU") 616 597 ("LFCrossTileBoundaryFlag", m_bLFCrossTileBoundaryFlag, true, "1: cross-tile-boundary loop filtering. 0:non-cross-tile-boundary loop filtering") 617 598 ("WaveFrontSynchro", m_iWaveFrontSynchro, 0, "0: no synchro; 1 synchro with TR; 2 TRR etc") … … 650 631 #endif 651 632 #if H_MV 652 #if H_MV_HLS10_GEN_FIX653 633 // A lot of this stuff could should actually be derived by the encoder. 654 #endif // H_MV_HLS10_GEN655 634 // VPS VUI 656 635 ("VpsVuiPresentFlag" , m_vpsVuiPresentFlag , false , "VpsVuiPresentFlag ") … … 676 655 ("CtuBasedOffsetEnabledFlag" , m_ctuBasedOffsetEnabledFlag , std::vector< Bool >(1,0) ,MAX_NUM_LAYERS , "CtuBasedOffsetEnabledFlag per direct reference for the N-th layer") 677 656 ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int >(1,0) ,MAX_NUM_LAYERS , "MinHorizontalCtuOffsetPlus1 per direct reference for the N-th layer") 678 #if H_MV_HLS10_VPS_VUI679 657 ("SingleLayerForNonIrapFlag", m_singleLayerForNonIrapFlag, false , "SingleLayerForNonIrapFlag") 680 658 ("HigherLayerIrapSkipFlag" , m_higherLayerIrapSkipFlag , false , "HigherLayerIrapSkipFlag ") 681 #endif682 659 #endif 683 660 … … 699 676 ("ColourDescriptionPresent", m_colourDescriptionPresentFlag, false, "Signals whether colour_primaries, transfer_characteristics and matrix_coefficients are present") 700 677 ("ColourPrimaries", m_colourPrimaries, 2, "Indicates chromaticity coordinates of the source primaries") 701 ("TransferChara teristics",m_transferCharacteristics, 2, "Indicates the opto-electronic transfer characteristics of the source")678 ("TransferCharacteristics", m_transferCharacteristics, 2, "Indicates the opto-electronic transfer characteristics of the source") 702 679 ("MatrixCoefficients", m_matrixCoefficients, 2, "Describes the matrix coefficients used in deriving luma and chroma from RGB primaries") 703 680 ("ChromaLocInfoPresent", m_chromaLocInfoPresentFlag, false, "Signals whether chroma_sample_loc_type_top_field and chroma_sample_loc_type_bottom_field are present") … … 786 763 ("SEISubBitstreamMaxBitRate", m_sbPropMaxBitRate, std::vector< Int >(1,0) ,"Specifies maximum bit rate of the i-th sub-bitstream") 787 764 788 #if H_MV_HLS10_GEN_FIX789 765 ("OutputVpsInfo", m_outputVpsInfo, false ,"Output information about the layer dependencies and layer sets") 790 #endif791 766 #endif 792 767 #if H_3D … … 814 789 815 790 #endif //HHI_VSO 816 #if MTK_I0099_VPS_EX2791 #if H_3D_QTLPC 817 792 ("LimQtPredFlag", m_bLimQtPredFlag , true , "Use Predictive Coding with QTL" ) 818 #endif819 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX820 #if H_3D_QTLPC821 793 ("QTL", m_bUseQTL , true , "Use depth Quadtree Limitation" ) 822 #if !MTK_I0099_VPS_EX2823 ("PC", m_bUsePC , true , "Use Predictive Coding with QTL" )824 #endif825 #endif826 794 #endif 827 795 #if H_3D_IV_MERGE … … 928 896 m_pchdQPFile = cfg_dQPFile.empty() ? NULL : strdup(cfg_dQPFile.c_str()); 929 897 930 Char* pColumnWidth = cfg_ColumnWidth.empty() ? NULL: strdup(cfg_ColumnWidth.c_str()); 931 Char* pRowHeight = cfg_RowHeight.empty() ? NULL : strdup(cfg_RowHeight.c_str()); 932 if( m_iUniformSpacingIdr == 0 && m_iNumColumnsMinus1 > 0 ) 933 { 934 char *columnWidth; 898 Char* pColumnWidth = cfgColumnWidth.empty() ? NULL: strdup(cfgColumnWidth.c_str()); 899 Char* pRowHeight = cfgRowHeight.empty() ? NULL : strdup(cfgRowHeight.c_str()); 900 901 if( !m_tileUniformSpacingFlag && m_numTileColumnsMinus1 > 0 ) 902 { 903 char *str; 935 904 int i=0; 936 m_ pColumnWidth = new UInt[m_iNumColumnsMinus1];937 columnWidth= strtok(pColumnWidth, " ,-");938 while( columnWidth!=NULL)939 { 940 if( i >=m_iNumColumnsMinus1 )905 m_tileColumnWidth.resize( m_numTileColumnsMinus1 ); 906 str = strtok(pColumnWidth, " ,-"); 907 while(str!=NULL) 908 { 909 if( i >= m_numTileColumnsMinus1 ) 941 910 { 942 911 printf( "The number of columns whose width are defined is larger than the allowed number of columns.\n" ); 943 912 exit( EXIT_FAILURE ); 944 913 } 945 *( m_pColumnWidth + i ) = atoi( columnWidth);946 columnWidth= strtok(NULL, " ,-");914 m_tileColumnWidth[i] = atoi( str ); 915 str = strtok(NULL, " ,-"); 947 916 i++; 948 917 } 949 if( i <m_iNumColumnsMinus1 )918 if( i < m_numTileColumnsMinus1 ) 950 919 { 951 920 printf( "The width of some columns is not defined.\n" ); … … 955 924 else 956 925 { 957 m_ pColumnWidth = NULL;958 } 959 960 if( m_iUniformSpacingIdr == 0 && m_iNumRowsMinus1 > 0 )961 { 962 char * rowHeight;926 m_tileColumnWidth.clear(); 927 } 928 929 if( !m_tileUniformSpacingFlag && m_numTileRowsMinus1 > 0 ) 930 { 931 char *str; 963 932 int i=0; 964 m_ pRowHeight = new UInt[m_iNumRowsMinus1];965 rowHeight= strtok(pRowHeight, " ,-");966 while( rowHeight!=NULL)967 { 968 if( i>=m_ iNumRowsMinus1 )933 m_tileRowHeight.resize(m_numTileRowsMinus1); 934 str = strtok(pRowHeight, " ,-"); 935 while(str!=NULL) 936 { 937 if( i>=m_numTileRowsMinus1 ) 969 938 { 970 939 printf( "The number of rows whose height are defined is larger than the allowed number of rows.\n" ); 971 940 exit( EXIT_FAILURE ); 972 941 } 973 *( m_pRowHeight + i ) = atoi( rowHeight);974 rowHeight= strtok(NULL, " ,-");942 m_tileRowHeight[i] = atoi( str ); 943 str = strtok(NULL, " ,-"); 975 944 i++; 976 945 } 977 if( i <m_iNumRowsMinus1 )946 if( i < m_numTileRowsMinus1 ) 978 947 { 979 948 printf( "The height of some rows is not defined.\n" ); … … 983 952 else 984 953 { 985 m_ pRowHeight = NULL;954 m_tileRowHeight.clear(); 986 955 } 987 956 #if H_MV … … 999 968 1000 969 // TODO:ChromaFmt assumes 4:2:0 below 1001 switch (m_conformance Mode)970 switch (m_conformanceWindowMode) 1002 971 { 1003 972 case 0: 1004 973 { 1005 974 // no conformance or padding 1006 m_conf Left = m_confRight = m_confTop = m_confBottom = 0;975 m_confWinLeft = m_confWinRight = m_confWinTop = m_confWinBottom = 0; 1007 976 m_aiPad[1] = m_aiPad[0] = 0; 1008 977 break; … … 1014 983 if (m_iSourceWidth % minCuSize) 1015 984 { 1016 m_aiPad[0] = m_conf Right = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth;1017 m_iSourceWidth += m_conf Right;985 m_aiPad[0] = m_confWinRight = ((m_iSourceWidth / minCuSize) + 1) * minCuSize - m_iSourceWidth; 986 m_iSourceWidth += m_confWinRight; 1018 987 } 1019 988 if (m_iSourceHeight % minCuSize) 1020 989 { 1021 m_aiPad[1] = m_conf Bottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight;1022 m_iSourceHeight += m_conf Bottom;990 m_aiPad[1] = m_confWinBottom = ((m_iSourceHeight / minCuSize) + 1) * minCuSize - m_iSourceHeight; 991 m_iSourceHeight += m_confWinBottom; 1023 992 if ( m_isField ) 1024 993 { 1025 m_iSourceHeightOrg += m_conf Bottom << 1;1026 m_aiPad[1] = m_conf Bottom << 1;994 m_iSourceHeightOrg += m_confWinBottom << 1; 995 m_aiPad[1] = m_confWinBottom << 1; 1027 996 } 1028 997 } … … 1044 1013 m_iSourceWidth += m_aiPad[0]; 1045 1014 m_iSourceHeight += m_aiPad[1]; 1046 m_conf Right = m_aiPad[0];1047 m_conf Bottom = m_aiPad[1];1015 m_confWinRight = m_aiPad[0]; 1016 m_confWinBottom = m_aiPad[1]; 1048 1017 break; 1049 1018 } … … 1051 1020 { 1052 1021 // conformance 1053 if ((m_conf Left == 0) && (m_confRight == 0) && (m_confTop == 0) && (m_confBottom == 0))1022 if ((m_confWinLeft == 0) && (m_confWinRight == 0) && (m_confWinTop == 0) && (m_confWinBottom == 0)) 1054 1023 { 1055 1024 fprintf(stderr, "Warning: Conformance window enabled, but all conformance window parameters set to zero\n"); … … 1082 1051 } 1083 1052 m_iNumberOfViews = (Int) uniqueViewOrderIndices.size(); 1084 #if H_MV_HLS10_AUX1085 1053 xResizeVector( m_auxId ); 1086 #endif1087 1054 1088 1055 #if H_3D … … 1118 1085 xResizeVector( m_wppInUseFlag ); 1119 1086 1120 #if H_MV_HLS10_ADD_LAYERSETS1121 1087 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + m_numAddLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++) 1122 #else1123 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + (Int) m_outputLayerSetIdx.size(); olsIdx++)1124 #endif1125 1088 { 1126 1089 m_altOutputLayerFlag.push_back( false ); … … 1234 1197 1235 1198 #if H_MV 1236 #if H_MV_HLS10_PTL1237 1199 // parse PTL 1238 1200 Bool anyEmpty = false; … … 1281 1243 xReadStrToEnum( cfg_levels, m_level ); 1282 1244 xReadStrToEnum( cfg_tiers , m_levelTier ); 1283 #endif1284 1245 #endif 1285 1246 #if H_3D … … 1399 1360 1400 1361 1401 #if !H_MV _HLS10_PTL1362 #if !H_MV 1402 1363 if( m_profile==Profile::NONE ) 1403 1364 { … … 1431 1392 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. "); 1432 1393 #else 1433 #if H_MV_HLS10_AUX1434 1394 xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 8 && m_scalabilityMask != 10, "Scalability Mask must be equal to 2, 8 or 10"); 1435 #else1436 xConfirmPara( m_scalabilityMask != 2 , "Scalability Mask must be equal to 2. ");1437 #endif1438 1395 #endif 1439 1396 … … 1446 1403 1447 1404 m_dimIds.push_back( m_viewOrderIndex ); 1448 #if H_MV_HLS10_AUX1449 1405 for (Int i = 0; i < m_auxId.size(); i++) 1450 1406 { … … 1455 1411 m_dimIds.push_back ( m_auxId ); 1456 1412 } 1457 #endif1458 1413 xConfirmPara( m_dimensionIdLen.size() < m_dimIds.size(), "DimensionIdLen must be given for all dimensions. " ); 1459 1414 Int dimBitOffset[MAX_NUM_SCALABILITY_TYPES+1]; … … 1540 1495 for ( Int i = 0; i < m_layerIdsInSets[lsIdx].size(); i++ ) 1541 1496 { 1542 #if FIX_TICKET_611543 1497 xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx][i] >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than 0 and less than MAX_NUM_LAYER_IDS" ); 1544 #else1545 xConfirmPara( m_layerIdsInSets[lsIdx][i] < 0 || m_layerIdsInSets[lsIdx].size() >= MAX_NUM_LAYER_IDS, "LayerIdsInSet must be greater than and less than MAX_NUM_LAYER_IDS" );1546 #endif1547 1498 } 1548 1499 } … … 1553 1504 { 1554 1505 Int refLayerSetIdx = m_outputLayerSetIdx[ lsIdx ]; 1555 #if H_MV_HLS10_ADD_LAYERSETS1556 1506 xConfirmPara( refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets + m_numAddLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets plus NumAddLayerSets." ); 1557 #else1558 xConfirmPara( refLayerSetIdx < 0 || refLayerSetIdx >= m_vpsNumLayerSets, "Output layer set idx must be greater or equal to 0 and less than the VpsNumLayerSets." );1559 #endif1560 #if !H_MV_HLS10_ADD_LAYERSETS1561 for (Int i = 0; i < m_layerIdsInAddOutputLayerSet[ lsIdx ].size(); i++)1562 {1563 Bool isAlsoInLayerSet = false;1564 for (Int j = 0; j < m_layerIdsInSets[ refLayerSetIdx ].size(); j++ )1565 {1566 if ( m_layerIdsInSets[ refLayerSetIdx ][ j ] == m_layerIdsInAddOutputLayerSet[ lsIdx ][ i ] )1567 {1568 isAlsoInLayerSet = true;1569 break;1570 }1571 }1572 xConfirmPara( !isAlsoInLayerSet, "All output layers of a output layer set be included in corresponding layer set.");1573 }1574 #endif1575 1507 } 1576 1508 … … 1584 1516 anyDefaultOutputFlag = anyDefaultOutputFlag || ( m_layerIdsInDefOutputLayerSet[lsIdx].size() != 0 ); 1585 1517 } 1586 #if H_MV_HLS10_ADD_LAYERSETS1587 1518 if ( anyDefaultOutputFlag ) 1588 1519 { 1589 1520 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" ); 1590 1521 } 1591 #else1592 printf( "\nWarning: Ignoring LayerIdsInDefOutputLayerSet parameters, since defaultTargetOuputLayerIdc is not equal 2.\n" );1593 #endif1594 1522 } 1595 1523 else … … 1613 1541 } 1614 1542 1615 #if H_MV_HLS10_ADD_LAYERSETS1616 1543 xConfirmPara( m_altOutputLayerFlag.size() < m_vpsNumLayerSets + m_numAddLayerSets + m_outputLayerSetIdx.size(), "The number of alt output layer flags must be equal to the number of layer set additional output layer sets plus the number of output layer set indices" ); 1617 #else1618 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" );1619 #endif1620 1544 1621 1545 // PTL 1622 #if H_MV_HLS10_PTL1623 1546 xConfirmPara( ( m_profile.size() != m_inblFlag.size() || m_profile.size() != m_level.size() || m_profile.size() != m_levelTier.size() ), "The number of Profiles, Levels, Tiers and InblFlags must be equal." ); 1624 1547 … … 1633 1556 } 1634 1557 } 1635 #else1636 xConfirmPara( m_profileLevelTierIdx.size() < m_vpsNumLayerSets + m_outputLayerSetIdx.size(), "The number of Profile Level Tier indices must be equal to the number of layer set plus the number of output layer set indices" );1637 #endif1638 1558 1639 1559 // Layer Dependencies … … 1768 1688 } 1769 1689 1770 Bool tileFlag = (m_ iNumColumnsMinus1 > 0 || m_iNumRowsMinus1 > 0 );1690 Bool tileFlag = (m_numTileColumnsMinus1 > 0 || m_numTileRowsMinus1 > 0 ); 1771 1691 xConfirmPara( tileFlag && m_iWaveFrontSynchro, "Tile and Wavefront can not be applied together"); 1772 1692 … … 1778 1698 xConfirmPara( m_aiPad[1] % TComSPS::getWinUnitY(CHROMA_420) != 0, "Vertical padding must be an integer multiple of the specified chroma subsampling"); 1779 1699 1780 xConfirmPara( m_confLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 1781 xConfirmPara( m_confRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 1782 xConfirmPara( m_confTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 1783 xConfirmPara( m_confBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 1700 xConfirmPara( m_confWinLeft % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left conformance window offset must be an integer multiple of the specified chroma subsampling"); 1701 xConfirmPara( m_confWinRight % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right conformance window offset must be an integer multiple of the specified chroma subsampling"); 1702 xConfirmPara( m_confWinTop % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top conformance window offset must be an integer multiple of the specified chroma subsampling"); 1703 xConfirmPara( m_confWinBottom % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom conformance window offset must be an integer multiple of the specified chroma subsampling"); 1704 1705 xConfirmPara( m_defaultDisplayWindowFlag && !m_vuiParametersPresentFlag, "VUI needs to be enabled for default display window"); 1706 1707 if (m_defaultDisplayWindowFlag) 1708 { 1709 xConfirmPara( m_defDispWinLeftOffset % TComSPS::getWinUnitX(CHROMA_420) != 0, "Left default display window offset must be an integer multiple of the specified chroma subsampling"); 1710 xConfirmPara( m_defDispWinRightOffset % TComSPS::getWinUnitX(CHROMA_420) != 0, "Right default display window offset must be an integer multiple of the specified chroma subsampling"); 1711 xConfirmPara( m_defDispWinTopOffset % TComSPS::getWinUnitY(CHROMA_420) != 0, "Top default display window offset must be an integer multiple of the specified chroma subsampling"); 1712 xConfirmPara( m_defDispWinBottomOffset % TComSPS::getWinUnitY(CHROMA_420) != 0, "Bottom default display window offset must be an integer multiple of the specified chroma subsampling"); 1713 } 1784 1714 1785 1715 #if H_3D … … 2301 2231 Int widthInCU = (m_iSourceWidth % m_uiMaxCUWidth) ? m_iSourceWidth/m_uiMaxCUWidth + 1: m_iSourceWidth/m_uiMaxCUWidth; 2302 2232 Int heightInCU = (m_iSourceHeight % m_uiMaxCUHeight) ? m_iSourceHeight/m_uiMaxCUHeight + 1: m_iSourceHeight/m_uiMaxCUHeight; 2303 if(m_ iUniformSpacingIdr)2304 { 2305 maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_ iNumColumnsMinus1)/(m_iNumColumnsMinus1+1));2306 maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_ iNumRowsMinus1)/(m_iNumRowsMinus1+1));2233 if(m_tileUniformSpacingFlag) 2234 { 2235 maxTileWidth = m_uiMaxCUWidth*((widthInCU+m_numTileColumnsMinus1)/(m_numTileColumnsMinus1+1)); 2236 maxTileHeight = m_uiMaxCUHeight*((heightInCU+m_numTileRowsMinus1)/(m_numTileRowsMinus1+1)); 2307 2237 // if only the last tile-row is one treeblock higher than the others 2308 2238 // the maxTileHeight becomes smaller if the last row of treeblocks has lower height than the others 2309 if(!((heightInCU-1)%(m_ iNumRowsMinus1+1)))2239 if(!((heightInCU-1)%(m_numTileRowsMinus1+1))) 2310 2240 { 2311 2241 maxTileHeight = maxTileHeight - m_uiMaxCUHeight + (m_iSourceHeight % m_uiMaxCUHeight); … … 2313 2243 // if only the last tile-column is one treeblock wider than the others 2314 2244 // the maxTileWidth becomes smaller if the last column of treeblocks has lower width than the others 2315 if(!((widthInCU-1)%(m_ iNumColumnsMinus1+1)))2245 if(!((widthInCU-1)%(m_numTileColumnsMinus1+1))) 2316 2246 { 2317 2247 maxTileWidth = maxTileWidth - m_uiMaxCUWidth + (m_iSourceWidth % m_uiMaxCUWidth); … … 2320 2250 else // not uniform spacing 2321 2251 { 2322 if(m_ iNumColumnsMinus1<1)2252 if(m_numTileColumnsMinus1<1) 2323 2253 { 2324 2254 maxTileWidth = m_iSourceWidth; … … 2327 2257 { 2328 2258 Int accColumnWidth = 0; 2329 for(Int col=0; col<(m_ iNumColumnsMinus1); col++)2259 for(Int col=0; col<(m_numTileColumnsMinus1); col++) 2330 2260 { 2331 maxTileWidth = m_ pColumnWidth[col]>maxTileWidth ? m_pColumnWidth[col]:maxTileWidth;2332 accColumnWidth += m_ pColumnWidth[col];2261 maxTileWidth = m_tileColumnWidth[col]>maxTileWidth ? m_tileColumnWidth[col]:maxTileWidth; 2262 accColumnWidth += m_tileColumnWidth[col]; 2333 2263 } 2334 2264 maxTileWidth = (widthInCU-accColumnWidth)>maxTileWidth ? m_uiMaxCUWidth*(widthInCU-accColumnWidth):m_uiMaxCUWidth*maxTileWidth; 2335 2265 } 2336 if(m_ iNumRowsMinus1<1)2266 if(m_numTileRowsMinus1<1) 2337 2267 { 2338 2268 maxTileHeight = m_iSourceHeight; … … 2341 2271 { 2342 2272 Int accRowHeight = 0; 2343 for(Int row=0; row<(m_ iNumRowsMinus1); row++)2273 for(Int row=0; row<(m_numTileRowsMinus1); row++) 2344 2274 { 2345 maxTileHeight = m_ pRowHeight[row]>maxTileHeight ? m_pRowHeight[row]:maxTileHeight;2346 accRowHeight += m_ pRowHeight[row];2275 maxTileHeight = m_tileRowHeight[row]>maxTileHeight ? m_tileRowHeight[row]:maxTileHeight; 2276 accRowHeight += m_tileRowHeight[row]; 2347 2277 } 2348 2278 maxTileHeight = (heightInCU-accRowHeight)>maxTileHeight ? m_uiMaxCUHeight*(heightInCU-accRowHeight):m_uiMaxCUHeight*maxTileHeight; … … 2499 2429 #endif 2500 2430 #if H_MV 2501 #if H_MV_HLS10_GEN_FIX2502 2431 xPrintParaVector( "NuhLayerId" , m_layerIdInNuh ); 2503 2432 if ( m_targetEncLayerIdList.size() > 0) … … 2505 2434 xPrintParaVector( "TargetEncLayerIdList" , m_targetEncLayerIdList ); 2506 2435 } 2507 #endif2508 2436 xPrintParaVector( "ViewIdVal" , m_viewId ); 2509 2437 xPrintParaVector( "ViewOrderIndex", m_viewOrderIndex ); 2510 #if H_MV_HLS10_AUX2511 2438 xPrintParaVector( "AuxId", m_auxId ); 2512 #endif2513 2439 #endif 2514 2440 #if H_3D … … 2521 2447 xPrintParaVector( "SAO" , m_bUseSAO ); 2522 2448 #endif 2523 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_conf Left - m_confRight, m_iSourceHeight - m_confTop - m_confBottom, m_iFrameRate );2449 printf("Real Format : %dx%d %dHz\n", m_iSourceWidth - m_confWinLeft - m_confWinRight, m_iSourceHeight - m_confWinTop - m_confWinBottom, m_iFrameRate ); 2524 2450 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 2525 2451 if (m_isField) … … 2676 2602 printf("WVSO:%d ", m_bUseWVSO ); 2677 2603 #endif 2678 #if MTK_I0099_VPS_EX22604 #if H_3D_QTLPC 2679 2605 printf("LimQtPredFlag:%d ", m_bLimQtPredFlag ? 1 : 0); 2680 #endif2681 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX2682 #if H_3D_QTLPC2683 2606 printf("QTL:%d ", m_bUseQTL); 2684 #if !MTK_I0099_VPS_EX22685 printf("PC:%d " , m_bUsePC );2686 #endif2687 #endif2688 2607 #endif 2689 2608 #if H_3D_IV_MERGE … … 2712 2631 #if H_3D_DIM 2713 2632 printf("DMM:%d ", m_useDMM ); 2714 #if SEPARATE_FLAG_I00852715 2633 printf("IVP:%d ", m_useIVP ); 2716 #endif2717 2634 printf("SDC:%d ", m_useSDC ); 2718 2635 printf("DLT:%d ", m_useDLT ); 2719 2636 #endif 2720 #if MTK_SINGLE_DEPTH_MODE_I00952637 #if H_3D 2721 2638 printf("SingleDepthMode:%d ", m_useSingleDepthMode); 2722 2639 #endif -
trunk/source/App/TAppEncoder/TAppEncCfg.h
r1066 r1084 43 43 #include "TLibEncoder/TEncCfg.h" 44 44 #include <sstream> 45 #include <vector> 45 46 #if H_3D 46 47 #include "TAppCommon/TAppComCamPara.h" … … 78 79 std::vector<Int> m_viewId; ///< view id 79 80 std::vector<Int> m_viewOrderIndex; ///< view order index 80 #if H_MV_HLS10_AUX81 81 std::vector<Int> m_auxId; ///< auxiliary id 82 #endif83 82 #if H_3D 84 83 std::vector<Int> m_depthFlag; ///< depth flag 85 84 #endif 86 #if H_MV_HLS10_GEN_FIX87 85 std::vector<Int> m_targetEncLayerIdList; ///< layer Ids in Nuh to be encoded 88 #endif89 86 std::vector<Int> m_layerIdInNuh; ///< layer Id in Nuh for each layer 90 87 Bool m_splittingFlag; ///< Splitting Flag … … 95 92 Int m_vpsNumLayerSets; ///< Number of layer sets 96 93 std::vector< std::vector<Int> > m_layerIdsInSets; ///< LayerIds in vps of layer set 97 #if H_MV_HLS10_ADD_LAYERSETS98 94 Int m_numAddLayerSets; ///< Number of additional layer sets 99 95 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 96 Int m_defaultOutputLayerIdc; ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet 102 97 std::vector<Int> m_outputLayerSetIdx; ///< Indices of layer sets used as additional output layer sets 103 98 std::vector< std::vector<Int> > m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers 104 99 std::vector< std::vector<Int> > m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets 105 #if H_MV_HLS10_ADD_LAYERSETS106 100 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 101 std::vector<Bool> m_altOutputLayerFlag; ///< Alt output layer flag 111 102 … … 138 129 std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag; 139 130 std::vector< std::vector<Int > > m_minHorizontalCtuOffsetPlus1; 140 #if H_MV_HLS10_VPS_VUI141 131 Bool m_singleLayerForNonIrapFlag; 142 132 Bool m_higherLayerIrapSkipFlag; 143 #endif // H_MV_HLS10_VPS_VUI144 133 145 134 … … 151 140 #endif 152 141 #endif 153 #if MTK_I0099_VPS_EX2142 #if H_3D_QTLPC 154 143 Bool m_bLimQtPredFlag; 155 144 #endif … … 184 173 bool m_isTopFieldFirst; 185 174 186 Int m_conformance Mode;187 Int m_conf Left;188 Int m_conf Right;189 Int m_conf Top;190 Int m_conf Bottom;175 Int m_conformanceWindowMode; 176 Int m_confWinLeft; 177 Int m_confWinRight; 178 Int m_confWinTop; 179 Int m_confWinBottom; 191 180 Int m_framesToBeEncoded; ///< number of encoded frames 192 181 Int m_aiPad[2]; ///< number of padded pixels for width and height 193 182 194 183 // profile/level 195 #if H_MV_HLS10_PTL196 184 #if H_MV 197 185 std::vector< Profile::Name > m_profile; … … 203 191 Level::Tier m_levelTier; 204 192 Level::Name m_level; 205 #endif206 193 #endif 207 194 … … 338 325 Bool m_bLFCrossSliceBoundaryFlag; ///< 1: filter across slice boundaries 0: do not filter across slice boundaries 339 326 Bool m_bLFCrossTileBoundaryFlag; ///< 1: filter across tile boundaries 0: do not filter across tile boundaries 340 Int m_iUniformSpacingIdr; 341 Int m_iNumColumnsMinus1; 342 Char* m_pchColumnWidth; 343 Int m_iNumRowsMinus1; 344 Char* m_pchRowHeight; 345 UInt* m_pColumnWidth; 346 UInt* m_pRowHeight; 327 Bool m_tileUniformSpacingFlag; 328 Int m_numTileColumnsMinus1; 329 Int m_numTileRowsMinus1; 330 std::vector<Int> m_tileColumnWidth; 331 std::vector<Int> m_tileRowHeight; 347 332 Int m_iWaveFrontSynchro; //< 0: no WPP. >= 1: WPP is enabled, the "Top right" from which inheritance occurs is this LCU offset in the line above the current. 348 333 Int m_iWaveFrontSubstreams; //< If iWaveFrontSynchro, this is the number of substreams per frame (dependent tiles) or per tile (independent tiles). … … 468 453 std::vector<Int> m_sbPropAvgBitRate; 469 454 std::vector<Int> m_sbPropMaxBitRate; 470 #if H_MV_HLS10_GEN_FIX471 455 Bool m_outputVpsInfo; 472 #endif473 456 #endif 474 457 #if H_3D … … 504 487 #if H_3D_DIM 505 488 Bool m_useDMM; ///< flag for using DMM 506 #if SEPARATE_FLAG_I0085507 489 Bool m_useIVP; 508 #endif509 490 Bool m_useSDC; ///< flag for using SDC 510 491 Bool m_useDLT; ///< flag for using DLT 511 492 #endif 512 #if MTK_SINGLE_DEPTH_MODE_I0095493 #if H_3D_SINGLE_DEPTH 513 494 Bool m_useSingleDepthMode; ///< flag for using single depth mode 514 495 #endif 515 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX516 496 #if H_3D_QTLPC 517 497 Bool m_bUseQTL; ///< flag for using depth QuadTree Limitation 518 #if !MTK_I0099_VPS_EX2519 Bool m_bUsePC; ///< flag for using Predictive Coding with QTL520 #endif521 #endif522 498 #endif 523 499 #if H_3D_INTER_SDC … … 538 514 #if H_MV 539 515 540 #if H_MV_HLS10_PTL541 516 template<typename T> 542 517 Void xReadStrToEnum(string in, std::vector<T> &val) … … 559 534 delete[] cString; 560 535 } 561 #endif562 536 563 537 -
trunk/source/App/TAppEncoder/TAppEncTop.cpp
r1066 r1084 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++) … … 233 227 #if H_3D_DIM 234 228 m_cTEncTop.setUseDMM ( isDepth ? m_useDMM : false ); 235 #if SEPARATE_FLAG_I0085 236 #if LGE_FCO_I0116 229 #if H_3D_FCO 237 230 m_cTEncTop.setUseIVP ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_useIVP : false ); 238 231 #else 239 232 m_cTEncTop.setUseIVP ( isDepth ? m_useIVP : false ); 240 #endif241 233 #endif 242 234 m_cTEncTop.setUseSDC ( isDepth ? m_useSDC : false ); 243 235 m_cTEncTop.setUseDLT ( isDepth ? m_useDLT : false ); 244 236 #endif 245 #if MTK_SINGLE_DEPTH_MODE_I0095237 #if H_3D_SINGLE_DEPTH 246 238 m_cTEncTop.setUseSingleDepthMode ( isDepth ? m_useSingleDepthMode : false ); 247 239 #endif 248 #if !MTK_I0099_VPS_EX2 || MTK_I0099_FIX249 240 #if H_3D_QTLPC 250 #if LGE_FCO_I0116251 m_cTEncTop.setUseQTL ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_bUseQTL : false );252 #else253 241 m_cTEncTop.setUseQTL ( isDepth ? m_bUseQTL : false ); 254 #endif255 #if !MTK_I0099_VPS_EX2256 m_cTEncTop.setUsePC ( isDepth ? m_bUsePC : false );257 #endif258 #endif259 242 #endif 260 243 //====== Depth Inter SDC ========= … … 266 249 #endif 267 250 #if H_3D_IV_MERGE 268 #if LGE_FCO_I0116251 #if H_3D_FCO 269 252 m_cTEncTop.setUseMPI ( vps.getViewIndex( layerId ) == 0 && isDepth ? m_bMPIFlag : false ); 270 253 #else … … 298 281 m_cTEncTop.setSourceWidth ( m_iSourceWidth ); 299 282 m_cTEncTop.setSourceHeight ( m_iSourceHeight ); 300 m_cTEncTop.setConformanceWindow ( m_conf Left, m_confRight, m_confTop, m_confBottom );283 m_cTEncTop.setConformanceWindow ( m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 301 284 m_cTEncTop.setFramesToBeEncoded ( m_framesToBeEncoded ); 302 285 … … 506 489 } 507 490 #endif 508 m_cTEncTop.set UniformSpacingIdr ( m_iUniformSpacingIdr);509 m_cTEncTop.setNumColumnsMinus1 ( m_ iNumColumnsMinus1 );510 m_cTEncTop.setNumRowsMinus1 ( m_ iNumRowsMinus1 );511 if( m_iUniformSpacingIdr==0)512 { 513 m_cTEncTop.setColumnWidth ( m_ pColumnWidth );514 m_cTEncTop.setRowHeight ( m_ pRowHeight );491 m_cTEncTop.setTileUniformSpacingFlag ( m_tileUniformSpacingFlag ); 492 m_cTEncTop.setNumColumnsMinus1 ( m_numTileColumnsMinus1 ); 493 m_cTEncTop.setNumRowsMinus1 ( m_numTileRowsMinus1 ); 494 if(!m_tileUniformSpacingFlag) 495 { 496 m_cTEncTop.setColumnWidth ( m_tileColumnWidth ); 497 m_cTEncTop.setRowHeight ( m_tileRowHeight ); 515 498 } 516 499 m_cTEncTop.xCheckGSParameters(); 517 Int uiTilesCount = (m_ iNumRowsMinus1+1) * (m_iNumColumnsMinus1+1);500 Int uiTilesCount = (m_numTileRowsMinus1+1) * (m_numTileColumnsMinus1+1); 518 501 if(uiTilesCount == 1) 519 502 { … … 620 603 m_cTEncTop.setActiveParameterSetsSEIEnabled ( m_activeParameterSetsSEIEnabled ); 621 604 m_cTEncTop.setVuiParametersPresentFlag( m_vuiParametersPresentFlag ); 605 m_cTEncTop.setAspectRatioInfoPresentFlag( m_aspectRatioInfoPresentFlag); 622 606 m_cTEncTop.setAspectRatioIdc( m_aspectRatioIdc ); 623 607 m_cTEncTop.setSarWidth( m_sarWidth ); … … 840 824 841 825 #if H_MV 842 #if H_MV_HLS10_GEN_FIX843 826 while ( (m_targetEncLayerIdList.size() != 0 ) && !allEos ) 844 #else845 while ( !allEos )846 #endif847 827 { 848 828 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 849 829 { 850 #if H_MV_HLS10_GEN_FIX851 830 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 852 831 { 853 832 continue; 854 833 } 855 #endif856 834 857 835 Int frmCnt = 0; … … 894 872 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 895 873 { 896 #if H_MV_HLS10_GEN_FIX897 874 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 898 875 { 899 876 continue; 900 877 } 901 #endif902 878 903 879 #if H_3D_VSO … … 927 903 for(Int layer=0; layer < m_numberOfLayers; layer++ ) 928 904 { 929 #if H_MV_HLS10_GEN_FIX930 905 if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) )) 931 906 { 932 907 continue; 933 908 } 934 #endif935 909 m_acTEncTopList[layer]->printSummary( m_acTEncTopList[layer]->getNumAllPicCoded(), m_isField ); 936 910 } … … 1114 1088 if (m_pchReconFileList[layerId]) 1115 1089 { 1090 #if H_MV_ALIGN_HM_15 1091 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst ); 1092 #else 1116 1093 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confLeft, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst ); 1094 #endif 1117 1095 } 1118 1096 } … … 1131 1109 if (m_pchReconFile) 1132 1110 { 1133 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_conf Left, m_confRight, m_confTop, m_confBottom, m_isTopFieldFirst );1111 m_cTVideoIOYuvReconFile.write( pcPicYuvRecTop, pcPicYuvRecBottom, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_isTopFieldFirst ); 1134 1112 } 1135 1113 … … 1167 1145 if (m_pchReconFileList[layerId]) 1168 1146 { 1147 #if H_MV_ALIGN_HM_15 1148 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 1149 #else 1169 1150 m_acTVideoIOYuvReconFileList[layerId]->write( pcPicYuvRec, m_confLeft, m_confRight, m_confTop, m_confBottom ); 1151 #endif 1170 1152 } 1171 1153 } … … 1183 1165 if (m_pchReconFile) 1184 1166 { 1185 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_conf Left, m_confRight, m_confTop, m_confBottom );1167 m_cTVideoIOYuvReconFile.write( pcPicYuvRec, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom ); 1186 1168 } 1187 1169 … … 1396 1378 // Max sub layers, + presence flag 1397 1379 Bool subLayersMaxMinus1PresentFlag = false; 1398 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS11399 Int subLayersMaxMinus1 = -1;1400 #endif1401 1380 for (Int curLayerIdInVps = 0; curLayerIdInVps < m_numberOfLayers; curLayerIdInVps++ ) 1402 1381 { … … 1409 1388 1410 1389 vps.setSubLayersVpsMaxMinus1( curLayerIdInVps, curSubLayersMaxMinus1 ); 1411 #if !H_MV_FIX_SUB_LAYERS_MAX_MINUS11412 if ( subLayersMaxMinus1 == -1 )1413 {1414 subLayersMaxMinus1 = curSubLayersMaxMinus1;1415 }1416 else1417 {1418 subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != subLayersMaxMinus1 );1419 }1420 #else1421 1390 subLayersMaxMinus1PresentFlag = subLayersMaxMinus1PresentFlag || ( curSubLayersMaxMinus1 != vps.getMaxSubLayersMinus1() ); 1422 #endif1423 1391 } 1424 1392 … … 1433 1401 { 1434 1402 Int maxTid = -1; 1435 #if H_MV_FIX_LOOP_GOPSIZE1436 1403 for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 1437 1404 { 1438 1405 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][( i < getGOPSize() ? i : MAX_GOP )]; 1439 1406 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][( i < getGOPSize() ? i : MAX_GOP )]; 1440 #else1441 for( Int i = 0; i < getGOPSize(); i++ )1442 {1443 GOPEntry geCur = m_GOPListMvc[curLayerIdInVps][i];1444 GOPEntry geRef = m_GOPListMvc[refLayerIdInVps][i];1445 #endif1446 1407 for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++) 1447 1408 { 1448 1409 if ( m_directRefLayers[ curLayerIdInVps ][ geCur.m_interLayerPredLayerIdc[ j ]] == refLayerIdInVps ) 1449 1410 { 1450 #if H_MV_FIX_LOOP_GOPSIZE1451 1411 Bool refAlwaysIntra = ( i == getGOPSize() ) && ( m_iIntraPeriod[ curLayerIdInVps ] % m_iIntraPeriod[ refLayerIdInVps ] == 0 ); 1452 1412 Bool refLayerZero = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 ); 1453 1413 maxTid = std::max( maxTid, ( refAlwaysIntra || refLayerZero ) ? 0 : geRef.m_temporalId ); 1454 #else1455 maxTid = std::max( maxTid, geRef.m_temporalId );1456 #endif1457 1414 } 1458 1415 } … … 1580 1537 Void TAppEncTop::xSetProfileTierLevel( TComVPS& vps ) 1581 1538 { 1582 #if H_MV_HLS10_PTL1583 1539 1584 1540 // SET PTL … … 1598 1554 m_nonPackedConstraintFlag, m_frameOnlyConstraintFlag, m_inblFlag[ptlIdx] ); 1599 1555 } 1600 #else 1601 const Int vpsNumProfileTierLevelMinus1 = 0; //TBD 1602 vps.setVpsNumProfileTierLevelMinus1( vpsNumProfileTierLevelMinus1 ); 1603 1604 for (Int i = 0; i <= vps.getVpsNumProfileTierLevelMinus1(); i++ ) 1605 { 1606 vps.setVpsProfilePresentFlag( i, true ); 1607 } 1608 #endif 1609 } 1610 1611 #if H_MV_HLS10_PTL 1556 } 1557 1612 1558 Void TAppEncTop::xSetProfileTierLevel(TComVPS& vps, Int profileTierLevelIdx, Int subLayer, Profile::Name profile, Level::Name level, Level::Tier tier, Bool progressiveSourceFlag, Bool interlacedSourceFlag, Bool nonPackedConstraintFlag, Bool frameOnlyConstraintFlag, Bool inbldFlag) 1613 1559 { … … 1631 1577 ptl->setLevelIdc ( level ); 1632 1578 ptl->setProfileCompatibilityFlag( profile, true ); 1633 #if H_MV_HLS10_PTL_INBL_FIX1634 1579 ptl->setInbldFlag( inbldFlag ); 1635 #endif1636 1580 1637 1581 switch ( profile ) … … 1659 1603 } 1660 1604 } 1661 #endif1662 1605 1663 1606 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) … … 1677 1620 //repFormat->setSeparateColourPlaneVpsFlag( ); 1678 1621 1679 #if H_MV_HLS10_GEN_VSP_CONF_WIN1680 1622 repFormat->setConformanceWindowVpsFlag( true ); 1623 #if H_MV_ALIGN_HM_15 1624 repFormat->setConfWinVpsLeftOffset ( m_confWinLeft / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); 1625 repFormat->setConfWinVpsRightOffset ( m_confWinRight / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); 1626 repFormat->setConfWinVpsTopOffset ( m_confWinTop / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1627 repFormat->setConfWinVpsBottomOffset ( m_confWinBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1628 #else 1681 1629 repFormat->setConfWinVpsLeftOffset ( m_confLeft / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); 1682 1630 repFormat->setConfWinVpsRightOffset ( m_confRight / TComSPS::getWinUnitX( repFormat->getChromaFormatVpsIdc() ) ); … … 1684 1632 repFormat->setConfWinVpsBottomOffset ( m_confBottom / TComSPS::getWinUnitY( repFormat->getChromaFormatVpsIdc() ) ); 1685 1633 #endif 1686 1687 1634 assert( vps.getRepFormat( 0 ) == NULL ); 1688 1635 vps.setRepFormat( 0 , repFormat ); … … 1700 1647 { 1701 1648 Int currLsIdx = vps.olsIdxToLsIdx( i ); 1702 #if !H_MV_HLS10_ADD_LAYERSETS1703 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i );1704 #endif1705 1649 Bool subLayerFlagInfoPresentFlag = false; 1706 1650 … … 1708 1652 { 1709 1653 Bool subLayerDpbInfoPresentFlag = false; 1710 #if !H_MV_HLS10_ADD_LAYERSETS1711 assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() );1712 #endif1713 1654 for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ ) 1714 1655 { 1715 #if H_MV_HLS10_DBP_SIZE1716 1656 Int layerIdInVps = vps.getLayerIdInVps( vps.getLayerSetLayerIdList( currLsIdx, k ) ); 1717 1657 if ( vps.getNecessaryLayerFlag( i,k ) && ( vps.getVpsBaseLayerInternalFlag() || vps.getLayerSetLayerIdList( currLsIdx, k ) != 0 ) ) … … 1730 1670 } 1731 1671 } 1732 #else1733 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] );1734 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 );1735 1736 if ( j > 0 )1737 {1738 subLayerDpbInfoPresentFlag = subLayerDpbInfoPresentFlag || ( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) != dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) );1739 }1740 #endif1741 1672 } 1742 1673 1743 1674 Int maxNumReorderPics = MIN_INT; 1744 #if H_MV_HLS10_DBP_SIZE1745 1675 for ( Int idx = 0; idx < vps.getNumLayersInIdList( currLsIdx ); idx++ ) 1746 1676 { … … 1751 1681 } 1752 1682 } 1753 #else1754 for ( Int idx = 0; idx < targetDecLayerIdList.size(); idx++ )1755 {1756 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[ idx ] );1757 maxNumReorderPics = std::max( maxNumReorderPics, m_numReorderPicsMvc[ layerIdInVps ][ j ] );1758 }1759 #endif1760 1683 assert( maxNumReorderPics != MIN_INT ); 1761 1684 … … 1804 1727 // Additional output layer sets + profileLevelTierIdx 1805 1728 vps.setDefaultOutputLayerIdc ( m_defaultOutputLayerIdc ); 1806 #if H_MV_HLS10_ADD_LAYERSETS1807 1729 if( vps.getNumIndependentLayers() == 0 && m_numAddLayerSets > 0 ) 1808 1730 { … … 1838 1760 } 1839 1761 } 1840 #else1841 vps.setNumAddLayerSets ( 0 );1842 #endif1843 1762 vps.setNumAddOlss ( numAddOuputLayerSets ); 1844 1763 vps.initTargetLayerIdLists(); 1845 1764 1846 #if H_MV_HLS10_ADD_LAYERSETS1847 1765 for (Int olsIdx = 0; olsIdx < vps.getNumLayerSets() + numAddOuputLayerSets; olsIdx++) 1848 1766 { 1849 1767 Int addOutLsIdx = olsIdx - vps.getNumLayerSets(); 1850 #else1851 for (Int olsIdx = 0; olsIdx < m_vpsNumLayerSets + numAddOuputLayerSets; olsIdx++)1852 {1853 Int addOutLsIdx = olsIdx - m_vpsNumLayerSets;1854 #endif1855 1768 vps.setLayerSetIdxForOlsMinus1( olsIdx, ( ( addOutLsIdx < 0 ) ? olsIdx : m_outputLayerSetIdx[ addOutLsIdx ] ) - 1 ); 1856 1769 1857 #if H_MV_HLS10_ADD_LAYERSETS1858 1770 Int lsIdx = vps.olsIdxToLsIdx( olsIdx ); 1859 #else1860 std::vector<Int>& layerIdList = m_layerIdsInSets[ vps.olsIdxToLsIdx( olsIdx ) ];1861 #endif1862 1771 if (vps.getDefaultOutputLayerIdc() == 2 || addOutLsIdx >= 0 ) 1863 1772 { 1864 #if H_MV_HLS10_ADD_LAYERSETS1865 1773 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1866 #else1867 for ( Int i = 0; i < layerIdList.size(); i++)1868 #endif1869 1774 { 1870 1775 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 ! … … 1876 1781 for (Int j = 0; j < outLayerIdList.size(); j++) 1877 1782 { 1878 #if H_MV_HLS10_ADD_LAYERSETS1879 1783 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1880 1784 { 1881 1785 if ( vps.getLayerSetLayerIdList( lsIdx, i ) == outLayerIdList[ j ] ) 1882 #else1883 for (Int i = 0; i < layerIdList.size(); i++ )1884 {1885 if ( layerIdList[ i ] == outLayerIdList[ j ] )1886 #endif1887 1786 { 1888 1787 vps.setOutputLayerFlag( olsIdx, i, true ); … … 1891 1790 } 1892 1791 } 1893 #if H_MV_HLS10_ADD_LAYERSETS1894 1792 if ( !outputLayerInLayerSetFlag ) 1895 1793 { … … 1897 1795 exit(EXIT_FAILURE); 1898 1796 } 1899 #else1900 assert( outputLayerInLayerSetFlag ); // The output layer is not in the layer set.1901 #endif1902 1797 } 1903 1798 } 1904 1799 else 1905 1800 { 1906 #if H_MV_HLS10_ADD_LAYERSETS1907 1801 for ( Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++) 1908 #else1909 for ( Int i = 0; i < layerIdList.size(); i++)1910 #endif1911 1802 { 1912 1803 vps.setOutputLayerFlag( olsIdx, i, vps.inferOutputLayerFlag( olsIdx, i ) ); … … 1914 1805 } 1915 1806 1916 #if H_MV_HLS10_NESSECARY_LAYER1917 1807 vps.deriveNecessaryLayerFlags( olsIdx ); 1918 #endif1919 1808 vps.deriveTargetLayerIdList( olsIdx ); 1920 1809 1921 #if H_MV_HLS10_PTL1922 1810 // SET profile_tier_level_index. 1923 1811 if ( olsIdx == 0 ) … … 1936 1824 { 1937 1825 vps.setProfileTierLevelIdx(olsIdx, j, m_profileTierLevelIdx[olsIdx][j] ); 1938 #if H_MV_HLS10_PTL_FIX1939 1826 if( !vps.getNecessaryLayerFlag(olsIdx,j) && m_profileTierLevelIdx[ olsIdx ][ j ] != -1 ) 1940 1827 { … … 1943 1830 } 1944 1831 else if ( vps.getNecessaryLayerFlag(olsIdx,j) ) 1945 #else1946 }1947 else1948 #endif1949 1832 { 1950 1833 // setting default values … … 1962 1845 } 1963 1846 } 1964 #else1965 if ( olsIdx > 0 )1966 {1967 vps.setProfileLevelTierIdx( olsIdx, m_profileLevelTierIdx[ olsIdx ] );1968 }1969 #endif1970 1847 1971 1848 if ( vps.getNumOutputLayersInOutputLayerSet( olsIdx ) == 1 && … … 2005 1882 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 2006 1883 { 2007 #if H_MV_HLS10_VPS_VUI2008 1884 for( Int i = 0; i < vps.getNumLayerSets(); i++ ) 2009 #else2010 for( Int i = 0; i <= vps.getVpsNumLayerSetsMinus1(); i++ )2011 #endif2012 1885 { 2013 1886 for( Int j = 0; j <= vps.getMaxTLayers(); j++ ) … … 2058 1931 for( Int j = 0; j < vps.getNumDirectRefLayers( vps.getLayerIdInNuh( i ) ) ; j++ ) 2059 1932 { 2060 #if H_MV_HLS10_REF_PRED_LAYERS2061 1933 Int layerIdx = vps.getLayerIdInVps( vps.getIdDirectRefLayer(vps.getLayerIdInNuh( i ) , j )); 2062 #else2063 Int layerIdx = vps.getLayerIdInVps( vps.getRefLayerId(vps.getLayerIdInNuh( i ) , j ));2064 #endif2065 1934 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 2066 1935 { … … 2081 1950 } 2082 1951 2083 #if H_MV_HLS10_VPS_VUI2084 1952 pcVPSVUI->setSingleLayerForNonIrapFlag( m_singleLayerForNonIrapFlag ); 2085 1953 pcVPSVUI->setHigherLayerIrapSkipFlag( m_higherLayerIrapSkipFlag ); 2086 #endif2087 1954 2088 1955 pcVPSVUI->setIlpRestrictedRefLayersFlag( m_ilpRestrictedRefLayersFlag ); … … 2141 2008 } 2142 2009 } 2143 #if H_MV_HLS10_GEN_FIX2144 2010 Bool TAppEncTop::xLayerIdInTargetEncLayerIdList(Int nuhLayerId) 2145 2011 { 2146 2012 return ( std::find(m_targetEncLayerIdList.begin(), m_targetEncLayerIdList.end(), nuhLayerId) != m_targetEncLayerIdList.end()) ; 2147 2013 } 2148 #endif2149 2014 2150 2015 … … 2159 2024 Bool isDepth = ( vps.getDepthId( layer ) == 1 ) ; 2160 2025 Bool isLayerZero = ( layer == 0 ); 2161 #if LGE_FCO_I01162026 #if H_3D_FCO 2162 2027 Bool isDepthFirst = (layer > 1 ? true : false); 2163 2028 #endif … … 2171 2036 { 2172 2037 vps.setSubPULog2Size ( layer, (layer != 1) ? 6: 0 ); 2173 #if MTK_I0099_VPS_EX22174 2038 vps.setSubPUMPILog2Size ( layer, (!isLayerZero) ? m_iSubPUMPILog2Size: 0 ); 2175 #endif2176 2039 } 2177 2040 else … … 2183 2046 #if H_3D_DIM 2184 2047 vps.setVpsDepthModesFlag( layer, isDepth && !isLayerZero && (m_useDMM || m_useSDC || m_useDLT ) ); 2185 #if SEPARATE_FLAG_I0085 2186 #if LGE_FCO_I0116 2048 #if H_3D_FCO 2187 2049 vps.setIVPFlag ( layer, isDepth && !isLayerZero && m_useIVP && !isDepthFirst ); 2188 2050 #else 2189 2051 vps.setIVPFlag ( layer, isDepth && !isLayerZero && m_useIVP ); 2190 #endif2191 2052 #endif 2192 2053 #endif … … 2196 2057 { 2197 2058 vps.setIvMvPredFlag (layer, false); 2198 #if SEC_HLS_CLEANUP_I01002199 2059 vps.setIvMvScalingFlag (layer, false); 2200 #endif2201 2060 } 2202 2061 else … … 2210 2069 vps.setIvMvPredFlag ( layer, !isLayerZero && m_ivMvPredFlag[0] ); 2211 2070 } 2212 #if SEC_HLS_CLEANUP_I01002213 2071 vps.setIvMvScalingFlag (layer, m_ivMvScalingFlag); 2214 #endif 2215 } 2216 #endif 2217 #if MTK_I0099_VPS_EX2 2218 #if LGE_FCO_I0116 2072 } 2073 #endif 2074 #if H_3D_QTLPC 2075 #if H_3D_FCO 2219 2076 vps.setLimQtPredFlag ( layer, isDepth && m_bLimQtPredFlag && !isDepthFirst ); 2220 2077 #else … … 2235 2092 #endif 2236 2093 #if H_3D_IV_MERGE 2237 #if LGE_FCO_I01162094 #if H_3D_FCO 2238 2095 vps.setMPIFlag( layer, !isLayerZero && isDepth && m_bMPIFlag && !isDepthFirst ); 2239 2096 #else … … 2242 2099 #endif 2243 2100 } 2244 #if !MTK_I0099_VPS_EX22245 #if H_3D_SPIVMP2246 vps.setSubPUMPILog2Size( m_iSubPUMPILog2Size );2247 #endif2248 #endif2249 #if H_3D2250 #if !SEC_HLS_CLEANUP_I01002251 vps.setIvMvScalingFlag( m_ivMvScalingFlag );2252 #endif2253 #endif2254 2101 } 2255 2102 … … 2273 2120 xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod[layer], 24), &vps, &dlt); 2274 2121 bDltPresentFlag = bDltPresentFlag || dlt.getUseDLTFlag(layer); 2275 #if H_3D_DELTA_DLT2276 2122 dlt.setInterViewDltPredEnableFlag(layer, (dlt.getUseDLTFlag(layer) && (layer>1))); 2277 #endif2278 2123 } 2279 2124 } -
trunk/source/App/TAppEncoder/TAppEncTop.h
r1066 r1084 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
Note: See TracChangeset for help on using the changeset viewer.