Changeset 971 in 3DVCSoftware
- Timestamp:
- 5 Jul 2014, 11:31:40 (10 years ago)
- Location:
- branches/HTM-11.1-dev0/source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-11.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
r969 r971 58 58 { 59 59 60 #if H_MV _HLS_860 #if H_MV 61 61 m_vps = new TComVPS; 62 #endif 63 #if !H_MV 62 #else !H_MV 64 63 m_iFrameRcvd = 0; 65 64 #endif … … 70 69 TAppEncTop::~TAppEncTop() 71 70 { 72 #if H_MV _HLS_871 #if H_MV 73 72 if (m_vps) 74 73 { … … 82 81 { 83 82 #if H_MV 84 #if H_MV_HLS_885 83 TComVPS& vps = (*m_vps); 86 #else87 TComVPS& vps = m_vps;88 #endif89 84 #else 90 85 TComVPS vps; … … 701 696 { 702 697 #if H_3D 703 #if H_MV_HLS_8704 698 for ( Int viewIndex = 0; viewIndex < m_vps->getNumViews(); viewIndex++ ) 705 699 { 706 700 m_vps->initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(), 707 701 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() ); 708 #else709 for ( Int viewIndex = 0; viewIndex < m_vps.getNumViews(); viewIndex++ )710 {711 m_vps.initCamParaVPS( viewIndex, true, m_cCameraData.getCamParsCodedPrecision(),712 m_cCameraData.getVaryingCameraParameters(), m_cCameraData.getCodedScale(), m_cCameraData.getCodedOffset() );713 #endif714 702 } 715 703 #endif … … 1507 1495 Void TAppEncTop::xSetRepFormat( TComVPS& vps ) 1508 1496 { 1509 #if H_MV_HLS_8_PMS_Q0195_201510 1497 vps.setRepFormatIdxPresentFlag( false ); 1511 #else1512 vps.setRepFormatIdxPresentFlag( true );1513 #endif1514 1498 vps.setVpsNumRepFormatsMinus1 ( 0 ); 1515 1499 … … 1527 1511 assert( vps.getRepFormat( 0 ) == NULL ); 1528 1512 vps.setRepFormat( 0 , repFormat ); 1529 1530 #if !H_MV_HLS_8_PMS_Q0195_201531 for(Int i = 0; i <= vps.getMaxLayersMinus1(); i++ )1532 {1533 vps.setVpsRepFormatIdx( i , 0 );1534 }1535 #endif1536 1513 } 1537 1514 … … 1544 1521 assert ( dpbSize != 0 ); 1545 1522 1546 #if H_MV_HLS_8_HRD_Q0102_081547 1523 for( Int i = 0; i < vps.getNumOutputLayerSets(); i++ ) 1548 #else1549 for( Int i = 1; i < vps.getNumOutputLayerSets(); i++ )1550 #endif1551 1524 { 1552 #if H_MV_HLS_8_MIS_Q0102_301553 1525 Int currLsIdx = vps.olsIdxToLsIdx( i ); 1554 #endif1555 1526 std::vector<Int> targetDecLayerIdList = vps.getTargetDecLayerIdList( i ); 1556 1527 Bool subLayerFlagInfoPresentFlag = false; 1557 1528 1558 #if H_MV_HLS_8_MIS_Q0102_301559 1529 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ ) 1560 #else1561 for( Int j = 0; j <= vps.getMaxSubLayersInLayerSetMinus1( i ); j++ )1562 #endif1563 1530 { 1564 1531 Bool subLayerDpbInfoPresentFlag = false; 1565 #if H_MV_HLS_8_MIS_Q0102_30 || H_MV_HLS_8_DBP_NODOC_421566 1532 assert( vps.getNumLayersInIdList( currLsIdx ) == targetDecLayerIdList.size() ); 1567 1533 for( Int k = 0; k < vps.getNumLayersInIdList( currLsIdx ); k++ ) 1568 #else1569 assert( vps.getNumSubDpbs( vps.olsIdxToLsIdx( i ) ) == targetDecLayerIdList.size() );1570 for( Int k = 0; k < vps.getNumSubDpbs( vps.olsIdxToLsIdx( i )); k++ )1571 #endif1572 1534 { 1573 1535 Int layerIdInVps = vps.getLayerIdInVps( targetDecLayerIdList[k] ); 1574 #if H_MV_HLS7_GEN1575 // TBD. Some derivation based on output layer set might be added here.1576 #endif1577 1536 dpbSize->setMaxVpsDecPicBufferingMinus1( i, k, j, m_maxDecPicBufferingMvc[ layerIdInVps ][ j ] - 1 ); 1578 1537 if ( j > 0 ) … … 1635 1594 // Additional output layer sets + profileLevelTierIdx 1636 1595 vps.setDefaultOutputLayerIdc ( m_defaultOutputLayerIdc ); 1637 #if H_MV_HLS_8_SYN_39_191638 1596 vps.setNumAddLayerSets ( 0 ); 1639 1597 vps.setNumAddOlss ( numAddOuputLayerSets ); 1640 #else1641 vps.setNumAddLayerSets ( numAddOuputLayerSets );1642 #endif1643 1598 vps.initTargetLayerIdLists(); 1644 1599 -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
r969 r971 48 48 TComSlice::TComSlice() 49 49 : m_iPPSId ( -1 ) 50 #if H_MV _HLS_8_POC_Q0142_3250 #if H_MV 51 51 , m_slicePicOrderCntLsb ( 0 ) 52 52 #endif … … 1863 1863 #endif 1864 1864 { 1865 #if H_MV _HLS_8_SYN_Q0041_031865 #if H_MV 1866 1866 m_vpsBaseLayerInternalFlag = true; 1867 1867 #endif … … 1883 1883 m_vpsNumProfileTierLevelMinus1 = -1; 1884 1884 1885 #if H_MV_HLS_8_SYN_39_191886 1885 m_numAddLayerSets = 0; 1887 1886 m_numAddOlss = 0; 1888 #else1889 m_numAddLayerSets = -1;1890 #endif1891 1887 m_defaultOutputLayerIdc = 0; 1892 1888 … … 1902 1898 } 1903 1899 1904 #if H_MV_HLS_8_PMS_Q0195_201905 1900 m_repFormatIdxPresentFlag = false; 1906 #endif1907 1901 m_maxOneActiveRefLayerFlag = false; 1908 1902 m_directDepTypeLenMinus2 = 0; 1909 1903 1910 1904 1911 #if H_MV_HLS_8_RPS_Q0100_361912 1905 m_vpsExtensionFlag = true; 1913 #endif1914 m_avcBaseLayerFlag = false;1915 1906 m_vpsNonVuiExtensionLength = 0; 1916 1907 m_splittingFlag = false; … … 2032 2023 } 2033 2024 2034 2035 #if H_MV_HLS_8_PMS_Q0195_202036 2025 //The value of vps_num_rep_formats_minus1 shall be in the range of 0 to 255, inclusive. 2037 2026 assert( getVpsNumRepFormatsMinus1() >= 0 ); 2038 2027 assert( getVpsNumRepFormatsMinus1() <= 255 ); 2039 #endif2040 2028 2041 2029 return true; … … 2083 2071 } 2084 2072 2085 #if H_MV_HLS_82086 2073 for (Int i = 0 ; i < MAX_NUM_LAYER_IDS; i++ ) 2087 2074 { … … 2096 2083 } 2097 2084 } 2098 2099 2085 2100 2086 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) … … 2107 2093 } 2108 2094 } 2109 2110 2095 2111 2096 for( Int i = 0; i <= getMaxLayersMinus1(); i++ ) // Bug in spec "<" instead of "<=" … … 2149 2134 m_numIndependentLayers = k; 2150 2135 } 2151 #endif2152 2136 } 2153 2137 … … 2314 2298 Int TComVPS::getNumOutputLayerSets() 2315 2299 { 2316 #if H_MV_HLS_8_SYN_39_192317 2300 return getNumAddOlss() + getNumLayerSets(); 2318 #else2319 return getNumAddLayerSets() + getVpsNumLayerSetsMinus1() + 1;2320 #endif2321 2301 } 2322 2302 … … 2384 2364 } 2385 2365 } 2386 #if H_MV_HLS_8_PMS_Q0165_182387 2366 assert( getNumOutputLayersInOutputLayerSet( i ) > 0 ); 2388 #endif2389 2367 } 2390 2368 … … 2420 2398 { 2421 2399 Int maxSLMinus1 = 0; 2422 #if H_MV_HLS_8_MIS_Q0102_302423 2400 for( Int k = 0; k < getNumLayersInIdList( i ); k++ ) 2424 2401 { 2425 2402 Int lId = m_layerSetLayerIdList[i][k]; 2426 #else2427 Int optLsIdx = olsIdxToLsIdx( i );2428 2429 for( Int k = 0; k < getNumLayersInIdList( optLsIdx ); k++ )2430 {2431 Int lId = m_layerSetLayerIdList[optLsIdx][k];2432 #endif2433 2403 maxSLMinus1 = std::max( maxSLMinus1, getSubLayersVpsMaxMinus1( getLayerIdInVps( lId ) )); 2434 2404 } 2435 2405 return maxSLMinus1; 2436 2406 } 2437 #if H_MV_HLS_8_RPS_Q0100_36 2407 2438 2408 Void TComVPS::inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ) 2439 2409 { … … 2458 2428 } 2459 2429 } 2460 #endif 2430 2431 Bool TComVPS::getAltOutputLayerFlagVar( Int i ) 2432 { 2433 // Semantics variable not syntax element ! 2434 2435 Bool altOptLayerFlag = false; 2436 if ( i > 0 && getNumOutputLayersInOutputLayerSet( i ) == 1 && 2437 getNumDirectRefLayers( getOlsHighestOutputLayerId( i ) ) > 0 ) 2438 { 2439 altOptLayerFlag = getAltOutputLayerFlag( i ); 2440 } 2441 return altOptLayerFlag; 2442 } 2443 2444 Int TComVPS::getMaxNumPics( Int layerId ) 2445 { 2446 Int maxNumPics = MAX_INT; 2447 for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++) 2448 { 2449 Int lsIdx = olsIdxToLsIdx( olsIdx ); 2450 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 2451 { 2452 if( getLayerSetLayerIdList(lsIdx, j ) == layerId ) 2453 { 2454 Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx ); 2455 maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j, maxSL ) ); 2456 } 2457 } 2458 } 2459 assert( maxNumPics != MAX_INT ); 2460 return maxNumPics; 2461 } 2462 2463 Void TComVPS::xSetRefLayerFlags( Int currLayerId ) 2464 { 2465 for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ ) 2466 { 2467 Int refLayerId = m_refLayerId[ currLayerId ][ j ]; 2468 m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1; 2469 for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 2470 { 2471 m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ] || m_recursiveRefLayerFlag[ refLayerId ][ k ]; 2472 } 2473 } 2474 } 2475 2461 2476 #endif // H_MV 2462 2477 … … 2530 2545 ::memset(m_usedByCurrPicLtSPSFlag, 0, sizeof(m_usedByCurrPicLtSPSFlag)); 2531 2546 #if H_MV 2532 #if !H_MV_HLS_8_SPS_NODOC_482533 m_spsExtensionPresentFlag = false;2534 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )2535 {2536 m_spsExtensionTypeFlag[ i ] = false;2537 }2538 #else2539 2547 m_spsRangeExtensionsFlag = false; 2540 2548 m_spsMultilayerExtensionFlag = false; … … 2544 2552 #else 2545 2553 m_spsExtension6bits = 0; 2546 #endif2547 2554 #endif 2548 2555 … … 2726 2733 2727 2734 #if H_MV 2728 #if H_MV_HLS_8_SPS_NODOC_482729 2735 m_ppsRangeExtensionsFlag = false; 2730 2736 m_ppsMultilayerExtensionFlag = false; … … 2734 2740 m_pps3dExtensionFlag = false; 2735 2741 m_ppsExtension5bits = 0; 2736 #endif2737 #else2738 for( Int i = 0; i < PS_EX_T_MAX_NUM; i++ )2739 {2740 m_ppsExtensionTypeFlag[ i ] = false;2741 }2742 2742 #endif 2743 2743 #endif … … 2984 2984 } 2985 2985 } 2986 2987 Void TComSPS::inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ) 2988 { 2989 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 2990 2991 if (getLayerId() > 0 ) 2992 { 2993 Int layerIdx = 0; 2994 while (layerIdx < (Int) targetDecLayerIdList.size() ) 2995 { 2996 if ( targetDecLayerIdList[layerIdx] == currLayerId ) 2997 { 2998 break; 2999 } 3000 layerIdx++; 3001 } 3002 3003 assert( layerIdx < (Int) targetDecLayerIdList.size() ); 3004 3005 for (Int i = 0; i <= getSpsMaxSubLayersMinus1(); i++ ) 3006 { 3007 Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ; 3008 3009 if ( encoder ) 3010 { 3011 assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 ); 3012 } 3013 else 3014 { 3015 setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 ); 3016 } 3017 } 3018 } 3019 } 3020 3021 Void TComSPS::checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ) 3022 { 3023 // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead 3024 // of nuh_layer_id of slice (currLayerId), this seems to be a bug. 3025 3026 for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ ) 3027 { 3028 TComReferencePictureSet* rps = getRPSList()->getReferencePictureSet( i ); 3029 if ( !rps->getInterRPSPrediction() ) 3030 { 3031 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ), 3032 getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 3033 } 3034 } 3035 } 3036 2986 3037 #endif 2987 3038 … … 3133 3184 printf("}\n"); 3134 3185 } 3186 #if H_MV 3187 Void TComReferencePictureSet::checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ) 3188 { 3189 assert( getNumberOfPictures() >= 0 ); 3190 if ( nuhLayerId == 0 ) 3191 { 3192 assert( getNumberOfPictures() <= spsMaxDecPicBufferingMinus1 ); 3193 } 3194 3195 if ( vpsExtensionFlag ) 3196 { 3197 assert( getNumberOfPictures() <= maxNumPics ); 3198 } 3199 } 3200 #endif 3135 3201 3136 3202 TComRPSList::TComRPSList() … … 3279 3345 } 3280 3346 3281 #if !H_MV_HLS_8_DBP_NODOC_423282 Void TComSlice::markIvRefPicsAsUnused( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc )3283 {3284 // Fill targetDecLayerIdSet with all layers if empty (at encoder side)3285 if (targetDecLayerIdSet.size() == 0 )3286 {3287 for ( Int layerIdInVps = 0; layerIdInVps <= vps->getMaxLayersMinus1(); layerIdInVps++ )3288 {3289 targetDecLayerIdSet.push_back( vps->getLayerIdInNuh( layerIdInVps ) );3290 }3291 }3292 3293 Int numTargetDecLayers = (Int) targetDecLayerIdSet.size();3294 Int latestDecIdx;3295 for ( latestDecIdx = 0; latestDecIdx < numTargetDecLayers; latestDecIdx++)3296 {3297 if ( targetDecLayerIdSet[ latestDecIdx ] == curLayerId )3298 {3299 break;3300 }3301 }3302 3303 for( Int i = 0; i <= latestDecIdx; i++ )3304 {3305 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ i ] ) )3306 {3307 TComPic* pcPic = ivPicLists->getPic( targetDecLayerIdSet[ i ], curPoc );3308 if ( pcPic )3309 {3310 if( pcPic->getSlice(0)->isReferenced() && pcPic->getSlice(0)->getTemporalLayerNonReferenceFlag() )3311 {3312 Bool remainingInterLayerReferencesFlag = false;3313 for( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ )3314 {3315 TComVPS* vpsSlice = pcPic->getSlice(0)->getVPS();3316 if ( vps->nuhLayerIdIncluded( targetDecLayerIdSet[ j ] ) )3317 {3318 for( Int k = 0; k < vpsSlice->getNumDirectRefLayers( targetDecLayerIdSet[ j ] ); k++ )3319 {3320 if ( targetDecLayerIdSet[ i ] == vpsSlice->getRefLayerId( targetDecLayerIdSet[ j ], k ) )3321 {3322 remainingInterLayerReferencesFlag = true;3323 }3324 }3325 }3326 }3327 if( !remainingInterLayerReferencesFlag )3328 {3329 pcPic->getSlice(0)->setReferenced( false );3330 }3331 }3332 }3333 }3334 }3335 }3336 #endif3337 3347 Void TComSlice::printRefPicList() 3338 3348 { … … 3351 3361 Void TComSlice::markCurrPic( TComPic* currPic ) 3352 3362 { 3353 3354 #if !H_MV_HLS_8_DBP_NODOC_42 3355 if ( !currPic->getSlice(0)->getDiscardableFlag() ) 3356 { 3357 #endif 3358 currPic->getSlice(0)->setReferenced( true ) ; 3359 currPic->setIsLongTerm( false ); 3360 #if !H_MV_HLS_8_DBP_NODOC_42 3361 } 3362 else 3363 { 3364 currPic->getSlice(0)->setReferenced( false ) ; 3365 } 3366 #endif 3367 3368 #if H_MV_HLS_7_VPS_P0300_27 3363 currPic->getSlice(0)->setReferenced( true ) ; 3364 currPic->setIsLongTerm( false ); 3365 3369 3366 currPic->setReconMark( true ); 3370 3367 currPic->setPicOutputFlag( currPic->getSlice(0)->getPicOutputFlag() ); 3371 #endif3372 3368 } 3373 3369 … … 3403 3399 Int refLayerIdx = vps->getLayerIdInVps( vps->getRefLayerId( getLayerId(), i ) ); 3404 3400 3405 #if H_MV_HLS_8_RPS_Q0060_173406 3401 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) && ( getTLayer() == 0 ) && 3407 3402 ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() ); 3408 #else3409 Bool refLayerPicFlag = ( vps->getSubLayersVpsMaxMinus1( refLayerIdx ) >= getTLayer() ) &&3410 ( vps->getMaxTidIlRefPicsPlus1( refLayerIdx, vps->getLayerIdInVps( getLayerId() )) > getTLayer() );3411 #endif3412 3403 3413 3404 return refLayerPicFlag; … … 3766 3757 3767 3758 #if H_3D_DDD 3768 InitializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i );3759 initializeDDDPara( vps->getCamParPrecision(), codScale[ i ], codOffset[ i ], i ); 3769 3760 #endif 3770 3761 } … … 3774 3765 3775 3766 #if H_3D_DDD 3776 Void TComSlice:: InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx )3767 Void TComSlice::initializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ) 3777 3768 { 3778 3769 UInt uiViewId = getViewIndex(); … … 3831 3822 3832 3823 return; 3824 } 3825 3826 3827 #endif 3828 3829 #if H_MV 3830 Void TComSlice::checkCrossLayerBlaFlag() 3831 { 3832 // cross_layer_bla_flag shall be equal to 0 for pictures with nal_unit_type not equal to IDR_W_RADL or IDR_N_LP or with nuh_layer_id not equal to 0. 3833 if ( getLayerId() != 0 || getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 3834 { 3835 assert( m_crossLayerBlaFlag == 0 ); 3836 } 3837 } 3838 3839 Bool TComSlice::inferPocMsbValPresentFlag() 3840 { 3841 Bool pocMsbValPresentFlag; 3842 if( getSliceSegmentHeaderExtensionLength() == 0 ) 3843 { 3844 pocMsbValPresentFlag = false; 3845 } 3846 else if ( getPocMsbValRequiredFlag() ) 3847 { 3848 pocMsbValPresentFlag = true; 3849 } 3850 else 3851 { 3852 pocMsbValPresentFlag = false; 3853 } 3854 3855 return pocMsbValPresentFlag; 3856 } 3857 3858 3859 #endif 3860 3861 #if H_3D_DBBP 3862 Int TComSlice::getDepthFromDV( Int iDV, Int iBaseViewIdx ) 3863 { 3864 return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]); 3833 3865 } 3834 3866 #endif … … 4323 4355 } 4324 4356 4357 Void TComVpsVuiBspHrdParameters::checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ) 4358 { 4359 // bsp_comb_hrd_idx 4360 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4361 assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() ); 4362 4363 // bsp_comb_sched_idx 4364 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 4365 4366 //* This check needs to activated, when HighestTid is available here 4367 // assert( getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) ); 4368 } 4369 4325 4370 Void TComVUI::inferVideoSignalInfo( TComVPS* vps, Int layerIdCurr ) 4326 4371 { -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TComSlice.h
r969 r971 54 54 class TComPicLists; 55 55 class TComVPS; 56 #if H_MV_HLS_8_RPS_Q0100_3657 56 class TComSPS; 58 #endif59 57 #endif 60 58 // ==================================================================================================================== … … 130 128 Void printDeltaPOC(); 131 129 132 #if H_MV_HLS_8_RPS_Q0100_36 133 Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ) 134 { 135 assert( getNumberOfPictures() >= 0 ); 136 if ( nuhLayerId == 0 ) 137 { 138 assert( getNumberOfPictures() <= spsMaxDecPicBufferingMinus1 ); 139 } 140 141 if ( vpsExtensionFlag ) 142 { 143 assert( getNumberOfPictures() <= maxNumPics ); 144 } 145 } 130 #if H_MV 131 Void checkMaxNumPics( Bool vpsExtensionFlag, Int maxNumPics, Int nuhLayerId, Int spsMaxDecPicBufferingMinus1 ); 146 132 #endif 147 133 }; … … 479 465 Void setBspCombHrdIdx( Int h, Int i, Int j, Int val ) { m_bspCombHrdIdx[h][i][j] = val; } 480 466 Int getBspCombHrdIdx( Int h, Int i, Int j ) { return m_bspCombHrdIdx[h][i][j]; } 481 #if H_MV_HLS_8_HRD_Q0101_04482 467 Int getBspCombHrdIdxLen() { return gCeilLog2( getVpsNumBspHrdParametersMinus1() + 1); }; 483 Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ) 484 { 485 // bsp_comb_hrd_idx 486 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 487 assert( getBspCombSchedIdx(h, i, j ) <= getVpsNumBspHrdParametersMinus1() ); 488 489 // bsp_comb_sched_idx 490 assert( getBspCombSchedIdx(h, i, j ) >= 0 ); 491 492 //* This check needs to activated, when HighestTid is available here 493 // assert( getBspCombSchedIdx(h, i, j ) <= vps->getHrdParameters( getBspCombHrdIdx( h, i, j ) )->getCpbCntMinus1( highestTid ) ); 494 } 495 #endif 468 496 469 497 470 Void setBspCombSchedIdx( Int h, Int i, Int j, Int val ) { m_bspCombSchedIdx[h][i][j] = val; } 498 471 Int getBspCombSchedIdx( Int h, Int i, Int j ) { return m_bspCombSchedIdx[h][i][j]; } 472 473 Void checkBspCombHrdAndShedIdx( TComVPS* vps, Int h, Int i, Int j ); 499 474 500 475 Void setHrdParametermeters( Int k, TComHRD* val ) { m_hrdParameters[k] = val; }; … … 695 670 private: 696 671 Int m_VPSId; 697 #if H_MV _HLS_8_SYN_Q0041_03672 #if H_MV 698 673 Bool m_vpsBaseLayerInternalFlag; 699 674 #endif … … 736 711 TimingInfo m_timingInfo; 737 712 #if H_MV 738 #if H_MV_HLS_8_RPS_Q0100_36739 713 Bool m_vpsExtensionFlag; 740 #endif 714 741 715 /// VPS EXTENSION SYNTAX ELEMENTS 742 Bool m_avcBaseLayerFlag;743 716 Int m_vpsNonVuiExtensionLength; 744 717 Bool m_splittingFlag; … … 761 734 762 735 Int m_numAddLayerSets; 763 #if H_MV_HLS_8_SYN_39_19764 736 Int m_highestLayerIdxPlus1 [MAX_VPS_ADD_OUTPUT_LAYER_SETS][MAX_NUM_LAYERS]; 765 737 Int m_numAddOlss; 766 #endif 738 767 739 Int m_defaultOutputLayerIdc; 768 740 … … 802 774 Int m_refLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 803 775 804 #if H_MV_HLS_8805 776 Int m_numRefLayers [MAX_NUM_LAYER_IDS]; 806 777 Int m_numPredictedLayers [MAX_NUM_LAYERS]; … … 810 781 Int m_treePartitionLayerIdList [MAX_NUM_LAYERS][MAX_NUM_LAYER_IDS]; 811 782 Bool m_recursiveRefLayerFlag [MAX_NUM_LAYER_IDS][MAX_NUM_LAYER_IDS]; 812 #else 813 814 Int m_numSamplePredRefLayers [MAX_NUM_LAYERS]; 815 Bool m_samplePredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 816 Int m_samplePredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 817 818 Int m_numMotionPredRefLayers [MAX_NUM_LAYERS]; 819 Bool m_motionPredEnabledFlag [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 820 Int m_motionPredRefLayerId [MAX_NUM_LAYERS][MAX_NUM_LAYERS]; 821 #endif 783 822 784 Int m_viewIndex [MAX_NUM_LAYERS ]; 823 785 … … 828 790 829 791 Int xGetDimBitOffset( Int j ); 830 831 #if H_MV_HLS_8 832 Void xSetRefLayerFlags( Int currLayerId ) 833 { 834 for( Int j = 0; j < getNumDirectRefLayers( currLayerId ); j++ ) 835 { 836 Int refLayerId = m_refLayerId[ currLayerId ][ j ]; 837 m_recursiveRefLayerFlag[ currLayerId ][ refLayerId ] = 1; 838 for( Int k = 0; k < MAX_NUM_LAYER_IDS; k++ ) 839 { 840 m_recursiveRefLayerFlag[ currLayerId ][ k ] = m_recursiveRefLayerFlag[ currLayerId ][ k ] || m_recursiveRefLayerFlag[ refLayerId ][ k ]; 841 } 842 } 843 } 844 #endif 792 Void xSetRefLayerFlags( Int currLayerId ); 845 793 // VPS EXTENSION 2 SYNTAX ELEMENTS 846 794 #if H_3D_ARP … … 902 850 Void setVPSId (Int i) { m_VPSId = i; } 903 851 904 #if H_MV_HLS_8_SYN_Q0041_03905 852 Void setVpsBaseLayerInternalFlag( Bool flag ) { m_vpsBaseLayerInternalFlag = flag; } 906 853 Bool getVpsBaseLayerInternalFlag( ) { return m_vpsBaseLayerInternalFlag; } 907 #endif908 854 909 855 UInt getMaxTLayers () { return m_uiMaxTLayers; } … … 957 903 TimingInfo* getTimingInfo() { return &m_timingInfo; } 958 904 #if H_MV 959 960 #if H_MV_HLS_8_RPS_Q0100_36961 905 Void setVpsExtensionFlag( Bool flag ) { m_vpsExtensionFlag = flag; } 962 906 Bool getVpsExtensionFlag( ) { return m_vpsExtensionFlag; } 963 #endif 964 #if !H_MV_HLS_8_SYN_Q0041_03 965 Void setAvcBaseLayerFlag( Bool val ) { m_avcBaseLayerFlag = val; } 966 Bool getAvcBaseLayerFlag() { return m_avcBaseLayerFlag; } 967 #endif 907 968 908 Void setVpsNonVuiExtensionLength( Int val ) { m_vpsNonVuiExtensionLength = val; } 969 909 Int getVpsNonVuiExtensionLength( ) { return m_vpsNonVuiExtensionLength; } … … 1026 966 Int getNumAddLayerSets( ) { return m_numAddLayerSets; } 1027 967 1028 #if H_MV_HLS_8_SYN_39_191029 968 Void setHighestLayerIdxPlus1( Int i, Int j, Int val ) { m_highestLayerIdxPlus1[i][j] = val; } 1030 969 Int getHighestLayerIdxPlus1( Int i, Int j ) { return m_highestLayerIdxPlus1[i][j]; } … … 1032 971 Void setNumAddOlss( Int val ) { m_numAddOlss = val; } 1033 972 Int getNumAddOlss( ) { return m_numAddOlss; } 1034 #endif1035 973 1036 974 Void setDefaultOutputLayerIdc( Int val ) { m_defaultOutputLayerIdc = val; } … … 1060 998 Int getVpsRepFormatIdx( Int i ) { return m_vpsRepFormatIdx[i]; } 1061 999 1062 #if H_MV_HLS_8_PMS_Q0195_201063 1000 Int inferVpsRepFormatIdx( Int i ) { return std::min( i, getVpsNumRepFormatsMinus1() ); } 1064 #endif1065 1001 1066 1002 Void setRepFormat( Int i, TComRepFormat* val ) { m_repFormat[i] = val; } … … 1077 1013 Void setDpbSize( TComDpbSize* val ) { assert( m_dpbSize != 0 ); m_dpbSize = val; } 1078 1014 TComDpbSize* getDpbSize( ) { return m_dpbSize;} 1079 #if H_MV_HLS_8_RPS_Q0100_36 1015 1080 1016 Void inferDbpSizeLayerSetZero( TComSPS* sps, Bool encoder ); 1081 #endif 1082 1083 1017 1084 1018 Void setPocLsbNotPresentFlag( Int i, Bool flag ) { m_pocLsbNotPresentFlag[i] = flag; } 1085 1019 Bool getPocLsbNotPresentFlag( Int i ) { return m_pocLsbNotPresentFlag[i]; } … … 1116 1050 Int getRefLayerId ( Int layerIdInNuh, Int idx );; 1117 1051 1118 #if H_MV_HLS_81119 1052 Int getNumRefLayers ( Int i ) { return m_numRefLayers[i]; } 1120 1053 Int getNumPredictedLayers ( Int i ) { return m_numPredictedLayers[i]; } … … 1124 1057 Int getTreePartitionLayerIdList( Int i, Int j ) { return m_treePartitionLayerIdList[i][j]; } 1125 1058 Bool getRecursiveRefLayerFlag ( Int i, Int j ) { return m_recursiveRefLayerFlag[i][j]; } 1126 1127 #endif1128 1129 #if H_MV_HLS_8_SYN_39_191130 1059 Int getNumLayerSets( ) { return getVpsNumLayerSetsMinus1() + 1 + getNumAddLayerSets(); }; 1131 #endif 1060 1132 1061 Bool checkVPSExtensionSyntax(); 1133 1062 Int scalTypeToScalIdx ( ScalabilityType scalType ); … … 1137 1066 1138 1067 Int getNumLayersInIdList ( Int lsIdx ); 1139 #if H_MV_HLS_8_RPS_Q0100_361140 1068 Int getLayerSetLayerIdList(Int lsIdx, Int j ) { return m_layerSetLayerIdList[ lsIdx ][ j ]; }; 1141 #endif1142 1069 1143 1070 Int getNumOutputLayerSets() ; 1144 #if !H_MV_HLS_8_DBP_NODOC_42 1145 Int getNumSubDpbs( Int i ) { return getNumLayersInIdList( i ); }; 1146 #endif 1071 1147 1072 Bool isOutputLayer( Int outLayerSetIdx, Int layerIdInNuh ); 1148 1073 Void deriveLayerSetLayerIdList(); … … 1160 1085 1161 1086 Int getMaxSubLayersInLayerSetMinus1( Int i ); 1162 1163 #if H_MV_HLS_8_SYN_39_191164 1087 Int getHighestLayerIdxPlus1Len( Int j ) { return gCeilLog2( getNumLayersInTreePartition( j ) + 1 ); }; 1165 #endif 1166 1167 1168 #if H_MV_HLS_7_VPS_P0300_27 1169 Bool getAltOutputLayerFlagVar( Int i ) 1170 { // Semantics variable not syntax element ! 1171 1172 Bool altOptLayerFlag = false; 1173 if ( i > 0 && getNumOutputLayersInOutputLayerSet( i ) == 1 && 1174 getNumDirectRefLayers( getOlsHighestOutputLayerId( i ) ) > 0 ) 1175 { 1176 altOptLayerFlag = getAltOutputLayerFlag( i ); 1177 } 1178 return altOptLayerFlag; 1179 }; 1180 #endif 1088 1089 Bool getAltOutputLayerFlagVar( Int i );; 1181 1090 1182 1091 // inference … … 1186 1095 // helpers 1187 1096 Bool getInDirectDependencyFlag( Int depLayeridInVps, Int refLayeridInVps, Int depth = 0 ); 1188 #if H_MV_HLS_8_RPS_Q0100_36 1189 Int getMaxNumPics( Int layerId ) 1190 { 1191 Int maxNumPics = MAX_INT; 1192 for( Int olsIdx = 0; olsIdx < getNumOutputLayerSets(); olsIdx++) 1193 { 1194 Int lsIdx = olsIdxToLsIdx( olsIdx ); 1195 for( Int j = 0; j < getNumLayersInIdList( lsIdx ); j++ ) 1196 { 1197 if( getLayerSetLayerIdList(lsIdx, j ) == layerId ) 1198 { 1199 Int maxSL = getMaxSubLayersInLayerSetMinus1( lsIdx ); 1200 maxNumPics = std::min( maxNumPics, getDpbSize()->getMaxVpsDecPicBufferingMinus1( olsIdx , j, maxSL ) ); 1201 } 1202 } 1203 } 1204 assert( maxNumPics != MAX_INT ); 1205 return maxNumPics; 1206 } 1207 #endif 1097 Int getMaxNumPics( Int layerId ); 1208 1098 1209 1099 /// VPS EXTENSION 2 SYNTAX ELEMENTS … … 1630 1520 // SPS 1631 1521 Bool m_spsExtensionPresentFlag; 1632 #if H_MV_HLS_8_SPS_NODOC_48 1522 1633 1523 Bool m_spsRangeExtensionsFlag; 1634 1524 Bool m_spsMultilayerExtensionFlag; … … 1639 1529 Int m_spsExtension6bits; 1640 1530 #endif 1641 #else 1642 Bool m_spsExtensionTypeFlag [PS_EX_T_MAX_NUM]; 1643 #endif 1531 1644 1532 Bool m_spsInferScalingListFlag; 1645 1533 Int m_spsScalingListRefLayerId; … … 1755 1643 UInt getMaxTLayers() { return m_uiMaxTLayers; } 1756 1644 Void setMaxTLayers( UInt uiMaxTLayers ) { assert( uiMaxTLayers <= MAX_TLAYER ); m_uiMaxTLayers = uiMaxTLayers; } 1757 #if H_MV _HLS_81645 #if H_MV 1758 1646 UInt getSpsMaxSubLayersMinus1() { return ( m_uiMaxTLayers - 1); } 1759 1647 #endif … … 1789 1677 TComPTL* getPTL() { return &m_pcPTL; } 1790 1678 #if H_MV 1791 1792 #if H_MV_HLS_8_HRD_Q0102_08 1793 Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ) 1794 { 1795 const std::vector<Int>& targetDecLayerIdList = vps->getTargetDecLayerIdList( vps->olsIdxToLsIdx( targetOptLayerSetIdx )); 1796 1797 if (getLayerId() > 0 ) 1798 { 1799 Int layerIdx = 0; 1800 while (layerIdx < (Int) targetDecLayerIdList.size() ) 1801 { 1802 if ( targetDecLayerIdList[layerIdx] == currLayerId ) 1803 { 1804 break; 1805 } 1806 layerIdx++; 1807 } 1808 1809 assert( layerIdx < (Int) targetDecLayerIdList.size() ); 1810 1811 for (Int i = 0; i <= getSpsMaxSubLayersMinus1(); i++ ) 1812 { 1813 Int maxDecPicBufferingMinus1 = vps->getDpbSize()->getMaxVpsDecPicBufferingMinus1( targetOptLayerSetIdx, layerIdx, i ) ; 1814 1815 if ( encoder ) 1816 { 1817 assert( getMaxDecPicBuffering( i ) - 1 == maxDecPicBufferingMinus1 ); 1818 } 1819 else 1820 { 1821 setMaxDecPicBuffering(i, maxDecPicBufferingMinus1 + 1 ); 1822 } 1823 } 1824 } 1825 } 1826 #endif 1679 Void inferSpsMaxDecPicBufferingMinus1( TComVPS* vps, Int targetOptLayerSetIdx, Int currLayerId, Bool encoder ); 1827 1680 1828 1681 Void setSpsExtensionPresentFlag( Bool flag ) { m_spsExtensionPresentFlag = flag; } 1829 1682 Bool getSpsExtensionPresentFlag( ) { return m_spsExtensionPresentFlag; } 1830 1683 1831 #if H_MV_HLS_8_SPS_NODOC_481832 1684 Void setSpsRangeExtensionsFlag( Bool flag ) { m_spsRangeExtensionsFlag = flag; } 1833 1685 Bool getSpsRangeExtensionsFlag( ) { return m_spsRangeExtensionsFlag; } … … 1844 1696 Void setSpsExtension6bits( Int val ) { m_spsExtension6bits = val; } 1845 1697 Int getSpsExtension6bits( ) { return m_spsExtension6bits; } 1846 #endif1847 #else1848 Void setSpsExtensionTypeFlag( Int i, Bool flag ) { m_spsExtensionTypeFlag[i] = flag; }1849 Bool getSpsExtensionTypeFlag( Int i ) { return m_spsExtensionTypeFlag[i]; }1850 1698 #endif 1851 1699 … … 1886 1734 // Inference 1887 1735 Void inferRepFormat( TComVPS* vps, Int layerIdCurr ); 1888 1889 1736 Void inferScalingList( TComSPS* spsSrc ); 1890 1737 1891 #if H_MV_HLS_8_RPS_Q0100_361892 1738 // others 1893 Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ) 1894 { 1895 // In spec, when rps is in SPS, nuh_layer_id of SPS is used instead 1896 // of nuh_layer_id of slice (currLayerId), this seems to be a bug. 1897 1898 for (Int i = 0; i < getRPSList()->getNumberOfReferencePictureSets(); i++ ) 1899 { 1900 TComReferencePictureSet* rps = getRPSList()->getReferencePictureSet( i ); 1901 if ( !rps->getInterRPSPrediction() ) 1902 { 1903 rps->checkMaxNumPics( vps->getVpsExtensionFlag(), vps->getMaxNumPics( currLayerId ), 1904 getLayerId(), getMaxDecPicBuffering( getSpsMaxSubLayersMinus1() ) - 1 ); 1905 } 1906 } 1907 } 1908 #endif 1739 Void checkRpsMaxNumPics( TComVPS* vps, Int currLayerId ); 1909 1740 1910 1741 #endif … … 2019 1850 Int m_ppsScalingListRefLayerId; 2020 1851 2021 #if H_MV_HLS_8_SPS_NODOC_482022 1852 Bool m_ppsRangeExtensionsFlag; 2023 1853 Bool m_ppsMultilayerExtensionFlag; … … 2029 1859 #endif 2030 1860 2031 #else2032 Bool m_ppsExtensionTypeFlag[PS_EX_T_MAX_NUM];2033 #endif2034 1861 Bool m_pocResetInfoPresentFlag; 2035 1862 #endif … … 2175 2002 Int getPpsScalingListRefLayerId( ) { return m_ppsScalingListRefLayerId; } 2176 2003 2177 #if H_MV_HLS_8_SPS_NODOC_482178 2004 Void setPpsRangeExtensionsFlag( Bool flag ) { m_ppsRangeExtensionsFlag = flag; } 2179 2005 Bool getPpsRangeExtensionsFlag( ) { return m_ppsRangeExtensionsFlag; } … … 2191 2017 Void setPpsExtension5bits( Int val ) { m_ppsExtension5bits = val; } 2192 2018 Int getPpsExtension5bits( ) { return m_ppsExtension5bits; } 2193 #endif2194 #else2195 Void setPpsExtensionTypeFlag( Int i, Bool flag ) { m_ppsExtensionTypeFlag[i] = flag; }2196 Bool getPpsExtensionTypeFlag( Int i ) { return m_ppsExtensionTypeFlag[i]; }2197 2019 #endif 2198 2020 … … 2231 2053 Int m_iPPSId; ///< picture parameter set ID 2232 2054 Bool m_PicOutputFlag; ///< pic_output_flag 2233 #if H_MV _HLS_8_POC_Q0142_322055 #if H_MV 2234 2056 Int m_slicePicOrderCntLsb; 2235 2057 #endif … … 2414 2236 Void setPicOutputFlag( Bool b ) { m_PicOutputFlag = b; } 2415 2237 Bool getPicOutputFlag() { return m_PicOutputFlag; } 2416 #if H_MV _HLS_8_POC_Q0142_322238 #if H_MV 2417 2239 Void setSlicePicOrderCntLsb( Int i ) { m_slicePicOrderCntLsb = i; }; 2418 2240 Int getSlicePicOrderCntLsb( ) { return m_slicePicOrderCntLsb; }; … … 2567 2389 static Void markIvRefPicsAsShortTerm ( std::vector<TComPic*> refPicSetInterLayer0, std::vector<TComPic*> refPicSetInterLayer1 ); 2568 2390 static Void markCurrPic ( TComPic* currPic ); 2569 #if !H_MV_HLS_8_DBP_NODOC_422570 static Void markIvRefPicsAsUnused ( TComPicLists* ivPicLists, std::vector<Int> targetDecLayerIdSet, TComVPS* vps, Int curLayerId, Int curPoc );2571 #endif2572 2391 Void printRefPicList(); 2573 2392 #endif … … 2705 2524 Void setCrossLayerBlaFlag( Bool flag ) { m_crossLayerBlaFlag = flag; } 2706 2525 Bool getCrossLayerBlaFlag( ) { return m_crossLayerBlaFlag; } 2707 Void checkCrossLayerBlaFlag ( ) 2708 { 2709 // cross_layer_bla_flag shall be equal to 0 for pictures with nal_unit_type not equal to IDR_W_RADL or IDR_N_LP or with nuh_layer_id not equal to 0. 2710 if ( getLayerId() != 0 || getNalUnitType() != NAL_UNIT_CODED_SLICE_IDR_W_RADL || getNalUnitType() == NAL_UNIT_CODED_SLICE_IDR_N_LP ) 2711 { 2712 assert( m_crossLayerBlaFlag == 0 ); 2713 } 2714 } 2526 Void checkCrossLayerBlaFlag ( ); 2715 2527 2716 2528 #if !H_MV_HLS7_GEN … … 2736 2548 Void setPocResetIdc( Int val ) { m_pocResetIdc = val; } 2737 2549 Int getPocResetIdc( ) { return m_pocResetIdc; } 2738 #if H_MV_HLS_8_POC_Q0142_322739 2550 Void checkPocResetIdc( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !(getSlicePicOrderCntLsb() > 0 ) || !( getPocResetIdc() == 2) ); } 2740 #endif 2551 2741 2552 Void setPocResetPeriodId( Int val ) { m_pocResetPeriodId = val; } 2742 2553 Int getPocResetPeriodId( ) { return m_pocResetPeriodId; } … … 2747 2558 Void setPocLsbVal( Int val ) { m_pocLsbVal = val; } 2748 2559 Int getPocLsbVal( ) { return m_pocLsbVal; } 2749 #if H_MV_HLS_8_POC_Q0142_322750 2560 Void checkPocLsbVal( ) { assert( !(getVPS()->getPocLsbNotPresentFlag( getLayerIdInVps() ) ) || !getFullPocResetFlag() || ( getPocLsbVal() == 0 ) ); } 2751 #endif2752 2561 2753 2562 Void setPocMsbValPresentFlag( Bool flag ) { m_pocMsbValPresentFlag = flag; } … … 2792 2601 TComPic* getPicFromRefPicSetInterLayer( Int setIdc, Int layerId ); 2793 2602 2794 2795 #if H_MV_HLS_8_POC_Q0146_15 2796 // Inference 2797 Bool inferPocMsbValPresentFlag() 2798 { 2799 Bool pocMsbValPresentFlag; 2800 if( getSliceSegmentHeaderExtensionLength() == 0 ) 2801 { 2802 pocMsbValPresentFlag = false; 2803 } 2804 else if ( getPocMsbValRequiredFlag() ) 2805 { 2806 pocMsbValPresentFlag = true; 2807 } 2808 else 2809 { 2810 pocMsbValPresentFlag = false; 2811 } 2812 2813 return pocMsbValPresentFlag; 2814 } 2815 #endif 2603 // Inference 2604 Bool inferPocMsbValPresentFlag(); 2816 2605 #endif 2817 2606 #if H_3D_DDD 2818 Void InitializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2819 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ) 2820 { 2821 return ClipY(( iDV * m_aiDDDInvScale[ iBaseViewIdx ] + m_aiDDDInvOffset[ iBaseViewIdx ] ) >> m_aiDDDShift[ iBaseViewIdx ]); 2822 } 2607 Void initializeDDDPara( UInt uiCamParsCodedPrecision, Int iCodedScale,Int iCodedOffset, Int iBaseViewIdx ); 2608 Int getDepthFromDV( Int iDV, Int iBaseViewIdx ); 2823 2609 #endif 2824 2610 -
branches/HTM-11.1-dev0/source/Lib/TLibCommon/TypeDef.h
r970 r971 398 398 :// #define H_MV_HLS_7_OTHER_P0187_1 0 // (OTHER/P0187/NoOutputOfPriorPicsFlag) #1 Inference of NoOutputOfPriorPicsFlag and proposes to take into account colour format and bit depth for the inference in addition to spatial resolution 399 399 //#define H_MV_HLS_8_MIS_Q0078_24 0 // #24 (MISC /Q0078/scan and pic type) , Items 3 b,c and 4, clarifying which pictures in an output layer sets are applied the values of general_progressive_source_flag, general_interlaced_source_flag, general_non_packed_constraint_flag and general_frame_only_constraint_flag. 400 //#define H_MV_HLS_7_HRD_P0138_6 0 //(HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections.400 //#define H_MV_HLS_7_HRD_P0138_6 0 // (HRD/P0138/HRD parameters for bitstreams excluding) #6 Decision: Adopt (as revised in updated contribution, with the specification of a flag in the BP SEI (HRD/P0192/sub-DPB) #12 Establish sub-DPBs based on the representation format indicated at the VPS level. It was suggested that the expressed shared capacity limit would need to be less than or equal to the sum of the individual capacity limits. Decision: Adopt as modified. Further study is encouraged on profile/level constraint selections. 401 401 402 402 #define H_MV_HLS_8_SYN_Q0041_03 1 // #3 Syntax only (HS /Q0041/hybrid scalability) The proposed text was endorsed, with non-editorial open issues considered as follows … … 987 987 #if H_MV 988 988 989 #if !H_MV_HLS_8_SPS_NODOC_48990 enum PpsExtensionTypes991 {992 PPS_EX_T_MV = 0,993 #if H_3D994 PPS_EX_T_3D = 3,995 #endif996 PPS_EX_T_ESC = 7,997 PPS_EX_T_MAX_NUM = 8998 };999 1000 //Below for sps, would be good if this could be aligned1001 1002 enum PsExtensionTypes1003 {1004 PS_EX_T_MV = 1,1005 #if H_3D1006 PS_EX_T_3D = 3,1007 #endif1008 PS_EX_T_ESC = 7,1009 PS_EX_T_MAX_NUM = 81010 };1011 #endif1012 989 /// scalability types 1013 990 enum ScalabilityType -
branches/HTM-11.1-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp
r969 r971 374 374 375 375 #if H_MV 376 #if H_MV_HLS_8_SPS_NODOC_48377 376 READ_FLAG( uiCode, "pps_range_extensions_flag" ); pcPPS->setPpsRangeExtensionsFlag( uiCode == 1 ); 378 377 READ_FLAG( uiCode, "pps_multilayer_extension_flag" ); pcPPS->setPpsMultilayerExtensionFlag( uiCode == 1 ); … … 390 389 if ( pcPPS->getPpsMultilayerExtensionFlag() ) 391 390 { 392 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 393 #if H_MV_HLS_8_PPS_NODOC_NN 394 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 395 #endif 391 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 392 READ_FLAG( uiCode, "pps_extension_reserved_zero_flag" ); 396 393 } 397 394 #if !H_3D … … 406 403 { 407 404 #endif 408 #else 409 for ( Int i = 0; i < PPS_EX_T_MAX_NUM; i++ ) 410 { 411 READ_FLAG( uiCode, "pps_extension_type_flag" ); pcPPS->setPpsExtensionTypeFlag( i, uiCode == 1 ); 412 #if H_3D 413 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_3D || i == PPS_EX_T_ESC ); 414 #else 415 assert( !pcPPS->getPpsExtensionTypeFlag( i ) || i == PPS_EX_T_MV || i == PPS_EX_T_ESC ); 416 #endif 417 } 418 419 420 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_MV ) ) 421 { 422 READ_FLAG( uiCode, "poc_reset_info_present_flag" ); pcPPS->setPocResetInfoPresentFlag( uiCode == 1 ); 423 } 424 425 #if H_3D 426 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_3D ) ) // This probably needs to be aligned with Rext and SHVC 427 { 428 parsePPSExtension( pcPPS, pcVPS ); 429 } 430 #endif 431 432 if( pcPPS->getPpsExtensionTypeFlag( PPS_EX_T_ESC ) ) 433 { 434 #endif 405 435 406 #endif 436 407 … … 792 763 { 793 764 #endif 794 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 );795 assert(uiCode <= 6);796 797 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false );798 if ( pcSPS->getMaxTLayers() == 1 )799 {800 // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0801 assert( uiCode == 1 );802 }803 804 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1);765 READ_CODE( 3, uiCode, "sps_max_sub_layers_minus1" ); pcSPS->setMaxTLayers ( uiCode+1 ); 766 assert(uiCode <= 6); 767 768 READ_FLAG( uiCode, "sps_temporal_id_nesting_flag" ); pcSPS->setTemporalIdNestingFlag ( uiCode > 0 ? true : false ); 769 if ( pcSPS->getMaxTLayers() == 1 ) 770 { 771 // sps_temporal_id_nesting_flag must be 1 when sps_max_sub_layers_minus1 is 0 772 assert( uiCode == 1 ); 773 } 774 775 parsePTL(pcSPS->getPTL(), 1, pcSPS->getMaxTLayers() - 1); 805 776 #if H_MV 806 777 } … … 820 791 { 821 792 #endif 822 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode );823 assert(uiCode <= 3);824 // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream825 assert (uiCode == 1);826 if( uiCode == 3 )827 {828 READ_FLAG( uiCode, "separate_colour_plane_flag"); assert(uiCode == 0);829 }830 831 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode );832 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode );793 READ_UVLC( uiCode, "chroma_format_idc" ); pcSPS->setChromaFormatIdc( uiCode ); 794 assert(uiCode <= 3); 795 // in the first version we only support chroma_format_idc equal to 1 (4:2:0), so separate_colour_plane_flag cannot appear in the bitstream 796 assert (uiCode == 1); 797 if( uiCode == 3 ) 798 { 799 READ_FLAG( uiCode, "separate_colour_plane_flag"); assert(uiCode == 0); 800 } 801 802 READ_UVLC ( uiCode, "pic_width_in_luma_samples" ); pcSPS->setPicWidthInLumaSamples ( uiCode ); 803 READ_UVLC ( uiCode, "pic_height_in_luma_samples" ); pcSPS->setPicHeightInLumaSamples( uiCode ); 833 804 #if H_MV 834 805 } … … 857 828 { 858 829 #endif 859 READ_UVLC( uiCode, "bit_depth_luma_minus8" );860 assert(uiCode <= 6);861 pcSPS->setBitDepthY( uiCode + 8 );862 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) );863 864 READ_UVLC( uiCode, "bit_depth_chroma_minus8" );865 assert(uiCode <= 6);866 pcSPS->setBitDepthC( uiCode + 8 );867 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) );830 READ_UVLC( uiCode, "bit_depth_luma_minus8" ); 831 assert(uiCode <= 6); 832 pcSPS->setBitDepthY( uiCode + 8 ); 833 pcSPS->setQpBDOffsetY( (Int) (6*uiCode) ); 834 835 READ_UVLC( uiCode, "bit_depth_chroma_minus8" ); 836 assert(uiCode <= 6); 837 pcSPS->setBitDepthC( uiCode + 8 ); 838 pcSPS->setQpBDOffsetC( (Int) (6*uiCode) ); 868 839 #if H_MV 869 840 } … … 877 848 { 878 849 #endif 879 UInt subLayerOrderingInfoPresentFlag;880 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag");881 882 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++)883 {884 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");885 pcSPS->setMaxDecPicBuffering( uiCode + 1, i);886 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );887 pcSPS->setNumReorderPics(uiCode, i);888 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]");889 pcSPS->setMaxLatencyIncrease( uiCode, i );890 891 if (!subLayerOrderingInfoPresentFlag)892 {893 for (i++; i <= pcSPS->getMaxTLayers()-1; i++)894 {895 pcSPS->setMaxDecPicBuffering(pcSPS->getMaxDecPicBuffering(0), i);896 pcSPS->setNumReorderPics(pcSPS->getNumReorderPics(0), i);897 pcSPS->setMaxLatencyIncrease(pcSPS->getMaxLatencyIncrease(0), i);898 }899 break;900 }901 }850 UInt subLayerOrderingInfoPresentFlag; 851 READ_FLAG(subLayerOrderingInfoPresentFlag, "sps_sub_layer_ordering_info_present_flag"); 852 853 for(UInt i=0; i <= pcSPS->getMaxTLayers()-1; i++) 854 { 855 READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]"); 856 pcSPS->setMaxDecPicBuffering( uiCode + 1, i); 857 READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" ); 858 pcSPS->setNumReorderPics(uiCode, i); 859 READ_UVLC ( uiCode, "sps_max_latency_increase_plus1[i]"); 860 pcSPS->setMaxLatencyIncrease( uiCode, i ); 861 862 if (!subLayerOrderingInfoPresentFlag) 863 { 864 for (i++; i <= pcSPS->getMaxTLayers()-1; i++) 865 { 866 pcSPS->setMaxDecPicBuffering(pcSPS->getMaxDecPicBuffering(0), i); 867 pcSPS->setNumReorderPics(pcSPS->getNumReorderPics(0), i); 868 pcSPS->setMaxLatencyIncrease(pcSPS->getMaxLatencyIncrease(0), i); 869 } 870 break; 871 } 872 } 902 873 #if H_MV 903 874 } … … 909 880 READ_UVLC( uiCode, "log2_diff_max_min_coding_block_size" ); 910 881 pcSPS->setLog2DiffMaxMinCodingBlockSize(uiCode); 911 882 912 883 if (pcSPS->getPTL()->getGeneralPTL()->getLevelIdc() >= Level::LEVEL5) 913 884 { 914 885 assert(log2MinCUSize + pcSPS->getLog2DiffMaxMinCodingBlockSize() >= 5); 915 886 } 916 887 917 888 Int maxCUDepthDelta = uiCode; 918 889 pcSPS->setMaxCUWidth ( 1<<(log2MinCUSize + maxCUDepthDelta) ); … … 945 916 { 946 917 #endif 947 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode );948 if(pcSPS->getScalingListPresentFlag ())949 {950 parseScalingList( pcSPS->getScalingList() );951 }918 READ_FLAG( uiCode, "sps_scaling_list_data_present_flag" ); pcSPS->setScalingListPresentFlag ( uiCode ); 919 if(pcSPS->getScalingListPresentFlag ()) 920 { 921 parseScalingList( pcSPS->getScalingList() ); 922 } 952 923 #if H_MV 953 924 } … … 1014 985 { 1015 986 #if H_MV 1016 #if H_MV_HLS_8_SPS_NODOC_481017 987 READ_FLAG( uiCode, "sps_range_extensions_flag" ); pcSPS->setSpsRangeExtensionsFlag( uiCode == 1 ); 1018 988 READ_FLAG( uiCode, "sps_multilayer_extension_flag" ); pcSPS->setSpsMultilayerExtensionFlag( uiCode == 1 ); … … 1047 1017 { 1048 1018 #endif 1049 #else 1050 for (Int i = 0; i < PS_EX_T_MAX_NUM; i++) 1051 { 1052 READ_FLAG( uiCode, "sps_extension_type_flag" ); pcSPS->setSpsExtensionTypeFlag( i, uiCode ); 1053 #if H_3D 1054 assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_3D || i == PS_EX_T_ESC ); 1055 #else 1056 assert( !pcSPS->getSpsExtensionTypeFlag( i ) || i == PS_EX_T_MV || i == PS_EX_T_ESC ); 1057 #endif 1058 } 1059 1060 if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_MV )) 1061 { 1062 parseSPSExtension( pcSPS ); 1063 } 1064 1065 #if H_3D 1066 if( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_3D )) 1067 { 1068 parseSPSExtension2( pcSPS, viewIndex, depthFlag ); 1069 } 1070 #endif 1071 1072 if ( pcSPS->getSpsExtensionTypeFlag( PS_EX_T_ESC )) 1073 { 1074 #endif 1075 #endif 1076 while ( xMoreRbspData() ) 1077 { 1078 READ_FLAG( uiCode, "sps_extension_data_flag"); 1079 } 1080 #if H_MV && !H_MV_HLS_8_SPS_NODOC_48 1081 } 1082 #endif 1019 1020 #endif 1021 while ( xMoreRbspData() ) 1022 { 1023 READ_FLAG( uiCode, "sps_extension_data_flag"); 1024 } 1083 1025 } 1084 1026 } … … 2027 1969 #endif 2028 1970 2029 #if H_MV _HLS_8_HRD_Q0102_081971 #if H_MV 2030 1972 Void TDecCavlc::parseSliceHeader (TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx) 2031 1973 #else … … 2070 2012 sps->inferRepFormat ( vps , rpcSlice->getLayerId() ); 2071 2013 sps->inferScalingList( parameterSetManager->getActiveSPS( sps->getSpsScalingListRefLayerId() ) ); 2072 #if H_MV_HLS_8_HRD_Q0102_082073 2014 sps->inferSpsMaxDecPicBufferingMinus1( vps, targetOlsIdx, rpcSlice->getLayerId(), false ); 2074 #endif2075 #if H_MV_HLS_8_RPS_Q0100_362076 2015 vps->inferDbpSizeLayerSetZero( sps, false ); 2077 #endif2078 2016 2079 2017 if ( sps->getVuiParametersPresentFlag() ) … … 2192 2130 READ_CODE(sps->getBitsForPOC(), slicePicOrderCntLsb, "slice_pic_order_cnt_lsb"); 2193 2131 } 2194 #if H_MV_HLS_8_POC_Q0142_322195 2132 rpcSlice->setSlicePicOrderCntLsb( slicePicOrderCntLsb ); 2196 #endif2197 2133 2198 2134 Bool picOrderCntMSBZeroFlag = false; … … 2290 2226 { 2291 2227 parseShortTermRefPicSet(sps,rps, sps->getRPSList()->getNumberOfReferencePictureSets()); 2292 #if H_MV _HLS_8_RPS_Q0100_362228 #if H_MV 2293 2229 if ( !rps->getInterRPSPrediction( ) ) 2294 2230 { // check sum of num_positive_pics and num_negative_pics … … 2403 2339 rps->setNumberOfPictures(offset); 2404 2340 } 2405 #if H_MV _HLS_8_RPS_Q0100_362341 #if H_MV 2406 2342 if ( !rps->getInterRPSPrediction( ) ) 2407 2343 { // check sum of NumPositivePics, NumNegativePics, num_long_term_sps and num_long_term_pics … … 2793 2729 rpcSlice->setPocResetIdc( 0 ); 2794 2730 } 2795 #if H_MV_HLS_8_POC_Q0142_322796 2731 rpcSlice->checkPocResetIdc(); 2797 #endif2798 2732 2799 2733 #if H0044_POC_LSB_NOT_PRESENT … … 2817 2751 READ_FLAG( uiCode, "full_poc_reset_flag" ); rpcSlice->setFullPocResetFlag( uiCode == 1 ); 2818 2752 READ_CODE( rpcSlice->getPocLsbValLen() , uiCode, "poc_lsb_val" ); rpcSlice->setPocLsbVal( uiCode ); 2819 #if !H_MV_HLS_8_POC_Q0142_322820 #if H0044_POC_LSB_NOT_PRESENT2821 if ( rpcSlice->getVPS()->getPocLsbNotPresentFlag(rpcSlice->getLayerId()) && rpcSlice->getFullPocResetFlag() )2822 {2823 assert( rpcSlice->getPocLsbVal() == 0 );2824 }2825 #endif2826 #endif2827 2753 } 2828 #if H_MV_HLS_8_POC_Q0142_322829 2754 rpcSlice->checkPocLsbVal(); 2830 #endif2831 2755 2832 2756 // Derive the value of PocMs8bValRequiredFlag … … 2841 2765 else 2842 2766 { 2843 #if H_MV_HLS_8_POC_Q0146_152844 2767 rpcSlice->setPocMsbValPresentFlag( rpcSlice->inferPocMsbValPresentFlag( ) ); 2845 #else2846 if( rpcSlice->getPocMsbValRequiredFlag() )2847 {2848 rpcSlice->setPocMsbValPresentFlag( true );2849 }2850 else2851 {2852 rpcSlice->setPocMsbValPresentFlag( false );2853 }2854 #endif2855 2768 } 2856 2769 -
branches/HTM-11.1-dev0/source/Lib/TLibDecoder/TDecSbac.h
r969 r971 87 87 #endif 88 88 89 #if H_MV _HLS_8_HRD_Q0102_0889 #if H_MV 90 90 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/, Int targetOlsIdx ) {} 91 #else92 Void parseSliceHeader ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/) {}93 91 #endif 94 92 Void parseTerminatingBit ( UInt& ruiBit );
Note: See TracChangeset for help on using the changeset viewer.