Changeset 945 in SHVCSoftware
- Timestamp:
- 31 Dec 2014, 07:37:45 (10 years ago)
- Location:
- branches/SHM-upgrade/source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.cpp
r929 r945 88 88 MAIN_444_12_INTRA = 2312, 89 89 MAIN_444_16_INTRA = 2316, 90 #if SVC_EXTENSION 91 SCALABLE = 6, 92 SCALABLE10 = 7, 93 #endif 90 94 91 }; 95 92 … … 341 338 {"main-RExt", Profile::MAINREXT }, 342 339 {"high-throughput-RExt", Profile::HIGHTHROUGHPUTREXT }, 343 #if SVC_EXTENSION344 {"scalable", Profile::SCALABLE },345 {"scalable10", Profile::SCALABLE10 },346 #endif347 340 }; 348 341 … … 379 372 {"main_444_12_intra", MAIN_444_12_INTRA}, 380 373 {"main_444_16_intra", MAIN_444_16_INTRA}, 381 #if SVC_EXTENSION382 {"scalable", SCALABLE },383 {"scalable10", SCALABLE10 },384 #endif385 374 }; 386 375 … … 786 775 UInt* cfg_uiQuadtreeTUMaxDepthIntra[MAX_LAYERS]; 787 776 #endif 788 Int cfg_tmpChromaFormatIDC [MAX_LAYERS];789 Int cfg_tmpInputChromaFormat[MAX_LAYERS];790 777 #if AUXILIARY_PICTURES 791 778 Int* cfg_auxId [MAX_LAYERS]; … … 875 862 #endif 876 863 Int* cfg_waveFrontSynchro[MAX_LAYERS]; 864 865 #if MULTIPLE_PTL_SUPPORT 866 Bool tmpIntraConstraintFlag; 867 Bool tmpLowerBitRateConstraintFlag; 868 UInt tmpBitDepthConstraint; 869 Int* cfg_layerPTLIdx[MAX_VPS_LAYER_ID_PLUS1]; 870 #endif 877 871 878 872 for(UInt layer = 0; layer < MAX_LAYERS; layer++) … … 971 965 cfg_auxId[layer] = &m_acLayerCfg[layer].m_auxId; 972 966 #endif 967 #if MULTIPLE_PTL_SUPPORT 968 cfg_layerPTLIdx[layer] = &m_acLayerCfg[layer].m_layerPTLIdx; 969 #endif 973 970 } 974 971 #if Q0078_ADD_LAYER_SETS … … 992 989 string* cfg_outputLayerSetIdx = new string; 993 990 #endif 991 #if MULTIPLE_PTL_SUPPORT 992 string* cfg_listOfLayerPTLOfOlss = new string[MAX_VPS_OUTPUT_LAYER_SETS_PLUS1]; 993 #endif 994 994 #if AVC_BASE 995 995 string cfg_BLInputFile; … … 1013 1013 Int tmpConstraintChromaFormat; 1014 1014 string inputColourSpaceConvert; 1015 #if MULTIPLE_PTL_SUPPORT 1016 ExtendedProfileName extendedProfile[NUM_POSSIBLE_LEVEL]; 1017 #else 1015 1018 ExtendedProfileName extendedProfile; 1019 #endif 1016 1020 Int saoOffsetBitShift[MAX_NUM_CHANNEL_TYPE]; 1017 1021 … … 1112 1116 ("OutputLayerSetIdx", cfg_outputLayerSetIdx, string(""), 1, "Corresponding layer set index, only for non-default output layer sets") 1113 1117 #endif 1114 ("InputChromaFormat%d", cfg_tmpInputChromaFormat, 420, MAX_LAYERS, "InputChromaFormatIDC for layer %d")1115 ("ChromaFormatIDC%d,-cf", cfg_tmpChromaFormatIDC, 420, MAX_LAYERS, "ChromaFormatIDC (400|420|422|444 or set 0 (default) for same as InputChromaFormat) for layer %d")1116 1118 #if AUXILIARY_PICTURES 1117 1119 ("AuxId%d", cfg_auxId, 0, MAX_LAYERS, "Auxilary picture ID for layer %d (0: Not aux pic, 1: Alpha plane, 2: Depth picture, 3: Cb enh, 4: Cr enh") … … 1263 1265 1264 1266 // Profile and level 1267 #if MULTIPLE_PTL_SUPPORT 1268 ("NumProfileTierLevel", m_numPTLInfo, 2, "Number of Profile, Tier and Level information") 1269 ("Profile%d", extendedProfile, NONE, NUM_POSSIBLE_LEVEL, "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none") 1270 ("Level%d", m_levelList, Level::NONE, NUM_POSSIBLE_LEVEL, "Level limit to be used, eg 5.1, or none") 1271 ("Tier%d", m_levelTierList, Level::MAIN, NUM_POSSIBLE_LEVEL, "Tier to use for interpretation of --Level (main or high only)") 1272 ("MaxBitDepthConstraint", tmpBitDepthConstraint, 0u, "Bit depth to use for profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") 1273 ("MaxChromaFormatConstraint", tmpConstraintChromaFormat, 0, "Chroma-format to use for the profile-constraint for RExt profiles. 0=automatically choose based upon other parameters") 1274 ("IntraConstraintFlag", tmpIntraConstraintFlag, false, "Value of general_intra_constraint_flag to use for RExt profiles (not used if an explicit RExt sub-profile is specified)") 1275 ("LowerBitRateConstraintFlag", tmpLowerBitRateConstraintFlag, true, "Value of general_lower_bit_rate_constraint_flag to use for RExt profiles") 1276 1277 ("ProgressiveSource%d", m_progressiveSourceFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that source is progressive") 1278 ("InterlacedSource%d", m_interlacedSourceFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that source is interlaced") 1279 ("NonPackedSource%d", m_nonPackedConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that source does not contain frame packing") 1280 ("FrameOnly%d", m_frameOnlyConstraintFlagList, false, NUM_POSSIBLE_LEVEL, "Indicate that the bitstream contains only frames") 1281 1282 ("LayerPTLIndex%d", cfg_layerPTLIdx, 0, MAX_VPS_LAYER_ID_PLUS1, "Index of PTL for each layer") 1283 ("ListOfProfileTierLevelOls%d", cfg_listOfLayerPTLOfOlss, string(""), MAX_VPS_LAYER_ID_PLUS1, "PTL Index for each layer in each OLS except the first OLS. The PTL index for layer in the first OLS is set to 1") 1284 #else 1265 1285 ("Profile", extendedProfile, NONE, "Profile name to use for encoding. Use main (for main), main10 (for main10), main-still-picture, main-RExt (for Range Extensions profile), any of the RExt specific profile names, or none") 1266 1286 ("Level", m_level, Level::NONE, "Level limit to be used, eg 5.1, or none") … … 1275 1295 ("NonPackedSource", m_nonPackedConstraintFlag, false, "Indicate that source does not contain frame packing") 1276 1296 ("FrameOnly", m_frameOnlyConstraintFlag, false, "Indicate that the bitstream contains only frames") 1297 #endif 1277 1298 1278 1299 #if LAYER_CTB … … 1874 1895 for(Int layer = 0; layer < MAX_LAYERS; layer++) 1875 1896 { 1876 if (m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] == 0) { m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] = m_acLayerCfg[layer].m_inputBitDepth [CHANNEL_TYPE_LUMA ]; } 1877 if (m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] == 0) { m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1897 m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ] = m_acLayerCfg[layer].m_inputBitDepth [CHANNEL_TYPE_LUMA ]; 1898 m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; 1899 1878 1900 if (m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_LUMA ] == 0) { m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_LUMA ] = m_acLayerCfg[layer].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA ]; } 1879 1901 if (m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_CHROMA] == 0) { m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layer].m_internalBitDepth [CHANNEL_TYPE_LUMA ]; } … … 1883 1905 1884 1906 m_acLayerCfg[layer].m_InputChromaFormatIDC = numberToChromaFormat(tmpInputChromaFormat); 1885 m_acLayerCfg[layer].m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1907 m_acLayerCfg[layer].m_chromaFormatIDC = ((tmpChromaFormat == 0) ? (m_acLayerCfg[layer].m_InputChromaFormatIDC) : (numberToChromaFormat(tmpChromaFormat))); 1908 1909 m_acLayerCfg[layer].m_useHighPrecisionPredictionWeighting = false; 1910 m_acLayerCfg[layer].m_useExtendedPrecision = false; 1886 1911 } 1887 1912 #else … … 1899 1924 #endif 1900 1925 1901 if (extendedProfile >= 1000 && extendedProfile <= 2316) 1902 { 1903 m_profile = Profile::MAINREXT; 1904 if (m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0) 1905 { 1906 fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n"); 1907 exit(EXIT_FAILURE); 1908 } 1909 m_bitDepthConstraint = (extendedProfile%100); 1910 m_intraConstraintFlag = (extendedProfile>=2000); 1911 switch ((extendedProfile/100)%10) 1912 { 1926 #if MULTIPLE_PTL_SUPPORT 1927 for( Int layer = 0; layer < MAX_LAYERS; layer++ ) 1928 { 1929 m_acLayerCfg[layer].m_bitDepthConstraint = tmpBitDepthConstraint; 1930 m_acLayerCfg[layer].m_intraConstraintFlag = tmpIntraConstraintFlag; 1931 m_acLayerCfg[layer].m_lowerBitRateConstraintFlag = tmpLowerBitRateConstraintFlag; 1932 1933 for (UInt channelType = 0; channelType < MAX_NUM_CHANNEL_TYPE; channelType++) 1934 { 1935 m_acLayerCfg[layer].m_saoOffsetBitShift[channelType] = 0; 1936 } 1937 1938 Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx; 1939 1940 if( extendedProfile[layerPTLIdx] >= 1000 && extendedProfile[layerPTLIdx] <= 2316 ) 1941 { 1942 m_profileList[layerPTLIdx] = Profile::MAINREXT; 1943 1944 if( m_acLayerCfg[layer].m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0) 1945 { 1946 fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n"); 1947 exit(EXIT_FAILURE); 1948 } 1949 m_acLayerCfg[layer].m_bitDepthConstraint = (extendedProfile[layerPTLIdx]%100); 1950 m_acLayerCfg[layer].m_intraConstraintFlag = (extendedProfile[layerPTLIdx]>=2000); 1951 switch ((extendedProfile[layerPTLIdx]/100)%10) 1952 { 1913 1953 case 0: tmpConstraintChromaFormat=400; break; 1914 1954 case 1: tmpConstraintChromaFormat=420; break; 1915 1955 case 2: tmpConstraintChromaFormat=422; break; 1916 1956 default: tmpConstraintChromaFormat=444; break; 1957 } 1958 } 1959 else 1960 { 1961 m_profileList[layerPTLIdx] = Profile::Name(extendedProfile[layerPTLIdx]); 1962 } 1963 1964 if( m_profileList[layerPTLIdx] == Profile::HIGHTHROUGHPUTREXT ) 1965 { 1966 if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 ) m_acLayerCfg[layer].m_bitDepthConstraint = 16; 1967 m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? CHROMA_444 : numberToChromaFormat(tmpConstraintChromaFormat); 1968 } 1969 else if( m_profileList[layerPTLIdx] == Profile::MAINREXT ) 1970 { 1971 if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 && tmpConstraintChromaFormat == 0 ) 1972 { 1973 // produce a valid combination, if possible. 1974 const Bool bUsingGeneralRExtTools = m_useResidualRotation || 1975 m_useSingleSignificanceMapContext || 1976 m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT] || 1977 m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT] || 1978 !m_enableIntraReferenceSmoothing || 1979 m_useGolombRiceParameterAdaptation || 1980 m_transformSkipLog2MaxSize!=2; 1981 const Bool bUsingChromaQPAdjustment= m_maxCUChromaQpAdjustmentDepth >= 0; 1982 const Bool bUsingExtendedPrecision = m_acLayerCfg[layer].m_useExtendedPrecision; 1983 m_acLayerCfg[layer].m_chromaFormatConstraint = NUM_CHROMA_FORMAT; 1984 automaticallySelectRExtProfile(bUsingGeneralRExtTools, 1985 bUsingChromaQPAdjustment, 1986 bUsingExtendedPrecision, 1987 m_acLayerCfg[layer].m_intraConstraintFlag, 1988 m_acLayerCfg[layer].m_bitDepthConstraint, 1989 m_acLayerCfg[layer].m_chromaFormatConstraint, 1990 m_acLayerCfg[layer].m_chromaFormatIDC==CHROMA_400 ? m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA] : std::max(m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layer].m_internalBitDepth[CHANNEL_TYPE_CHROMA]), 1991 m_acLayerCfg[layer].m_chromaFormatIDC); 1992 } 1993 else if( m_acLayerCfg[layer].m_bitDepthConstraint == 0 || tmpConstraintChromaFormat == 0) 1994 { 1995 fprintf(stderr, "Error: The bit depth and chroma format constraints must either both be specified or both be configured automatically\n"); 1996 exit(EXIT_FAILURE); 1997 } 1998 else 1999 { 2000 m_acLayerCfg[layer].m_chromaFormatConstraint = numberToChromaFormat(tmpConstraintChromaFormat); 2001 } 2002 } 2003 else 2004 { 2005 m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? m_acLayerCfg[layer].m_chromaFormatIDC : numberToChromaFormat(tmpConstraintChromaFormat); 2006 m_acLayerCfg[layer].m_bitDepthConstraint = (m_profileList[layerPTLIdx] == Profile::MAIN10?10:8); 2007 } 2008 } 2009 #else 2010 if (extendedProfile >= 1000 && extendedProfile <= 2316) 2011 { 2012 m_profile = Profile::MAINREXT; 2013 if (m_bitDepthConstraint != 0 || tmpConstraintChromaFormat != 0) 2014 { 2015 fprintf(stderr, "Error: The bit depth and chroma format constraints are not used when an explicit RExt profile is specified\n"); 2016 exit(EXIT_FAILURE); 2017 } 2018 m_bitDepthConstraint = (extendedProfile%100); 2019 m_intraConstraintFlag = (extendedProfile>=2000); 2020 switch ((extendedProfile/100)%10) 2021 { 2022 case 0: tmpConstraintChromaFormat=400; break; 2023 case 1: tmpConstraintChromaFormat=420; break; 2024 case 2: tmpConstraintChromaFormat=422; break; 2025 default: tmpConstraintChromaFormat=444; break; 1917 2026 } 1918 2027 } … … 1921 2030 m_profile = Profile::Name(extendedProfile); 1922 2031 } 2032 2033 #if SVC_EXTENSION 2034 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC; 2035 #endif 1923 2036 1924 2037 if (m_profile == Profile::HIGHTHROUGHPUTREXT ) … … 1932 2045 { 1933 2046 #if SVC_EXTENSION 1934 Bool m_useExtendedPrecision = m_acLayerCfg[0].m_useExtendedPrecision; 1935 Int m_internalBitDepth[] = {m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_CHROMA]}; 2047 Bool m_useExtendedPrecision = m_acLayerCfg[0].m_useExtendedPrecision; 2048 Int m_internalBitDepth[] = {m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[0].m_internalBitDepth[CHANNEL_TYPE_CHROMA]}; 2049 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[0].m_chromaFormatIDC; 1936 2050 #endif 1937 2051 // produce a valid combination, if possible. … … 1965 2079 } 1966 2080 } 1967 #if SVC_EXTENSION1968 else if( m_profile == Profile::SCALABLE || m_profile == Profile::SCALABLE10 )1969 {1970 for(Int layer = 0; layer < m_numLayers; layer++)1971 {1972 m_acLayerCfg[layer].m_bitDepthConstraint = (m_profile == Profile::SCALABLE10 ? 10 : 8);1973 m_acLayerCfg[layer].m_chromaFormatConstraint = (tmpConstraintChromaFormat == 0) ? CHROMA_420 : numberToChromaFormat(tmpConstraintChromaFormat);1974 1975 for(UInt ch=0; ch<MAX_NUM_CHANNEL_TYPE; ch++)1976 {1977 m_acLayerCfg[layer].m_MSBExtendedBitDepth[ch] = m_acLayerCfg[layer].m_inputBitDepth[ch];1978 1979 if (saoOffsetBitShift[ch]<0)1980 {1981 if (m_acLayerCfg[layer].m_internalBitDepth[ch]>10)1982 {1983 m_acLayerCfg[layer].m_saoOffsetBitShift[ch]=UInt(Clip3<Int>(0, m_acLayerCfg[layer].m_internalBitDepth[ch]-10, Int(m_acLayerCfg[layer].m_internalBitDepth[ch]-10 + 0.165*m_acLayerCfg[layer].m_iQP - 3.22 + 0.5) ) );1984 }1985 else1986 {1987 m_acLayerCfg[layer].m_saoOffsetBitShift[ch]=0;1988 }1989 }1990 else1991 {1992 m_acLayerCfg[layer].m_saoOffsetBitShift[ch]=UInt(saoOffsetBitShift[ch]);1993 }1994 }1995 }1996 }1997 #endif1998 2081 else 1999 2082 { … … 2001 2084 m_bitDepthConstraint = (m_profile == Profile::MAIN10?10:8); 2002 2085 } 2003 2086 #endif 2004 2087 2005 2088 m_inputColourSpaceConvert = stringToInputColourSpaceConvert(inputColourSpaceConvert, true); … … 2008 2091 for(Int layer = 0; layer < MAX_LAYERS; layer++) 2009 2092 { 2093 #if !MULTIPLE_PTL_SUPPORT 2094 m_acLayerCfg[layer].m_chromaFormatConstraint = m_chromaFormatConstraint; 2095 m_acLayerCfg[layer].m_bitDepthConstraint = m_bitDepthConstraint; 2096 #endif 2097 2010 2098 // If number of scaled ref. layer offsets is non-zero, at least one of the offsets should be specified 2011 2099 if(m_acLayerCfg[layer].m_numScaledRefLayerOffsets) … … 2377 2465 } 2378 2466 2379 #if AUXILIARY_PICTURES2380 for(UInt layer = 0; layer < MAX_LAYERS; layer++)2381 {2382 m_acLayerCfg[layer].m_InputChromaFormatIDC = numberToChromaFormat(cfg_tmpChromaFormatIDC[layer]);2383 m_acLayerCfg[layer].m_chromaFormatIDC = ((cfg_tmpChromaFormatIDC[layer] == 0) ? (m_acLayerCfg[layer].m_InputChromaFormatIDC ) : (numberToChromaFormat(cfg_tmpChromaFormatIDC[layer])));2384 }2385 #endif2386 2467 for(Int layer = 0; layer < MAX_LAYERS; layer++) 2387 2468 { … … 2516 2597 // Layers in the output layer set 2517 2598 m_listOfOutputLayers.resize(m_numOutputLayerSets); 2599 2600 #if MULTIPLE_PTL_SUPPORT 2601 m_listOfLayerPTLofOlss.resize(m_numOutputLayerSets); 2602 #endif 2603 2518 2604 Int startOlsCtr = 1; 2519 2605 if( m_defaultTargetOutputLayerIdc == 0 || m_defaultTargetOutputLayerIdc == 1 ) … … 2535 2621 assert( scanStringToArray( cfg_listOfOutputLayers[olsCtr], m_numLayersInOutputLayerSet[olsCtr], "ListOfOutputLayers", m_listOfOutputLayers[olsCtr] ) ); 2536 2622 } 2537 } 2623 #if MULTIPLE_PTL_SUPPORT 2624 if( olsCtr > m_numLayerSets ) 2625 { 2626 scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[m_outputLayerSetIdx[olsCtr - m_numLayerSets]], "ListOfOutputLayers", m_listOfLayerPTLofOlss[olsCtr] ); 2627 } 2628 else 2629 { 2630 scanStringToArray( cfg_listOfLayerPTLOfOlss[olsCtr], m_numLayerInIdList[olsCtr], "List of PTL for each layer in OLS", m_listOfLayerPTLofOlss[olsCtr] ); 2631 } 2632 #endif 2633 } 2634 #if MULTIPLE_PTL_SUPPORT 2635 m_listOfLayerPTLofOlss[0].push_back(*cfg_layerPTLIdx[0]); 2636 delete [] cfg_listOfLayerPTLOfOlss; 2637 #endif 2538 2638 delete cfg_numLayersInOutputLayerSet; 2539 2639 delete [] cfg_listOfOutputLayers; … … 3062 3162 Bool m_useExtendedPrecision = m_acLayerCfg[layerId].m_useExtendedPrecision; 3063 3163 Bool m_useHighPrecisionPredictionWeighting = m_acLayerCfg[layerId].m_useHighPrecisionPredictionWeighting; 3064 m_chromaFormatIDC= m_acLayerCfg[layerId].m_chromaFormatIDC;3065 m_chromaFormatConstraint= m_acLayerCfg[layerId].m_chromaFormatConstraint;3066 m_bitDepthConstraint = m_acLayerCfg[layerId].m_bitDepthConstraint;3164 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[layerId].m_chromaFormatIDC; 3165 ChromaFormat m_chromaFormatConstraint = m_acLayerCfg[layerId].m_chromaFormatConstraint; 3166 ChromaFormat m_InputChromaFormatIDC = m_acLayerCfg[layerId].m_InputChromaFormatIDC; 3067 3167 3068 3168 Int m_inputBitDepth[] = {m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_inputBitDepth[CHANNEL_TYPE_CHROMA]}; … … 3072 3172 m_saoOffsetBitShift[CHANNEL_TYPE_LUMA] = m_acLayerCfg[layerId].m_saoOffsetBitShift[CHANNEL_TYPE_LUMA]; 3073 3173 m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA] = m_acLayerCfg[layerId].m_saoOffsetBitShift[CHANNEL_TYPE_CHROMA]; 3174 3175 #if MULTIPLE_PTL_SUPPORT 3176 Int layerPTLIdx = m_acLayerCfg[layerId].m_layerPTLIdx; 3177 Profile::Name m_profile = m_profileList[layerPTLIdx]; 3178 Level::Name m_level = m_levelList[layerPTLIdx]; 3179 UInt m_bitDepthConstraint = m_acLayerCfg[layerId].m_bitDepthConstraint; 3180 Bool m_intraConstraintFlag = m_acLayerCfg[layerId].m_intraConstraintFlag; 3181 Bool m_lowerBitRateConstraintFlag = m_acLayerCfg[layerId].m_lowerBitRateConstraintFlag; 3182 #endif 3074 3183 #else 3075 3184 Void TAppEncCfg::xCheckParameter() … … 3085 3194 fprintf(stderr, "******************************************************************\n"); 3086 3195 } 3196 #if SVC_EXTENSION && MULTIPLE_PTL_SUPPORT 3197 Int ii = 0; 3198 while( ii < m_numPTLInfo ) 3199 { 3200 if( m_profileList[ii] == Profile::NONE ) 3201 { 3202 fprintf(stderr, "***************************************************************************\n"); 3203 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Profile value must be set! **\n"); 3204 fprintf(stderr, "***************************************************************************\n"); 3205 } 3206 if( m_levelList[ii] == Level::NONE ) 3207 { 3208 fprintf(stderr, "***************************************************************************\n"); 3209 fprintf(stderr, "** WARNING: For conforming bitstreams a valid Level value must be set! **\n"); 3210 fprintf(stderr, "***************************************************************************\n"); 3211 } 3212 ii++; 3213 } 3214 #else 3087 3215 if( m_profile==Profile::NONE ) 3088 3216 { … … 3097 3225 fprintf(stderr, "***************************************************************************\n"); 3098 3226 } 3227 #endif 3099 3228 3100 3229 Bool check_failed = false; /* abort if there is a fatal configuration problem */ … … 3146 3275 } 3147 3276 } 3148 #if SVC_EXTENSION3149 else if( m_profile==Profile::SCALABLE || m_profile==Profile::SCALABLE10 )3150 {3151 xConfirmPara(m_bitDepthConstraint!=((m_profile==Profile::SCALABLE10)?10:8), "BitDepthConstraint must be 8 for MAIN profile and 10 for MAIN10 profile.");3152 xConfirmPara(m_chromaFormatConstraint!=CHROMA_420, "ChromaFormatConstraint must be 420 for non main-RExt profiles.");3153 xConfirmPara(m_intraConstraintFlag==true, "IntraConstraintFlag must be false for non main_RExt profiles.");3154 xConfirmPara(m_lowerBitRateConstraintFlag==false, "LowerBitrateConstraintFlag must be true for non main-RExt profiles.");3155 3156 xConfirmPara(m_useCrossComponentPrediction==true, "CrossComponentPrediction must not be used for non main-RExt profiles.");3157 xConfirmPara(m_transformSkipLog2MaxSize!=2, "Transform Skip Log2 Max Size must be 2 for V1 profiles.");3158 xConfirmPara(m_useResidualRotation==true, "UseResidualRotation must not be enabled for non main-RExt profiles.");3159 xConfirmPara(m_useSingleSignificanceMapContext==true, "UseSingleSignificanceMapContext must not be enabled for non main-RExt profiles.");3160 xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_IMPLICIT]==true, "ImplicitResidualDPCM must not be enabled for non main-RExt profiles.");3161 xConfirmPara(m_useResidualDPCM[RDPCM_SIGNAL_EXPLICIT]==true, "ExplicitResidualDPCM must not be enabled for non main-RExt profiles.");3162 xConfirmPara(m_useGolombRiceParameterAdaptation==true, "GolombRiceParameterAdaption must not be enabled for non main-RExt profiles.");3163 xConfirmPara(m_useExtendedPrecision==true, "UseExtendedPrecision must not be enabled for non main-RExt profiles.");3164 xConfirmPara(m_useHighPrecisionPredictionWeighting==true, "UseHighPrecisionPredictionWeighting must not be enabled for non main-RExt profiles.");3165 xConfirmPara(m_enableIntraReferenceSmoothing==false, "EnableIntraReferenceSmoothing must be enabled for non main-RExt profiles.");3166 xConfirmPara(m_alignCABACBeforeBypass, "AlignCABACBeforeBypass cannot be enabled for non main-RExt profiles.");3167 }3168 #endif3169 3277 else 3170 3278 { … … 4508 4616 Int m_internalBitDepth[] = {m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_internalBitDepth[CHANNEL_TYPE_CHROMA]}; 4509 4617 Int m_MSBExtendedBitDepth[] = {m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_LUMA], m_acLayerCfg[layerId].m_MSBExtendedBitDepth[CHANNEL_TYPE_CHROMA]}; 4618 ChromaFormat m_chromaFormatIDC = m_acLayerCfg[layerId].m_chromaFormatIDC; 4510 4619 #endif 4511 4620 … … 4626 4735 printf("Frame index : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_framesToBeEncoded-1, m_framesToBeEncoded ); 4627 4736 } 4737 #if !MULTIPLE_PTL_SUPPORT 4628 4738 if (m_profile == Profile::MAINREXT) 4629 4739 { … … 4641 4751 printf("Profile : %s\n", profileToString(m_profile) ); 4642 4752 } 4753 #endif 4643 4754 #if !LAYER_CTB 4644 4755 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); -
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncCfg.h
r916 r945 120 120 Bool m_snrInternalColourSpace; ///< if true, then no colour space conversion is applied for snr calculation, otherwise inverse of input is applied. 121 121 Bool m_outputInternalColourSpace; ///< if true, then no colour space conversion is applied for reconstructed video, otherwise inverse of input is applied. 122 #if !SVC_EXTENSION 122 123 ChromaFormat m_InputChromaFormatIDC; 124 #endif 123 125 124 126 Bool m_printMSEBasedSequencePSNR; … … 127 129 Bool m_cabacZeroWordPaddingEnabled; 128 130 131 #if MULTIPLE_PTL_SUPPORT 132 Int m_numPTLInfo; 133 Profile::Name m_profileList[NUM_POSSIBLE_LEVEL]; 134 Level::Tier m_levelTierList[NUM_POSSIBLE_LEVEL]; 135 Level::Name m_levelList[NUM_POSSIBLE_LEVEL]; 136 Bool m_progressiveSourceFlagList[NUM_POSSIBLE_LEVEL]; 137 Bool m_interlacedSourceFlagList[NUM_POSSIBLE_LEVEL]; 138 Bool m_nonPackedConstraintFlagList[NUM_POSSIBLE_LEVEL]; 139 Bool m_frameOnlyConstraintFlagList[NUM_POSSIBLE_LEVEL]; 140 141 std::vector< std::vector<Int> > m_listOfLayerPTLofOlss; 142 #else 129 143 // profile/level 130 144 Profile::Name m_profile; … … 139 153 Bool m_nonPackedConstraintFlag; 140 154 Bool m_frameOnlyConstraintFlag; 155 #endif 141 156 142 157 // coding structure … … 227 242 #endif 228 243 //coding tools (chroma format) 244 #if !SVC_EXTENSION 229 245 ChromaFormat m_chromaFormatIDC; 246 #endif 230 247 231 248 // coding tools (PCM bit-depth) -
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.cpp
r929 r945 308 308 #endif 309 309 printf("Internal Format : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate ); 310 #if MULTIPLE_PTL_SUPPORT 311 printf("PTL index : %d", m_layerPTLIdx ); 312 #endif 310 313 #if O0194_DIFFERENT_BITDEPTH_EL_BL 311 314 printf("Input bit depth : (Y:%d, C:%d)\n", m_inputBitDepth[CHANNEL_TYPE_LUMA], m_inputBitDepth[CHANNEL_TYPE_CHROMA] ); … … 313 316 printf("PCM sample bit depth : (Y:%d, C:%d)\n", m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_LUMA] : m_internalBitDepth[CHANNEL_TYPE_LUMA], m_cAppEncCfg->getPCMInputBitDepthFlag() ? m_inputBitDepth[CHANNEL_TYPE_CHROMA] : m_internalBitDepth[CHANNEL_TYPE_CHROMA] ); 314 317 #endif 315 #if SVC_EXTENSION316 318 std::cout << "Input ChromaFormatIDC :"; 317 #else 318 std::cout << std::setw(43) << "Input ChromaFormatIDC = "; 319 #endif 319 320 320 switch (m_InputChromaFormatIDC) 321 321 { 322 case CHROMA_400: std::cout << " 323 case CHROMA_420: std::cout << " 324 case CHROMA_422: std::cout << " 325 case CHROMA_444: std::cout << " 322 case CHROMA_400: std::cout << " 4:0:0"; break; 323 case CHROMA_420: std::cout << " 4:2:0"; break; 324 case CHROMA_422: std::cout << " 4:2:2"; break; 325 case CHROMA_444: std::cout << " 4:4:4"; break; 326 326 default: 327 327 std::cerr << "Invalid"; … … 330 330 std::cout << std::endl; 331 331 332 #if SVC_EXTENSION333 332 std::cout << "Output (internal) ChromaFormatIDC :"; 334 #else335 std::cout << std::setw(43) << "Output (internal) ChromaFormatIDC = ";336 #endif337 333 switch (m_chromaFormatIDC) 338 334 { 339 case CHROMA_400: std::cout << " 340 case CHROMA_420: std::cout << " 341 case CHROMA_422: std::cout << " 342 case CHROMA_444: std::cout << " 335 case CHROMA_400: std::cout << " 4:0:0"; break; 336 case CHROMA_420: std::cout << " 4:2:0"; break; 337 case CHROMA_422: std::cout << " 4:2:2"; break; 338 case CHROMA_444: std::cout << " 4:4:4"; break; 343 339 default: 344 340 std::cerr << "Invalid"; 345 341 exit(1); 346 342 } 347 #if SVC_EXTENSION348 343 printf("\n"); 349 #else350 std::cout << "\n" << std::endl;351 #endif352 344 #if LAYER_CTB 353 345 printf("CU size / depth : %d / %d\n", m_uiMaxCUWidth, m_uiMaxCUDepth ); -
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncLayerCfg.h
r916 r945 47 47 ChromaFormat m_chromaFormatConstraint; 48 48 UInt m_bitDepthConstraint; 49 Bool m_intraConstraintFlag; 50 Bool m_lowerBitRateConstraintFlag; 49 51 #if AUXILIARY_PICTURES 50 52 Int m_auxId; … … 152 154 #endif 153 155 156 #if MULTIPLE_PTL_SUPPORT 157 // profile/level 158 Int m_layerPTLIdx; 159 #endif 160 154 161 public: 155 162 TAppEncLayerCfg(); -
branches/SHM-upgrade/source/App/TAppEncoder/TAppEncTop.cpp
r928 r945 202 202 #endif 203 203 204 #if MULTIPLE_PTL_SUPPORT 205 //Populate PTL in VPS 206 TComVPS *pVPS = m_acTEncTop[0].getVPS(); 207 ProfileTierLevel& profileTierLevel = *(pVPS->getPTL(0)->getGeneralPTL()); 208 for( Int ii = 0; ii < m_numPTLInfo; ii++ ) 209 { 210 profileTierLevel = *(pVPS->getPTL(ii)->getGeneralPTL()); 211 212 profileTierLevel.setLevelIdc(m_levelList[ii]); 213 profileTierLevel.setTierFlag(m_levelTierList[ii]); 214 profileTierLevel.setProfileIdc(m_profileList[ii]); 215 profileTierLevel.setProfileCompatibilityFlag(m_profileList[ii], 1); 216 profileTierLevel.setProgressiveSourceFlag(m_progressiveSourceFlagList[ii]); 217 profileTierLevel.setInterlacedSourceFlag(m_interlacedSourceFlagList[ii]); 218 profileTierLevel.setNonPackedConstraintFlag(m_nonPackedConstraintFlagList[ii]); 219 profileTierLevel.setFrameOnlyConstraintFlag(m_frameOnlyConstraintFlagList[ii]); 220 } 221 pVPS->setNumProfileTierLevel(m_numPTLInfo); 222 223 std::vector<int> myvector; 224 vps->getProfileLevelTierIdx()->resize(m_numOutputLayerSets); 225 for (int ii = 0; ii < m_numOutputLayerSets; ii++) 226 { 227 myvector = m_listOfLayerPTLofOlss[ii]; 228 vps->getProfileLevelTierIdx()->resize(myvector.size()); 229 for (std::vector<int>::iterator it = myvector.begin() ; it != myvector.end(); ++it) 230 { 231 pVPS->addProfileLevelTierIdx(ii, it[0]); 232 } 233 } 234 #endif 235 204 236 assert( m_numLayers <= MAX_LAYERS ); 205 237 … … 222 254 #endif 223 255 #endif 224 //m_acTEncTop[layer].setVPS(&vps); 256 257 #if MULTIPLE_PTL_SUPPORT 258 Int layerPTLIdx = m_acLayerCfg[layer].m_layerPTLIdx; 259 m_acTEncTop[layer].setProfile ( m_profileList[layerPTLIdx] ); 260 m_acTEncTop[layer].setLevel ( m_levelTierList[layerPTLIdx], m_levelList[layerPTLIdx] ); 261 m_acTEncTop[layer].setProgressiveSourceFlag ( m_progressiveSourceFlagList[layerPTLIdx] ); 262 m_acTEncTop[layer].setInterlacedSourceFlag ( m_interlacedSourceFlagList[layerPTLIdx] ); 263 m_acTEncTop[layer].setNonPackedConstraintFlag ( m_nonPackedConstraintFlagList[layerPTLIdx] ); 264 m_acTEncTop[layer].setFrameOnlyConstraintFlag ( m_frameOnlyConstraintFlagList[layerPTLIdx] ); 265 m_acTEncTop[layer].setBitDepthConstraintValue ( m_acLayerCfg[layer].m_bitDepthConstraint ); 266 m_acTEncTop[layer].setChromaFormatConstraintValue ( m_acLayerCfg[layer].m_chromaFormatConstraint ); 267 m_acTEncTop[layer].setIntraConstraintFlag ( m_acLayerCfg[layer].m_intraConstraintFlag ); 268 m_acTEncTop[layer].setLowerBitRateConstraintFlag ( m_acLayerCfg[layer].m_lowerBitRateConstraintFlag ); 269 #else 225 270 m_acTEncTop[layer].setProfile ( m_profile ); 226 271 m_acTEncTop[layer].setLevel ( m_levelTier, m_level ); … … 233 278 m_acTEncTop[layer].setIntraConstraintFlag ( m_intraConstraintFlag ); 234 279 m_acTEncTop[layer].setLowerBitRateConstraintFlag ( m_lowerBitRateConstraintFlag ); 280 #endif 235 281 236 282 m_acTEncTop[layer].setPrintMSEBasedSequencePSNR ( m_printMSEBasedSequencePSNR); … … 423 469 m_acTEncTop[layer].setChromaCrQpOffset ( m_crQpOffset ); 424 470 425 m_acTEncTop[layer].setChromaFormatIdc ( m_ chromaFormatIDC );471 m_acTEncTop[layer].setChromaFormatIdc ( m_acLayerCfg[layer].m_chromaFormatIDC ); 426 472 427 473 #if ADAPTIVE_QP_SELECTION … … 1438 1484 vps->setIlpSshSignalingEnabledFlag(false); 1439 1485 #if VPS_EXTN_PROFILE_INFO 1440 1486 #if !MULTIPLE_PTL_SUPPORT 1441 1487 #if LIST_OF_PTL 1442 1488 vps->getPTLForExtnPtr()->resize(1); // Dummy object - unused. … … 1467 1513 *(vps->getPTLForExtn(setId)) = *(m_acTEncTop[setId].getSPS()->getPTL()); 1468 1514 } 1515 #endif 1469 1516 #endif 1470 1517 #endif … … 1577 1624 #endif 1578 1625 // Target output layer 1626 #if !MULTIPLE_PTL_SUPPORT 1579 1627 #if LIST_OF_PTL 1580 1628 vps->setNumProfileTierLevel( vps->getPTLForExtnPtr()->size() ); // +1 for the base VPS PTL() … … 1582 1630 vps->setNumOutputLayerSets(vps->getNumLayerSets()); 1583 1631 vps->setNumProfileTierLevel(vps->getNumLayerSets()); 1632 #endif 1584 1633 #endif 1585 1634 #if !OUTPUT_LAYER_SETS_CONFIG // Taken care by configuration file parameter … … 1673 1722 vps->checkNecessaryLayerFlagCondition(); 1674 1723 #endif 1724 #if !MULTIPLE_PTL_SUPPORT 1675 1725 #if PER_LAYER_PTL 1676 1726 vps->getProfileLevelTierIdx()->resize(vps->getNumOutputLayerSets()); … … 1693 1743 } 1694 1744 } 1745 #endif 1695 1746 #endif 1696 1747 #if SUB_LAYERS_IN_LAYER_SET -
branches/SHM-upgrade/source/Lib/TLibCommon/TComSlice.h
r916 r945 621 621 Bool m_layerIdIncludedFlag[MAX_VPS_OP_SETS_PLUS1][MAX_VPS_NUH_RESERVED_ZERO_LAYER_ID_PLUS1]; 622 622 #endif 623 623 #if !MULTIPLE_PTL_SUPPORT 624 624 TComPTL m_pcPTL; 625 #endif 625 626 TimingInfo m_timingInfo; 626 627 627 628 #if SVC_EXTENSION 629 #if MULTIPLE_PTL_SUPPORT 630 TComPTL m_pcPTLList[NUM_POSSIBLE_LEVEL]; 631 #endif 628 632 #if DERIVE_LAYER_ID_LIST_VARIABLES 629 633 #if Q0078_ADD_LAYER_SETS … … 689 693 UInt m_profileLayerSetRef[MAX_VPS_LAYER_SETS_PLUS1]; // The value with index 0 will not be used. 690 694 #endif 695 #if !MULTIPLE_PTL_SUPPORT 691 696 std::vector<TComPTL> m_pcPTLForExtn; 697 #endif 692 698 #endif 693 699 #if VPS_EXTN_OP_LAYER_SETS … … 1004 1010 Void setLayerIdIncludedFlag(Bool v, UInt opsIdx, UInt id) { m_layerIdIncludedFlag[opsIdx][id] = v; } 1005 1011 1012 #if !MULTIPLE_PTL_SUPPORT 1006 1013 TComPTL* getPTL() { return &m_pcPTL; } 1014 #endif 1015 1007 1016 TimingInfo* getTimingInfo() { return &m_timingInfo; } 1008 1017 1009 1018 #if SVC_EXTENSION 1019 #if MULTIPLE_PTL_SUPPORT 1020 TComPTL* getPTL() { return &m_pcPTLList[0]; } 1021 TComPTL* getPTL(UInt idx) { return &m_pcPTLList[idx]; } 1022 #endif 1010 1023 #if DERIVE_LAYER_ID_LIST_VARIABLES 1011 1024 Int getLayerSetLayerIdList(Int set, Int layerId) { return m_layerSetLayerIdList[set][layerId]; } … … 1105 1118 #endif 1106 1119 1120 #if !MULTIPLE_PTL_SUPPORT 1107 1121 std::vector<TComPTL>* getPTLForExtnPtr() { return &m_pcPTLForExtn; } 1108 1122 TComPTL* getPTLForExtn(Int id) { return &m_pcPTLForExtn[id]; } 1123 #endif 1109 1124 #endif 1110 1125 #if VPS_EXTN_OP_LAYER_SETS … … 1172 1187 Int getProfileLevelTierIdx(Int const olsIdx, Int const layerIdx) { return m_profileLevelTierIdx[olsIdx][layerIdx]; } 1173 1188 Void setProfileLevelTierIdx(Int const olsIdx, Int const layerIdx, Int const ptlIdx) { m_profileLevelTierIdx[olsIdx][layerIdx] = ptlIdx; } 1174 Int calculateLenOfSyntaxElement( Int const numVal ); 1189 #if MULTIPLE_PTL_SUPPORT 1190 Void addProfileLevelTierIdx(Int const olsIdx, Int const ptlIdx) { m_profileLevelTierIdx[olsIdx].push_back(ptlIdx); } 1191 #endif 1192 Int calculateLenOfSyntaxElement( Int const numVal ); 1175 1193 #else 1176 1194 Int getProfileLevelTierIdx(Int i) { return m_profileLevelTierIdx[i]; } -
branches/SHM-upgrade/source/Lib/TLibCommon/TypeDef.h
r928 r945 245 245 #define MAX_NUM_ADD_LAYER_SETS 1023 246 246 #endif 247 #define MULTIPLE_PTL_SUPPORT 1 ///< Profile, tier and level signalling 248 #define NUM_POSSIBLE_LEVEL 13 247 249 248 250 #define VPS_DPB_SIZE_TABLE 1 ///< JCTVC-O0217: DPB operations: signaling DPB-related parameters … … 927 929 MAINREXT = 4, 928 930 HIGHTHROUGHPUTREXT = 5, 929 #if SVC_EXTENSION930 SCALABLE = 6,931 SCALABLE10 = 7,932 #endif933 931 }; 934 932 } -
branches/SHM-upgrade/source/Lib/TLibDecoder/TDecCAVLC.cpp
r938 r945 2234 2234 for (Int i = 0; i < maxNumSubLayersMinus1; i++) 2235 2235 { 2236 #if MULTIPLE_PTL_SUPPORT 2237 READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode); 2238 #else 2236 2239 if(profilePresentFlag) 2237 2240 { 2238 2241 READ_FLAG( uiCode, "sub_layer_profile_present_flag[i]" ); rpcPTL->setSubLayerProfilePresentFlag(i, uiCode); 2239 2242 } 2243 #endif 2240 2244 READ_FLAG( uiCode, "sub_layer_level_present_flag[i]" ); rpcPTL->setSubLayerLevelPresentFlag (i, uiCode); 2241 2245 } … … 2252 2256 for(Int i = 0; i < maxNumSubLayersMinus1; i++) 2253 2257 { 2258 #if MULTIPLE_PTL_SUPPORT 2259 if( rpcPTL->getSubLayerProfilePresentFlag(i) ) 2260 #else 2254 2261 if( profilePresentFlag && rpcPTL->getSubLayerProfilePresentFlag(i) ) 2262 #endif 2255 2263 { 2256 2264 parseProfileTier(rpcPTL->getSubLayerPTL(i)); … … 2744 2752 { 2745 2753 vps->setProfilePresentFlag(1, false); 2754 #if MULTIPLE_PTL_SUPPORT 2755 parsePTL( vps->getPTL(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 ); 2756 #else 2746 2757 vps->getPTLForExtnPtr()->empty(); 2747 2758 vps->getPTLForExtnPtr()->resize(2); 2748 2759 vps->getPTLForExtn(1)->copyProfileInfo( vps->getPTL() ); 2749 2760 parsePTL( vps->getPTLForExtn(1), vps->getProfilePresentFlag(1), vps->getMaxTLayers() - 1 ); 2761 #endif 2750 2762 } 2751 2763 #endif … … 2974 2986 Int const numBitsForPtlIdx = vps->calculateLenOfSyntaxElement( vps->getNumProfileTierLevel() ); 2975 2987 #endif 2988 #if !MULTIPLE_PTL_SUPPORT 2976 2989 vps->getPTLForExtnPtr()->resize(vps->getNumProfileTierLevel()); 2990 #endif 2977 2991 #if LIST_OF_PTL 2978 2992 for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) … … 2986 3000 #if P0048_REMOVE_PROFILE_REF 2987 3001 // Copy profile information from previous one 3002 #if MULTIPLE_PTL_SUPPORT 3003 vps->getPTL(idx)->copyProfileInfo( vps->getPTL( idx - 1 ) ); 3004 #else 2988 3005 vps->getPTLForExtn(idx)->copyProfileInfo( (idx==1) ? vps->getPTL() : vps->getPTLForExtn( idx - 1 ) ); 3006 #endif 2989 3007 #else 2990 3008 READ_CODE( 6, uiCode, "profile_ref_minus1[i]" ); vps->setProfileLayerSetRef(idx, uiCode + 1); … … 2998 3016 #endif 2999 3017 } 3018 #if MULTIPLE_PTL_SUPPORT 3019 parsePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); 3020 #else 3000 3021 parsePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); 3022 #endif 3001 3023 } 3002 3024 #endif -
branches/SHM-upgrade/source/Lib/TLibEncoder/TEncCavlc.cpp
r938 r945 1455 1455 for (Int i = 0; i < maxNumSubLayersMinus1; i++) 1456 1456 { 1457 #if MULTIPLE_PTL_SUPPORT 1458 WRITE_FLAG( pcPTL->getSubLayerProfilePresentFlag(i), "sub_layer_profile_present_flag[i]" ); 1459 #else 1457 1460 if(profilePresentFlag) 1458 1461 { 1459 1462 WRITE_FLAG( pcPTL->getSubLayerProfilePresentFlag(i), "sub_layer_profile_present_flag[i]" ); 1460 1463 } 1464 #endif 1461 1465 1462 1466 WRITE_FLAG( pcPTL->getSubLayerLevelPresentFlag(i), "sub_layer_level_present_flag[i]" ); … … 1473 1477 for(Int i = 0; i < maxNumSubLayersMinus1; i++) 1474 1478 { 1479 #if MULTIPLE_PTL_SUPPORT 1480 if( pcPTL->getSubLayerProfilePresentFlag(i) ) 1481 #else 1475 1482 if( profilePresentFlag && pcPTL->getSubLayerProfilePresentFlag(i) ) 1483 #endif 1476 1484 { 1477 1485 codeProfileTier(pcPTL->getSubLayerPTL(i)); // sub_layer_... … … 2060 2068 if( vps->getMaxLayers() > 1 && vps->getBaseLayerInternalFlag() ) 2061 2069 { 2070 #if MULTIPLE_PTL_SUPPORT 2071 codePTL( vps->getPTL(1), false, vps->getMaxTLayers() - 1 ); 2072 #else 2062 2073 codePTL( vps->getPTLForExtn(1), false, vps->getMaxTLayers() - 1 ); 2074 #endif 2063 2075 } 2064 2076 #endif … … 2226 2238 #endif 2227 2239 #if LIST_OF_PTL 2240 #if MULTIPLE_PTL_SUPPORT 2241 //Do something here to make sure the loop is correct to consider base layer internal stuff 2242 #else 2228 2243 assert( vps->getNumProfileTierLevel() == vps->getPTLForExtnPtr()->size()); 2244 #endif 2229 2245 for(Int idx = vps->getBaseLayerInternalFlag() ? 2 : 1; idx <= vps->getNumProfileTierLevel() - 1; idx++) 2230 2246 #else … … 2232 2248 #endif 2233 2249 { 2250 #if MULTIPLE_PTL_SUPPORT 2251 vps->setProfilePresentFlag(idx, true); 2252 #endif 2234 2253 WRITE_FLAG( vps->getProfilePresentFlag(idx), "vps_profile_present_flag[i]" ); 2235 2254 #if !P0048_REMOVE_PROFILE_REF … … 2239 2258 } 2240 2259 #endif 2260 #if MULTIPLE_PTL_SUPPORT 2261 codePTL( vps->getPTL(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); 2262 #else 2241 2263 codePTL( vps->getPTLForExtn(idx), vps->getProfilePresentFlag(idx), vps->getMaxTLayers() - 1 ); 2264 #endif 2242 2265 } 2243 2266 #endif
Note: See TracChangeset for help on using the changeset viewer.