Changeset 1054 in 3DVCSoftware for branches/HTM-12.0-dev1/source/Lib
- Timestamp:
- 26 Sep 2014, 18:34:05 (10 years ago)
- Location:
- branches/HTM-12.0-dev1/source/Lib
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComRom.cpp
r1049 r1054 71 71 c <<= 1; 72 72 } 73 74 #if H_MV 75 #if H_MV_HLS_PTL_LIMITS 76 g_generalTierAndLevelLimits[ Level::LEVEL1 ] = TComGeneralTierAndLevelLimits( 36864, 350, INT_MIN, 16, 1, 1 ); 77 g_generalTierAndLevelLimits[ Level::LEVEL2 ] = TComGeneralTierAndLevelLimits( 122880, 1500, INT_MIN, 16, 1, 1 ); 78 g_generalTierAndLevelLimits[ Level::LEVEL2_1 ] = TComGeneralTierAndLevelLimits( 245760, 3000, INT_MIN, 20, 1, 1 ); 79 g_generalTierAndLevelLimits[ Level::LEVEL3 ] = TComGeneralTierAndLevelLimits( 552960, 6000, INT_MIN, 30, 2, 2 ); 80 g_generalTierAndLevelLimits[ Level::LEVEL3_1 ] = TComGeneralTierAndLevelLimits( 983040, 10000, INT_MIN, 40, 3, 3 ); 81 g_generalTierAndLevelLimits[ Level::LEVEL4 ] = TComGeneralTierAndLevelLimits( 2228224, 12000, 30000, 75, 5, 5 ); 82 g_generalTierAndLevelLimits[ Level::LEVEL4_1 ] = TComGeneralTierAndLevelLimits( 2228224, 20000, 50000, 75, 5, 5 ); 83 g_generalTierAndLevelLimits[ Level::LEVEL5 ] = TComGeneralTierAndLevelLimits( 8912896, 25000, 100000, 200, 11, 10 ); 84 g_generalTierAndLevelLimits[ Level::LEVEL5_1 ] = TComGeneralTierAndLevelLimits( 8912896, 40000, 160000, 200, 11, 10 ); 85 g_generalTierAndLevelLimits[ Level::LEVEL5_2 ] = TComGeneralTierAndLevelLimits( 8912896, 60000, 240000, 200, 11, 10 ); 86 g_generalTierAndLevelLimits[ Level::LEVEL6 ] = TComGeneralTierAndLevelLimits( 35651584, 60000, 240000, 600, 22, 20 ); 87 g_generalTierAndLevelLimits[ Level::LEVEL6_1 ] = TComGeneralTierAndLevelLimits( 35651584, 120000, 480000, 600, 22, 20 ); 88 g_generalTierAndLevelLimits[ Level::LEVEL6_2 ] = TComGeneralTierAndLevelLimits( 35651584, 240000, 800000, 600, 22, 20 ); 89 #endif 90 #endif 91 73 92 } 74 93 -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComRom.h
r1049 r1054 187 187 // ========================================== 188 188 189 #if H_MV_HLS_PTL_LIMITS 190 class TComGeneralTierAndLevelLimits 191 { 192 public: 193 TComGeneralTierAndLevelLimits::TComGeneralTierAndLevelLimits 194 ( Int maxLumaPs, 195 Int maxCPBMainTier, 196 Int maxCPBHighTier, 197 Int maxSliceSegmentsPerPicture, 198 Int maxTileRows, 199 Int maxTileCols ) 200 : m_maxLumaPs ( maxLumaPs ), 201 m_maxCPBMainTier ( maxCPBMainTier ), 202 m_maxCPBHighTier ( maxCPBHighTier ), 203 m_maxSliceSegmentsPerPicture( maxSliceSegmentsPerPicture ), 204 m_maxTileRows ( maxTileRows ), 205 m_maxTileCols ( maxTileCols ); 206 {}; 207 208 Int getMaxLumaPs ( ) { return m_maxLumaPs ; }; 209 Int getMaxCPBMainTier ( ) { return m_maxCPBMainTier ; }; 210 Int getMaxCPBHighTier ( ) { return m_maxCPBHighTier ; }; 211 Int getMaxSliceSegmentsPerPicture( ) { return m_maxSliceSegmentsPerPicture; }; 212 Int getMaxTileRows ( ) { return m_maxTileRows ; }; 213 Int getMaxTileCols ( ) { return m_maxTileCols ; }; 214 215 private: 216 const Int m_maxLumaPs; 217 const Int m_maxCPBMainTier; 218 const Int m_maxCPBHighTier; 219 const Int m_maxSliceSegmentsPerPicture; 220 const Int m_maxTileRows; 221 const Int m_maxTileCols; 222 }; 223 224 extern std::map< Level::Name, TComGeneralTierAndLevelLimits > g_generalTierAndLevelLimits; 225 226 #endif 189 227 // ==================================================================================================================== 190 228 // Misc. -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.cpp
r1050 r1054 1875 1875 #if H_MV 1876 1876 m_vpsBaseLayerInternalFlag = true; 1877 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 1878 m_vpsBaseLayerAvailableFlag = true; 1879 #endif 1877 1880 #endif 1878 1881 … … 1900 1903 { 1901 1904 m_layerSetIdxForOlsMinus1[i] = -1; 1905 #if !H_MV_HLS10_PTL 1902 1906 m_profileLevelTierIdx[i] = 0; 1907 #endif 1903 1908 for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++) 1904 1909 { 1910 #if H_MV_HLS10_PTL 1911 m_profileTierLevelIdx[i][j] = false; 1912 #endif 1905 1913 m_outputLayerFlag[i][j] = false; 1906 1914 } … … 1966 1974 m_directDependencyFlag[i][j] = false; 1967 1975 m_directDependencyType[i][j] = -1; 1976 #if H_MV_HLS10_REF_PRED_LAYERS 1977 m_dependencyFlag [i][j] = false; 1978 m_idDirectRefLayer[i][j] = -1; 1979 m_idPredictedLayer[i][j] = -1; 1980 m_idRefLayer [i][j] = -1; 1981 #else 1968 1982 m_refLayerId[i][j] = -1; 1983 #endif 1969 1984 m_maxTidIlRefPicsPlus1[i][j] = 7; 1970 1985 } … … 2050 2065 assert( getVpsNumRepFormatsMinus1() <= 255 ); 2051 2066 2067 #if H_MV_HLS10_ADD_LAYERSETS 2068 // The value of num_add_layer_sets shall be in the range of 0 to 1023, inclusive. 2069 assert( getNumAddLayerSets() >= 0 && getNumAddLayerSets() <= 1023 ); 2070 #endif 2052 2071 return true; 2053 2072 } … … 2081 2100 Void TComVPS::setRefLayers() 2082 2101 { 2102 2103 #if H_MV_HLS10_REF_PRED_LAYERS 2104 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2105 { 2106 for( Int j = 0; j <= getMaxLayersMinus1(); j++ ) 2107 { 2108 m_dependencyFlag[ i ][ j ] = getDirectDependencyFlag( i , j ); 2109 for( Int k = 0; k < i; k++ ) 2110 { 2111 if( getDirectDependencyFlag(i , k ) && m_dependencyFlag[k][j] ) 2112 { 2113 m_dependencyFlag[ i ][ j ] = true; 2114 } 2115 } 2116 } 2117 } 2118 2119 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2120 { 2121 Int iNuhLId = getLayerIdInNuh( i ); 2122 Int d = 0; 2123 Int r = 0; 2124 Int p = 0; 2125 for( Int j = 0; j <= getMaxLayersMinus1(); j++ ) 2126 { 2127 Int jNuhLid = getLayerIdInNuh( j ); 2128 if( getDirectDependencyFlag( i , j ) ) 2129 { 2130 m_idDirectRefLayer[iNuhLId][d++] = jNuhLid; 2131 } 2132 if( getDependencyFlag( i , j ) ) 2133 { 2134 m_idRefLayer [iNuhLId][r++] = jNuhLid; 2135 } 2136 if( getDependencyFlag( j , i ) ) 2137 { 2138 m_idPredictedLayer[iNuhLId][p++] = jNuhLid; 2139 } 2140 } 2141 m_numDirectRefLayers[ iNuhLId ] = d; 2142 m_numRefLayers [ iNuhLId ] = r; 2143 m_numPredictedLayers[ iNuhLId ] = p; 2144 } 2145 2146 Bool layerIdInListFlag[ 64 ]; 2147 for( Int i = 0; i <= 63; i++ ) 2148 { 2149 layerIdInListFlag[ i ] = 0; 2150 } 2151 2152 Int k = 0; 2153 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2154 { 2155 Int iNuhLId = getLayerIdInNuh( i ); 2156 if( getNumDirectRefLayers( iNuhLId ) == 0 ) 2157 { 2158 m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId; 2159 Int h = 1; 2160 for( Int j = 0; j < getNumPredictedLayers( iNuhLId ); j++ ) 2161 { 2162 Int predLId = getIdPredictedLayer( iNuhLId, j ); 2163 if ( !layerIdInListFlag[ predLId ] ) 2164 { 2165 m_treePartitionLayerIdList[ k ][ h++ ] = predLId; 2166 layerIdInListFlag[ predLId ] = 1; 2167 } 2168 } 2169 m_numLayersInTreePartition[ k++ ] = h; 2170 } 2171 } 2172 m_numIndependentLayers = k; 2173 #else // H_MV_HLS10_GEN 2174 2083 2175 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2084 2176 { … … 2116 2208 } 2117 2209 } 2118 2210 2119 2211 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) // Bug in spec "<" instead of "<=" 2120 2212 { … … 2136 2228 countedLayerIdxFlag[ i ] = 0; 2137 2229 } 2138 2139 2230 for( Int i = 0, k = 0; i <= getMaxLayersMinus1(); i++ ) 2140 2231 { … … 2144 2235 m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId; 2145 2236 m_numLayersInTreePartition[ k ] = 1; 2237 2146 2238 for( Int j = 0; j < m_numPredictedLayers[ iNuhLId ]; j++ ) 2147 2239 { … … 2154 2246 } 2155 2247 k++; 2156 } 2157 m_numIndependentLayers = k; 2158 } 2159 } 2160 2248 2249 m_numIndependentLayers = k; 2250 } 2251 } 2252 #endif // H_MV_HLS10_GEN 2253 } 2254 2255 #if !H_MV_HLS10_REF_PRED_LAYERS 2161 2256 Int TComVPS::getRefLayerId( Int layerIdInNuh, Int idx ) 2162 2257 { … … 2166 2261 return refLayerIdInNuh; 2167 2262 } 2263 #endif 2168 2264 2169 2265 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType ) … … 2315 2411 { 2316 2412 assert( lsIdx >= 0 ); 2413 #if H_MV_HLS10_ADD_LAYERSETS 2414 assert( lsIdx <= getNumLayerSets() ); 2415 #else 2317 2416 assert( lsIdx <= getVpsNumLayerSetsMinus1() ); 2417 #endif 2318 2418 return (Int) m_layerSetLayerIdList[ lsIdx ].size(); 2319 2419 } … … 2341 2441 Bool TComVPS::getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth /*= 0 */ ) 2342 2442 { 2443 #if H_MV_HLS10_REF_PRED_LAYERS 2444 // TBD: Remove getInDirectDependencyFlag entirely. 2445 return getDependencyFlag( depLayeridInVps, refLayeridInVps ); 2446 #else 2343 2447 assert( depth < 65 ); 2344 2448 Bool dependentFlag = getDirectDependencyFlag( depLayeridInVps, refLayeridInVps ); … … 2352 2456 } 2353 2457 return dependentFlag; 2458 #endif 2354 2459 } 2355 2460 … … 2378 2483 { 2379 2484 Int lsIdx = olsIdxToLsIdx( i ); 2380 2485 2381 2486 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2382 2487 { 2383 m_targetDecLayerIdLists[i].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2488 #if H_MV_HLS10_NESSECARY_LAYER 2489 if ( getNecessaryLayerFlag( i , j )) 2490 { 2491 #endif 2492 m_targetDecLayerIdLists[i].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2493 #if H_MV_HLS10_NESSECARY_LAYER 2494 } 2495 #endif 2496 2384 2497 if( getOutputLayerFlag( i, j )) 2385 2498 { … … 2429 2542 } 2430 2543 2544 #if !H_MV_HLS10_ADD_LAYERSETS 2431 2545 Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ) 2432 2546 { … … 2451 2565 } 2452 2566 } 2453 2567 #endif 2454 2568 Bool TComVPS::getAltOutputLayerFlagVar( Int i ) 2455 2569 { … … 2465 2579 } 2466 2580 2581 #if !H_MV_HLS10_MAXNUMPICS 2467 2582 Int TComVPS::getMaxNumPics( Int layerId ) 2468 2583 { … … 2483 2598 return maxNumPics; 2484 2599 } 2485 2600 #endif 2601 2602 #if !H_MV_HLS10_REF_PRED_LAYERS 2486 2603 Void TComVPS::xSetRefLayerFlags( Int currLayerId ) 2487 2604 { … … 2496 2613 } 2497 2614 } 2498 2615 #endif 2499 2616 #endif // H_MV 2500 2617 … … 2579 2696 #endif 2580 2697 2698 #if !H_MV_HLS10_PPS 2581 2699 m_numScaledRefLayerOffsets = 0; 2582 2700 … … 2590 2708 m_scaledRefLayerLeftOffset [i] = 0; 2591 2709 m_scaledRefLayerTopOffset [i] = 0; 2592 m_scaledRefLayerRi ghtOffset [i] = 0;2710 m_scaledRefLayerRiFghtOffset [i] = 0; 2593 2711 m_scaledRefLayerBottomOffset [i] = 0; 2594 2712 } 2713 #endif 2595 2714 #endif 2596 2715 } … … 2967 3086 Void TComSPS::inferRepFormat( TComVPS* vps, Int layerIdCurr ) 2968 3087 { 3088 #if H_MV_HLS10_MULTILAYERSPS 3089 if ( getMultiLayerExtSpsFlag() ) 3090 #else 2969 3091 if ( layerIdCurr > 0 ) 3092 #endif 2970 3093 { 2971 3094 Int repFormatIdx = getUpdateRepFormatFlag() ? getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ; 2972 3095 TComRepFormat* repFormat = vps->getRepFormat( repFormatIdx ); 2973 setChromaFormatIdc( repFormat->getChromaFormatVpsIdc() ); 2974 //// ToDo: add when supported: 2975 // setSeperateColourPlaneFlag( repFormat->getSeparateColourPlaneVpsFlag() ) ; 2976 2977 setPicWidthInLumaSamples ( repFormat->getPicWidthVpsInLumaSamples() ); 2978 setPicHeightInLumaSamples( repFormat->getPicHeightVpsInLumaSamples() ); 2979 2980 setBitDepthY ( repFormat->getBitDepthVpsLumaMinus8() + 8 ); 2981 setQpBDOffsetY ( (Int) (6*( getBitDepthY() - 8 )) ); 2982 2983 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 2984 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 2985 if ( getLayerId() > 0 && getUpdateRepFormatFlag() ) 3096 setChromaFormatIdc( repFormat->getChromaFormatVpsIdc() ); 3097 //// ToDo: add when supported: 3098 // setSeperateColourPlaneFlag( repFormat->getSeparateColourPlaneVpsFlag() ) ; 3099 3100 setPicWidthInLumaSamples ( repFormat->getPicWidthVpsInLumaSamples() ); 3101 setPicHeightInLumaSamples( repFormat->getPicHeightVpsInLumaSamples() ); 3102 3103 setBitDepthY ( repFormat->getBitDepthVpsLumaMinus8() + 8 ); 3104 setQpBDOffsetY ( (Int) (6*( getBitDepthY() - 8 )) ); 3105 3106 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 3107 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 3108 #if H_MV_HLS10_GEN_VSP_CONF_WIN 3109 Window &spsConf = getConformanceWindow(); 3110 3111 // Scaled later 3112 spsConf.setScaledFlag( false ); 3113 spsConf.setWindowLeftOffset ( repFormat->getConfWinVpsLeftOffset() ); 3114 spsConf.setWindowRightOffset ( repFormat->getConfWinVpsRightOffset() ); 3115 spsConf.setWindowTopOffset ( repFormat->getConfWinVpsTopOffset() ); 3116 spsConf.setWindowBottomOffset( repFormat->getConfWinVpsBottomOffset() ); 3117 #endif 3118 3119 #if H_MV_HLS10_MULTILAYERSPS 3120 if ( getMultiLayerExtSpsFlag() && getUpdateRepFormatFlag() ) 3121 #else 3122 if ( getLayerId() > 0 && getUpdateRepFormatFlag() ) 3123 #endif 2986 3124 { 2987 3125 assert( getChromaFormatIdc() <= repFormat->getChromaFormatVpsIdc() ); … … 3017 3155 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 3018 3156 3157 #if H_MV_HLS10_MULTILAYERSPS 3158 if ( getMultiLayerExtSpsFlag() ) 3159 #else 3019 3160 if (getLayerId() > 0 ) 3161 #endif 3020 3162 { 3021 3163 Int layerIdx = 0; … … 3035 3177 Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ; 3036 3178 3037 if ( encoder ) 3179 if ( encoder ) 3038 3180 { 3039 3181 assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 ); … … 3049 3191 Void TComSPS::checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ) 3050 3192 { 3193 #if !H_MV_HLS10_MAXNUMPICS 3051 3194 // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead 3052 3195 // of nuh_layer_id of slice (currLayerId), this seems to be a bug. 3053 3196 #endif 3054 3197 for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ ) 3055 3198 { … … 3057 3200 if ( !rps->getInterRPSPrediction() ) 3058 3201 { 3202 #if H_MV_HLS10_MAXNUMPICS 3203 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), INT_MAX, getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); // INT_MAX to be replaced by DpbSize 3204 #else 3059 3205 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ), 3060 3206 getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 3207 #endif 3061 3208 } 3062 3209 } … … 3425 3572 { 3426 3573 TComVPS* vps = getVPS(); 3574 #if H_MV_HLS10_REF_PRED_LAYERS 3575 Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) ); 3576 #else 3427 3577 Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) ); 3578 #endif 3428 3579 3429 3580 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) && ( getTLayer() == 0 ) && … … 3496 3647 Int TComSlice::getRefPicLayerId( Int i ) 3497 3648 { 3649 #if H_MV_HLS10_REF_PRED_LAYERS 3650 return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) ); 3651 #else 3498 3652 return getVPS()->getRefLayerId( getLayerId(), getInterLayerPredLayerIdc( i ) ); 3653 #endif 3499 3654 } 3500 3655 … … 4233 4388 , m_nonPackedConstraintFlag(false) 4234 4389 , m_frameOnlyConstraintFlag(false) 4390 #if H_MV_HLS10_PTL 4391 , m_max12bitConstraintFlag ( false ) 4392 , m_max10bitConstraintFlag ( false ) 4393 , m_max8bitConstraintFlag ( false ) 4394 , m_max422chromaConstraintFlag ( false ) 4395 , m_max420chromaConstraintFlag ( false ) 4396 , m_maxMonochromeConstraintFlag ( false ) 4397 , m_intraConstraintFlag ( false ) 4398 , m_onePictureOnlyConstraintFlag( false ) 4399 , m_lowerBitRateConstraintFlag ( false ) 4400 , m_inbldFlag ( false ) 4401 #endif 4235 4402 { 4236 4403 ::memset(m_profileCompatibilityFlag, 0, sizeof(m_profileCompatibilityFlag)); … … 4295 4462 4296 4463 m_vpsVuiBspHrdPresentFlag = false; 4464 #if H_MV_HLS10_VPS_VUI_BSP 4465 m_vpsVuiBspHrdParameters = NULL; 4466 #else 4297 4467 m_vpsVuiBspHrdParameters = new TComVpsVuiBspHrdParameters(); 4468 #endif 4298 4469 } 4299 4470 … … 4338 4509 assert( getBitDepthVpsLumaMinus8 () == prevRepFormat->getBitDepthVpsLumaMinus8 () ); 4339 4510 assert( getBitDepthVpsChromaMinus8 () == prevRepFormat->getBitDepthVpsChromaMinus8 () ); 4340 } 4341 } 4342 4511 } 4512 } 4513 4514 #if !H_MV_HLS10_VPS_VUI_BSP 4343 4515 Void TComVpsVuiBspHrdParameters::checkLayerInBspFlag( TComVPS* vps, Int h ) 4344 4516 { … … 4419 4591 // assert( getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) ); 4420 4592 } 4593 #endif 4594 4595 #if H_MV_HLS10_VPS_VUI_BSP 4596 4597 TComVpsVuiBspHrdParameters::~TComVpsVuiBspHrdParameters() 4598 { 4599 delete[] m_cprmsAddPresentFlag; 4600 delete[] m_numSubLayerHrdMinus1; 4601 delete[] m_hrdParameters; 4602 4603 for (Int h = 0; h < m_numOls; h++) 4604 { 4605 if ( h > 0 ) 4606 { 4607 for (Int i = 0; i < getNumSignalledPartitioningSchemes(h)+1; i++) 4608 { 4609 for (Int t = 0; t < m_vps->getMaxSubLayersInLayerSetMinus1( m_vps->olsIdxToLsIdx(h) ) + 1; t++) 4610 { 4611 for ( Int j = 0; j <= getNumBspSchedulesMinus1(h,i,j);j++ ) 4612 { 4613 delete[] m_bspHrdIdx [h][i][t][j]; 4614 delete[] m_bspSchedIdx[h][i][t][j]; 4615 } 4616 } 4617 delete[] m_numBspSchedulesMinus1[h][i]; 4618 } 4619 } 4620 4621 for (Int j = 0; j <= getNumSignalledPartitioningSchemes(h ) + 1; j++ ) 4622 { 4623 for (Int k = 0; k <= getNumPartitionsInSchemeMinus1(h,j); k++ ) 4624 { 4625 delete[] m_layerIncludedInPartitionFlag[h][j][k]; 4626 } 4627 } 4628 delete[] m_numPartitionsInSchemeMinus1[h]; 4629 } 4630 delete[] m_numSignalledPartitioningSchemes; 4631 } 4632 4633 4634 Int TComVpsVuiBspHrdParameters::getBspHrdIdxLen(TComVPS* vps) 4635 { 4636 return gCeilLog2( vps->getNumHrdParameters() + getVpsNumAddHrdParams() ); 4637 } 4638 4639 Void TComVpsVuiBspHrdParameters::createAfterVpsNumAddHrdParams( TComVPS* vps ) 4640 { 4641 assert( vps == NULL ); 4642 m_vps = vps; 4643 m_offsetHrdParamIdx = vps->getNumHrdParameters(); 4644 m_numHrdParam = vps->getNumHrdParameters() + getVpsNumAddHrdParams() - m_offsetHrdParamIdx; 4645 m_numOls = vps->getNumOutputLayerSets(); 4646 4647 m_cprmsAddPresentFlag = new Bool [ m_numHrdParam ]; 4648 m_numSubLayerHrdMinus1 = new Int [ m_numHrdParam ]; 4649 m_hrdParameters = new TComHRD [ m_numHrdParam ]; 4650 4651 m_numSignalledPartitioningSchemes = new Int [ m_numOls ]; 4652 m_numPartitionsInSchemeMinus1 = new Int* [ m_numOls ]; 4653 m_numBspSchedulesMinus1 = new Int** [ m_numOls ]; 4654 m_bspHrdIdx = new Int****[ m_numOls ]; 4655 m_bspSchedIdx = new Int****[ m_numOls ]; 4656 } 4657 4658 Void TComVpsVuiBspHrdParameters::createAfterNumSignalledPartitioningSchemes( Int h ) 4659 { 4660 m_numPartitionsInSchemeMinus1 [h] = new Int [ getNumSignalledPartitioningSchemes(h) ]; 4661 m_layerIncludedInPartitionFlag[h] = new Bool** [ getNumSignalledPartitioningSchemes(h) ]; 4662 4663 m_numBspSchedulesMinus1[h] = new Int* [ getNumSignalledPartitioningSchemes(h) + 1 ]; 4664 for (Int i = 0; i < getNumSignalledPartitioningSchemes(h) + 1; i++) 4665 { 4666 Int tMax = m_vps->getMaxSubLayersInLayerSetMinus1( m_vps->olsIdxToLsIdx(h) ) + 1; 4667 m_numBspSchedulesMinus1[h][i] = new Int [ tMax ]; 4668 m_bspHrdIdx [h][i] = new Int**[ tMax ]; 4669 m_bspSchedIdx [h][i] = new Int**[ tMax ]; 4670 } 4671 } 4672 4673 Void TComVpsVuiBspHrdParameters::createAfterNumPartitionsInSchemeMinus1( Int h, Int j ) 4674 { 4675 m_layerIncludedInPartitionFlag[h][j] = new Bool*[ getNumPartitionsInSchemeMinus1(h,j)]; 4676 for( Int k = 0; k < getNumPartitionsInSchemeMinus1(h,j); k++ ) 4677 { 4678 m_layerIncludedInPartitionFlag[h][j][k] = new Bool[ m_vps->getNumLayersInIdList( m_vps->olsIdxToLsIdx(h))]; 4679 } 4680 } 4681 4682 Void TComVpsVuiBspHrdParameters::createAfterNumBspSchedulesMinus1( Int h, Int i, Int t ) 4683 { 4684 m_bspSchedIdx[h][i][t] = new Int* [ getNumBspSchedulesMinus1( h, i, t ) + 1 ]; 4685 m_bspHrdIdx [h][i][t] = new Int* [ getNumBspSchedulesMinus1( h, i, t ) + 1 ]; 4686 for( Int j = 0; j < getNumBspSchedulesMinus1( h, i, t ) + 1; j++ ) 4687 { 4688 m_bspSchedIdx[h][i][t][j] = new Int[ getNumPartitionsInSchemeMinus1( h, i ) ]; 4689 m_bspHrdIdx [h][i][t][j] = new Int[ getNumPartitionsInSchemeMinus1( h, i ) ]; 4690 } 4691 } 4692 4693 #endif 4421 4694 4422 4695 Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) … … 4454 4727 for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 4455 4728 { 4729 #if H_MV_HLS10_ADD_LAYERSETS 4730 m_maxVpsDecPicBufferingMinus1[i][k][j] = MIN_INT; 4731 #else 4456 4732 m_maxVpsDecPicBufferingMinus1[i][k][j] = 0; 4733 #endif 4457 4734 } 4458 4735 } -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TComSlice.h
r1049 r1054 1 /* The copyright in this software is being made available under the BSD1 /* The copyright in this software is being made available under the BSD 2 2 * License, included below. This software may be subject to other third party 3 3 * and contributor rights, including patent rights, and no such rights are … … 45 45 #include "TComRom.h" 46 46 #include "TComList.h" 47 47 #if H_MV_HLS10_GEN_FIX 48 #if H_MV 49 #include <ios> 50 #include <iostream> 51 #include <iomanip> 52 #endif 53 #endif 48 54 //! \ingroup TLibCommon 49 55 //! \{ … … 201 207 Bool m_frameOnlyConstraintFlag; 202 208 209 #if H_MV_HLS10_PTL 210 Bool m_max12bitConstraintFlag; 211 Bool m_max10bitConstraintFlag; 212 Bool m_max8bitConstraintFlag; 213 Bool m_max422chromaConstraintFlag; 214 Bool m_max420chromaConstraintFlag; 215 Bool m_maxMonochromeConstraintFlag; 216 Bool m_intraConstraintFlag; 217 Bool m_onePictureOnlyConstraintFlag; 218 Bool m_lowerBitRateConstraintFlag; 219 Bool m_inbldFlag; 220 #endif 203 221 public: 204 222 ProfileTierLevel(); … … 230 248 Bool getFrameOnlyConstraintFlag() const { return m_frameOnlyConstraintFlag; } 231 249 Void setFrameOnlyConstraintFlag(Bool b) { m_frameOnlyConstraintFlag = b; } 250 251 #if H_MV_HLS10_PTL 252 Void setMax12bitConstraintFlag( Bool flag ) { m_max12bitConstraintFlag = flag; } 253 Bool getMax12bitConstraintFlag( ) { return m_max12bitConstraintFlag; } 254 255 Void setMax10bitConstraintFlag( Bool flag ) { m_max10bitConstraintFlag = flag; } 256 Bool getMax10bitConstraintFlag( ) { return m_max10bitConstraintFlag; } 257 258 Void setMax8bitConstraintFlag( Bool flag ) { m_max8bitConstraintFlag = flag; } 259 Bool getMax8bitConstraintFlag( ) { return m_max8bitConstraintFlag; } 260 261 Void setMax422chromaConstraintFlag( Bool flag ) { m_max422chromaConstraintFlag = flag; } 262 Bool getMax422chromaConstraintFlag( ) { return m_max422chromaConstraintFlag; } 263 264 Void setMax420chromaConstraintFlag( Bool flag ) { m_max420chromaConstraintFlag = flag; } 265 Bool getMax420chromaConstraintFlag( ) { return m_max420chromaConstraintFlag; } 266 267 Void setMaxMonochromeConstraintFlag( Bool flag ) { m_maxMonochromeConstraintFlag = flag; } 268 Bool getMaxMonochromeConstraintFlag( ) { return m_maxMonochromeConstraintFlag; } 269 Void setIntraConstraintFlag( Bool flag ) { m_intraConstraintFlag = flag; } 270 Bool getIntraConstraintFlag( ) { return m_intraConstraintFlag; } 271 272 Void setOnePictureOnlyConstraintFlag( Bool flag ) { m_onePictureOnlyConstraintFlag = flag; } 273 Bool getOnePictureOnlyConstraintFlag( ) { return m_onePictureOnlyConstraintFlag; } 274 275 Void setLowerBitRateConstraintFlag( Bool flag ) { m_lowerBitRateConstraintFlag = flag; } 276 Bool getLowerBitRateConstraintFlag( ) { return m_lowerBitRateConstraintFlag; } 277 278 Void setInbldFlag( Bool flag ) { m_inbldFlag = flag; } 279 Bool getInbldFlag( ) { return m_inbldFlag; } 280 #endif 281 232 282 }; 233 283 … … 359 409 Void setCpbCntMinus1 ( Int layer, UInt value ) { m_HRD[layer].cpbCntMinus1 = value; } 360 410 UInt getCpbCntMinus1 ( Int layer ) { return m_HRD[layer].cpbCntMinus1; } 361 411 362 412 Void setBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl, UInt value ) { m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl] = value; } 363 413 UInt getBitRateValueMinus1 ( Int layer, Int cpbcnt, Int nalOrVcl ) { return m_HRD[layer].bitRateValueMinus1[cpbcnt][nalOrVcl]; } … … 434 484 Int getMatrixCoeffsVps( ) { return m_matrixCoeffsVps; } 435 485 }; 486 436 487 class TComVpsVuiBspHrdParameters 437 488 { 489 #if H_MV_HLS10_VPS_VUI_BSP 490 491 /* Not yet tested */ 492 private: 493 494 Int m_vpsNumAddHrdParams; 495 Bool* m_cprmsAddPresentFlag; 496 TComHRD* m_hrdParameters; 497 Int* m_numSubLayerHrdMinus1; 498 Int* m_numSignalledPartitioningSchemes; 499 Int** m_numPartitionsInSchemeMinus1; 500 501 Bool**** m_layerIncludedInPartitionFlag; 502 Int*** m_numBspSchedulesMinus1; 503 Int***** m_bspHrdIdx; 504 Int***** m_bspSchedIdx; 505 506 // Array sizes 507 Int m_offsetHrdParamIdx; 508 Int m_numHrdParam; 509 Int m_numOls; 510 TComVPS* m_vps; 511 public: 512 513 ~TComVpsVuiBspHrdParameters(); 514 515 Void createAfterVpsNumAddHrdParams( TComVPS* vps ); 516 Void createAfterNumSignalledPartitioningSchemes(Int h ); 517 Void createAfterNumPartitionsInSchemeMinus1(Int h, Int j); 518 Void createAfterNumBspSchedulesMinus1( Int h, Int i, Int t); 519 520 Void setVpsNumAddHrdParams( Int val ) { m_vpsNumAddHrdParams = val; } 521 Int getVpsNumAddHrdParams( ) { return m_vpsNumAddHrdParams; } 522 523 Void setCprmsAddPresentFlag( Int i, Bool flag ) { m_cprmsAddPresentFlag[i - m_offsetHrdParamIdx] = flag; } 524 Bool getCprmsAddPresentFlag( Int i ) { return m_cprmsAddPresentFlag[i - m_offsetHrdParamIdx]; } 525 526 Void setNumSubLayerHrdMinus1( Int i, Int val ) { m_numSubLayerHrdMinus1[i - m_offsetHrdParamIdx] = val; } 527 Int getNumSubLayerHrdMinus1( Int i ) { return m_numSubLayerHrdMinus1[i - m_offsetHrdParamIdx]; } 528 529 Void setNumSignalledPartitioningSchemes( Int h, Int val ) { m_numSignalledPartitioningSchemes[h] = val; } 530 Int getNumSignalledPartitioningSchemes( Int h ) { return m_numSignalledPartitioningSchemes[h]; } 531 532 Void setNumPartitionsInSchemeMinus1( Int h, Int j, Int val ) { m_numPartitionsInSchemeMinus1[h][j] = val; } 533 Int getNumPartitionsInSchemeMinus1( Int h, Int j ) { return m_numPartitionsInSchemeMinus1[h][j]; } 534 535 Void setLayerIncludedInPartitionFlag( Int h, Int j, Int k, Int r, Bool flag ) { m_layerIncludedInPartitionFlag[h][j][k][r] = flag; } 536 Bool getLayerIncludedInPartitionFlag( Int h, Int j, Int k, Int r ) { return m_layerIncludedInPartitionFlag[h][j][k][r]; } 537 538 Void setNumBspSchedulesMinus1( Int h, Int i, Int t, Int val ) { m_numBspSchedulesMinus1[h][i][t] = val; } 539 Int getNumBspSchedulesMinus1( Int h, Int i, Int t ) { return m_numBspSchedulesMinus1[h][i][t]; } 540 541 Void setBspHrdIdx( Int h, Int i, Int t, Int j, Int k, Int val ) { m_bspHrdIdx[h][i - m_offsetHrdParamIdx][t][j][k] = val; } 542 Int getBspHrdIdx( Int h, Int i, Int t, Int j, Int k ) { return m_bspHrdIdx[h][i - m_offsetHrdParamIdx][t][j][k]; } 543 544 Int getBspHrdIdxLen( TComVPS* vps ); 545 546 Void setBspSchedIdx( Int h, Int i, Int t, Int j, Int k, Int val ) { m_bspSchedIdx[h][i - m_offsetHrdParamIdx][t][j][k] = val; } 547 Int getBspSchedIdx( Int h, Int i, Int t, Int j, Int k ) { return m_bspSchedIdx[h][i - m_offsetHrdParamIdx][t][j][k]; } 548 549 Void setHrdParametermeters( Int k, TComHRD* val ) { *(m_hrdParameters + k ) = *val; }; 550 TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters + k; }; 551 #else 438 552 private: 439 553 Int m_vpsNumBspHrdParametersMinus1; … … 475 589 Void setHrdParametermeters( Int k, TComHRD* val ) { m_hrdParameters[k] = val; }; 476 590 TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters[k]; }; 591 #endif; 477 592 }; 478 593 … … 501 616 Bool m_wppNotInUseFlag; 502 617 Bool m_wppInUseFlag [MAX_NUM_LAYERS]; 618 #if H_MV_HLS10_VPS_VUI 619 Bool m_singleLayerForNonIrapFlag; 620 Bool m_higherLayerIrapSkipFlag; 621 #endif 503 622 Bool m_ilpRestrictedRefLayersFlag; 504 623 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; … … 574 693 Void setWppInUseFlag( Int i, Bool flag ) { m_wppInUseFlag[i] = flag; } 575 694 Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; } 695 696 #if H_MV_HLS10_VPS_VUI 697 Void setSingleLayerForNonIrapFlag( Bool flag ) { m_singleLayerForNonIrapFlag = flag; } 698 Bool getSingleLayerForNonIrapFlag( ) { return m_singleLayerForNonIrapFlag; } 699 700 Void setHigherLayerIrapSkipFlag( Bool flag ) { m_higherLayerIrapSkipFlag = flag; } 701 Bool getHigherLayerIrapSkipFlag( ) { return m_higherLayerIrapSkipFlag; } 702 #endif 576 703 577 704 Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } … … 609 736 Int m_bitDepthVpsLumaMinus8; 610 737 Int m_bitDepthVpsChromaMinus8; 738 #if H_MV_HLS10_GEN_VSP_CONF_WIN 739 Bool m_conformanceWindowVpsFlag; 740 Int m_confWinVpsLeftOffset; 741 Int m_confWinVpsRightOffset; 742 Int m_confWinVpsTopOffset; 743 Int m_confWinVpsBottomOffset; 744 #endif 611 745 612 746 public: 747 748 #if H_MV_HLS10_GEN_VSP_CONF_WIN 749 TComRepFormat() 750 { 751 m_conformanceWindowVpsFlag = 0; 752 m_confWinVpsLeftOffset = 0; 753 m_confWinVpsRightOffset = 0; 754 m_confWinVpsTopOffset = 0; 755 m_confWinVpsBottomOffset = 0; 756 }; 757 #else 613 758 TComRepFormat() { }; 759 #endif 614 760 615 761 Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } … … 635 781 Void setBitDepthVpsChromaMinus8( Int val ) { m_bitDepthVpsChromaMinus8 = val; } 636 782 Int getBitDepthVpsChromaMinus8( ) { return m_bitDepthVpsChromaMinus8; } 783 784 #if H_MV_HLS10_GEN_VSP_CONF_WIN 785 Void setConformanceWindowVpsFlag( Bool flag ) { m_conformanceWindowVpsFlag = flag; } 786 Bool getConformanceWindowVpsFlag( ) { return m_conformanceWindowVpsFlag; } 787 788 Void setConfWinVpsLeftOffset( Int val ) { m_confWinVpsLeftOffset = val; } 789 Int getConfWinVpsLeftOffset( ) { return m_confWinVpsLeftOffset; } 790 791 Void setConfWinVpsRightOffset( Int val ) { m_confWinVpsRightOffset = val; } 792 Int getConfWinVpsRightOffset( ) { return m_confWinVpsRightOffset; } 793 794 Void setConfWinVpsTopOffset( Int val ) { m_confWinVpsTopOffset = val; } 795 Int getConfWinVpsTopOffset( ) { return m_confWinVpsTopOffset; } 796 797 Void setConfWinVpsBottomOffset( Int val ) { m_confWinVpsBottomOffset = val; } 798 Int getConfWinVpsBottomOffset( ) { return m_confWinVpsBottomOffset; } 799 #endif 637 800 }; 638 801 … … 657 820 658 821 Void setMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsDecPicBufferingMinus1[i][k][j] = val; } 822 #if H_MV_HLS10_ADD_LAYERSETS 823 Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { assert( m_maxVpsDecPicBufferingMinus1[i][k][j] >= 0 ); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } 824 #else 659 825 Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { return m_maxVpsDecPicBufferingMinus1[i][k][j]; } 826 #endif 660 827 661 828 Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } … … 672 839 #if H_MV 673 840 Bool m_vpsBaseLayerInternalFlag; 841 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 842 Bool m_vpsBaseLayerAvailableFlag; 843 #endif // H_MV_HLS10_GEN 674 844 #endif 675 845 … … 741 911 Int m_layerSetIdxForOlsMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 742 912 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 913 #if H_MV_HLS10_PTL 914 Int m_profileTierLevelIdx [MAX_VPS_OUTPUTLAYER_SETS ][MAX_NUM_LAYERS]; 915 #else 743 916 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ]; 917 #endif 744 918 Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; 745 919 Bool m_repFormatIdxPresentFlag; … … 770 944 // VPS EXTENSION SEMANTICS VARIABLES 771 945 Int m_layerIdInVps [MAX_NUM_LAYERS ]; 946 #if H_MV_HLS10_REF_PRED_LAYERS 947 Int m_dependencyFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 948 #endif 772 949 773 950 Int m_numDirectRefLayers [MAX_NUM_LAYERS]; 951 #if H_MV_HLS10_REF_PRED_LAYERS 952 Int m_idDirectRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 953 #else 774 954 Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 955 #endif 775 956 776 957 Int m_numRefLayers [MAX_NUM_LAYER_IDS]; 777 Int m_numPredictedLayers [MAX_NUM_LAYERS]; 958 #if H_MV_HLS10_REF_PRED_LAYERS 959 Int m_idRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 960 #endif 961 962 963 Int m_numPredictedLayers [MAX_NUM_LAYERS ]; 964 #if !H_MV_HLS10_REF_PRED_LAYERS 778 965 Int m_predictedLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 966 #else 967 Int m_idPredictedLayer [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 968 #endif 779 969 Int m_numIndependentLayers; 780 970 Int m_numLayersInTreePartition [MAX_NUM_LAYER_IDS]; 781 971 Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 972 #if H_MV_HLS10_REF_PRED_LAYERS 782 973 Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 783 974 #endif 784 975 Int m_viewIndex [MAX_NUM_LAYERS ]; 785 976 … … 788 979 std::vector< std::vector< Int> > m_layerSetLayerIdList; 789 980 981 #if H_MV_HLS10_NESSECARY_LAYER 982 Int m_numNecessaryLayers [MAX_VPS_OUTPUTLAYER_SETS]; 983 Bool m_necessaryLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYERS]; 984 #endif 790 985 791 986 Int xGetDimBitOffset( Int j ); 987 #if H_MV_HLS10_REF_PRED_LAYERS 792 988 Void xSetRefLayerFlags( Int currLayerId ); 989 #endif 793 990 // VPS EXTENSION 2 SYNTAX ELEMENTS 794 991 #if H_3D_ARP … … 870 1067 Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } 871 1068 Bool getVpsBaseLayerInternalFlag( ) { return m_vpsBaseLayerInternalFlag; } 1069 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 1070 Void setVpsBaseLayerAvailableFlag( Bool flag ) { m_vpsBaseLayerAvailableFlag = flag; } 1071 Bool getVpsBaseLayerAvailableFlag( ) { return m_vpsBaseLayerAvailableFlag; } 1072 #endif 872 1073 #endif 873 1074 … … 877 1078 #if H_MV 878 1079 UInt getMaxSubLayersMinus1() { return m_uiMaxTLayers - 1; } // For consistency with draft spec 1080 #if H_MV_HLS10_GEN_FIX 1081 Void setMaxSubLayersMinus1(UInt val) { m_uiMaxTLayers = (val + 1); }; 1082 #endif 879 1083 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; 880 1084 Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } … … 916 1120 917 1121 #if H_MV 1122 #if H_MV_HLS10_PTL 1123 TComPTL* getPTL( Int idx = 0 ) { return &m_pcPTL[idx]; } 1124 #else 918 1125 TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; } 1126 #endif 919 1127 #else 920 1128 TComPTL* getPTL() { return &m_pcPTL; } … … 1002 1210 Bool inferOutputLayerFlag( Int i, Int j ); 1003 1211 1212 #if H_MV_HLS10_PTL 1213 Void setProfileTierLevelIdx( Int i, Int j, Int val ) { m_profileTierLevelIdx[ i ][ j ] = val; } 1214 Int getProfileTierLevelIdx( Int i, Int j ) { return m_profileTierLevelIdx[ i ][ j ]; } 1215 #else 1004 1216 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx ] = val; } 1005 1217 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; } 1218 #endif 1006 1219 1007 1220 Void setAltOutputLayerFlag( Int i, Bool flag ) { m_altOutputLayerFlag[i] = flag; } … … 1033 1246 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1034 1247 1248 #if !H_MV_HLS10_ADD_LAYERSETS 1035 1249 Void inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ); 1036 1250 #endif 1251 1037 1252 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } 1038 1253 Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } … … 1066 1281 Int getNumViews(); 1067 1282 1283 #if H_MV_HLS10_REF_PRED_LAYERS 1284 Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } 1285 #endif 1068 1286 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; 1287 #if !H_MV_HLS10_REF_PRED_LAYERS 1069 1288 Int getRefLayerId ( Int layerIdInNuh, Int idx );; 1070 1289 #endif 1071 1290 Int getNumRefLayers ( Int i ) { return m_numRefLayers[i]; } 1072 1291 Int getNumPredictedLayers ( Int i ) { return m_numPredictedLayers[i]; } 1292 1293 #if !H_MV_HLS10_REF_PRED_LAYERS 1073 1294 Int getPredictedLayerId ( Int i, Int j ) { return m_predictedLayerId[i][j]; } 1295 #else 1296 Int getIdRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumRefLayers ( i )); return m_idRefLayer [i][j]; } 1297 Int getIdPredictedLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; } 1298 Int getIdDirectRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; } 1299 #endif 1074 1300 Int getNumIndependentLayers ( ) { return m_numIndependentLayers; } 1075 1301 Int getNumLayersInTreePartition( Int i ) { return m_numLayersInTreePartition[i]; } … … 1078 1304 Int getNumLayerSets( ) { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; 1079 1305 1306 #if H_MV_HLS10_ADD_LAYERSETS 1307 Int getFirstAddLayerSetIdx() { return getVpsNumLayerSetsMinus1() + 1; } 1308 Int getLastAddLayerSetIdx() { return getFirstAddLayerSetIdx() + getNumAddLayerSets() - 1; } 1309 #endif 1080 1310 Bool checkVPSExtensionSyntax(); 1081 1311 Int scalTypeToScalIdx ( ScalabilityType scalType ); 1082 1312 1313 #if H_MV_HLS10_PTL 1314 Int getProfileTierLevelIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 1315 #else 1083 1316 Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 1317 #endif 1084 1318 Int getVpsRepFormatIdxLen() { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); }; 1085 1319 … … 1092 1326 Void deriveLayerSetLayerIdList(); 1093 1327 1328 #if H_MV_HLS10_ADD_LAYERSETS 1329 Int olsIdxToLsIdx( Int i ) { return ( i < getNumLayerSets() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; }; 1330 #else 1094 1331 Int olsIdxToLsIdx( Int i ) { return ( i <= getVpsNumLayerSetsMinus1() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; }; 1095 1332 #endif 1096 1333 Void initTargetLayerIdLists ( ); 1097 1334 Void deriveTargetLayerIdList ( Int i ); 1098 1099 1335 std::vector<Int> getTargetDecLayerIdList( Int targetDecLayerSetIdx ) { return m_targetDecLayerIdLists[targetDecLayerSetIdx]; }; 1100 1336 std::vector<Int> getTargetOptLayerIdList( Int targetOptLayerSetIdx ) { return m_targetOptLayerIdLists[targetOptLayerSetIdx]; }; … … 1102 1338 Int getNumOutputLayersInOutputLayerSet( Int i ) { return (Int) getTargetOptLayerIdList( i ).size(); }; 1103 1339 Int getOlsHighestOutputLayerId( Int i ) { return getTargetOptLayerIdList( i ).back(); }; 1340 1341 #if H_MV_HLS10_ADD_LAYERSETS 1342 Void deriveAddLayerSetLayerIdList( Int i ) 1343 { 1344 assert( m_layerSetLayerIdList.size() == ( getVpsNumLayerSetsMinus1() + 1 + i ) ); 1345 std::vector<Int> layerSetLayerIdList; 1346 1347 for( Int treeIdx = 1; treeIdx < getNumIndependentLayers(); treeIdx++ ) 1348 { 1349 // The value of highest_layer_idx_plus1[ i ][ j ] shall be in the range of 0 to NumLayersInTreePartition[ j ], inclusive. 1350 assert( getHighestLayerIdxPlus1( i, treeIdx ) >= 0 && getHighestLayerIdxPlus1( i, treeIdx ) <= getNumLayersInTreePartition( treeIdx ) ); 1351 1352 for( Int layerCnt = 0; layerCnt < getHighestLayerIdxPlus1( i, treeIdx ); layerCnt++ ) 1353 { 1354 layerSetLayerIdList.push_back( getTreePartitionLayerIdList( treeIdx, layerCnt ) ); 1355 } 1356 } 1357 m_layerSetLayerIdList.push_back( layerSetLayerIdList ); 1358 1359 //It is a requirement of bitstream conformance that 1360 //NumLayersInIdList[ vps_num_layer_sets_minus1 + 1 + i ] shall be greater than 0. 1361 assert( getNumLayersInIdList( getVpsNumLayerSetsMinus1() + 1 + i ) > 0 ); 1362 1363 } 1364 #endif 1365 #if H_MV_HLS10_NESSECARY_LAYER 1366 Void deriveNecessaryLayerFlags( Int olsIdx ) 1367 { 1368 AOF( olsIdx >= 0 && olsIdx < getNumOutputLayerSets() ); 1369 Int lsIdx = olsIdxToLsIdx( olsIdx ); 1370 for( Int lsLayerIdx = 0; lsLayerIdx < getNumLayersInIdList( lsIdx) ; lsLayerIdx++ ) 1371 { 1372 m_necessaryLayerFlag[ olsIdx ][ lsLayerIdx ] = 0; 1373 } 1374 for( Int lsLayerIdx = 0; lsLayerIdx < getNumLayersInIdList( lsIdx ); lsLayerIdx++ ) 1375 { 1376 if( getOutputLayerFlag( olsIdx, lsLayerIdx )) 1377 { 1378 m_necessaryLayerFlag[ olsIdx ][ lsLayerIdx ] = 1; 1379 Int currLayerId = getLayerSetLayerIdList( lsIdx, lsLayerIdx ); 1380 for( Int rLsLayerIdx = 0; rLsLayerIdx < lsLayerIdx; rLsLayerIdx++ ) 1381 { 1382 Int refLayerId = getLayerSetLayerIdList( lsIdx, rLsLayerIdx ); 1383 if( getDependencyFlag( getLayerIdInVps( currLayerId ), getLayerIdInVps( refLayerId ) ) ) 1384 { 1385 m_necessaryLayerFlag[ olsIdx ][ rLsLayerIdx ] = 1; 1386 } 1387 } 1388 } 1389 } 1390 m_numNecessaryLayers[ olsIdx ] = 0; 1391 for( Int lsLayerIdx = 0; lsLayerIdx < getNumLayersInIdList( lsIdx ); lsLayerIdx++ ) 1392 { 1393 m_numNecessaryLayers[ olsIdx ] += m_necessaryLayerFlag[ olsIdx ][ lsLayerIdx ]; 1394 } 1395 }; 1396 1397 Int getNecessaryLayerFlag( Int i, Int j ) { AOF( i >= 0 && i < getNumOutputLayerSets() ); AOF( j >= 0 && j < getNumLayersInIdList( olsIdxToLsIdx( i ) ) ); return m_necessaryLayerFlag[i][j]; }; 1398 1399 #endif 1400 1104 1401 1105 1402 Int getMaxSubLayersInLayerSetMinus1( Int i ); … … 1113 1410 1114 1411 // helpers 1412 1115 1413 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 ); 1414 #if !H_MV_HLS10_MAXNUMPICS 1116 1415 Int getMaxNumPics( Int layerId ); 1416 #endif 1417 #if H_MV_HLS10_ADD_LAYERSETS 1418 1419 Void printPTL() 1420 { 1421 std::vector<Int> idx; 1422 std::vector<Int> num; 1423 std::vector<std::vector<Int>> ptlInfo; 1424 1425 std::cout << std::right << std::setw(60) << std::setfill('-') << " " << std::setfill(' ') << std::endl << "PTLI" << std::endl; 1426 1427 for ( Int i = 0; i <= getVpsNumProfileTierLevelMinus1(); i++ ) 1428 { 1429 std::vector<Int> curPtlInfo; 1430 ProfileTierLevel* ptl = getPTL( i )->getGeneralPTL(); 1431 curPtlInfo.push_back( (Int) ptl->getProfileIdc() ); 1432 curPtlInfo.push_back( (Int) ptl->getTierFlag() ); 1433 curPtlInfo.push_back( (Int) ptl->getLevelIdc() ); 1434 curPtlInfo.push_back( (Int) ptl->getInbldFlag() ); 1435 1436 idx.push_back ( i ); 1437 num.push_back ( 4 ); 1438 ptlInfo.push_back( curPtlInfo ); 1439 } 1440 1441 xPrintArray( "VpsProfileTierLevel", getVpsNumProfileTierLevelMinus1() + 1, idx, num, ptlInfo, false ); 1442 1443 num.clear(); 1444 idx.clear(); 1445 for (Int i = 0; i < getNumOutputLayerSets(); i++) 1446 { 1447 num.push_back ( getNumLayersInIdList( olsIdxToLsIdx( i )) ); 1448 idx.push_back( i ); 1449 } 1450 1451 xPrintArray( "profile_tier_level_idx", getNumOutputLayerSets(), idx, num, m_profileTierLevelIdx, true ); 1452 std::cout << std::endl; 1453 } 1454 1455 Void printLayerDependencies() 1456 { 1457 vector<Int> fullArray; 1458 vector<Int> range; 1459 for (Int i = 0; i <= getMaxLayersMinus1(); i++ ) 1460 { 1461 fullArray.push_back( getMaxLayersMinus1() + 1 ); 1462 range.push_back( i ); 1463 } 1464 std::cout << std::right << std::setw(60) << std::setfill('-') << " " << std::setfill(' ') << std::endl << "Layer Dependencies" << std::endl; 1465 xPrintArray( "direct_dependency_flag", getMaxLayersMinus1()+1, range, fullArray, m_directDependencyFlag, false ); 1466 xPrintArray( "DependencyFlag", getMaxLayersMinus1()+1, range, fullArray, m_dependencyFlag, false ); 1467 xPrintArray( "layer_id_in_nuh", getMaxLayersMinus1()+1, m_layerIdInNuh, true ); 1468 xPrintArray( "IdPredictedLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numPredictedLayers, m_idPredictedLayer, true ); 1469 xPrintArray( "IdRefLayer" , getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numRefLayers, m_idRefLayer, true ); 1470 xPrintArray( "IdDirectRefLayer", getMaxLayersMinus1() + 1, m_layerIdInNuh, m_numDirectRefLayers, m_idDirectRefLayer, true ); 1471 std::cout << std::endl; 1472 1473 }; 1474 1475 Void printLayerSets() 1476 { 1477 vector<Int> fullArray; 1478 vector<Int> numLayersInIdList; 1479 vector<Int> rangeLayerSets; 1480 1481 1482 for (Int i = 0; i < getNumLayerSets(); i++ ) 1483 { 1484 numLayersInIdList.push_back( getNumLayersInIdList( i ) ); 1485 rangeLayerSets.push_back( i ); 1486 } 1487 1488 vector<Int> rangeOutputLayerSets; 1489 vector<Int> numOutputLayersInOutputLayerSet; 1490 vector<Int> numDecLayer; 1491 vector<Int> numLayersInLayerSetForOutputLayerSet; 1492 vector<Int> vOlsIdxToLsIdx; 1493 for (Int i = 0; i < getNumOutputLayerSets(); i++ ) 1494 { 1495 vOlsIdxToLsIdx.push_back( olsIdxToLsIdx(i)); 1496 numOutputLayersInOutputLayerSet.push_back( getNumOutputLayersInOutputLayerSet( i ) ); 1497 numDecLayer.push_back( (Int) m_targetDecLayerIdLists[ i ].size() ); 1498 rangeOutputLayerSets.push_back( i ); 1499 numLayersInLayerSetForOutputLayerSet.push_back( getNumLayersInIdList( olsIdxToLsIdx( i ) ) ); 1500 } 1501 1502 vector<Int> rangeIndependentLayers; 1503 for(Int i = 0; i < getNumIndependentLayers(); i++ ) 1504 { 1505 rangeIndependentLayers.push_back( i ); 1506 } 1507 1508 vector<Int> rangeAddLayerSets; 1509 vector<Int> numHighestLayerIdxPlus1; 1510 for(Int i = 0; i < getNumAddLayerSets(); i++ ) 1511 { 1512 rangeAddLayerSets.push_back( i ); 1513 numHighestLayerIdxPlus1.push_back( getNumIndependentLayers() ); 1514 } 1515 1516 std::cout << std::right << std::setw(60) << std::setfill('-') << " " << std::setfill(' ') << std::endl << "Layer Sets" << std::endl; 1517 xPrintArray( "TreePartitionLayerIdList", getNumIndependentLayers(), rangeIndependentLayers, m_numLayersInTreePartition, m_treePartitionLayerIdList, true ); 1518 xPrintArray( "highest_layer_idx_plus1", getNumAddLayerSets(), rangeAddLayerSets, numHighestLayerIdxPlus1, m_highestLayerIdxPlus1, true ); 1519 xPrintArray( "LayerSetLayerIdList" , (Int) getNumLayerSets() , rangeLayerSets , numLayersInIdList, m_layerSetLayerIdList, true ); 1520 xPrintArray( "OlsIdxToLsIdx", (Int) vOlsIdxToLsIdx.size(), vOlsIdxToLsIdx, true ); 1521 xPrintArray( "OutputLayerFlag" , getNumOutputLayerSets(), rangeOutputLayerSets, numLayersInLayerSetForOutputLayerSet, m_outputLayerFlag, true ); 1522 xPrintArray( "TargetOptLayerIdList", getNumOutputLayerSets(), rangeOutputLayerSets, numOutputLayersInOutputLayerSet, m_targetOptLayerIdLists, true ); 1523 xPrintArray( "NecessaryLayerFlag" , getNumOutputLayerSets(), rangeOutputLayerSets, numLayersInLayerSetForOutputLayerSet, m_necessaryLayerFlag , true ); 1524 xPrintArray( "TargetDecLayerIdList", getNumOutputLayerSets(), rangeOutputLayerSets, numDecLayer, m_targetDecLayerIdLists, true ); 1525 std::cout << endl; 1526 }; 1527 1528 1529 1530 template <typename T, typename S, typename U> Void xPrintArray( const Char* name, Int numElemDim1, U idx, S numElemDim2, T vec, Bool printNumber, Bool printIdx = true ) 1531 { 1532 std::cout << std::endl; 1533 for (Int j = 0; j < numElemDim1; j++ ) 1534 { 1535 std::cout << std::right << std::setw(27) << name; 1536 if (printIdx) 1537 { 1538 std::cout << "[" << std::right << std::setw(3) << idx[ j ] << "]" ; 1539 } 1540 else 1541 { 1542 std::cout << std::right << std::setw(5) << " "; 1543 } 1544 1545 if ( printNumber ) 1546 { 1547 std::cout << " (" << std::right << std::setw(3) << numElemDim2[j] << ")"; 1548 } 1549 else 1550 { 1551 std::cout << std::right << std::setw(6) << " "; 1552 } 1553 1554 std::cout << ":"; 1555 for (Int i = 0; i < numElemDim2[j]; i++) 1556 { 1557 std::cout << std::right << std::setw(3) << vec[j][i]; 1558 } 1559 std::cout << std::endl; 1560 } 1561 } 1562 1563 template <typename T> Void xPrintArray( const char* name, Int numElem, T vec, Bool printNumber ) 1564 { 1565 std::vector<Int> numElemDim2(1, numElem); 1566 std::vector<T> vec2 (1, vec ); 1567 std::vector<Int> idx2 (0); 1568 xPrintArray( name, 1, idx2, numElemDim2, vec2, printNumber, false ); 1569 } 1570 #endif 1571 1117 1572 1118 1573 /// VPS EXTENSION 2 SYNTAX ELEMENTS … … 1557 2012 TComVPS* m_pcVPS; 1558 2013 // SPS 2014 #if H_MV_HLS10_MULTILAYERSPS 2015 Int m_spsMaxSubLayersMinus1; 2016 Int m_spsExtOrMaxSubLayersMinus1; 2017 #endif 1559 2018 Bool m_spsExtensionPresentFlag; 1560 2019 … … 1574 2033 // SPS Extension 1575 2034 Bool m_interViewMvVertConstraintFlag; 2035 #if !H_MV_HLS10_PPS 1576 2036 Int m_numScaledRefLayerOffsets; 1577 2037 Int m_scaledRefLayerId [MAX_NUM_SCALED_REF_LAYERS]; … … 1580 2040 Int m_scaledRefLayerRightOffset [MAX_NUM_LAYERS]; 1581 2041 Int m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS]; 2042 #endif 1582 2043 #endif 1583 2044 #if H_3D … … 1683 2144 #if H_MV 1684 2145 UInt getSpsMaxSubLayersMinus1() { return ( m_uiMaxTLayers - 1); } 2146 #if H_MV_HLS10_MULTILAYERSPS 2147 Void setSpsMaxSubLayersMinus1( UInt val ) { setMaxTLayers( val + 1 ); } 2148 #endif 1685 2149 #endif 1686 2150 … … 1715 2179 TComPTL* getPTL() { return &m_pcPTL; } 1716 2180 #if H_MV 2181 #if H_MV_HLS10_MULTILAYERSPS 2182 Void setSpsExtOrMaxSubLayersMinus1( Int val ) { m_spsExtOrMaxSubLayersMinus1 = val; } 2183 Int getSpsExtOrMaxSubLayersMinus1( ) { return m_spsExtOrMaxSubLayersMinus1; } 2184 Void inferSpsMaxSubLayersMinus1( Bool atPsActivation, TComVPS* vps ) 2185 { 2186 assert( getLayerId() != 0 ); 2187 if ( !atPsActivation ) 2188 { 2189 assert( vps == NULL ); 2190 if (getSpsExtOrMaxSubLayersMinus1() != 7) 2191 { 2192 setSpsMaxSubLayersMinus1( getSpsExtOrMaxSubLayersMinus1() ); 2193 } 2194 } 2195 else 2196 { 2197 assert( vps != NULL ); 2198 if (getSpsExtOrMaxSubLayersMinus1() == 7) 2199 { 2200 setSpsMaxSubLayersMinus1( vps->getMaxSubLayersMinus1() ); 2201 } 2202 } 2203 } 2204 2205 Bool getMultiLayerExtSpsFlag() { return ( getLayerId() != 0 && getSpsExtOrMaxSubLayersMinus1() == 7 ); } 2206 #endif 1717 2207 Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ); 1718 2208 … … 1753 2243 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 1754 2244 2245 #if !H_MV_HLS10_PPS 1755 2246 Void setNumScaledRefLayerOffsets( Int val ) { m_numScaledRefLayerOffsets = val; } 1756 2247 Int getNumScaledRefLayerOffsets( ) { return m_numScaledRefLayerOffsets; } … … 1770 2261 Void setScaledRefLayerBottomOffset( Int j, Int val ) { m_scaledRefLayerBottomOffset[j] = val; } 1771 2262 Int getScaledRefLayerBottomOffset( Int j ) { return m_scaledRefLayerBottomOffset[j]; } 2263 #endif 1772 2264 // Inference 2265 1773 2266 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); 1774 2267 Void inferScalingList( TComSPS* spsSrc ); -
branches/HTM-12.0-dev1/source/Lib/TLibCommon/TypeDef.h
r1051 r1054 55 55 56 56 #ifndef HEVC_EXT 57 #define HEVC_EXT 257 #define HEVC_EXT 1 58 58 #endif 59 59 … … 387 387 ///////////////////////////////////////////////////////////////////////////////// 388 388 // TBD: Check if integration is necessary. 389 390 391 392 #define H_MV_HLS10_GEN 0 // General changes (not tested) 393 394 #define H_MV_HLS10_GEN_FIX 1 395 396 #define H_MV_HLS10_GEN_VSP_CONF_WIN 1 // VPS conformance window 397 #define H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 1 // vps_base_layer_available 398 #define H_MV_HLS10_REF_PRED_LAYERS 1 // reference and predicted layer derivation 399 #define H_MV_HLS10_NESSECARY_LAYER 1 // necessary layers 400 #define H_MV_HLS10_ADD_LAYERSETS 1 // additional layer sets 401 #define H_MV_HLS10_DBP_SIZE 1 // dpb size syntax structure 402 #define H_MV_HLS10_MAXNUMPICS 1 // constraint on number of pictures in rps 403 #define H_MV_HLS10_PTL 1 // profile tier level 404 #define H_MV_HLS10_MULTILAYERSPS 1 // multilayer SPS extension 405 #define H_MV_HLS10_VPS_VUI 1 // vsp vui 406 #define H_MV_HLS10_VPS_VUI_BSP 1 // vsp vui bsp 407 #define H_MV_HLS10_PPS 1 // PPS modifications 408 409 #define H_MV_HLS10_VPS_VUI_BSP_STORE 0 // Currently bsp vui bsp hrd parameters are not stored, some dynamic memory allocation with upper bounds is required. 410 411 389 412 #define H_MV_HLS7_GEN 0 // General changes (not tested) 413 390 414 391 415 // POC … … 463 487 #define MAX_NESTING_NUM_LAYER 64 464 488 489 #if H_MV_HLS10_VPS_VUI_BSP 490 #define MAX_VPS_NUM_HRD_PARAMETERS 1024 491 #define MAX_NUM_SUB_LAYERS 7 492 #define MAX_NUM_SIGNALLED_PARTITIONING_SCHEMES 16 493 #else 465 494 #define MAX_VPS_NUM_HRD_PARAMETERS 1 495 #endif 496 466 497 #define MAX_VPS_OP_SETS_PLUS1 1024 467 498 #if H_MV 499 #if H_MV_HLS10_ADD_LAYERSETS 500 #define MAX_VPS_NUM_ADD_LAYER_SETS 1024 501 #endif 468 502 #define MAX_VPS_NUH_LAYER_ID_PLUS1 63 469 503 #define MAX_NUM_SCALABILITY_TYPES 16 … … 480 514 #define MAX_VPS_PROFILE_TIER_LEVEL 64 481 515 #define MAX_VPS_ADD_OUTPUT_LAYER_SETS 1024 516 #if H_MV_HLS10_ADD_LAYERSETS 517 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 + MAX_VPS_OP_SETS_PLUS1 ) 518 #else 482 519 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 ) 520 #endif 483 521 #define MAX_NUM_VIDEO_SIGNAL_INFO 16 484 522 #define MAX_NUM_SCALED_REF_LAYERS MAX_NUM_LAYERS-1 523 #if !H_MV_HLS10_VPS_VUI_BSP 485 524 #define MAX_NUM_BSP_HRD_PARAMETERS 100 ///< Maximum value is actually not specified 486 525 #define MAX_NUM_BITSTREAM_PARTITIONS 100 ///< Maximum value is actually not specified 487 526 #define MAX_NUM_BSP_SCHED_COMBINATION 100 ///< Maximum value is actually not specified 488 527 #define MAX_SUB_STREAMS 1024 528 #endif 489 529 #else 490 530 #define MAX_NUM_LAYER_IDS 64 … … 957 997 MAINSTILLPICTURE = 3, 958 998 #if H_MV 999 #if H_MV_HLS10_PTL 1000 MULTIVIEWMAIN = 6, 1001 MAIN3D = 5, 1002 #if H_3D 1003 MAIN3D = 8, 1004 #endif 1005 #else 959 1006 MAINSTEREO = 4, 960 1007 MAINMULTIVIEW = 5, 961 1008 #if H_3D 962 1009 MAIN3D = 6, 1010 #endif 963 1011 #endif 964 1012 #endif -
branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1048 r1054 53 53 } 54 54 // To avoid mismatches 55 #if H_MV_HLS10_GEN_FIX 56 fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() ); 57 #else 55 58 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" ); 59 #endif 56 60 #else 57 61 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); … … 66 70 return; 67 71 } 72 #if H_MV_HLS10_GEN_FIX 73 fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() ); 74 #else 68 75 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" ); 76 #endif 69 77 #else 70 78 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); … … 334 342 } 335 343 } 344 #if !H_MV_HLS10_PPS 336 345 #if H_MV 337 346 if ( pcPPS->getLayerId() > 0 ) … … 347 356 { 348 357 #endif 358 #endif 349 359 READ_FLAG( uiCode, "pps_scaling_list_data_present_flag" ); pcPPS->setScalingListPresentFlag( uiCode ? true : false ); 350 360 if(pcPPS->getScalingListPresentFlag ()) … … 352 362 parseScalingList( pcPPS->getScalingList() ); 353 363 } 354 #if H_MV 355 } 356 #endif 357 364 #if !H_MV_HLS10_PPS 365 #if H_MV 366 } 367 #endif 368 #endif 358 369 READ_FLAG( uiCode, "lists_modification_present_flag"); 359 370 pcPPS->setListsModificationPresentFlag(uiCode); … … 389 400 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 390 401 { 402 #if H_MV_HLS10_PPS 403 parsePPSMultilayerExtension( pcPPS ); 404 #else 391 405 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 392 406 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 407 #endif 393 408 } 394 409 #if !H_3D … … 415 430 } 416 431 } 432 417 433 418 434 #if H_3D … … 759 775 UInt uiCode; 760 776 READ_CODE( 4, uiCode, "sps_video_parameter_set_id"); pcSPS->setVPSId ( uiCode ); 777 761 778 #if H_MV 762 779 if ( pcSPS->getLayerId() == 0 ) … … 765 782 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 766 783 assert(uiCode <= 6); 784 #if H_MV_HLS10_MULTILAYERSPS 785 #if H_MV 786 } 787 else 788 { 789 READ_CODE( 3, uiCode, "sps_ext_or_max_sub_layers_minus1" ); pcSPS->setSpsExtOrMaxSubLayersMinus1( uiCode ); 790 pcSPS->inferSpsMaxSubLayersMinus1( false, NULL ); 791 } 792 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 793 { 794 #endif 795 #endif 767 796 768 797 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); … … 780 809 assert(uiCode <= 15); 781 810 #if H_MV 811 #if H_MV_HLS10_MULTILAYERSPS 812 if ( pcSPS->getMultiLayerExtSpsFlag() ) 813 #else 782 814 if ( pcSPS->getLayerId() > 0 ) 815 #endif 783 816 { 784 817 READ_FLAG( uiCode, "update_rep_format_flag" ); pcSPS->setUpdateRepFormatFlag( uiCode == 1 ); … … 802 835 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 803 836 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 804 #if H_MV 805 } 837 #if !H_MV_HLS10_MULTILAYERSPS 838 #if H_MV 839 } 840 #endif 806 841 #endif 807 842 READ_FLAG( uiCode, "conformance_window_flag"); … … 816 851 READ_UVLC( uiCode, "conf_win_top_offset" ); conf.setWindowTopOffset ( uiCode ); 817 852 READ_UVLC( uiCode, "conf_win_bottom_offset" ); conf.setWindowBottomOffset( uiCode ); 853 #if H_MV_HLS10_MULTILAYERSPS 854 } 855 #endif 818 856 #else 819 857 READ_UVLC( uiCode, "conf_win_left_offset" ); conf.setWindowLeftOffset ( uiCode * TComSPS::getWinUnitX( pcSPS->getChromaFormatIdc() ) ); … … 825 863 826 864 #if H_MV 865 #if H_MV_HLS10_MULTILAYERSPS 866 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 867 #else // H_MV_HLS10_GEN 827 868 if ( pcSPS->getLayerId() == 0 ) 869 #endif // H_MV_HLS10_GEN 828 870 { 829 871 #endif … … 845 887 846 888 #if H_MV 889 #if H_MV_HLS10_MULTILAYERSPS 890 if ( !pcSPS->getMultiLayerExtSpsFlag()) 891 #else 847 892 if ( pcSPS->getLayerId() == 0 ) 893 #endif 848 894 { 849 895 #endif … … 904 950 { 905 951 #if H_MV 952 #if H_MV_HLS10_MULTILAYERSPS 953 if ( pcSPS->getMultiLayerExtSpsFlag() ) 954 #else 906 955 if ( pcSPS->getLayerId() > 0 ) 956 #endif 907 957 { 908 958 READ_FLAG( uiCode, "sps_infer_scaling_list_flag" ); pcSPS->setSpsInferScalingListFlag( uiCode == 1 ); … … 1032 1082 READ_FLAG( uiCode, "inter_view_mv_vert_constraint_flag" ); pcSPS->setInterViewMvVertConstraintFlag(uiCode == 1 ? true : false); 1033 1083 1084 #if !H_MV_HLS10_PPS 1034 1085 READ_UVLC( uiCode, "num_scaled_ref_layer_offsets" ); pcSPS->setNumScaledRefLayerOffsets( uiCode ); 1035 1086 … … 1046 1097 READ_FLAG( uiCode, "sps_multilayer_ext_reserved_zero_flag[ i ]" ); 1047 1098 } 1099 #endif 1048 1100 } 1049 1101 … … 1075 1127 #if H_MV 1076 1128 READ_FLAG( uiCode, "vps_base_layer_internal_flag" ); pcVPS->setVpsBaseLayerInternalFlag( uiCode == 1 ); 1129 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 1130 READ_FLAG( uiCode, "vps_base_layer_available_flag" ); pcVPS->setVpsBaseLayerAvailableFlag( uiCode == 1 ); 1131 #else 1077 1132 READ_FLAG( uiCode, "vps_reserved_one_bit" ); assert( uiCode == 1 ); 1133 #endif 1078 1134 #else 1079 1135 READ_CODE( 2, uiCode, "vps_reserved_three_2bits" ); assert(uiCode == 3); … … 1115 1171 READ_CODE( 6, uiCode, "vps_max_layer_id" ); pcVPS->setVpsMaxLayerId( uiCode ); 1116 1172 1173 #if H_MV_HLS10_GEN_FIX 1174 READ_UVLC( uiCode, "vps_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode ); 1175 #else 1117 1176 READ_UVLC( uiCode, "vps_max_num_layer_sets_minus1" ); pcVPS->setVpsNumLayerSetsMinus1( uiCode ); 1177 #endif 1118 1178 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 1119 1179 { … … 1204 1264 UInt uiCode; 1205 1265 1266 #if H_MV_HLS10_PTL 1267 if( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) 1268 { 1269 parsePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1270 1271 // Copy Profile info 1272 TComPTL temp = *pcVPS->getPTL( 1 ); 1273 *pcVPS->getPTL( 1 ) = *pcVPS->getPTL( 0 ); 1274 pcVPS->getPTL( 1 )->copyLevelFrom( &temp ); 1275 } 1276 #endif 1277 1206 1278 READ_FLAG( uiCode, "splitting_flag" ); pcVPS->setSplittingFlag( uiCode == 1 ? true : false ); 1207 1279 … … 1275 1347 } 1276 1348 pcVPS->setRefLayers(); 1349 1350 #if H_MV_HLS10_ADD_LAYERSETS 1351 if ( pcVPS->getNumIndependentLayers() > 1 ) 1352 { 1353 READ_UVLC( uiCode, "num_add_layer_sets" ); pcVPS->setNumAddLayerSets( uiCode ); 1354 } 1355 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1356 { 1357 for (Int j = 1; j < pcVPS->getNumIndependentLayers(); j++) 1358 { 1359 READ_CODE( pcVPS->getHighestLayerIdxPlus1Len( j ) , uiCode, "highest_layer_idx_plus1" ); pcVPS->setHighestLayerIdxPlus1( i, j, uiCode ); 1360 } 1361 pcVPS->deriveAddLayerSetLayerIdList( i ); 1362 } 1363 #endif 1364 1277 1365 READ_FLAG( uiCode, "vps_sub_layers_max_minus1_present_flag" ); pcVPS->setVpsSubLayersMaxMinus1PresentFlag( uiCode == 1 ); 1278 1366 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1310 1398 READ_UVLC( uiCode, "vps_num_profile_tier_level_minus1" ); pcVPS->setVpsNumProfileTierLevelMinus1( uiCode ); 1311 1399 1400 #if H_MV_HLS10_PTL 1401 Int offsetVal = ( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1; 1402 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1403 { 1404 READ_FLAG( uiCode, "vps_profile_present_flag[i]" ); pcVPS->setVpsProfilePresentFlag( i, uiCode == 1 ); 1405 parsePTL ( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers()-1); 1406 if( !pcVPS->getVpsProfilePresentFlag( i ) ) 1407 { 1408 TComPTL temp = *pcVPS->getPTL( offsetVal ); 1409 *pcVPS->getPTL( offsetVal ) = *pcVPS->getPTL( offsetVal - 1 ); 1410 pcVPS->getPTL( offsetVal )->copyLevelFrom( &temp ); 1411 } 1412 offsetVal++; 1413 } 1414 #else 1312 1415 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1313 1416 { … … 1321 1424 } 1322 1425 } 1323 1426 #endif 1427 1428 #if !H_MV_HLS10_ADD_LAYERSETS 1324 1429 if ( pcVPS->getNumIndependentLayers() > 1 ) 1325 1430 { … … 1333 1438 } 1334 1439 } 1440 #endif // H_MV_HLS10_GEN 1441 1335 1442 if (pcVPS->getNumLayerSets() > 1) 1336 1443 { … … 1345 1452 pcVPS->setLayerSetIdxForOlsMinus1(0, -1); 1346 1453 1454 #if H_MV_HLS10_NESSECARY_LAYER 1455 pcVPS->deriveNecessaryLayerFlags( 0 ); 1456 #endif 1347 1457 pcVPS->deriveTargetLayerIdList( 0 ); 1348 1458 … … 1368 1478 } 1369 1479 } 1480 #if H_MV_HLS10_NESSECARY_LAYER 1481 pcVPS->deriveNecessaryLayerFlags( i ); 1482 #endif 1370 1483 pcVPS->deriveTargetLayerIdList( i ); 1371 1484 1485 #if H_MV_HLS10_PTL 1486 for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ ) 1487 { 1488 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() > 0 ) 1489 { 1490 READ_CODE( pcVPS->getProfileTierLevelIdxLen(), uiCode,"profile_tier_level_idx[ i ][ j ]" ); pcVPS->setProfileTierLevelIdx( i, j, uiCode ); 1491 } 1492 } 1493 #else 1372 1494 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1373 { 1495 { 1374 1496 READ_CODE( pcVPS->getProfileLevelTierIdxLen(), uiCode,"profile_level_tier_idx[ i ]" ); pcVPS->setProfileLevelTierIdx( i , uiCode ); 1375 1497 } 1498 #endif 1499 1376 1500 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1377 1501 { … … 1422 1546 } 1423 1547 1548 #if !H_MV_HLS10_GEN_FIX 1424 1549 READ_FLAG( uiCode, "vps_reserved_zero_flag" ); 1550 #endif 1425 1551 parseDpbSize( pcVPS ); 1426 1552 … … 1484 1610 if ( pcRepFormat->getChromaAndBitDepthVpsPresentFlag() ) 1485 1611 { 1486 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode );1487 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 )1488 {1489 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 );1490 }1491 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode );1492 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode );1612 READ_CODE( 2, uiCode, "chroma_format_vps_idc" ); pcRepFormat->setChromaFormatVpsIdc ( uiCode ); 1613 if ( pcRepFormat->getChromaFormatVpsIdc() == 3 ) 1614 { 1615 READ_FLAG( uiCode, "separate_colour_plane_vps_flag" ); pcRepFormat->setSeparateColourPlaneVpsFlag( uiCode == 1 ); 1616 } 1617 READ_CODE( 4, uiCode, "bit_depth_vps_luma_minus8" ); pcRepFormat->setBitDepthVpsLumaMinus8 ( uiCode ); 1618 READ_CODE( 4, uiCode, "bit_depth_vps_chroma_minus8" ); pcRepFormat->setBitDepthVpsChromaMinus8 ( uiCode ); 1493 1619 } 1494 1620 else … … 1496 1622 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, false ); 1497 1623 } 1624 #if H_MV_HLS10_GEN_VSP_CONF_WIN 1625 READ_FLAG( uiCode, "conformance_window_vps_flag" ); pcRepFormat->setConformanceWindowVpsFlag( uiCode == 1 ); 1626 if ( pcRepFormat->getConformanceWindowVpsFlag() ) 1627 { 1628 READ_UVLC( uiCode, "conf_win_vps_left_offset" ); pcRepFormat->setConfWinVpsLeftOffset( uiCode ); 1629 READ_UVLC( uiCode, "conf_win_vps_right_offset" ); pcRepFormat->setConfWinVpsRightOffset( uiCode ); 1630 READ_UVLC( uiCode, "conf_win_vps_top_offset" ); pcRepFormat->setConfWinVpsTopOffset( uiCode ); 1631 READ_UVLC( uiCode, "conf_win_vps_bottom_offset" ); pcRepFormat->setConfWinVpsBottomOffset( uiCode ); 1632 } 1633 #endif 1498 1634 } 1499 1635 … … 1521 1657 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1522 1658 { 1659 #if H_MV_HLS10_VPS_VUI 1660 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1661 #else 1523 1662 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1663 #endif 1524 1664 { 1525 1665 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1554 1694 else 1555 1695 { 1696 #if H_MV_HLS10_VPS_VUI 1697 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() - pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1 ); 1698 #else 1556 1699 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1700 #endif 1557 1701 } 1558 1702 … … 1567 1711 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1568 1712 { 1713 #if H_MV_HLS10_VPS_VUI 1714 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1715 #else 1569 1716 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1717 #endif 1570 1718 { 1571 1719 READ_CODE( 4, uiCode, "vps_video_signal_info_idx" ); pcVPSVUI->setVpsVideoSignalInfoIdx( i, uiCode ); … … 1594 1742 { 1595 1743 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) 1596 { 1744 { 1745 #if H_MV_HLS10_REF_PRED_LAYERS 1746 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdDirectRefLayer(pcVPS->getLayerIdInNuh( i ) , j )); 1747 #else 1597 1748 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j )); 1749 #endif 1598 1750 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1599 1751 { … … 1613 1765 } 1614 1766 } 1767 #if H_MV_HLS10_VPS_VUI 1768 READ_FLAG( uiCode, "single_layer_for_non_irap_flag" ); pcVPSVUI->setSingleLayerForNonIrapFlag( uiCode == 1 ); 1769 READ_FLAG( uiCode, "higher_layer_irap_skip_flag" ); pcVPSVUI->setHigherLayerIrapSkipFlag( uiCode == 1 ); 1770 #else 1615 1771 READ_CODE( 3, uiCode, "vps_vui_reserved_zero_3bits" ); 1772 #endif 1616 1773 READ_FLAG( uiCode, "ilp_restricted_ref_layers_flag" ); pcVPSVUI->setIlpRestrictedRefLayersFlag( uiCode == 1 ); 1617 1774 … … 1622 1779 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1623 1780 { 1781 #if H_MV_HLS10_REF_PRED_LAYERS 1782 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdDirectRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1783 #else 1624 1784 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1785 #endif 1625 1786 { 1626 1787 READ_UVLC( uiCode, "min_spatial_segment_offset_plus1" ); pcVPSVUI->setMinSpatialSegmentOffsetPlus1( i, j, uiCode ); … … 1661 1822 1662 1823 TComVpsVuiBspHrdParameters* vpsVuiBspHrdP = pcVPSVUI->getVpsVuiBspHrdParameters(); 1663 1824 #if H_MV_HLS10_VPS_VUI_BSP 1825 assert( vpsVuiBspHrdP == NULL ); 1826 vpsVuiBspHrdP = new TComVpsVuiBspHrdParameters; 1827 pcVPSVUI->setVpsVuiBspHrdParameters( vpsVuiBspHrdP ); 1828 #else 1664 1829 assert ( vpsVuiBspHrdP ); 1665 1830 #endif 1666 1831 UInt uiCode; 1832 #if H_MV_HLS10_VPS_VUI_BSP 1833 READ_UVLC( uiCode, "vps_num_add_hrd_params" ); vpsVuiBspHrdP->setVpsNumAddHrdParams( uiCode ); 1834 vpsVuiBspHrdP->createAfterVpsNumAddHrdParams( pcVPS ); 1835 for( Int i = pcVPS->getNumHrdParameters(); i < pcVPS->getNumHrdParameters() + vpsVuiBspHrdP->getVpsNumAddHrdParams(); i++ ) 1836 { 1837 if( i > 0 ) 1838 { 1839 READ_FLAG( uiCode, "cprms_add_present_flag" ); vpsVuiBspHrdP->setCprmsAddPresentFlag( i, uiCode == 1 ); 1840 } 1841 else 1842 { 1843 vpsVuiBspHrdP->setCprmsAddPresentFlag( i, true ); 1844 } 1845 1846 READ_UVLC( uiCode, "num_sub_layer_hrd_minus1" ); vpsVuiBspHrdP->setNumSubLayerHrdMinus1( i, uiCode ); 1847 TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i ); 1848 parseHrdParameters( hrdParameters, vpsVuiBspHrdP->getCprmsAddPresentFlag( i ), vpsVuiBspHrdP->getNumSubLayerHrdMinus1( i ) ); 1849 } 1850 1851 vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( 0, 0, 0); 1852 vpsVuiBspHrdP->createAfterNumPartitionsInSchemeMinus1( 0, 0 ); 1853 1854 for( Int h = 0; h < pcVPS->getNumOutputLayerSets(); h++ ) 1855 { 1856 if ( h == 0) 1857 { 1858 vpsVuiBspHrdP->setNumSignalledPartitioningSchemes( h, 0 ); 1859 } 1860 else 1861 { 1862 READ_UVLC( uiCode, "num_signalled_partitioning_schemes" ); vpsVuiBspHrdP->setNumSignalledPartitioningSchemes( h, uiCode ); 1863 } 1864 vpsVuiBspHrdP->createAfterNumSignalledPartitioningSchemes( h ); 1865 1866 for( Int j = 0; j < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; j++ ) 1867 { 1868 if ( j == 0 && h == 0 ) 1869 { 1870 vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, uiCode ); 1871 } 1872 else if( j == 0 ) 1873 { 1874 vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, pcVPS->getNumLayersInIdList( h ) - 1 ); 1875 } 1876 else 1877 { 1878 READ_UVLC( uiCode, "num_partitions_in_scheme_minus1" ); vpsVuiBspHrdP->setNumPartitionsInSchemeMinus1( h, j, uiCode ); 1879 } 1880 vpsVuiBspHrdP->createAfterNumPartitionsInSchemeMinus1( h, j ); 1881 1882 for( Int k = 0; k <= vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 1883 { 1884 for( Int r = 0; r < pcVPS->getNumLayersInIdList(pcVPS->olsIdxToLsIdx( h ) ) ; r++ ) 1885 { 1886 if( h == 0 && j == 0 && k == 0 && r == 0 ) 1887 { 1888 vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, true ); 1889 } 1890 else if ( h > 0 && j == 0 ) 1891 { 1892 vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, (k == r) ); 1893 } 1894 else 1895 { 1896 READ_FLAG( uiCode, "layer_included_in_partition_flag" ); vpsVuiBspHrdP->setLayerIncludedInPartitionFlag( h, j, k, r, uiCode == 1 ); 1897 } 1898 } 1899 } 1900 } 1901 if ( h > 0 ) 1902 { 1903 for( Int i = 0; i < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; i++ ) 1904 { 1905 for( Int t = 0; t <= pcVPS->getMaxSubLayersInLayerSetMinus1( pcVPS->olsIdxToLsIdx( i ) ); t++ ) 1906 { 1907 READ_UVLC( uiCode, "num_bsp_schedules_minus1" ); vpsVuiBspHrdP->setNumBspSchedulesMinus1( h, i, t, uiCode ); 1908 vpsVuiBspHrdP->createAfterNumBspSchedulesMinus1( h, i, t ); 1909 for( Int j = 0; j <= vpsVuiBspHrdP->getNumBspSchedulesMinus1( h, i, t ); j++ ) 1910 { 1911 for( Int k = 0; k <= vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 1912 { 1913 READ_CODE( vpsVuiBspHrdP->getBspHrdIdxLen( pcVPS ), uiCode, "bsp_hrd_idx" ); vpsVuiBspHrdP->setBspHrdIdx( h, i, t, j, k, uiCode ); 1914 READ_UVLC( uiCode, "bsp_sched_idx" ); vpsVuiBspHrdP->setBspSchedIdx( h, i, t, j, k, uiCode ); 1915 } 1916 } 1917 } 1918 } 1919 } 1920 } 1921 #else 1667 1922 READ_UVLC( uiCode, "vps_num_bsp_hrd_parameters_minus1" ); vpsVuiBspHrdP->setVpsNumBspHrdParametersMinus1( uiCode ); 1668 1923 for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ ) … … 1701 1956 } 1702 1957 } 1703 } 1958 #endif 1959 } 1704 1960 1705 1961 Void TDecCavlc::parseVideoSignalInfo( TComVideoSignalInfo* pcVideoSignalInfo ) … … 1733 1989 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1734 1990 { 1991 #if H_MV_HLS10_DBP_SIZE 1992 if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) )) 1993 { 1994 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 1995 } 1996 else 1997 { 1998 if ( vps->getNecessaryLayerFlag( i, k ) && ( j == 0 ) && ( k == 0 )) 1999 { 2000 dpbSize->setMaxVpsDecPicBufferingMinus1(i ,k, j, 0 ); 2001 } 2002 } 2003 #else 1735 2004 READ_UVLC( uiCode, "max_vps_dec_pic_buffering_minus1" ); dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, uiCode ); 2005 #endif 1736 2006 } 1737 2007 READ_UVLC( uiCode, "max_vps_num_reorder_pics" ); dpbSize->setMaxVpsNumReorderPics( i, j, uiCode ); … … 1744 2014 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1745 2015 { 1746 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 2016 #if H_MV_HLS10_DBP_SIZE 2017 if ( vps->getNecessaryLayerFlag(i, k ) ) 2018 { 2019 #endif 2020 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 2021 #if H_MV_HLS10_DBP_SIZE 2022 } 2023 #endif 1747 2024 } 1748 2025 dpbSize->setMaxVpsNumReorderPics ( i, j, dpbSize->getMaxVpsNumReorderPics ( i, j - 1 ) ); … … 1940 2217 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 1941 2218 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2219 #if !H_MV_HLS10_ADD_LAYERSETS 1942 2220 vps->inferDbpSizeLayerSetZero( sps, false ); 2221 #endif 1943 2222 1944 2223 if ( sps->getVuiParametersPresentFlag() ) … … 2155 2434 rps->checkMaxNumPics( 2156 2435 vps->getVpsExtensionFlag(), 2436 #if H_MV_HLS10_MAXNUMPICS 2437 INT_MAX, // To be replaced by MaxDbpSize 2438 #else 2157 2439 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2440 #endif 2158 2441 rpcSlice->getLayerId(), 2159 2442 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 2268 2551 rps->checkMaxNumPics( 2269 2552 vps->getVpsExtensionFlag(), 2553 #if H_MV_HLS10_MAXNUMPICS 2554 INT_MAX, // To be replaced by MaxDbpsize 2555 #else 2270 2556 vps->getMaxNumPics( rpcSlice->getLayerId() ), 2557 #endif 2271 2558 rpcSlice->getLayerId(), 2272 2559 sps->getMaxDecPicBuffering( sps->getSpsMaxSubLayersMinus1() ) - 1 ); … … 2870 3157 ptl->setFrameOnlyConstraintFlag(uiCode ? true : false); 2871 3158 3159 #if H_MV_HLS10_PTL 3160 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) || 3161 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) || 3162 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) || 3163 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) ) 3164 { 3165 READ_FLAG( uiCode, "max_12bit_constraint_flag" ); ptl->setMax12bitConstraintFlag( uiCode == 1 ); 3166 READ_FLAG( uiCode, "max_10bit_constraint_flag" ); ptl->setMax10bitConstraintFlag( uiCode == 1 ); 3167 READ_FLAG( uiCode, "max_8bit_constraint_flag" ); ptl->setMax8bitConstraintFlag( uiCode == 1 ); 3168 READ_FLAG( uiCode, "max_422chroma_constraint_flag" ); ptl->setMax422chromaConstraintFlag( uiCode == 1 ); 3169 READ_FLAG( uiCode, "max_420chroma_constraint_flag" ); ptl->setMax420chromaConstraintFlag( uiCode == 1 ); 3170 READ_FLAG( uiCode, "max_monochrome_constraint_flag" ); ptl->setMaxMonochromeConstraintFlag( uiCode == 1 ); 3171 READ_FLAG( uiCode, "intra_constraint_flag" ); ptl->setIntraConstraintFlag( uiCode == 1 ); 3172 READ_FLAG( uiCode, "one_picture_only_constraint_flag" ); ptl->setOnePictureOnlyConstraintFlag( uiCode == 1 ); 3173 READ_FLAG( uiCode, "lower_bit_rate_constraint_flag" ); ptl->setLowerBitRateConstraintFlag( uiCode == 1 ); 3174 READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[0..15]"); 3175 READ_CODE(16, uiCode, "XXX_reserved_zero_34bits[16..31]"); 3176 READ_CODE(2 , uiCode, "XXX_reserved_zero_34bits[32..33]"); 3177 } 3178 else 3179 { 3180 READ_CODE(16, uiCode, "XXX_reserved_zero_43bits[0..15]"); 3181 READ_CODE(16, uiCode, "XXX_reserved_zero_43bits[16..31]"); 3182 READ_CODE(11, uiCode, "XXX_reserved_zero_43bits[32..42]"); 3183 } 3184 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) || 3185 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) || 3186 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) || 3187 ptl->getProfileCompatibilityFlag( 5 ) ) 3188 { 3189 READ_FLAG( uiCode, "inbld_flag" ); ptl->setInbldFlag( uiCode == 1 ); 3190 } 3191 else 3192 { 3193 READ_FLAG(uiCode, "reserved_zero_bit"); 3194 } 3195 #else 2872 3196 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[0..15]"); 2873 3197 READ_CODE(16, uiCode, "XXX_reserved_zero_44bits[16..31]"); 2874 3198 READ_CODE(12, uiCode, "XXX_reserved_zero_44bits[32..43]"); 3199 #endif 2875 3200 } 2876 3201 -
branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecCAVLC.h
r1039 r1054 97 97 #endif 98 98 99 #if H_MV_HLS10_PPS 100 #if H_MV 101 Void parsePPSMultilayerExtension( TComPPS* pcPPS ) 102 { 103 UInt uiCode = 0; 104 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 105 READ_FLAG( uiCode, "pps_infer_scaling_list_flag" ); pcPPS->setPpsInferScalingListFlag( uiCode == 1 ); 106 READ_CODE( 6, uiCode, "pps_scaling_list_ref_layer_id" ); pcPPS->setPpsScalingListRefLayerId( uiCode ); 107 READ_UVLC( uiCode, "num_ref_loc_offsets" ); assert( uiCode == 0 ); 108 } 109 #endif 110 #endif 111 112 99 113 #if H_3D 100 114 Void parsePPS ( TComPPS* pcPPS, TComVPS* pcVPS ); -
branches/HTM-12.0-dev1/source/Lib/TLibDecoder/TDecTop.cpp
r1048 r1054 669 669 #if H_MV 670 670 sps->inferSpsMaxDecPicBufferingMinus1( vps, m_targetOptLayerSetIdx, getLayerId(), false ); 671 #if !H_MV_HLS10_ADD_LAYERSETS 671 672 vps->inferDbpSizeLayerSetZero( sps, false ); 673 #endif 672 674 // When the value of vps_num_rep_formats_minus1 in the active VPS is equal to 0 673 675 if ( vps->getVpsNumRepFormatsMinus1() == 0 ) … … 677 679 } 678 680 sps->checkRpsMaxNumPics( vps, getLayerId() ); 681 #if H_MV_HLS10_MULTILAYERSPS 682 683 if( sps->getLayerId() != 0 ) 684 { 685 sps->inferSpsMaxSubLayersMinus1( true, vps ); 686 } 687 688 #if H_MV_HLS10_MULTILAYERSPS 689 // It is a requirement of bitstream conformance that, when the SPS is referred to by 690 // any current picture that belongs to an independent non-base layer, the value of 691 // MultiLayerExtSpsFlag derived from the SPS shall be equal to 0. 692 693 if ( m_layerId > 0 && vps->getNumRefLayers( m_layerId ) == 0 ) 694 { 695 assert( sps->getMultiLayerExtSpsFlag() == 0 ); 696 } 697 #endif 698 699 if( sps->getMultiLayerExtSpsFlag() ) 700 { 701 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 702 } 703 #else 679 704 if( m_layerId > 0 ) 680 705 { 681 706 sps->setTemporalIdNestingFlag( (sps->getMaxTLayers() > 1) ? vps->getTemporalNestingFlag() : true ); 682 707 } 708 #endif 683 709 #endif 684 710 … … 710 736 sps->inferRepFormat ( vps , m_layerId ); 711 737 sps->inferScalingList( m_parameterSetManagerDecoder.getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 738 712 739 #endif 713 740 pps->setSPS(sps); … … 1658 1685 for (Int i = 0; i < vps->getNumDirectRefLayers( getLayerId() ); i++ ) 1659 1686 { 1687 #if H_MV_HLS10_REF_PRED_LAYERS 1688 Int refLayerId = vps->getIdDirectRefLayer( m_layerId, i ); 1689 #else 1660 1690 Int refLayerId = vps->getRefLayerId( m_layerId, i ); 1691 #endif 1661 1692 allRefLayersInitilizedFlag = allRefLayersInitilizedFlag && m_layerInitilizedFlag[ refLayerId ]; 1662 1693 } -
branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncCavlc.cpp
r1048 r1054 49 49 { 50 50 #if H_MV_ENC_DEC_TRAC 51 #if H_MV_HLS10_GEN_FIX 52 fprintf( g_hTrace, "=========== Sequence Parameter Set LayerId: %d ===========\n", pSPS->getLayerId() ); 53 #else 51 54 fprintf( g_hTrace, "=========== Sequence Parameter Set ===========\n" ); 55 #endif 52 56 #else 53 57 fprintf( g_hTrace, "=========== Sequence Parameter Set ID: %d ===========\n", pSPS->getSPSId() ); … … 58 62 { 59 63 #if H_MV_ENC_DEC_TRAC 64 #if H_MV_HLS10_GEN_FIX 65 fprintf( g_hTrace, "=========== Picture Parameter Set LayerId: %d ===========\n", pPPS->getLayerId() ); 66 #else 60 67 fprintf( g_hTrace, "=========== Picture Parameter Set ===========\n" ); 68 #endif 61 69 #else 62 70 fprintf( g_hTrace, "=========== Picture Parameter Set ID: %d ===========\n", pPPS->getPPSId() ); … … 241 249 } 242 250 } 251 #if !H_MV_HLS10_PPS 243 252 #if H_MV 244 253 if ( pcPPS->getLayerId() > 0 ) … … 254 263 { 255 264 #endif 265 #endif 256 266 WRITE_FLAG( pcPPS->getScalingListPresentFlag() ? 1 : 0, "pps_scaling_list_data_present_flag" ); 257 267 if( pcPPS->getScalingListPresentFlag() ) … … 259 269 codeScalingList( m_pcSlice->getScalingList() ); 260 270 } 271 #if !H_MV_HLS10_PPS 261 272 #if H_MV 262 273 } 274 #endif 263 275 #endif 264 276 #if PPS_FIX_DEPTH … … 301 313 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 302 314 { 315 #if H_MV_HLS10_PPS 316 codePPSMultilayerExtension( pcPPS ); 317 #else 303 318 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 304 319 WRITE_FLAG( 0, "pps_extension_reserved_zero_flag" ); 320 #endif 305 321 } 306 322 … … 675 691 #endif 676 692 WRITE_CODE( pcSPS->getMaxTLayers() - 1, 3, "sps_max_sub_layers_minus1" ); 693 #if H_MV_HLS10_MULTILAYERSPS 694 #if H_MV 695 } 696 else 697 { 698 WRITE_CODE( pcSPS->getSpsExtOrMaxSubLayersMinus1( ), 3, "sps_ext_or_max_sub_layers_minus1" ); 699 } 700 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 701 { 702 #endif 703 #endif 704 677 705 WRITE_FLAG( pcSPS->getTemporalIdNestingFlag() ? 1 : 0, "sps_temporal_id_nesting_flag" ); 678 706 codePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); … … 682 710 WRITE_UVLC( pcSPS->getSPSId (), "sps_seq_parameter_set_id" ); 683 711 #if H_MV 712 #if H_MV_HLS10_MULTILAYERSPS 713 if ( pcSPS->getMultiLayerExtSpsFlag() ) 714 #else 684 715 if ( pcSPS->getLayerId() > 0 ) 716 #endif 685 717 { 686 718 WRITE_FLAG( pcSPS->getUpdateRepFormatFlag( ) ? 1 : 0 , "update_rep_format_flag" ); … … 703 735 WRITE_UVLC( pcSPS->getPicWidthInLumaSamples (), "pic_width_in_luma_samples" ); 704 736 WRITE_UVLC( pcSPS->getPicHeightInLumaSamples(), "pic_height_in_luma_samples" ); 737 #if !H_MV_HLS10_MULTILAYERSPS 705 738 #if H_MV 706 739 } 740 #endif 707 741 #endif 708 742 Window conf = pcSPS->getConformanceWindow(); … … 716 750 WRITE_UVLC( conf.getWindowBottomOffset() / TComSPS::getWinUnitY(pcSPS->getChromaFormatIdc() ), "conf_win_bottom_offset" ); 717 751 } 752 #if H_MV_HLS10_MULTILAYERSPS 718 753 #if H_MV 754 } 755 #endif 756 #endif 757 758 #if H_MV 759 #if H_MV_HLS10_MULTILAYERSPS 760 if ( !pcSPS->getMultiLayerExtSpsFlag() ) 761 #else 719 762 if ( pcSPS->getLayerId() == 0 ) 763 #endif 720 764 { 721 765 #endif … … 727 771 WRITE_UVLC( pcSPS->getBitsForPOC()-4, "log2_max_pic_order_cnt_lsb_minus4" ); 728 772 #if H_MV 773 #if H_MV_HLS10_MULTILAYERSPS 774 if ( !pcSPS->getMultiLayerExtSpsFlag()) 775 #else 729 776 if ( pcSPS->getLayerId() == 0 ) 777 #endif 730 778 { 731 779 #endif … … 758 806 { 759 807 #if H_MV 808 #if H_MV_HLS10_MULTILAYERSPS 809 if ( pcSPS->getMultiLayerExtSpsFlag() ) 810 #else 760 811 if ( pcSPS->getLayerId() > 0 ) 812 #endif 761 813 { 762 814 WRITE_FLAG( pcSPS->getSpsInferScalingListFlag( ) ? 1 : 0 , "sps_infer_scaling_list_flag" ); … … 865 917 { 866 918 WRITE_FLAG( pcSPS->getInterViewMvVertConstraintFlag() ? 1 : 0, "inter_view_mv_vert_constraint_flag" ); 867 919 #if !H_MV_HLS10_PPS 868 920 WRITE_UVLC( pcSPS->getNumScaledRefLayerOffsets( ), "num_scaled_ref_layer_offsets" ); 869 921 … … 880 932 WRITE_FLAG( 0, "sps_multilayer_ext_reserved_zero_flag[ j ]" ); 881 933 } 934 #endif 882 935 } 883 936 #endif … … 904 957 #if H_MV 905 958 WRITE_FLAG( pcVPS->getVpsBaseLayerInternalFlag( ) ? 1 : 0 , "vps_base_layer_internal_flag" ); 959 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 960 WRITE_FLAG( pcVPS->getVpsBaseLayerAvailableFlag( ) ? 1 : 0 , "vps_base_layer_available_flag" ); 961 #else // H_MV_HLS10_GEN 906 962 WRITE_FLAG( 1 , "vps_reserved_one_bit" ); 963 #endif // H_MV_HLS10_GEN 907 964 #else 908 965 WRITE_CODE( 3, 2, "vps_reserved_three_2bits" ); … … 930 987 } 931 988 } 932 933 989 assert( pcVPS->getNumHrdParameters() <= MAX_VPS_NUM_HRD_PARAMETERS ); 934 990 #if H_MV 935 991 assert( pcVPS->getVpsMaxLayerId() < MAX_VPS_NUH_LAYER_ID_PLUS1 ); 936 992 WRITE_CODE( pcVPS->getVpsMaxLayerId(), 6, "vps_max_layer_id" ); 937 993 #if H_MV_HLS10_GEN_FIX 994 WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(), "vps_num_layer_sets_minus1" ); 995 #else 938 996 WRITE_UVLC( pcVPS->getVpsNumLayerSetsMinus1(), "vps_max_num_layer_sets_minus1" ); 997 #endif 939 998 for( UInt opsIdx = 1; opsIdx <= pcVPS->getVpsNumLayerSetsMinus1(); opsIdx ++ ) 940 999 { … … 1012 1071 #if H_MV 1013 1072 Void TEncCavlc::codeVPSExtension( TComVPS *pcVPS ) 1014 { 1073 { 1074 #if H_MV_HLS10_PTL 1075 if( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) 1076 { 1077 codePTL( pcVPS->getPTL( 1 ),0, pcVPS->getMaxSubLayersMinus1() ); 1078 } 1079 #endif 1080 1015 1081 WRITE_FLAG( pcVPS->getSplittingFlag() ? 1 : 0, "splitting_flag" ); 1016 1082 … … 1084 1150 } 1085 1151 1152 #if H_MV_HLS10_ADD_LAYERSETS 1153 if ( pcVPS->getNumIndependentLayers() > 1 ) 1154 { 1155 WRITE_UVLC( pcVPS->getNumAddLayerSets( ), "num_add_layer_sets" ); 1156 } 1157 for (Int i = 0; i < pcVPS->getNumAddLayerSets(); i++) 1158 { 1159 for (Int j = 1; j < pcVPS->getNumIndependentLayers(); j++) 1160 { 1161 WRITE_CODE( pcVPS->getHighestLayerIdxPlus1( i, j ), pcVPS->getHighestLayerIdxPlus1Len( j ) , "highest_layer_idx_plus1" ); 1162 } 1163 1164 } 1165 #endif 1166 1167 1086 1168 WRITE_FLAG( pcVPS->getVpsSubLayersMaxMinus1PresentFlag( ) ? 1 : 0 , "vps_sub_layers_max_minus1_present_flag" ); 1087 1169 if ( pcVPS->getVpsSubLayersMaxMinus1PresentFlag() ) … … 1119 1201 WRITE_UVLC( pcVPS->getVpsNumProfileTierLevelMinus1( ), "vps_num_profile_tier_level_minus1" ); 1120 1202 1203 #if H_MV_HLS10_PTL 1204 Int offsetVal = ( pcVPS->getMaxLayersMinus1() > 0 && pcVPS->getVpsBaseLayerInternalFlag() ) ? 2 : 1; 1205 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 2 : 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1206 { 1207 WRITE_FLAG( pcVPS->getVpsProfilePresentFlag( i ) ? 1 : 0, "vps_profile_present_flag[i]" ); 1208 codePTL( pcVPS->getPTL( offsetVal ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1209 offsetVal++; 1210 } 1211 #else 1121 1212 for( Int i = 1; i <= pcVPS->getVpsNumProfileTierLevelMinus1(); i++ ) 1122 1213 { … … 1124 1215 codePTL( pcVPS->getPTL( i ), pcVPS->getVpsProfilePresentFlag( i ), pcVPS->getMaxTLayers() - 1 ); 1125 1216 } 1126 1217 #endif 1218 1219 #if !H_MV_HLS10_ADD_LAYERSETS 1127 1220 if ( pcVPS->getNumIndependentLayers() > 1 ) 1128 1221 { … … 1136 1229 } 1137 1230 } 1231 #endif // H_MV_HLS10_GEN 1232 1138 1233 if (pcVPS->getNumLayerSets() > 1) 1139 1234 { … … 1169 1264 } 1170 1265 } 1171 1172 1266 1267 #if H_MV_HLS10_PTL 1268 for ( Int j = 0; j < pcVPS->getNumLayersInIdList( pcVPS->olsIdxToLsIdx(i)); j++ ) 1269 { 1270 if (pcVPS->getNecessaryLayerFlag( i, j ) && pcVPS->getVpsNumProfileTierLevelMinus1() > 0 ) 1271 { 1272 WRITE_CODE( pcVPS->getProfileTierLevelIdx( i, j ), pcVPS->getProfileTierLevelIdxLen() ,"profile_tier_level_idx[ i ][ j ]" ); 1273 } 1274 } 1275 #else 1173 1276 if ( pcVPS->getProfileLevelTierIdxLen() > 0 ) 1174 1277 { 1175 1278 WRITE_CODE( pcVPS->getProfileLevelTierIdx( i ), pcVPS->getProfileLevelTierIdxLen() ,"profile_level_tier_idx[ i ]" ); 1176 1279 } 1280 #endif 1177 1281 if( pcVPS->getNumOutputLayersInOutputLayerSet( i ) == 1 && pcVPS->getNumDirectRefLayers( pcVPS->getOlsHighestOutputLayerId( i ) ) > 0 ) 1178 1282 { … … 1224 1328 } 1225 1329 1330 #if !H_MV_HLS10_GEN_FIX 1226 1331 WRITE_FLAG( 0, "vps_reserved_zero_flag" ); 1332 #endif 1227 1333 codeDpbSize( pcVPS ); 1228 1334 … … 1301 1407 for( Int k = 0; k < vps->getNumLayersInIdList( currLsIdx ); k++ ) 1302 1408 { 1409 #if H_MV_HLS10_DBP_SIZE 1410 if ( vps->getNecessaryLayerFlag( i, k ) && ( vps->getVpsBaseLayerInternalFlag() || ( vps->getLayerSetLayerIdList(vps->olsIdxToLsIdx(i),k) != 0 ) )) 1411 { 1412 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); 1413 } 1414 else 1415 { 1416 if ( vps->getNecessaryLayerFlag( i, k ) && ( j == 0 ) && ( k == 0 ) ) 1417 { 1418 assert( dpbSize->getMaxVpsDecPicBufferingMinus1(i ,k, j ) == 0 ); 1419 } 1420 } 1421 #else 1303 1422 WRITE_UVLC( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ), "max_vps_dec_pic_buffering_minus1" ); 1423 #endif 1304 1424 } 1305 1425 WRITE_UVLC( dpbSize->getMaxVpsNumReorderPics( i, j ), "max_vps_num_reorder_pics" ); … … 1312 1432 for( Int k = 0; k < vps->getNumLayersInIdList( vps->olsIdxToLsIdx( i ) ); k++ ) 1313 1433 { 1314 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 1434 #if H_MV_HLS10_DBP_SIZE 1435 if ( vps->getNecessaryLayerFlag(i, k ) ) 1436 { 1437 #endif 1438 assert( dpbSize->getMaxVpsDecPicBufferingMinus1( i, k, j ) == dpbSize->getMaxVpsDecPicBufferingMinus1( i,k, j - 1 ) ); 1439 #if H_MV_HLS10_DBP_SIZE 1440 } 1441 #endif 1315 1442 } 1316 1443 assert( dpbSize->getMaxVpsNumReorderPics ( i, j ) == dpbSize->getMaxVpsNumReorderPics ( i, j - 1 ) ); … … 1347 1474 pcRepFormat->inferChromaAndBitDepth(pcPrevRepFormat, true ); 1348 1475 } 1476 #if H_MV_HLS10_GEN_VSP_CONF_WIN 1477 WRITE_FLAG( pcRepFormat->getConformanceWindowVpsFlag( ) ? 1 : 0 , "conformance_window_vps_flag" ); 1478 if ( pcRepFormat->getConformanceWindowVpsFlag() ) 1479 { 1480 WRITE_UVLC( pcRepFormat->getConfWinVpsLeftOffset( ), "conf_win_vps_left_offset" ); 1481 WRITE_UVLC( pcRepFormat->getConfWinVpsRightOffset( ), "conf_win_vps_right_offset" ); 1482 WRITE_UVLC( pcRepFormat->getConfWinVpsTopOffset( ), "conf_win_vps_top_offset" ); 1483 WRITE_UVLC( pcRepFormat->getConfWinVpsBottomOffset( ), "conf_win_vps_bottom_offset" ); 1484 } 1485 #endif 1349 1486 } 1350 1487 … … 1371 1508 if( pcVPSVUI->getBitRatePresentVpsFlag( ) || pcVPSVUI->getPicRatePresentVpsFlag( ) ) 1372 1509 { 1510 #if H_MV_HLS10_VPS_VUI 1511 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i < pcVPS->getNumLayerSets(); i++ ) 1512 #else 1373 1513 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getVpsNumLayerSetsMinus1(); i++ ) 1514 #endif 1374 1515 { 1375 1516 for( Int j = 0; j <= pcVPS->getMaxSubLayersInLayerSetMinus1( i ); j++ ) … … 1404 1545 else 1405 1546 { 1547 #if H_MV_HLS10_VPS_VUI 1548 assert( pcVPSVUI->getVpsNumVideoSignalInfoMinus1() == pcVPS->getMaxLayersMinus1() - ( pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1) ); 1549 #else 1406 1550 pcVPSVUI->setVpsNumVideoSignalInfoMinus1( pcVPS->getMaxLayersMinus1() ); 1551 #endif 1407 1552 } 1408 1553 … … 1417 1562 if( pcVPSVUI->getVideoSignalInfoIdxPresentFlag() && pcVPSVUI->getVpsNumVideoSignalInfoMinus1() > 0 ) 1418 1563 { 1564 #if H_MV_HLS10_VPS_VUI 1565 for( Int i = pcVPS->getVpsBaseLayerInternalFlag() ? 0 : 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1566 #else 1419 1567 for( Int i = 1; i <= pcVPS->getMaxLayersMinus1(); i++ ) 1568 #endif 1420 1569 { 1421 1570 WRITE_CODE( pcVPSVUI->getVpsVideoSignalInfoIdx( i ), 4, "vps_video_signal_info_idx" ); … … 1445 1594 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ) ; j++ ) 1446 1595 { 1596 #if H_MV_HLS10_REF_PRED_LAYERS 1597 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getIdRefLayer(pcVPS->getLayerIdInNuh( i ) , j )); 1598 #else 1447 1599 Int layerIdx = pcVPS->getLayerIdInVps(pcVPS->getRefLayerId(pcVPS->getLayerIdInNuh( i ) , j )); 1600 #endif 1448 1601 if( pcVPSVUI->getTilesInUseFlag( i ) && pcVPSVUI->getTilesInUseFlag( layerIdx ) ) 1449 1602 { … … 1463 1616 } 1464 1617 } 1618 #if H_MV_HLS10_VPS_VUI 1619 WRITE_FLAG( pcVPSVUI->getSingleLayerForNonIrapFlag( ) ? 1 : 0 , "single_layer_for_non_irap_flag" ); 1620 WRITE_FLAG( pcVPSVUI->getHigherLayerIrapSkipFlag( ) ? 1 : 0 , "higher_layer_irap_skip_flag" ); 1621 #else 1465 1622 WRITE_CODE( 0, 3, "vps_vui_reserved_zero_3bits" ); 1623 #endif 1466 1624 WRITE_FLAG( pcVPSVUI->getIlpRestrictedRefLayersFlag( ) ? 1 : 0 , "ilp_restricted_ref_layers_flag" ); 1467 1625 … … 1472 1630 for( Int j = 0; j < pcVPS->getNumDirectRefLayers( pcVPS->getLayerIdInNuh( i ) ); j++ ) 1473 1631 { 1632 #if H_MV_HLS10_REF_PRED_LAYERS 1633 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getIdRefLayer( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1634 #else 1474 1635 if( pcVPS->getVpsBaseLayerInternalFlag() || pcVPS->getRefLayerId( pcVPS->getLayerIdInNuh( i ), j ) > 0 ) 1636 #endif 1475 1637 { 1476 1638 WRITE_UVLC( pcVPSVUI->getMinSpatialSegmentOffsetPlus1( i, j ), "min_spatial_segment_offset_plus1" ); … … 1514 1676 1515 1677 assert ( vpsVuiBspHrdP ); 1516 1517 1678 1679 #if H_MV_HLS10_VPS_VUI_BSP 1680 WRITE_UVLC( vpsVuiBspHrdP->getVpsNumAddHrdParams( ), "vps_num_add_hrd_params" ); 1681 1682 for( Int i = pcVPS->getNumHrdParameters(); i < pcVPS->getNumHrdParameters() + vpsVuiBspHrdP->getVpsNumAddHrdParams(); i++ ) 1683 { 1684 if( i > 0 ) 1685 { 1686 WRITE_FLAG( vpsVuiBspHrdP->getCprmsAddPresentFlag( i ) ? 1 : 0 , "cprms_add_present_flag" ); 1687 } 1688 WRITE_UVLC( vpsVuiBspHrdP->getNumSubLayerHrdMinus1( i ), "num_sub_layer_hrd_minus1" ); 1689 TComHRD* hrdParameters = vpsVuiBspHrdP->getHrdParametermeters( i ); 1690 codeHrdParameters( hrdParameters, vpsVuiBspHrdP->getCprmsAddPresentFlag( i ), vpsVuiBspHrdP->getNumSubLayerHrdMinus1( i ) ); 1691 } 1692 1693 for( Int h = 1; h < pcVPS->getNumOutputLayerSets(); h++ ) 1694 { 1695 WRITE_UVLC( vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ), "num_signalled_partitioning_schemes" ); 1696 1697 for( Int j = 1; j < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; j++ ) 1698 { 1699 WRITE_UVLC( vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ), "num_partitions_in_scheme_minus1" ); 1700 for( Int k = 0; k <= vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 1701 { 1702 for( Int r = 0; r < pcVPS->getNumLayersInIdList(pcVPS->olsIdxToLsIdx( h ) ) ; r++ ) 1703 { 1704 WRITE_FLAG( vpsVuiBspHrdP->getLayerIncludedInPartitionFlag( h, j, k, r ) ? 1 : 0 , "layer_included_in_partition_flag" ); 1705 } 1706 } 1707 } 1708 for( Int i = 0; i < vpsVuiBspHrdP->getNumSignalledPartitioningSchemes( h ) + 1; i++ ) 1709 { 1710 for( Int t = 0; t <= pcVPS->getMaxSubLayersInLayerSetMinus1( pcVPS->olsIdxToLsIdx( h ) ); t++ ) 1711 { 1712 WRITE_UVLC( vpsVuiBspHrdP->getNumBspSchedulesMinus1( h, i, t ), "num_bsp_schedules_minus1" ); 1713 for( Int j = 0; j <= vpsVuiBspHrdP->getNumBspSchedulesMinus1( h, i, t ); j++ ) 1714 { 1715 for( Int k = 0; k <= vpsVuiBspHrdP->getNumPartitionsInSchemeMinus1( h, j ); k++ ) 1716 { 1717 WRITE_CODE( vpsVuiBspHrdP->getBspHrdIdx( h, i, t, j, k ), vpsVuiBspHrdP->getBspHrdIdxLen( pcVPS ), "bsp_hrd_idx" ); 1718 WRITE_UVLC( vpsVuiBspHrdP->getBspSchedIdx( h, i, t, j, k ), "bsp_sched_idx" ); 1719 } 1720 } 1721 } 1722 } 1723 } 1724 1725 #else // H_MV_HLS10_GEN 1518 1726 WRITE_UVLC( vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ), "vps_num_bsp_hrd_parameters_minus1" ); 1519 1727 for( Int i = 0; i <= vpsVuiBspHrdP->getVpsNumBspHrdParametersMinus1( ); i++ ) … … 1552 1760 } 1553 1761 } 1554 } 1762 } 1763 #endif 1555 1764 } 1556 1557 1765 #endif 1558 1766 … … 2316 2524 WRITE_FLAG(ptl->getFrameOnlyConstraintFlag(), "general_frame_only_constraint_flag"); 2317 2525 2526 #if H_MV_HLS10_PTL 2527 if( ptl->getProfileIdc( ) == 4 || ptl->getProfileCompatibilityFlag( 4 ) || 2528 ptl->getProfileIdc( ) == 5 || ptl->getProfileCompatibilityFlag( 5 ) || 2529 ptl->getProfileIdc( ) == 6 || ptl->getProfileCompatibilityFlag( 6 ) || 2530 ptl->getProfileIdc( ) == 7 || ptl->getProfileCompatibilityFlag( 7 ) ) 2531 { 2532 WRITE_FLAG( ptl->getMax12bitConstraintFlag( ) ? 1 : 0 , "max_12bit_constraint_flag" ); 2533 WRITE_FLAG( ptl->getMax10bitConstraintFlag( ) ? 1 : 0 , "max_10bit_constraint_flag" ); 2534 WRITE_FLAG( ptl->getMax8bitConstraintFlag( ) ? 1 : 0 , "max_8bit_constraint_flag" ); 2535 WRITE_FLAG( ptl->getMax422chromaConstraintFlag( ) ? 1 : 0 , "max_422chroma_constraint_flag" ); 2536 WRITE_FLAG( ptl->getMax420chromaConstraintFlag( ) ? 1 : 0 , "max_420chroma_constraint_flag" ); 2537 WRITE_FLAG( ptl->getMaxMonochromeConstraintFlag( ) ? 1 : 0 , "max_monochrome_constraint_flag" ); 2538 WRITE_FLAG( ptl->getIntraConstraintFlag( ) ? 1 : 0 , "intra_constraint_flag" ); 2539 WRITE_FLAG( ptl->getOnePictureOnlyConstraintFlag( ) ? 1 : 0 , "one_picture_only_constraint_flag" ); 2540 WRITE_FLAG( ptl->getLowerBitRateConstraintFlag( ) ? 1 : 0 , "lower_bit_rate_constraint_flag" ); 2541 WRITE_CODE( 0, 16, "XXX_reserved_zero_34bits[0..15]"); 2542 WRITE_CODE( 0, 16, "XXX_reserved_zero_34bits[16..31]"); 2543 WRITE_CODE( 0, 2 , "XXX_reserved_zero_34bits[32..33]"); 2544 } 2545 else 2546 { 2547 WRITE_CODE( 0, 16, "XXX_reserved_zero_43bits[0..15]"); 2548 WRITE_CODE( 0, 16, "XXX_reserved_zero_43bits[16..31]"); 2549 WRITE_CODE( 0, 11, "XXX_reserved_zero_43bits[32..42]"); 2550 } 2551 if( ( ptl->getProfileIdc() >= 1 && ptl->getProfileIdc() <= 5 ) || 2552 ptl->getProfileCompatibilityFlag( 1 ) || ptl->getProfileCompatibilityFlag( 2 ) || 2553 ptl->getProfileCompatibilityFlag( 3 ) || ptl->getProfileCompatibilityFlag( 4 ) || 2554 ptl->getProfileCompatibilityFlag( 5 ) ) 2555 { 2556 WRITE_FLAG( ptl->getInbldFlag( ) ? 1 : 0 , "inbld_flag" ); 2557 } 2558 else 2559 { 2560 WRITE_FLAG(0, "reserved_zero_bit"); 2561 } 2562 #else 2318 2563 WRITE_CODE(0 , 16, "XXX_reserved_zero_44bits[0..15]"); 2319 2564 WRITE_CODE(0 , 16, "XXX_reserved_zero_44bits[16..31]"); 2320 2565 WRITE_CODE(0 , 12, "XXX_reserved_zero_44bits[32..43]"); 2321 } 2566 #endif 2567 } 2322 2568 2323 2569 /** -
branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncCavlc.h
r1039 r1054 107 107 Void codePPS ( TComPPS* pcPPS ); 108 108 109 #if H_MV_HLS10_PPS 110 #if H_MV 111 Void codePPSMultilayerExtension( TComPPS* pcPPS ) 112 { 113 WRITE_FLAG( pcPPS->getPocResetInfoPresentFlag( ) ? 1 : 0 , "poc_reset_info_present_flag" ); 114 WRITE_FLAG( pcPPS->getPpsInferScalingListFlag( ) ? 1 : 0 , "pps_infer_scaling_list_flag" ); 115 WRITE_CODE( pcPPS->getPpsScalingListRefLayerId( ), 6, "pps_scaling_list_ref_layer_id" ); 116 WRITE_UVLC( 0, "num_ref_loc_offsets" ); 117 } 118 #endif 119 #endif 120 109 121 #if H_3D 110 122 Void codePPSExtension ( TComPPS* pcPPS ); -
branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncTop.cpp
r1049 r1054 72 72 ContextModel::buildNextStateTable(); 73 73 #endif 74 #if H_MV_HLS10_GEN_FIX 75 #if H_MV 76 m_iNumSubstreams = 0; 77 #endif 78 #endif 74 79 75 80 m_pcSbacCoders = NULL; … … 231 236 for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ ) 232 237 { 238 #if H_MV_HLS10_GEN_FIX 239 #if H_MV 240 xDelete( false, m_pppcRDSbacCoder, iDepth, iCIIdx); 241 xDelete( false, m_pppcBinCoderCABAC, iDepth, iCIIdx); 242 #else 233 243 delete m_pppcRDSbacCoder[iDepth][iCIIdx]; 234 244 delete m_pppcBinCoderCABAC[iDepth][iCIIdx]; 245 #endif 246 #endif 235 247 } 236 248 } … … 238 250 for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ ) 239 251 { 252 #if H_MV_HLS10_GEN_FIX 253 #if H_MV 254 xDelete( true, m_pppcRDSbacCoder , iDepth); 255 xDelete( true, m_pppcBinCoderCABAC, iDepth); 256 #else 240 257 delete [] m_pppcRDSbacCoder[iDepth]; 241 258 delete [] m_pppcBinCoderCABAC[iDepth]; 242 } 243 259 #endif 260 #endif 261 } 262 263 #if H_MV_HLS10_GEN_FIX 264 #if H_MV 265 xDelete( true, m_pppcRDSbacCoder ); 266 xDelete( true, m_pppcBinCoderCABAC); 267 #else 244 268 delete [] m_pppcRDSbacCoder; 245 269 delete [] m_pppcBinCoderCABAC; 246 270 #endif 271 #endif 247 272 for ( UInt ui = 0; ui < m_iNumSubstreams; ui++ ) 248 273 { … … 251 276 for (Int iCIIdx = 0; iCIIdx < CI_NUM; iCIIdx ++ ) 252 277 { 278 #if H_MV_HLS10_GEN_FIX 279 #if H_MV 280 xDelete(false, m_ppppcRDSbacCoders ,ui, iDepth, iCIIdx); 281 xDelete(false, m_ppppcBinCodersCABAC,ui, iDepth, iCIIdx); 282 #else 253 283 delete m_ppppcRDSbacCoders [ui][iDepth][iCIIdx]; 254 284 delete m_ppppcBinCodersCABAC[ui][iDepth][iCIIdx]; 285 #endif 286 #endif 255 287 } 256 288 } … … 258 290 for ( iDepth = 0; iDepth < g_uiMaxCUDepth+1; iDepth++ ) 259 291 { 292 #if H_MV_HLS10_GEN_FIX 293 #if H_MV 294 xDelete(true, m_ppppcRDSbacCoders ,ui, iDepth); 295 xDelete(true, m_ppppcBinCodersCABAC,ui, iDepth); 296 #else 260 297 delete [] m_ppppcRDSbacCoders [ui][iDepth]; 261 298 delete [] m_ppppcBinCodersCABAC[ui][iDepth]; 262 } 299 #endif 300 #endif 301 } 302 303 304 #if H_MV_HLS10_GEN_FIX 305 #if H_MV 306 xDelete(true, m_ppppcRDSbacCoders, ui); 307 xDelete(true, m_ppppcBinCodersCABAC, ui); 308 #else 263 309 delete[] m_ppppcRDSbacCoders [ui]; 264 310 delete[] m_ppppcBinCodersCABAC[ui]; 265 } 311 #endif 312 #endif 313 } 314 #if H_MV_HLS10_GEN_FIX 315 #if H_MV 316 xDelete(true, m_ppppcRDSbacCoders ) ; 317 xDelete(true, m_ppppcBinCodersCABAC); 318 xDelete(true, m_pcSbacCoders); 319 xDelete(true, m_pcBinCoderCABACs); 320 xDelete(true, m_pcRDGoOnSbacCoders); 321 xDelete(true, m_pcRDGoOnBinCodersCABAC); 322 xDelete(true, m_pcBitCounters); 323 xDelete(true, m_pcRdCosts); 324 #else 266 325 delete[] m_ppppcRDSbacCoders; 267 326 delete[] m_ppppcBinCodersCABAC; … … 272 331 delete[] m_pcBitCounters; 273 332 delete[] m_pcRdCosts; 274 333 #endif 334 #endif 335 275 336 #if !H_MV 276 337 // destroy ROM … … 708 769 #if H_MV 709 770 m_cSPS.setUpdateRepFormatFlag ( false ); 771 #if H_MV_HLS10_MULTILAYERSPS 772 Bool multiLayerExtensionFlag = ( getLayerId() > 0 ) && ( m_cVPS->getNumRefLayers( getLayerId() ) > 0 ); 773 774 m_cSPS.setSpsExtOrMaxSubLayersMinus1( multiLayerExtensionFlag ? 7 : m_maxTempLayer - 1 ); 775 if ( multiLayerExtensionFlag ) 776 { 777 m_cSPS.setSpsInferScalingListFlag ( true ); 778 m_cSPS.setSpsScalingListRefLayerId( m_cVPS->getIdRefLayer( getLayerId(), 0 ) ); 779 } 780 #else 710 781 m_cSPS.setSpsInferScalingListFlag ( m_layerId > 0 && m_cVPS->getInDirectDependencyFlag( getLayerIdInVps(), 0 ) ); 711 782 m_cSPS.setSpsScalingListRefLayerId ( 0 ); 712 m_cSPS.setSpsExtensionPresentFlag ( true ); 783 #endif 784 m_cSPS.setSpsExtensionPresentFlag ( true ); 713 785 m_cSPS.setSpsMultilayerExtensionFlag ( true ); 714 786 #if H_3D … … 791 863 for( Int is = 0; is < targetDecLayerIdList.size(); is++ ) 792 864 { 865 #if H_MV_HLS10_ADD_LAYERSETS 866 if ( m_cVPS->getNecessaryLayerFlag( ols, is ) ) 867 { 868 m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true ); 869 } 870 #else 793 871 m_cSPS.inferSpsMaxDecPicBufferingMinus1( m_cVPS, ols, targetDecLayerIdList[is], true ); 794 } 795 } 796 872 #endif 873 } 874 } 875 #if !H_MV_HLS10_ADD_LAYERSETS 797 876 m_cVPS->inferDbpSizeLayerSetZero( &m_cSPS, true ); 877 #endif 798 878 #endif 799 879 m_cSPS.setPCMBitDepthLuma (g_uiPCMBitDepthLuma); -
branches/HTM-12.0-dev1/source/Lib/TLibEncoder/TEncTop.h
r1049 r1054 150 150 Void xInitPPSforTiles (); 151 151 Void xInitRPS (Bool isFieldCoding); ///< initialize PPS from encoder options 152 152 #if H_MV_HLS10_GEN_FIX 153 #if H_MV 154 155 template <class T> Void xDelete( Bool ar, T inArray ) 156 { 157 if( inArray != NULL) 158 { 159 if ( ar ) 160 { 161 delete[] inArray; 162 } 163 else 164 { 165 delete inArray; 166 } 167 } 168 } 169 170 template <class T> Void xDelete( Bool ar, T inArray, Int idx1 ) 171 { 172 if( inArray != NULL) 173 { 174 xDelete( ar, inArray[idx1]); 175 } 176 } 177 178 template <class T> Void xDelete( Bool ar, T inArray, Int idx1, Int idx2 ) 179 { 180 if( inArray != NULL ) 181 { 182 xDelete( ar, inArray[idx1], idx2 ); 183 } 184 } 185 186 template <class T> Void xDelete( Bool ar, T inArray, Int idx1, Int idx2, Int idx3 ) 187 { 188 if( inArray != NULL ) 189 { 190 xDelete( ar, inArray[idx1], idx2, idx3 ); 191 } 192 } 193 194 #endif 195 #endif 153 196 public: 154 197 TEncTop();
Note: See TracChangeset for help on using the changeset viewer.