Changeset 1100 in SHVCSoftware
- Timestamp:
- 6 Jul 2015, 20:20:51 (9 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1089 r1100 1387 1387 pic->getPicYuvRec()->setBorderExtension( false ); 1388 1388 1389 #if RESOLUTION_BASED_DPB1390 dpbStatus.m_numPicsInLayer[layerIdx]--;1391 #endif1392 1389 #if FIX_ALIGN_BUMPING 1393 1390 dpbStatus.m_numPicsInSubDpb[dpbStatus.m_layerIdToSubDpbIdMap[layerId]]--; … … 1532 1529 // Find DPB-information from the VPS 1533 1530 DpbStatus maxDpbLimit; 1534 #if RESOLUTION_BASED_DPB1535 Int targetLsIdx, subDpbIdx;1536 TComVPS *vps = findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit);1537 1538 if( getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 )1539 {1540 targetLsIdx = 0;1541 subDpbIdx = 0;1542 }1543 else1544 {1545 targetLsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );1546 subDpbIdx = vps->getSubDpbAssigned( targetLsIdx, layerIdx );1547 }1548 #else1549 1531 #if FIX_ALIGN_BUMPING 1550 1532 Int subDpbIdx = getCommonDecoderParams()->getTargetOutputLayerSetIdx() == 0 … … 1555 1537 #endif 1556 1538 findDpbParametersFromVps(listOfPocs, listOfPocsInEachLayer, listOfPocsPositionInEachLayer, maxDpbLimit); 1557 #endif1558 1539 // Assume that listOfPocs is sorted in increasing order - if not have to sort it. 1559 1540 while( ifInvokeBumpingBeforeDecoding(dpbStatus, maxDpbLimit, layerIdx, subDpbIdx) ) … … 1747 1728 maxDpbLimit.m_maxLatencyPictures = sps->getMaxLatencyIncrease( highestTId ) + sps->getNumReorderPics( highestTId ) - 1; 1748 1729 } 1749 #if RESOLUTION_BASED_DPB1750 maxDpbLimit.m_numPicsInLayer[0] = sps->getMaxDecPicBuffering( highestTId );1751 #endif1752 1730 maxDpbLimit.m_numPicsInSubDpb[0] = sps->getMaxDecPicBuffering( highestTId ); 1753 1731 } … … 1838 1816 // Number of pictures in each sub-DPB 1839 1817 retVal |= ( dpbStatus.m_numPicsInSubDpb[subDpbIdx] >= dpbLimit.m_numPicsInSubDpb[subDpbIdx] ); 1840 1841 #if RESOLUTION_BASED_DPB1842 // Number of pictures in each layer1843 retVal |= ( dpbStatus.m_numPicsInLayer[layerIdx] >= dpbLimit.m_numPicsInLayer[layerIdx]);1844 #endif1845 1818 1846 1819 return retVal; … … 1909 1882 if( pic->getSlice(0)->isReferenced() || pic->getOutputMark() ) 1910 1883 { 1911 #if RESOLUTION_BASED_DPB1912 dpbStatus.m_numPicsInLayer[i]++; // Count pictures that are "used for reference" or "needed for output"1913 #else1914 1884 dpbStatus.m_numPicsInSubDpb[i]++; // Count pictures that are "used for reference" or "needed for output" 1915 #endif1916 1885 } 1917 1886 #if POC_RESET_IDC_DECODER … … 1949 1918 { 1950 1919 dpbStatus.m_numPicsNotDisplayedInLayer[i] = (Int)listOfPocsInEachLayer[i].size(); 1951 #if RESOLUTION_BASED_DPB1952 dpbStatus.m_numPicsInSubDpb[vps->getSubDpbAssigned(targetLsIdx,i)] += dpbStatus.m_numPicsInLayer[i];1953 dpbStatus.m_numPicsInSubDpb[i] += dpbStatus.m_numPicsInLayer[i];1954 #endif1955 1920 } 1956 1921 assert( dpbStatus.m_numAUsNotDisplayed != -1 ); -
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.h
r1066 r1100 139 139 Int m_numAUsNotDisplayed; 140 140 Int m_numPicsNotDisplayedInLayer[MAX_LAYERS]; 141 #if RESOLUTION_BASED_DPB142 Int m_numPicsInLayer[MAX_LAYERS]; // Pictures marked as used_for_reference or needed for output in the layer143 #endif144 141 Int m_numPicsInSubDpb[MAX_LAYERS]; // Pictures marked as used_for_reference or needed for output in the sub-DPB 145 142 #if FIX_ALIGN_BUMPING … … 162 159 m_maxLatencyIncrease = false; 163 160 m_maxLatencyPictures = 0; 164 #if RESOLUTION_BASED_DPB165 ::memset( m_numPicsInLayer, 0, sizeof(m_numPicsInLayer) );166 #endif167 161 ::memset( m_numPicsInSubDpb, 0, sizeof(m_numPicsInSubDpb) ); 168 162 ::memset(m_numPicsNotDisplayedInLayer, 0, sizeof(m_numPicsNotDisplayedInLayer) ); -
branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
r1094 r1100 1644 1644 #endif 1645 1645 #endif 1646 #if RESOLUTION_BASED_DPB1647 vps->assignSubDpbIndices();1648 #else1649 1646 vps->deriveNumberOfSubDpbs(); 1650 #endif1651 1647 vps->setOutputLayerFlag( 0, 0, 1 ); 1652 1648 … … 1747 1743 Int maxNumReorderPics = -1; 1748 1744 #if CHANGE_NUMSUBDPB_IDX 1749 #if RESOLUTION_BASED_DPB1750 for(Int k = 0; k < vps->getNumLayersInIdList(layerSetIdxForOutputLayerSet); k++)1751 #else1752 1745 for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++) 1753 #endif1754 1746 #else 1755 1747 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) … … 1757 1749 { 1758 1750 Int layerId = vps->getLayerSetLayerIdList(layerSetId, k); // k-th layer in the output layer set 1759 #if RESOLUTION_BASED_DPB1760 vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, m_acTEncTop[layerId].getMaxDecPicBuffering(j) - 1 );1761 // Add sub-DPB sizes of layers belonging to a sub-DPB. If a different sub-DPB size is calculated1762 // at the encoder, modify below1763 Int oldValue = vps->getMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j );1764 oldValue += vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j ) + 1;1765 vps->setMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j, oldValue );1766 #else1767 1751 vps->setMaxVpsDecPicBufferingMinus1( i, k, j, m_acTEncTop[vps->getLayerIdxInVps(layerId)].getMaxDecPicBuffering(j) - 1 ); 1768 #endif1769 1752 maxNumReorderPics = std::max( maxNumReorderPics, m_acTEncTop[vps->getLayerIdxInVps(layerId)].getNumReorderPics(j)); 1770 1753 } 1771 #if RESOLUTION_BASED_DPB1772 for(Int k = 0; k < vps->getNumSubDpbs(i); k++)1773 {1774 // Decrement m_maxVpsDecPicBufferingMinus11775 Int oldValue = vps->getMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j );1776 vps->setMaxVpsDecPicBufferingMinus1( i, vps->getSubDpbAssigned( layerSetIdxForOutputLayerSet, k ), j, oldValue - 1 );1777 }1778 #endif1779 1754 vps->setMaxVpsNumReorderPics(i, j, maxNumReorderPics); 1780 1755 vps->determineSubDpbInfoFlags(); -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.cpp
r1093 r1100 2153 2153 ::memset( m_subLayerDpbInfoPresentFlag, 0, sizeof(m_subLayerDpbInfoPresentFlag ) ); 2154 2154 ::memset( m_maxVpsDecPicBufferingMinus1, 0, sizeof(m_maxVpsDecPicBufferingMinus1 ) ); 2155 #if RESOLUTION_BASED_DPB2156 ::memset( m_maxVpsLayerDecPicBuffMinus1, 0, sizeof(m_maxVpsLayerDecPicBuffMinus1 ) );2157 #endif2158 2155 ::memset( m_maxVpsNumReorderPics, 0, sizeof(m_maxVpsNumReorderPics ) ); 2159 2156 ::memset( m_maxVpsLatencyIncreasePlus1, 0, sizeof(m_maxVpsLatencyIncreasePlus1 ) ); … … 3258 3255 #endif 3259 3256 #endif 3260 #if !RESOLUTION_BASED_DPB3261 3257 #if VPS_DPB_SIZE_TABLE 3262 3258 Void TComVPS::deriveNumberOfSubDpbs() … … 3282 3278 } 3283 3279 #endif 3284 #endif3285 3280 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 3286 3281 Void TComVPS::setTilesNotInUseFlag(Bool x) … … 3533 3528 checkFlagInner[j] |= ( getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j - 1) != getMaxVpsDecPicBufferingMinus1(i, subDpbIdx, j) ); 3534 3529 } 3535 #if RESOLUTION_BASED_DPB3536 for(Int layerIdx = 0; layerIdx < this->getNumLayersInIdList(layerSetIdxForOutputLayerSet) && !checkFlagInner[j]; layerIdx++) // If checkFlagInner[j] is true, break and signal the values3537 {3538 checkFlagInner[j] |= ( getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j - 1) != getMaxVpsLayerDecPicBuffMinus1(i, layerIdx, j) );3539 }3540 #endif3541 3530 } 3542 3531 // If checkFlagInner[j] = true, then some value needs to be signalled for the j-th sub-layer … … 3560 3549 } 3561 3550 #endif 3562 #if RESOLUTION_BASED_DPB 3563 Void TComVPS::assignSubDpbIndices() 3564 { 3565 RepFormat layerRepFormat [MAX_LAYERS]; 3566 RepFormat subDpbRepFormat [MAX_LAYERS]; 3567 3568 for(Int lsIdx = 0; lsIdx < this->getNumLayerSets(); lsIdx++) 3569 { 3570 for(Int j = 0; j < MAX_LAYERS; j++) 3571 { 3572 layerRepFormat [j].init(); 3573 subDpbRepFormat[j].init(); 3574 } 3575 3576 // Assign resolution, bit-depth, colour format for each layer in the layer set 3577 for(Int i = 0; i < this->getNumLayersInIdList( lsIdx ); i++) 3578 { 3579 Int layerIdxInVps = this->getLayerIdxInVps( this->getLayerSetLayerIdList(lsIdx, i) ); 3580 Int repFormatIdx = this->getVpsRepFormatIdx( layerIdxInVps ); 3581 RepFormat* repFormat = this->getVpsRepFormat( repFormatIdx ); 3582 3583 // Assign the rep_format() to the layer 3584 layerRepFormat[i] = *repFormat; 3585 } 3586 3587 // ---------------------------------------- 3588 // Sub-DPB assignment 3589 // ---------------------------------------- 3590 // For the base layer 3591 m_subDpbAssigned[lsIdx][0] = 0; 3592 subDpbRepFormat[0] = layerRepFormat[0]; 3593 3594 // Sub-DPB counter 3595 Int subDpbCtr = 1; 3596 3597 for(Int i = 1; i < this->getNumLayersInIdList( lsIdx ); i++) 3598 { 3599 Bool newSubDpbFlag = true; 3600 for(Int j = 0; (j < subDpbCtr) && (newSubDpbFlag); j++) 3601 { 3602 if( RepFormat::checkSameSubDpb( layerRepFormat[i], subDpbRepFormat[j] ) ) 3603 { 3604 // Belong to i-th sub-DPB 3605 m_subDpbAssigned[lsIdx][i] = j; 3606 newSubDpbFlag = false; 3607 } 3608 } 3609 if( newSubDpbFlag ) 3610 { 3611 // New sub-DPB 3612 subDpbRepFormat[subDpbCtr] = layerRepFormat[i]; 3613 m_subDpbAssigned[lsIdx][i] = subDpbCtr; 3614 subDpbCtr++; // Increment # subDpbs 3615 } 3616 } 3617 m_numSubDpbs[lsIdx] = subDpbCtr; 3618 } 3619 } 3620 Int TComVPS::findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId ) 3621 { 3622 for(Int i = 0; i < this->getNumLayersInIdList(lsIdx); i++) 3623 { 3624 if( this->getLayerSetLayerIdList( lsIdx, i) == nuhLayerId ) 3625 { 3626 return i; 3627 } 3628 } 3629 return -1; // Layer not found 3630 } 3631 #endif 3551 3632 3552 #if O0164_MULTI_LAYER_HRD 3633 3553 Void TComVPS::setBspHrdParameters( UInt hrdIdx, UInt frameRate, UInt numDU, UInt bitRate, Bool randomAccess ) … … 3798 3718 #endif 3799 3719 3800 #if RESOLUTION_BASED_DPB3801 // RepFormat Assignment operator3802 RepFormat& RepFormat::operator= (const RepFormat &other)3803 {3804 if( this != &other)3805 {3806 m_chromaAndBitDepthVpsPresentFlag = other.m_chromaAndBitDepthVpsPresentFlag;3807 m_chromaFormatVpsIdc = other.m_chromaFormatVpsIdc;3808 m_separateColourPlaneVpsFlag = other.m_separateColourPlaneVpsFlag;3809 m_picWidthVpsInLumaSamples = other.m_picWidthVpsInLumaSamples;3810 m_picHeightVpsInLumaSamples = other.m_picHeightVpsInLumaSamples;3811 m_bitDepthVpsLuma = other.m_bitDepthVpsLuma;3812 m_bitDepthVpsChroma = other.m_bitDepthVpsChroma;3813 #if R0156_CONF_WINDOW_IN_REP_FORMAT3814 m_conformanceWindowVps = other.m_conformanceWindowVps;3815 #endif3816 }3817 return *this;3818 }3819 3820 // Check whether x and y share the same resolution, chroma format and bit-depth.3821 Bool RepFormat::checkSameSubDpb(const RepFormat &x, const RepFormat &y)3822 {3823 return ( (x.m_chromaFormatVpsIdc == y.m_chromaFormatVpsIdc)3824 && (x.m_picWidthVpsInLumaSamples == y.m_picWidthVpsInLumaSamples)3825 && (x.m_picHeightVpsInLumaSamples == y.m_picHeightVpsInLumaSamples)3826 && (x.m_bitDepthVpsLuma == y.m_bitDepthVpsLuma)3827 && (x.m_bitDepthVpsChroma == y.m_bitDepthVpsChroma)3828 );3829 }3830 #endif3831 3832 3720 #if REPN_FORMAT_IN_VPS 3833 3721 UInt TComSlice::getPicWidthInLumaSamples() … … 4119 4007 , m_bitDepthVpsChroma (0) 4120 4008 {} 4121 #if RESOLUTION_BASED_DPB4122 Void RepFormat::init()4123 {4124 m_chromaFormatVpsIdc = CHROMA_420;4125 m_separateColourPlaneVpsFlag = false;4126 m_picWidthVpsInLumaSamples = 0;4127 m_picHeightVpsInLumaSamples = 0;4128 m_bitDepthVpsLuma = 0;4129 m_bitDepthVpsChroma = 0;4130 #if R0156_CONF_WINDOW_IN_REP_FORMAT4131 m_conformanceWindowVps.resetWindow();4132 #endif4133 }4134 #endif4135 4009 #endif 4136 4010 -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1094 r1100 531 531 public: 532 532 RepFormat(); 533 #if RESOLUTION_BASED_DPB534 Void init();535 RepFormat& operator= (const RepFormat &);536 static Bool checkSameSubDpb(const RepFormat &x, const RepFormat &y);537 #endif538 533 #if REPN_FORMAT_CONTROL_FLAG 539 534 Bool getChromaAndBitDepthVpsPresentFlag() { return m_chromaAndBitDepthVpsPresentFlag; } … … 818 813 Bool m_subLayerDpbInfoPresentFlag [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 819 814 Int m_maxVpsDecPicBufferingMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER]; 820 #if RESOLUTION_BASED_DPB821 Int m_maxVpsLayerDecPicBuffMinus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS][MAX_TLAYER];822 #endif823 815 Int m_maxVpsNumReorderPics [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; 824 816 Int m_maxVpsLatencyIncreasePlus1 [MAX_VPS_OP_LAYER_SETS_PLUS1][MAX_LAYERS]; … … 878 870 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 879 871 Bool m_vpsPocLsbAlignedFlag; 880 #endif881 #if RESOLUTION_BASED_DPB882 Int m_subDpbAssigned [MAX_VPS_LAYER_SETS_PLUS1][MAX_LAYERS];883 872 #endif 884 873 #if NECESSARY_LAYER_FLAG … … 1365 1354 Int getLayerIdcForOls( Int olsIdx, Int layerId ); 1366 1355 1367 #if RESOLUTION_BASED_DPB1368 Int getMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j) { assert(i != 0); return m_maxVpsLayerDecPicBuffMinus1[i][k][j]; }1369 Void setMaxVpsLayerDecPicBuffMinus1(Int i, Int k, Int j, Int x) { m_maxVpsLayerDecPicBuffMinus1[i][k][j] = x; }1370 #endif1371 1372 1356 Int getMaxVpsNumReorderPics(Int olsIdx, Int subLayerIdx) { assert(olsIdx != 0); return m_maxVpsNumReorderPics[olsIdx][subLayerIdx]; } 1373 1357 Void setMaxVpsNumReorderPics(Int olsIdx, Int subLayerIdx, Int x) { m_maxVpsNumReorderPics[olsIdx][subLayerIdx] = x; } … … 1397 1381 Int getVpsNonVuiExtLength() { return m_vpsNonVuiExtLength; } 1398 1382 Void setVpsNonVuiExtLength(Int x) { m_vpsNonVuiExtLength = x; } 1399 #endif1400 #if RESOLUTION_BASED_DPB1401 Void assignSubDpbIndices();1402 Int getSubDpbAssigned (Int lsIdx, Int layerIdx) { return m_subDpbAssigned[lsIdx][layerIdx]; }1403 Int findLayerIdxInLayerSet ( Int lsIdx, Int nuhLayerId );1404 1383 #endif 1405 1384 #if O0164_MULTI_LAYER_HRD -
branches/SHM-dev/source/Lib/TLibCommon/TypeDef.h
r1096 r1100 95 95 #define VPS_EXTN_UEV_CODING 1 ///< JCTVC-P0306: Code some syntax elements as ue(v), and remove some syntax elements that duplicate behaviour 96 96 #define CHANGE_NUMSUBDPB_IDX 1 ///< Change index of NumSubDpb from output layer set to layer set, to be more aligned with the Spec 97 #define RESOLUTION_BASED_DPB 0 ///< JCTVC-Q0154 - remove sharing of sub-DPB across layers98 ///< JCTVC-P0192: Assign layers to sub-DPBs based on the rep_format() signaled in the VPS99 97 #define ALIGNED_BUMPING 1 ///< JCTVC-P0192: Align bumping of pictures in an AU 100 98 #define FIX_ALIGN_BUMPING 1 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1095 r1100 3424 3424 #endif 3425 3425 #endif 3426 #if RESOLUTION_BASED_DPB3427 vps->assignSubDpbIndices();3428 #endif3429 3426 READ_FLAG(uiCode, "max_one_active_ref_layer_flag" ); 3430 3427 vps->setMaxOneActiveRefLayerFlag(uiCode); … … 3785 3782 #endif 3786 3783 3787 #if !RESOLUTION_BASED_DPB3788 3784 vps->deriveNumberOfSubDpbs(); 3789 #endif 3785 3790 3786 for(Int i = 1; i < vps->getNumOutputLayerSets(); i++) 3791 3787 { … … 3843 3839 } 3844 3840 READ_UVLC( uiCode, "max_vps_num_reorder_pics[i][j]" ); vps->setMaxVpsNumReorderPics( i, j, uiCode); 3845 #if RESOLUTION_BASED_DPB 3846 if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) ) 3847 { 3848 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 3849 { 3850 READ_UVLC( uiCode, "max_vps_layer_dec_pic_buff_minus1[i][k][j]" ); vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, uiCode); 3851 } 3852 } 3853 else // vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) == vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) 3854 { 3855 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 3856 { 3857 vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j)); 3858 } 3859 } 3860 #endif 3841 3861 3842 READ_UVLC( uiCode, "max_vps_latency_increase_plus1[i][j]" ); vps->setMaxVpsLatencyIncreasePlus1( i, j, uiCode); 3862 3843 } … … 3885 3866 if( !vps->getSubLayerDpbInfoPresentFlag(i, j) ) // If sub-layer DPB information is NOT present 3886 3867 { 3887 #if RESOLUTION_BASED_DPB3888 for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++)3889 #else3890 3868 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 3891 #endif3892 3869 { 3893 3870 vps->setMaxVpsDecPicBufferingMinus1( i, k, j, vps->getMaxVpsDecPicBufferingMinus1( i, k, j - 1 ) ); 3894 3871 } 3895 3872 vps->setMaxVpsNumReorderPics( i, j, vps->getMaxVpsNumReorderPics( i, j - 1) ); 3896 #if RESOLUTION_BASED_DPB3897 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++)3898 {3899 vps->setMaxVpsLayerDecPicBuffMinus1( i, k, j, vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j - 1));3900 }3901 #endif3902 3873 vps->setMaxVpsLatencyIncreasePlus1( i, j, vps->getMaxVpsLatencyIncreasePlus1( i, j - 1 ) ); 3903 3874 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1093 r1100 116 116 m_firstPicInLayerDecodedFlag = false; 117 117 #endif 118 #if RESOLUTION_BASED_DPB119 m_subDpbIdx = -1;120 #endif121 118 #if POC_RESET_IDC_DECODER 122 119 m_parseIdc = -1; … … 280 277 else 281 278 { 282 #if RESOLUTION_BASED_DPB283 Int layerSetIdxForOutputLayerSet = pcSlice->getVPS()->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() );284 Int layerIdx = pcSlice->getVPS()->findLayerIdxInLayerSet( layerSetIdxForOutputLayerSet, pcSlice->getLayerId() ); assert( layerIdx != -1 );285 m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsLayerDecPicBuffMinus1( getCommonDecoderParams()->getTargetOutputLayerSetIdx(), layerIdx, pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded286 #else287 279 m_iMaxRefPicNum = pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1( m_commonDecoderParams->getTargetOutputLayerSetIdx(), pcSlice->getVPS()->getLayerIdcForOls( pcSlice->getVPS()->getOutputLayerSetIdx( m_commonDecoderParams->getTargetOutputLayerSetIdx()), pcSlice->getLayerId() ), pcSlice->getTLayer() ) + 1; // m_uiMaxDecPicBuffering has the space for the picture currently being decoded 288 #endif289 280 } 290 281 #else … … 759 750 checkValueOfTargetOutputLayerSetIdx( m_apcSlicePilot->getVPS()); 760 751 #endif 761 #endif762 #if RESOLUTION_BASED_DPB763 // Following assignment should go wherever a new VPS is activated764 assignSubDpbs(m_apcSlicePilot->getVPS());765 752 #endif 766 753 m_apcSlicePilot->initSlice( nalu.m_layerId ); … … 2836 2823 } 2837 2824 #endif 2838 #if RESOLUTION_BASED_DPB 2839 Void TDecTop::assignSubDpbs(TComVPS *vps) 2840 { 2841 if( m_subDpbIdx == -1 ) // Sub-DPB index is not already assigned 2842 { 2843 Int lsIdx = vps->getOutputLayerSetIdx( getCommonDecoderParams()->getTargetOutputLayerSetIdx() ); 2844 2845 Int layerIdx = vps->findLayerIdxInLayerSet( lsIdx, getLayerId() ); 2846 assert( layerIdx != -1 ); // Current layer should be found in the layer set. 2847 2848 // Copy from the active VPS based on the layer ID. 2849 m_subDpbIdx = vps->getSubDpbAssigned( lsIdx, layerIdx ); 2850 } 2851 } 2852 #endif 2825 2853 2826 #if POC_RESET_IDC_DECODER 2854 2827 Void TDecTop::markAllPicsAsNoCurrAu(TComVPS *vps) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r1093 r1100 168 168 Int m_prevPicOrderCnt; 169 169 #endif 170 #if RESOLUTION_BASED_DPB171 Int m_subDpbIdx; // Index to the sub-DPB that the layer belongs to.172 // When new VPS is activated, this should be re-initialized to -1173 #endif174 170 #if CONFORMANCE_BITSTREAM_MODE 175 171 Bool m_confModeFlag; … … 293 289 ParameterSetManagerDecoder* getParameterSetManager() { return &m_parameterSetManagerDecoder; } 294 290 #endif 295 #if RESOLUTION_BASED_DPB296 Void setSubDpbIdx(Int idx) { m_subDpbIdx = idx; }297 Int getSubDpbIdx() { return m_subDpbIdx; }298 Void assignSubDpbs(TComVPS *vps);299 #endif300 291 #if CONFORMANCE_BITSTREAM_MODE 301 292 std::vector<TComPic>* getConfListPic() {return &m_confListPic; } -
branches/SHM-dev/source/Lib/TLibEncoder/TEncCavlc.cpp
r1095 r1100 2665 2665 { 2666 2666 #if CHANGE_NUMSUBDPB_IDX 2667 #if RESOLUTION_BASED_DPB2668 for(Int k = 0; k < vps->getNumSubDpbs(layerSetIdxForOutputLayerSet); k++)2669 #else2670 2667 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 2671 #endif2672 2668 #else 2673 2669 for(Int k = 0; k < vps->getNumSubDpbs(i); k++) … … 2684 2680 } 2685 2681 WRITE_UVLC( vps->getMaxVpsNumReorderPics( i, j), "max_vps_num_reorder_pics[i][j]" ); 2686 #if RESOLUTION_BASED_DPB 2687 if( vps->getNumSubDpbs(layerSetIdxForOutputLayerSet) != vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ) ) // NumSubDpbs 2688 { 2689 for(Int k = 0; k < vps->getNumLayersInIdList( layerSetIdxForOutputLayerSet ); k++) 2690 { 2691 WRITE_UVLC( vps->getMaxVpsLayerDecPicBuffMinus1( i, k, j), "max_vps_layer_dec_pic_buff_minus1[i][k][j]" ); 2692 } 2693 } 2694 #endif 2682 2695 2683 WRITE_UVLC( vps->getMaxVpsLatencyIncreasePlus1( i, j), "max_vps_latency_increase_plus1[i][j]" ); 2696 2684 }
Note: See TracChangeset for help on using the changeset viewer.