Changeset 1076 in 3DVCSoftware for branches/HTM-12.1-dev0/source/Lib/TLibCommon
- Timestamp:
- 21 Oct 2014, 21:25:42 (10 years ago)
- Location:
- branches/HTM-12.1-dev0/source/Lib/TLibCommon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
r1075 r1076 1873 1873 #if H_MV 1874 1874 m_vpsBaseLayerInternalFlag = true; 1875 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL1876 1875 m_vpsBaseLayerAvailableFlag = true; 1877 #endif1878 1876 #endif 1879 1877 … … 1901 1899 { 1902 1900 m_layerSetIdxForOlsMinus1[i] = -1; 1903 #if !H_MV_HLS10_PTL1904 m_profileLevelTierIdx[i] = 0;1905 #endif1906 1901 for ( Int j = 0; j < MAX_VPS_NUH_LAYER_ID_PLUS1; j++) 1907 1902 { 1908 #if H_MV_HLS10_PTL1909 #if H_MV_HLS10_PTL_FIX1910 1903 m_profileTierLevelIdx[i][j] = -1; 1911 #else1912 m_profileTierLevelIdx[i][j] = false;1913 #endif1914 #endif1915 1904 m_outputLayerFlag[i][j] = false; 1916 1905 } … … 1970 1959 m_directDependencyFlag[i][j] = false; 1971 1960 m_directDependencyType[i][j] = -1; 1972 #if H_MV_HLS10_REF_PRED_LAYERS1973 1961 m_dependencyFlag [i][j] = false; 1974 1962 m_idDirectRefLayer[i][j] = -1; 1975 1963 m_idPredictedLayer[i][j] = -1; 1976 1964 m_idRefLayer [i][j] = -1; 1977 #else1978 m_refLayerId[i][j] = -1;1979 #endif1980 1965 m_maxTidIlRefPicsPlus1[i][j] = 7; 1981 1966 } … … 2061 2046 assert( getVpsNumRepFormatsMinus1() <= 255 ); 2062 2047 2063 #if H_MV_HLS10_ADD_LAYERSETS2064 2048 // The value of num_add_layer_sets shall be in the range of 0 to 1023, inclusive. 2065 2049 assert( getNumAddLayerSets() >= 0 && getNumAddLayerSets() <= 1023 ); 2066 #endif2067 2050 return true; 2068 2051 } … … 2097 2080 { 2098 2081 2099 #if H_MV_HLS10_REF_PRED_LAYERS2100 2082 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2101 2083 { … … 2167 2149 } 2168 2150 m_numIndependentLayers = k; 2169 #else // H_MV_HLS10_GEN 2170 2171 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2172 { 2173 Int iNuhLId = getLayerIdInNuh( i ); 2174 m_numDirectRefLayers[ iNuhLId ] = 0; 2175 for( Int j = 0; j < i; j++ ) 2176 { 2177 if( getDirectDependencyFlag(i , j) ) 2178 { 2179 m_refLayerId[ iNuhLId ][m_numDirectRefLayers[ iNuhLId ]++ ] = getLayerIdInNuh( j ); 2180 } 2181 } 2182 } 2183 2184 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2185 { 2186 m_numRefLayers[i] = 0; 2187 } 2188 2189 for (Int currLayerId = 0; currLayerId <= 62; currLayerId++ ) 2190 { 2191 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2192 { 2193 m_recursiveRefLayerFlag[currLayerId][i] = 0; 2194 } 2195 } 2196 2197 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2198 { 2199 Int iNuhLId = getLayerIdInNuh( i ); 2200 xSetRefLayerFlags( iNuhLId ); 2201 for( Int j = 0; j < 63; j++ ) 2202 { 2203 m_numRefLayers[ iNuhLId ] += m_recursiveRefLayerFlag[ iNuhLId ][ j ]; 2204 } 2205 } 2206 2207 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) // Bug in spec "<" instead of "<=" 2208 { 2209 Int iNuhLId = getLayerIdInNuh( i ); 2210 Int predIdx = 0; 2211 for( Int j = iNuhLId + 1; j < 63; j++ ) 2212 { 2213 if( m_recursiveRefLayerFlag[ j ][ iNuhLId ] ) 2214 { 2215 m_predictedLayerId[ iNuhLId ][ predIdx++ ] = j; 2216 } 2217 } 2218 m_numPredictedLayers[ iNuhLId ] = predIdx; 2219 } 2220 2221 Bool countedLayerIdxFlag[ MAX_NUM_LAYERS ]; 2222 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2223 { 2224 countedLayerIdxFlag[ i ] = 0; 2225 } 2226 for( Int i = 0, k = 0; i <= getMaxLayersMinus1(); i++ ) 2227 { 2228 Int iNuhLId = getLayerIdInNuh( i ); 2229 if( m_numDirectRefLayers[ iNuhLId ] == 0 ) 2230 { 2231 m_treePartitionLayerIdList[ k ][ 0 ] = iNuhLId; 2232 m_numLayersInTreePartition[ k ] = 1; 2233 2234 for( Int j = 0; j < m_numPredictedLayers[ iNuhLId ]; j++ ) 2235 { 2236 if( !countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] ) 2237 { 2238 m_treePartitionLayerIdList[ k ][ m_numLayersInTreePartition[ k ] ] = m_predictedLayerId[ iNuhLId ][ j ]; 2239 m_numLayersInTreePartition[ k ]++; 2240 countedLayerIdxFlag[ getLayerIdInVps( m_predictedLayerId[ iNuhLId ][ j ] ) ] = 1; 2241 } 2242 } 2243 k++; 2244 2245 m_numIndependentLayers = k; 2246 } 2247 } 2248 #endif // H_MV_HLS10_GEN 2249 } 2250 2251 #if !H_MV_HLS10_REF_PRED_LAYERS 2252 Int TComVPS::getRefLayerId( Int layerIdInNuh, Int idx ) 2253 { 2254 assert( idx >= 0 && idx < m_numDirectRefLayers[layerIdInNuh] ); 2255 Int refLayerIdInNuh = m_refLayerId[ layerIdInNuh ][ idx ]; 2256 assert ( refLayerIdInNuh >= 0 ); 2257 return refLayerIdInNuh; 2258 } 2259 #endif 2151 } 2152 2260 2153 2261 2154 Int TComVPS::getScalabilityId( Int layerIdInVps, ScalabilityType scalType ) … … 2408 2301 { 2409 2302 assert( lsIdx >= 0 ); 2410 #if H_MV_HLS10_ADD_LAYERSETS2411 2303 assert( lsIdx <= getNumLayerSets() ); 2412 #else2413 assert( lsIdx <= getVpsNumLayerSetsMinus1() );2414 #endif2415 2304 return (Int) m_layerSetLayerIdList[ lsIdx ].size(); 2416 2305 } … … 2436 2325 } 2437 2326 2438 #if !H_MV_HLS10_REF_PRED_LAYERS2439 Bool TComVPS::getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth /*= 0 */ )2440 {2441 #if H_MV_HLS10_REF_PRED_LAYERS2442 // TBD: Remove getInDirectDependencyFlag entirely.2443 return getDependencyFlag( depLayeridInVps, refLayeridInVps );2444 #else2445 assert( depth < 65 );2446 Bool dependentFlag = getDirectDependencyFlag( depLayeridInVps, refLayeridInVps );2447 2448 for( Int i = 0; i < depLayeridInVps && !dependentFlag; i++ )2449 {2450 if ( getDirectDependencyFlag( depLayeridInVps, i ) )2451 {2452 dependentFlag = getInDirectDependencyFlag( i, refLayeridInVps, depth++ );2453 }2454 }2455 return dependentFlag;2456 #endif2457 }2458 #endif2459 2327 2460 2328 Void TComVPS::deriveLayerSetLayerIdList() … … 2485 2353 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2486 2354 { 2487 #if H_MV_HLS10_NESSECARY_LAYER2488 2355 if ( getNecessaryLayerFlag( i , j )) 2489 2356 { 2490 #endif2491 2357 m_targetDecLayerIdLists[i].push_back( m_layerSetLayerIdList[ lsIdx ][ j ] ); 2492 #if H_MV_HLS10_NESSECARY_LAYER 2493 } 2494 #endif 2358 } 2495 2359 2496 2360 if( getOutputLayerFlag( i, j )) … … 2541 2405 } 2542 2406 2543 #if !H_MV_HLS10_ADD_LAYERSETS2544 Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder )2545 {2546 for( Int j = 0; j <= getMaxSubLayersInLayerSetMinus1( 0 ); j++ )2547 {2548 Int maxDecPicBufferingMinus1 = sps->getMaxDecPicBuffering( j ) - 1;2549 Int numReorderPics = sps->getNumReorderPics ( j );2550 Int maxLatencyIncreasePlus1 = sps->getMaxLatencyIncrease( j );2551 2552 if ( encoder )2553 {2554 assert( getDpbSize()->getMaxVpsDecPicBufferingMinus1(0, 0, j ) == maxDecPicBufferingMinus1 );2555 assert( getDpbSize()->getMaxVpsNumReorderPics (0, j ) == numReorderPics );2556 assert( getDpbSize()->getMaxVpsLatencyIncreasePlus1 (0, j ) == maxLatencyIncreasePlus1 );2557 }2558 else2559 {2560 getDpbSize()->setMaxVpsDecPicBufferingMinus1(0, 0, j, maxDecPicBufferingMinus1 );2561 getDpbSize()->setMaxVpsNumReorderPics (0, j, numReorderPics );2562 getDpbSize()->setMaxVpsLatencyIncreasePlus1 (0, j, maxLatencyIncreasePlus1 );2563 }2564 }2565 }2566 #endif2567 2407 Bool TComVPS::getAltOutputLayerFlagVar( Int i ) 2568 2408 { … … 2578 2418 } 2579 2419 2580 #if !H_MV_HLS10_MAXNUMPICS 2581 Int TComVPS::getMaxNumPics( Int layerId ) 2582 { 2583 Int maxNumPics = MAX_INT; 2584 for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++) 2585 { 2586 Int lsIdx = olsIdxToLsIdx( olsIdx ); 2587 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2588 { 2589 if( getLayerSetLayerIdList(lsIdx, j ) == layerId ) 2590 { 2591 Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx ); 2592 maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j, maxSL ) ); 2593 } 2594 } 2595 } 2596 assert( maxNumPics != MAX_INT ); 2597 return maxNumPics; 2598 } 2599 #endif 2600 2601 #if !H_MV_HLS10_REF_PRED_LAYERS 2602 Void TComVPS::xSetRefLayerFlags( Int currLayerId ) 2603 { 2604 for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ ) 2605 { 2606 Int refLayerId = m_refLayerId[ currLayerId ][ j ]; 2607 m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1; 2608 for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 2609 { 2610 m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ] || m_recursiveRefLayerFlag[ refLayerId ][ k ]; 2611 } 2612 } 2613 } 2614 2615 #endif 2616 2617 #if H_MV_HLS10_PTL_FIX 2420 2421 2618 2422 Int TComVPS::inferProfileTierLevelIdx(Int i, Int j) 2619 2423 { … … 2635 2439 return ptlIdx; 2636 2440 } 2637 #endif 2638 2639 #if H_MV_HLS10_ADD_LAYERSETS 2441 2640 2442 Void TComVPS::deriveAddLayerSetLayerIdList(Int i) 2641 2443 { … … 2660 2462 } 2661 2463 2662 #endif 2663 2664 #if H_MV_HLS10_NESSECARY_LAYER 2464 2665 2465 Void TComVPS::deriveNecessaryLayerFlags(Int olsIdx) 2666 2466 { … … 2693 2493 } 2694 2494 } 2695 #endif 2696 2697 #if H_MV_HLS10_ADD_LAYERSETS 2495 2698 2496 Void TComVPS::printPTL() 2699 2497 { … … 2741 2539 #endif 2742 2540 2743 #if H_MV_HLS10_AUX2744 2541 vector<Int> viewOrderIndex; 2745 2542 vector<Int> auxId; 2746 2543 vector<Int> dependencyId; 2747 2544 vector<Int> viewId; 2748 #endif2749 2545 for (Int i = 0; i <= getMaxLayersMinus1(); i++ ) 2750 2546 { 2751 2547 fullArray.push_back( getMaxLayersMinus1() + 1 ); 2752 2548 range.push_back( i ); 2753 #if H_MV_HLS10_AUX2754 2549 viewOrderIndex.push_back( getViewIndex ( i ) ); 2755 2550 dependencyId .push_back( getDependencyId( i ) ); … … 2758 2553 #if H_3D 2759 2554 depthId.push_back( getDepthId( i ) ); 2760 #endif2761 2555 #endif 2762 2556 } … … 2771 2565 } 2772 2566 2773 #if H_MV_HLS10_AUX2774 2567 Void TComVPS::printScalabilityId() 2775 2568 { … … 2809 2602 std::cout << std::endl; 2810 2603 } 2811 #endif2812 2604 2813 2605 Void TComVPS::printLayerSets() … … 2864 2656 } 2865 2657 2866 #endif2867 2658 2868 2659 #endif // H_MV … … 2942 2733 #endif 2943 2734 2944 #if !H_MV_HLS10_PPS2945 m_numScaledRefLayerOffsets = 0;2946 2947 for (Int i = 0; i < MAX_NUM_SCALED_REF_LAYERS; i++ )2948 {2949 m_scaledRefLayerId [i] = -1;2950 }2951 2952 for (Int i = 0; i < MAX_NUM_LAYERS; i++ )2953 {2954 m_scaledRefLayerLeftOffset [i] = 0;2955 m_scaledRefLayerTopOffset [i] = 0;2956 m_scaledRefLayerRiFghtOffset [i] = 0;2957 m_scaledRefLayerBottomOffset [i] = 0;2958 }2959 #endif2960 2735 #endif 2961 2736 } … … 3324 3099 Void TComSPS::inferRepFormat( TComVPS* vps, Int layerIdCurr ) 3325 3100 { 3326 #if H_MV_HLS10_MULTILAYERSPS3327 3101 if ( getMultiLayerExtSpsFlag() ) 3328 #else3329 if ( layerIdCurr > 0 )3330 #endif3331 3102 { 3332 3103 Int repFormatIdx = getUpdateRepFormatFlag() ? getSpsRepFormatIdx() : vps->getVpsRepFormatIdx( vps->getLayerIdInVps( layerIdCurr ) ) ; … … 3344 3115 setBitDepthC ( repFormat->getBitDepthVpsChromaMinus8() + 8 ); 3345 3116 setQpBDOffsetC ( (Int) (6* ( getBitDepthC() -8 ) ) ); 3346 #if H_MV_HLS10_GEN_VSP_CONF_WIN3347 3117 Window &spsConf = getConformanceWindow(); 3348 3118 … … 3353 3123 spsConf.setWindowTopOffset ( repFormat->getConfWinVpsTopOffset() ); 3354 3124 spsConf.setWindowBottomOffset( repFormat->getConfWinVpsBottomOffset() ); 3355 #endif 3356 3357 #if H_MV_HLS10_MULTILAYERSPS 3125 3358 3126 if ( getMultiLayerExtSpsFlag() && getUpdateRepFormatFlag() ) 3359 #else3360 if ( getLayerId() > 0 && getUpdateRepFormatFlag() )3361 #endif3362 3127 { 3363 3128 assert( getChromaFormatIdc() <= repFormat->getChromaFormatVpsIdc() ); … … 3393 3158 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 3394 3159 3395 #if H_MV_HLS10_MULTILAYERSPS3396 3160 if ( getMultiLayerExtSpsFlag() ) 3397 #else3398 if (getLayerId() > 0 )3399 #endif3400 3161 { 3401 3162 Int layerIdx = 0; … … 3415 3176 Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ; 3416 3177 3417 #if H_MV_HLS10_MULTILAYERSPS3418 3178 // This preliminary fix needs to be checked. 3419 3179 Int maxNumReorderPics = vps->getDpbSize()->getMaxVpsNumReorderPics( targetOptLayerSetIdx, i ); 3420 3180 Int maxLatencyIncreasePlus1 = vps->getDpbSize()->getMaxVpsLatencyIncreasePlus1( targetOptLayerSetIdx, i ); 3421 #endif3422 3181 if ( encoder ) 3423 3182 { 3424 3183 assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 ); 3425 #if H_MV_HLS10_MULTILAYERSPS3426 3184 // This preliminary fix needs to be checked. 3427 3185 assert( getNumReorderPics( i ) == maxNumReorderPics ); 3428 3186 assert( getMaxLatencyIncrease( i ) == maxLatencyIncreasePlus1 ); 3429 #endif3430 3187 3431 3188 } 3432 3189 else 3433 3190 { 3434 #if !H_MV_HLS10_MULTILAYERSPS3435 setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 );3436 #else3437 3191 // This preliminary fix needs to be checked. 3438 3192 setMaxDecPicBuffering( maxDecPicBufferingMinus1 + 1 , i); 3439 3193 setNumReorderPics ( maxNumReorderPics, i ); 3440 3194 setMaxLatencyIncrease( maxLatencyIncreasePlus1 - 1 , i); 3441 #endif3442 3195 } 3443 3196 } … … 3447 3200 Void TComSPS::checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ) 3448 3201 { 3449 #if !H_MV_HLS10_MAXNUMPICS3450 // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead3451 // of nuh_layer_id of slice (currLayerId), this seems to be a bug.3452 #endif3453 3202 for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ ) 3454 3203 { … … 3456 3205 if ( !rps->getInterRPSPrediction() ) 3457 3206 { 3458 #if H_MV_HLS10_MAXNUMPICS3459 3207 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), MAX_INT, getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); // INT_MAX to be replaced by DpbSize 3460 #else 3461 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ), 3462 getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 3463 #endif 3464 } 3465 } 3466 } 3467 3468 #if H_MV_HLS10_MULTILAYERSPS 3208 } 3209 } 3210 } 3211 3469 3212 Void TComSPS::inferSpsMaxSubLayersMinus1(Bool atPsActivation, TComVPS* vps) 3470 3213 { … … 3487 3230 } 3488 3231 } 3489 #endif3490 3232 #endif 3491 3233 … … 3850 3592 { 3851 3593 TComVPS* vps = getVPS(); 3852 #if H_MV_HLS10_REF_PRED_LAYERS3853 3594 Int refLayerIdx = vps->getLayerIdInVps( vps->getIdDirectRefLayer( getLayerId(), i ) ); 3854 #else3855 Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) );3856 #endif3857 3595 3858 3596 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) && ( getTLayer() == 0 ) && … … 3925 3663 Int TComSlice::getRefPicLayerId( Int i ) 3926 3664 { 3927 #if H_MV_HLS10_REF_PRED_LAYERS3928 3665 return getVPS()->getIdDirectRefLayer( getLayerId(), getInterLayerPredLayerIdc( i ) ); 3929 #else3930 return getVPS()->getRefLayerId( getLayerId(), getInterLayerPredLayerIdc( i ) );3931 #endif3932 3666 } 3933 3667 … … 4648 4382 , m_nonPackedConstraintFlag(false) 4649 4383 , m_frameOnlyConstraintFlag(false) 4650 #if H_MV_HLS10_PTL4651 4384 , m_max12bitConstraintFlag ( false ) 4652 4385 , m_max10bitConstraintFlag ( false ) … … 4659 4392 , m_lowerBitRateConstraintFlag ( false ) 4660 4393 , m_inbldFlag ( false ) 4661 #endif4662 4394 { 4663 4395 ::memset(m_profileCompatibilityFlag, 0, sizeof(m_profileCompatibilityFlag)); 4664 4396 } 4665 4397 4666 #if H_MV_HLS10_PTL_INFER_FIX4667 4398 Bool ProfileTierLevel::getV2ConstraintsPresentFlag() 4668 4399 { … … 4710 4441 } 4711 4442 4712 #endif4713 4443 4714 4444 TComPTL::TComPTL() … … 4719 4449 4720 4450 #if H_MV 4721 #if !H_MV_HLS10_PTL_INFER_FIX4722 Void TComPTL::copyLevelFrom( TComPTL* source )4723 {4724 getGeneralPTL()->setLevelIdc( source->getGeneralPTL()->getLevelIdc() );4725 for( Int subLayer = 0; subLayer < 6; subLayer++ )4726 {4727 setSubLayerLevelPresentFlag( subLayer, source->getSubLayerLevelPresentFlag( subLayer ) );4728 getSubLayerPTL( subLayer )->setLevelIdc( source->getSubLayerPTL( subLayer )->getLevelIdc() );4729 }4730 }4731 #else4732 4451 Void TComPTL::inferGeneralValues(Bool profilePresentFlag, Int k, TComPTL* refPTL) 4733 4452 { … … 4817 4536 } 4818 4537 4819 #endif4820 4538 #endif 4821 4539 //! \} … … 4860 4578 4861 4579 m_vpsVuiBspHrdPresentFlag = false; 4862 #if H_MV_HLS10_VPS_VUI_BSP4863 4580 m_vpsVuiBspHrdParameters = NULL; 4864 #else4865 m_vpsVuiBspHrdParameters = new TComVpsVuiBspHrdParameters();4866 #endif4867 4581 } 4868 4582 … … 4910 4624 } 4911 4625 4912 #if !H_MV_HLS10_VPS_VUI_BSP 4913 Void TComVpsVuiBspHrdParameters::checkLayerInBspFlag( TComVPS* vps, Int h ) 4914 { 4915 // It is a requirement of bitstream conformance that bitstream partition with index j shall not include 4916 // direct or indirect reference layers of any layers in bitstream partition i for any values of i and j 4917 // in the range of 0 to num_bitstream_partitions[ h ] ?1, inclusive, such that i is less than j. 4918 4919 for ( Int partJ = 0; partJ < getNumBitstreamPartitions( h ); partJ++ ) 4920 { 4921 for ( Int partI = 0; partI < partJ; partI++ ) 4922 { 4923 for ( Int layerJ = 0; layerJ < vps->getMaxLayersMinus1(); layerJ++ ) 4924 { 4925 if ( m_layerInBspFlag[ h ][partJ][layerJ ] ) 4926 { 4927 for ( Int layerI = 0; layerI < vps->getMaxLayersMinus1(); layerI++ ) 4928 { 4929 if ( m_layerInBspFlag[ h ][partI][layerI] ) 4930 { 4931 assert( !vps->getInDirectDependencyFlag( layerI, layerJ ) ); 4932 } 4933 } 4934 } 4935 } 4936 } 4937 } 4938 4939 // --------------- 4940 // To be added: 4941 // When vps_base_layer_internal_flag is equal to 0 and layer_in_bsp_flag[ h ][ i ][ 0 ] is equal to 1 for any value of h in the 4942 // range of 1 to vps_num_layer_sets_minus1, inclusive, and any value of i in the range of 0 to num_bitstream_partitions[ h ] - 1, 4943 // inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] for at least one value of j in the range of 1 to 4944 // NumLayersInIdList[ h ] - 1, inclusive, shall be equal to 1. 4945 // --------------- 4946 4947 4948 // When num_bitstream_partitions[ h ] is equal to 1 for any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, 4949 // the value of layer_in_bsp_flag[ h ][ 0 ][ j ] should be equal to 0 for at least one value of j in the range 0 to 4950 // NumLayersInIdList[ h ] ? 1, inclusive. 4951 4952 4953 if ( getNumBitstreamPartitions( h ) == 1 ) 4954 { 4955 Bool atLeastOneZero = false; 4956 for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ ) 4957 { 4958 atLeastOneZero = atLeastOneZero || !getLayerInBspFlag( h, 0, j ); 4959 } 4960 assert( atLeastOneZero ); 4961 } 4962 4963 4964 // For any value of h in the range 1 to vps_num_layer_set_minus1, inclusive, the value of layer_in_bsp_flag[ h ][ i ][ j ] 4965 // shall be equal to 1 for at most one value of i in the range of 0 to num_bitstream_partitions[ h ] ? 1, inclusive. 4966 4967 for ( Int j = 0; j <= vps->getNumLayersInIdList( h ) - 1; j++ ) 4968 { 4969 Int numLayerInBsp = 0; 4970 for ( Int i = 0; i <= getNumBitstreamPartitions( h ) - 1; i++ ) 4971 { 4972 numLayerInBsp += ( getLayerInBspFlag( h, i, j ) ? 1 : 0 ); 4973 } 4974 assert( numLayerInBsp <= 1 ); 4975 } 4976 4977 } 4978 4979 Void TComVpsVuiBspHrdParameters::checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ) 4980 { 4981 // bsp_comb_hrd_idx 4982 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4983 assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() ); 4984 4985 // bsp_comb_sched_idx 4986 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4987 4988 //* This check needs to activated, when HighestTid is available here 4989 // assert( getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) ); 4990 } 4991 #endif 4992 4993 #if H_MV_HLS10_VPS_VUI_BSP 4626 4994 4627 4995 4628 TComVpsVuiBspHrdParameters::~TComVpsVuiBspHrdParameters() … … 5089 4722 } 5090 4723 5091 #endif5092 4724 5093 4725 Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) … … 5125 4757 for (Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 5126 4758 { 5127 #if H_MV_HLS10_ADD_LAYERSETS5128 4759 m_maxVpsDecPicBufferingMinus1[i][k][j] = MIN_INT; 5129 #else5130 m_maxVpsDecPicBufferingMinus1[i][k][j] = 0;5131 #endif5132 4760 } 5133 4761 } -
branches/HTM-12.1-dev0/source/Lib/TLibCommon/TComSlice.h
r1075 r1076 45 45 #include "TComRom.h" 46 46 #include "TComList.h" 47 #if H_MV_HLS10_GEN_FIX48 47 #if H_MV 49 48 #include <ios> 50 49 #include <iostream> 51 50 #include <iomanip> 52 #endif53 51 #endif 54 52 //! \ingroup TLibCommon … … 207 205 Bool m_frameOnlyConstraintFlag; 208 206 209 #if H_MV_HLS10_PTL210 207 #if H_MV 211 208 Bool m_max12bitConstraintFlag; … … 220 217 Bool m_inbldFlag; 221 218 #endif 222 #endif223 219 public: 224 220 ProfileTierLevel(); … … 252 248 253 249 #if H_MV 254 #if H_MV_HLS10_PTL255 250 Void setMax12bitConstraintFlag( Bool flag ) { m_max12bitConstraintFlag = flag; } 256 251 Bool getMax12bitConstraintFlag( ) { return m_max12bitConstraintFlag; } … … 281 276 Void setInbldFlag( Bool flag ) { m_inbldFlag = flag; } 282 277 Bool getInbldFlag( ) { return m_inbldFlag; } 283 #endif284 #if H_MV_HLS10_PTL_INFER_FIX285 278 Bool getV2ConstraintsPresentFlag(); 286 279 Bool getInbldPresentFlag(); 287 280 Void copyV2ConstraintFlags( ProfileTierLevel* ptlRef ); 288 281 Void copyProfile( ProfileTierLevel* ptlRef ); 289 #endif290 282 #endif 291 283 }; … … 310 302 ProfileTierLevel* getSubLayerPTL(Int i) { return &m_subLayerPTL[i]; } 311 303 #if H_MV 312 #if H_MV_HLS10_PTL_INFER_FIX313 304 Void inferGeneralValues ( Bool profilePresentFlag , Int k, TComPTL* refPTL );; 314 305 Void inferSubLayerValues( Int maxNumSubLayersMinus1, Int k, TComPTL* refPTL );; 315 #else316 Void copyLevelFrom( TComPTL* source );317 #endif318 306 #endif 319 307 }; … … 501 489 class TComVpsVuiBspHrdParameters 502 490 { 503 #if H_MV_HLS10_VPS_VUI_BSP504 491 505 492 /* Not yet tested */ … … 563 550 Void setHrdParametermeters( Int k, TComHRD* val ) { *(m_hrdParameters + k ) = *val; }; 564 551 TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters + k; }; 565 #else566 private:567 Int m_vpsNumBspHrdParametersMinus1;568 Bool m_bspCprmsPresentFlag[MAX_NUM_BSP_HRD_PARAMETERS];569 Int m_numBitstreamPartitions[MAX_VPS_OP_SETS_PLUS1];570 Bool m_layerInBspFlag[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_LAYERS];571 Int m_numBspSchedCombinationsMinus1[MAX_VPS_OP_SETS_PLUS1];572 Int m_bspCombHrdIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION];573 Int m_bspCombSchedIdx[MAX_VPS_OP_SETS_PLUS1][MAX_NUM_BSP_HRD_PARAMETERS][MAX_NUM_BSP_SCHED_COMBINATION];574 TComHRD* m_hrdParameters[MAX_NUM_BSP_HRD_PARAMETERS];575 public:576 577 Void setVpsNumBspHrdParametersMinus1( Int val ) { m_vpsNumBspHrdParametersMinus1 = val; }578 Int getVpsNumBspHrdParametersMinus1( ) { return m_vpsNumBspHrdParametersMinus1; }579 580 Void setBspCprmsPresentFlag( Int i, Bool flag ) { m_bspCprmsPresentFlag[i] = flag; }581 Bool getBspCprmsPresentFlag( Int i ) { return m_bspCprmsPresentFlag[i]; }582 583 Void setNumBitstreamPartitions( Int h, Int val ) { m_numBitstreamPartitions[h] = val; }584 Int getNumBitstreamPartitions( Int h ) { return m_numBitstreamPartitions[h]; }585 586 Void setLayerInBspFlag( Int h, Int i, Int j, Bool flag ) { m_layerInBspFlag[h][i][j] = flag; }587 Bool getLayerInBspFlag( Int h, Int i, Int j ) { return m_layerInBspFlag[h][i][j]; }588 Void checkLayerInBspFlag ( TComVPS* vps, Int h );589 590 Void setNumBspSchedCombinationsMinus1( Int h, Int val ) { m_numBspSchedCombinationsMinus1[h] = val; }591 Int getNumBspSchedCombinationsMinus1( Int h ) { return m_numBspSchedCombinationsMinus1[h]; }592 593 Void setBspCombHrdIdx( Int h, Int i, Int j, Int val ) { m_bspCombHrdIdx[h][i][j] = val; }594 Int getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; }595 Int getBspCombHrdIdxLen() { return gCeilLog2( getVpsNumBspHrdParametersMinus1() + 1); };596 597 598 Void setBspCombSchedIdx( Int h, Int i, Int j, Int val ) { m_bspCombSchedIdx[h][i][j] = val; }599 Int getBspCombSchedIdx( Int h, Int i, Int j ) { return m_bspCombSchedIdx[h][i][j]; }600 601 Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j );602 603 Void setHrdParametermeters( Int k, TComHRD* val ) { m_hrdParameters[k] = val; };604 TComHRD* getHrdParametermeters( Int k ) { return m_hrdParameters[k]; };605 #endif606 552 }; 607 553 … … 630 576 Bool m_wppNotInUseFlag; 631 577 Bool m_wppInUseFlag [MAX_NUM_LAYERS]; 632 #if H_MV_HLS10_VPS_VUI633 578 Bool m_singleLayerForNonIrapFlag; 634 579 Bool m_higherLayerIrapSkipFlag; 635 #endif636 580 Bool m_ilpRestrictedRefLayersFlag; 637 581 Int m_minSpatialSegmentOffsetPlus1[MAX_NUM_LAYERS][MAX_NUM_LAYERS]; … … 708 652 Bool getWppInUseFlag( Int i ) { return m_wppInUseFlag[i]; } 709 653 710 #if H_MV_HLS10_VPS_VUI711 654 Void setSingleLayerForNonIrapFlag( Bool flag ) { m_singleLayerForNonIrapFlag = flag; } 712 655 Bool getSingleLayerForNonIrapFlag( ) { return m_singleLayerForNonIrapFlag; } … … 714 657 Void setHigherLayerIrapSkipFlag( Bool flag ) { m_higherLayerIrapSkipFlag = flag; } 715 658 Bool getHigherLayerIrapSkipFlag( ) { return m_higherLayerIrapSkipFlag; } 716 #endif717 659 718 660 Void setIlpRestrictedRefLayersFlag( Bool flag ) { m_ilpRestrictedRefLayersFlag = flag; } … … 750 692 Int m_bitDepthVpsLumaMinus8; 751 693 Int m_bitDepthVpsChromaMinus8; 752 #if H_MV_HLS10_GEN_VSP_CONF_WIN753 694 Bool m_conformanceWindowVpsFlag; 754 695 Int m_confWinVpsLeftOffset; … … 756 697 Int m_confWinVpsTopOffset; 757 698 Int m_confWinVpsBottomOffset; 758 #endif759 699 760 700 public: 761 701 762 #if H_MV_HLS10_GEN_VSP_CONF_WIN763 702 TComRepFormat() 764 703 { … … 769 708 m_confWinVpsBottomOffset = 0; 770 709 }; 771 #else772 TComRepFormat() { };773 #endif774 710 775 711 Void setChromaAndBitDepthVpsPresentFlag( Bool flag ) { m_chromaAndBitDepthVpsPresentFlag = flag; } … … 796 732 Int getBitDepthVpsChromaMinus8( ) { return m_bitDepthVpsChromaMinus8; } 797 733 798 #if H_MV_HLS10_GEN_VSP_CONF_WIN799 734 Void setConformanceWindowVpsFlag( Bool flag ) { m_conformanceWindowVpsFlag = flag; } 800 735 Bool getConformanceWindowVpsFlag( ) { return m_conformanceWindowVpsFlag; } … … 811 746 Void setConfWinVpsBottomOffset( Int val ) { m_confWinVpsBottomOffset = val; } 812 747 Int getConfWinVpsBottomOffset( ) { return m_confWinVpsBottomOffset; } 813 #endif814 748 }; 815 749 … … 834 768 835 769 Void setMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j, Int val ) { m_maxVpsDecPicBufferingMinus1[i][k][j] = val; } 836 #if H_MV_HLS10_ADD_LAYERSETS837 770 Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { assert( m_maxVpsDecPicBufferingMinus1[i][k][j] >= 0 ); return m_maxVpsDecPicBufferingMinus1[i][k][j]; } 838 #else839 Int getMaxVpsDecPicBufferingMinus1( Int i, Int k, Int j ) { return m_maxVpsDecPicBufferingMinus1[i][k][j]; }840 #endif841 771 842 772 Void setMaxVpsNumReorderPics( Int i, Int j, Int val ) { m_maxVpsNumReorderPics[i][j] = val; } … … 853 783 #if H_MV 854 784 Bool m_vpsBaseLayerInternalFlag; 855 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL856 785 Bool m_vpsBaseLayerAvailableFlag; 857 #endif // H_MV_HLS10_GEN858 786 #endif 859 787 … … 925 853 Int m_layerSetIdxForOlsMinus1 [MAX_VPS_OUTPUTLAYER_SETS]; 926 854 Bool m_outputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_VPS_NUH_LAYER_ID_PLUS1]; 927 #if H_MV_HLS10_PTL928 855 Int m_profileTierLevelIdx [MAX_VPS_OUTPUTLAYER_SETS ][MAX_NUM_LAYERS]; 929 #else930 Int m_profileLevelTierIdx [MAX_VPS_OUTPUTLAYER_SETS ];931 #endif932 856 Bool m_altOutputLayerFlag [MAX_VPS_OUTPUTLAYER_SETS]; 933 857 Bool m_repFormatIdxPresentFlag; … … 958 882 // VPS EXTENSION SEMANTICS VARIABLES 959 883 Int m_layerIdInVps [MAX_NUM_LAYERS ]; 960 #if H_MV_HLS10_REF_PRED_LAYERS961 884 Int m_dependencyFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 962 #endif963 885 964 886 Int m_numDirectRefLayers [MAX_NUM_LAYERS]; 965 #if H_MV_HLS10_REF_PRED_LAYERS966 887 Int m_idDirectRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 967 #else968 Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS];969 #endif970 888 971 889 Int m_numRefLayers [MAX_NUM_LAYER_IDS]; 972 #if H_MV_HLS10_REF_PRED_LAYERS973 890 Int m_idRefLayer [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 974 #endif975 891 976 892 977 893 Int m_numPredictedLayers [MAX_NUM_LAYERS ]; 978 #if !H_MV_HLS10_REF_PRED_LAYERS979 Int m_predictedLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS];980 #else981 894 Int m_idPredictedLayer [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 982 #endif983 895 Int m_numIndependentLayers; 984 896 Int m_numLayersInTreePartition [MAX_NUM_LAYER_IDS]; 985 897 Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 986 #if H_MV_HLS10_REF_PRED_LAYERS987 898 Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 988 #endif989 899 Int m_viewIndex [MAX_NUM_LAYERS ]; 990 900 … … 993 903 std::vector< std::vector< Int> > m_layerSetLayerIdList; 994 904 995 #if H_MV_HLS10_NESSECARY_LAYER996 905 Int m_numNecessaryLayers [MAX_VPS_OUTPUTLAYER_SETS]; 997 906 Bool m_necessaryLayerFlag [MAX_VPS_OUTPUTLAYER_SETS][MAX_NUM_LAYERS]; 998 #endif999 907 1000 908 Int xGetDimBitOffset( Int j ); 1001 #if H_MV_HLS10_REF_PRED_LAYERS1002 909 Void xSetRefLayerFlags( Int currLayerId ); 1003 #endif1004 910 // VPS EXTENSION 2 SYNTAX ELEMENTS 1005 911 #if H_3D_ARP … … 1069 975 Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } 1070 976 Bool getVpsBaseLayerInternalFlag( ) { return m_vpsBaseLayerInternalFlag; } 1071 #if H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL1072 977 Void setVpsBaseLayerAvailableFlag( Bool flag ) { m_vpsBaseLayerAvailableFlag = flag; } 1073 978 Bool getVpsBaseLayerAvailableFlag( ) { return m_vpsBaseLayerAvailableFlag; } 1074 979 #endif 1075 #endif1076 980 1077 981 UInt getMaxTLayers () { return m_uiMaxTLayers; } … … 1080 984 #if H_MV 1081 985 UInt getMaxSubLayersMinus1() { return m_uiMaxTLayers - 1; } // For consistency with draft spec 1082 #if H_MV_HLS10_GEN_FIX1083 986 Void setMaxSubLayersMinus1(UInt val) { m_uiMaxTLayers = (val + 1); }; 1084 #endif1085 987 UInt getMaxLayersMinus1() { return m_uiMaxLayersMinus1; }; 1086 988 Void setMaxLayersMinus1(UInt l) { m_uiMaxLayersMinus1 = l; } … … 1122 1024 1123 1025 #if H_MV 1124 #if H_MV_HLS10_PTL1125 1026 TComPTL* getPTL( Int idx = 0 ) { return &m_pcPTL[idx]; } 1126 #else1127 TComPTL* getPTL( Int layerSet = 0 ) { return &m_pcPTL[layerSet]; }1128 #endif1129 1027 #else 1130 1028 TComPTL* getPTL() { return &m_pcPTL; } … … 1213 1111 Bool inferOutputLayerFlag( Int i, Int j ); 1214 1112 1215 #if H_MV_HLS10_PTL1216 1113 Void setProfileTierLevelIdx( Int i, Int j, Int val ) { m_profileTierLevelIdx[ i ][ j ] = val; } 1217 1114 Int getProfileTierLevelIdx( Int i, Int j ) { return m_profileTierLevelIdx[ i ][ j ]; } 1218 #if H_MV_HLS10_PTL_FIX1219 1115 Int inferProfileTierLevelIdx( Int i, Int j ); 1220 #endif1221 #else1222 Void setProfileLevelTierIdx( Int outLayerSetIdx, Int val ) { m_profileLevelTierIdx[ outLayerSetIdx ] = val; }1223 Int getProfileLevelTierIdx( Int outLayerSetIdx ) { return m_profileLevelTierIdx[ outLayerSetIdx ]; }1224 #endif1225 1116 1226 1117 Void setAltOutputLayerFlag( Int i, Bool flag ) { m_altOutputLayerFlag[i] = flag; } … … 1252 1143 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1253 1144 1254 #if !H_MV_HLS10_ADD_LAYERSETS1255 Void inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder );1256 #endif1257 1145 1258 1146 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } … … 1285 1173 1286 1174 Int getViewIndex ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), VIEW_ORDER_INDEX ); } 1287 #if H_MV_HLS10_AUX1288 1175 Int getAuxId ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), AUX_ID ); } 1289 1176 Int getDependencyId ( Int layerIdInNuh ) { return getScalabilityId( getLayerIdInVps(layerIdInNuh), DEPENDENCY_ID ); } 1290 #endif1291 1177 Int getNumViews(); 1292 1178 1293 #if H_MV_HLS10_REF_PRED_LAYERS1294 1179 Bool getDependencyFlag( Int i, Int j ) { return m_dependencyFlag[i][j]; } 1295 #endif1296 1180 Int getNumDirectRefLayers( Int layerIdInNuh ) { return m_numDirectRefLayers[ layerIdInNuh ]; }; 1297 #if !H_MV_HLS10_REF_PRED_LAYERS1298 Int getRefLayerId ( Int layerIdInNuh, Int idx );;1299 #endif1300 1181 Int getNumRefLayers ( Int i ) { return m_numRefLayers[i]; } 1301 1182 Int getNumPredictedLayers ( Int i ) { return m_numPredictedLayers[i]; } 1302 1183 1303 #if !H_MV_HLS10_REF_PRED_LAYERS1304 Int getPredictedLayerId ( Int i, Int j ) { return m_predictedLayerId[i][j]; }1305 #else1306 1184 Int getIdRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumRefLayers ( i )); return m_idRefLayer [i][j]; } 1307 1185 Int getIdPredictedLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumPredictedLayers( i )); return m_idPredictedLayer[i][j]; } 1308 1186 Int getIdDirectRefLayer ( Int i, Int j ) { assert( j >= 0 && j < getNumDirectRefLayers( i )); return m_idDirectRefLayer[i][j]; } 1309 #endif1310 1187 Int getNumIndependentLayers ( ) { return m_numIndependentLayers; } 1311 1188 Int getNumLayersInTreePartition( Int i ) { return m_numLayersInTreePartition[i]; } … … 1314 1191 Int getNumLayerSets( ) { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; 1315 1192 1316 #if H_MV_HLS10_ADD_LAYERSETS1317 1193 Int getFirstAddLayerSetIdx() { return getVpsNumLayerSetsMinus1() + 1; } 1318 1194 Int getLastAddLayerSetIdx() { return getFirstAddLayerSetIdx() + getNumAddLayerSets() - 1; } 1319 #endif1320 1195 Bool checkVPSExtensionSyntax(); 1321 1196 Int scalTypeToScalIdx ( ScalabilityType scalType ); 1322 1197 1323 #if H_MV_HLS10_PTL1324 1198 Int getProfileTierLevelIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); }; 1325 #else1326 Int getProfileLevelTierIdxLen() { return gCeilLog2( getVpsNumProfileTierLevelMinus1() + 1 ); };1327 #endif1328 1199 Int getVpsRepFormatIdxLen() { return gCeilLog2( getVpsNumRepFormatsMinus1() + 1 ); }; 1329 1200 … … 1336 1207 Void deriveLayerSetLayerIdList(); 1337 1208 1338 #if H_MV_HLS10_ADD_LAYERSETS1339 1209 Int olsIdxToLsIdx( Int i ) { return ( i < getNumLayerSets() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; }; 1340 #else1341 Int olsIdxToLsIdx( Int i ) { return ( i <= getVpsNumLayerSetsMinus1() ) ? i : getLayerSetIdxForOlsMinus1( i ) + 1 ; };1342 #endif1343 1210 Void initTargetLayerIdLists ( ); 1344 1211 Void deriveTargetLayerIdList ( Int i ); … … 1349 1216 Int getOlsHighestOutputLayerId( Int i ) { return getTargetOptLayerIdList( i ).back(); }; 1350 1217 1351 #if H_MV_HLS10_ADD_LAYERSETS1352 1218 Void deriveAddLayerSetLayerIdList( Int i ); 1353 #endif1354 #if H_MV_HLS10_NESSECARY_LAYER1355 1219 Void deriveNecessaryLayerFlags( Int olsIdx );; 1356 1220 Int getNecessaryLayerFlag( Int i, Int j ) { AOF( i >= 0 && i < getNumOutputLayerSets() ); AOF( j >= 0 && j < getNumLayersInIdList( olsIdxToLsIdx( i ) ) ); return m_necessaryLayerFlag[i][j]; }; 1357 #endif1358 1221 1359 1222 Int getMaxSubLayersInLayerSetMinus1( Int i ); … … 1366 1229 1367 1230 // helpers 1368 #if !H_MV_HLS10_REF_PRED_LAYERS1369 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 );1370 #endif1371 #if !H_MV_HLS10_MAXNUMPICS1372 Int getMaxNumPics( Int layerId );1373 #endif1374 #if H_MV_HLS10_ADD_LAYERSETS1375 1231 Void printPTL(); 1376 1232 Void printLayerDependencies(); 1377 #if H_MV_HLS10_AUX1378 1233 Void printScalabilityId();; 1379 #endif1380 1234 Void printLayerSets();; 1381 1235 … … 1422 1276 xPrintArray( name, 1, idx2, numElemDim2, vec2, printNumber, false ); 1423 1277 } 1424 #endif1425 1278 1426 1279 … … 1837 1690 TComVPS* m_pcVPS; 1838 1691 // SPS 1839 #if H_MV_HLS10_MULTILAYERSPS1840 1692 Int m_spsMaxSubLayersMinus1; 1841 1693 Int m_spsExtOrMaxSubLayersMinus1; 1842 #endif1843 1694 Bool m_spsExtensionPresentFlag; 1844 1695 … … 1858 1709 // SPS Extension 1859 1710 Bool m_interViewMvVertConstraintFlag; 1860 #if !H_MV_HLS10_PPS1861 Int m_numScaledRefLayerOffsets;1862 Int m_scaledRefLayerId [MAX_NUM_SCALED_REF_LAYERS];1863 Int m_scaledRefLayerLeftOffset [MAX_NUM_LAYERS];1864 Int m_scaledRefLayerTopOffset [MAX_NUM_LAYERS];1865 Int m_scaledRefLayerRightOffset [MAX_NUM_LAYERS];1866 Int m_scaledRefLayerBottomOffset[MAX_NUM_LAYERS];1867 #endif1868 1711 #endif 1869 1712 #if H_3D … … 1969 1812 #if H_MV 1970 1813 UInt getSpsMaxSubLayersMinus1() { return ( m_uiMaxTLayers - 1); } 1971 #if H_MV_HLS10_MULTILAYERSPS1972 1814 Void setSpsMaxSubLayersMinus1( UInt val ) { setMaxTLayers( val + 1 ); } 1973 #endif1974 1815 #endif 1975 1816 … … 2004 1845 TComPTL* getPTL() { return &m_pcPTL; } 2005 1846 #if H_MV 2006 #if H_MV_HLS10_MULTILAYERSPS2007 1847 Void setSpsExtOrMaxSubLayersMinus1( Int val ) { m_spsExtOrMaxSubLayersMinus1 = val; } 2008 1848 Int getSpsExtOrMaxSubLayersMinus1( ) { return m_spsExtOrMaxSubLayersMinus1; } … … 2010 1850 2011 1851 Bool getMultiLayerExtSpsFlag() { return ( getLayerId() != 0 && getSpsExtOrMaxSubLayersMinus1() == 7 ); } 2012 #endif2013 1852 Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ); 2014 1853 … … 2049 1888 Bool getInterViewMvVertConstraintFlag() { return m_interViewMvVertConstraintFlag;} 2050 1889 2051 #if !H_MV_HLS10_PPS2052 Void setNumScaledRefLayerOffsets( Int val ) { m_numScaledRefLayerOffsets = val; }2053 Int getNumScaledRefLayerOffsets( ) { return m_numScaledRefLayerOffsets; }2054 2055 Void setScaledRefLayerId( Int i, Int val ) { m_scaledRefLayerId[i] = val; }2056 Int getScaledRefLayerId( Int i ) { return m_scaledRefLayerId[i]; }2057 2058 Void setScaledRefLayerLeftOffset( Int j, Int val ) { m_scaledRefLayerLeftOffset[j] = val; }2059 Int getScaledRefLayerLeftOffset( Int j ) { return m_scaledRefLayerLeftOffset[j]; }2060 2061 Void setScaledRefLayerTopOffset( Int j, Int val ) { m_scaledRefLayerTopOffset[j] = val; }2062 Int getScaledRefLayerTopOffset( Int j ) { return m_scaledRefLayerTopOffset[j]; }2063 2064 Void setScaledRefLayerRightOffset( Int j, Int val ) { m_scaledRefLayerRightOffset[j] = val; }2065 Int getScaledRefLayerRightOffset( Int j ) { return m_scaledRefLayerRightOffset[j]; }2066 2067 Void setScaledRefLayerBottomOffset( Int j, Int val ) { m_scaledRefLayerBottomOffset[j] = val; }2068 Int getScaledRefLayerBottomOffset( Int j ) { return m_scaledRefLayerBottomOffset[j]; }2069 #endif2070 1890 // Inference 2071 1891 -
branches/HTM-12.1-dev0/source/Lib/TLibCommon/TypeDef.h
r1075 r1076 368 368 // TBD: Check if integration is necessary. 369 369 370 #define H_MV_HLS10_GEN 0 // General changes (not tested)371 372 #define H_MV_HLS10_AUX 1 // Auxiliary pictures373 #define H_MV_HLS10_GEN_FIX 1374 #define H_MV_FIX_LOOP_GOPSIZE 1375 #define H_MV_FIX_SUB_LAYERS_MAX_MINUS1 1376 377 #define H_MV_HLS10_GEN_VSP_CONF_WIN 1 // VPS conformance window378 #define H_MV_HLS10_GEN_VSP_BASE_LAYER_AVAIL 1 // vps_base_layer_available379 #define H_MV_HLS10_REF_PRED_LAYERS 1 // reference and predicted layer derivation380 #define H_MV_HLS10_NESSECARY_LAYER 1 // necessary layers381 #define H_MV_HLS10_ADD_LAYERSETS 1 // additional layer sets382 #define H_MV_HLS10_DBP_SIZE 1 // dpb size syntax structure383 #define H_MV_HLS10_MAXNUMPICS 1 // constraint on number of pictures in rps384 #define H_MV_HLS10_PTL 1 // profile tier level385 #define H_MV_HLS10_PTL_FIX 1 // profile tier level fix386 #define H_MV_HLS10_PTL_INBL_FIX 1 // profile tier level fix387 #define H_MV_HLS10_PTL_INFER_FIX 1 // fix inference ptl388 #define H_MV_HLS10_MULTILAYERSPS 1 // multilayer SPS extension389 #define H_MV_HLS10_VPS_VUI 1 // vsp vui390 #define H_MV_HLS10_VPS_VUI_BSP 1 // vsp vui bsp391 #define H_MV_HLS10_PPS 1 // PPS modifications392 393 #define H_MV_HLS10_VPS_VUI_BSP_STORE 0 // Currently bsp vui bsp hrd parameters are not stored, some dynamic memory allocation with upper bounds is required.394 395 396 370 #define H_MV_HLS7_GEN 0 // General changes (not tested) 397 371 … … 459 433 #define MAX_NESTING_NUM_LAYER 64 460 434 461 #if H_MV_HLS10_VPS_VUI_BSP462 435 #define MAX_VPS_NUM_HRD_PARAMETERS 1024 463 436 #define MAX_NUM_SUB_LAYERS 7 464 437 #define MAX_NUM_SIGNALLED_PARTITIONING_SCHEMES 16 465 #else466 #define MAX_VPS_NUM_HRD_PARAMETERS 1467 #endif468 438 469 439 #define MAX_VPS_OP_SETS_PLUS1 1024 470 440 #if H_MV 471 #if H_MV_HLS10_ADD_LAYERSETS472 441 #define MAX_VPS_NUM_ADD_LAYER_SETS 1024 473 #endif474 442 #define MAX_VPS_NUH_LAYER_ID_PLUS1 63 475 443 #define MAX_NUM_SCALABILITY_TYPES 16 … … 486 454 #define MAX_VPS_PROFILE_TIER_LEVEL 64 487 455 #define MAX_VPS_ADD_OUTPUT_LAYER_SETS 1024 488 #if H_MV_HLS10_ADD_LAYERSETS489 456 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 + MAX_VPS_OP_SETS_PLUS1 ) 490 #else491 #define MAX_VPS_OUTPUTLAYER_SETS ( MAX_VPS_ADD_OUTPUT_LAYER_SETS + MAX_VPS_OP_SETS_PLUS1 )492 #endif493 457 #define MAX_NUM_VIDEO_SIGNAL_INFO 16 494 458 #define MAX_NUM_SCALED_REF_LAYERS MAX_NUM_LAYERS-1 495 #if !H_MV_HLS10_VPS_VUI_BSP496 #define MAX_NUM_BSP_HRD_PARAMETERS 100 ///< Maximum value is actually not specified497 #define MAX_NUM_BITSTREAM_PARTITIONS 100 ///< Maximum value is actually not specified498 #define MAX_NUM_BSP_SCHED_COMBINATION 100 ///< Maximum value is actually not specified499 #define MAX_SUB_STREAMS 1024500 #endif501 459 #else 502 460 #define MAX_NUM_LAYER_IDS 64 … … 969 927 MAINSTILLPICTURE = 3, 970 928 #if H_MV 971 #if H_MV_HLS10_PTL972 929 MULTIVIEWMAIN = 6, 973 930 #if H_3D 974 931 MAIN3D = 8, 975 #endif976 #else977 MAINSTEREO = 4,978 MAINMULTIVIEW = 5,979 #if H_3D980 MAIN3D = 6,981 #endif982 932 #endif 983 933 #endif … … 1022 972 #endif 1023 973 VIEW_ORDER_INDEX = 1, 1024 #if H_MV_HLS10_AUX1025 974 DEPENDENCY_ID = 2, 1026 975 AUX_ID = 3, 1027 #endif1028 976 }; 1029 977 #endif
Note: See TracChangeset for help on using the changeset viewer.