Changeset 1043 in SHVCSoftware for branches/SHM-dev/source/Lib/TLibDecoder
- Timestamp:
- 2 Mar 2015, 21:08:06 (11 years ago)
- Location:
- branches/SHM-dev/source/Lib/TLibDecoder
- Files:
-
- 6 edited
-
TDecCAVLC.cpp (modified) (15 diffs)
-
TDecCu.h (modified) (1 diff)
-
TDecGop.cpp (modified) (1 diff)
-
TDecGop.h (modified) (1 diff)
-
TDecTop.cpp (modified) (8 diffs)
-
TDecTop.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1030 r1043 1347 1347 #if N0065_LAYER_POC_ALIGNMENT 1348 1348 #if O0062_POC_LSB_NOT_PRESENT_FLAG 1349 if( ( pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerId InVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag() )1349 if( ( pcSlice->getLayerId() > 0 && !pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId())) ) || !pcSlice->getIdrPicFlag() ) 1350 1350 #else 1351 1351 if( pcSlice->getLayerId() > 0 || !pcSlice->getIdrPicFlag() ) … … 1536 1536 if(chkAssert) 1537 1537 { 1538 // There may be something wrong here (layer id assumed to be layer idx?)1539 assert(rps->getNumberOfNegativePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , pcSlice->getLayerId(), pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)));1540 assert(rps->getNumberOfPositivePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , pcSlice->getLayerId(), pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)) - rps->getNumberOfNegativePictures());1541 assert((rps->getNumberOfPositivePictures() + rps->getNumberOfNegativePictures() + rps->getNumberOfLongtermPictures()) <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii , pcSlice->getLayerId(), pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)));1538 UInt layerIdx = pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId()); 1539 assert(rps->getNumberOfNegativePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii, layerIdx, pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii))); 1540 assert(rps->getNumberOfPositivePictures() <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii, layerIdx, pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii)) - rps->getNumberOfNegativePictures()); 1541 assert((rps->getNumberOfPositivePictures() + rps->getNumberOfNegativePictures() + rps->getNumberOfLongtermPictures()) <= pcSlice->getVPS()->getMaxVpsDecPicBufferingMinus1(ii, layerIdx, pcSlice->getVPS()->getMaxSLayersInLayerSetMinus1(ii))); 1542 1542 } 1543 1543 } … … 1601 1601 { 1602 1602 #if Q0060_MAX_TID_REF_EQUAL_TO_ZERO 1603 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&1604 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1603 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) && 1604 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1605 1605 #else 1606 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() &&1607 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1606 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() && 1607 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1608 1608 #endif 1609 1609 { … … 1664 1664 { 1665 1665 #if Q0060_MAX_TID_REF_EQUAL_TO_ZERO 1666 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) &&1667 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1666 if((pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() || pcSlice->getTLayer()==0) && 1667 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1668 1668 #else 1669 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerId InVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() &&1670 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerId InVps(i)) >= pcSlice->getTLayer()) )1669 if(pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(pcSlice->getVPS()->getLayerIdxInVps(i),pcSlice->getLayerId()) > pcSlice->getTLayer() && 1670 (pcSlice->getVPS()->getMaxTSLayersMinus1(pcSlice->getVPS()->getLayerIdxInVps(i)) >= pcSlice->getTLayer()) ) 1671 1671 #endif 1672 1672 { … … 1714 1714 else 1715 1715 { 1716 format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerId InVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc();1716 format = pcSlice->getVPS()->getVpsRepFormat( sps->getUpdateRepFormatFlag() ? sps->getUpdateRepFormatIndex() : pcSlice->getVPS()->getVpsRepFormatIdx( pcSlice->getVPS()->getLayerIdxInVps(sps->getLayerId()) ) )->getChromaFormatVpsIdc(); 1717 1717 #if Q0195_REP_FORMAT_CLEANUP 1718 1718 assert( (sps->getUpdateRepFormatFlag()==false && pcSlice->getVPS()->getVpsNumRepFormats()==1) || pcSlice->getVPS()->getVpsNumRepFormats() > 1 ); //conformance check … … 2062 2062 } 2063 2063 #if Q0142_POC_LSB_NOT_PRESENT 2064 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerId InVps(pcSlice->getLayerId()) ) && iPOClsb > 0 )2064 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId()) ) && iPOClsb > 0 ) 2065 2065 { 2066 2066 assert( pcSlice->getPocResetIdc() != 2 ); … … 2082 2082 READ_CODE(pcSlice->getSPS()->getBitsForPOC(), uiCode,"poc_lsb_val"); pcSlice->setPocLsbVal(uiCode); 2083 2083 #if Q0142_POC_LSB_NOT_PRESENT 2084 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerId InVps(pcSlice->getLayerId()) ) && pcSlice->getFullPocResetFlag() )2084 if ( pcSlice->getVPS()->getPocLsbNotPresentFlag( pcSlice->getVPS()->getLayerIdxInVps(pcSlice->getLayerId()) ) && pcSlice->getFullPocResetFlag() ) 2085 2085 { 2086 2086 assert( pcSlice->getPocLsbVal() == 0 ); … … 2854 2854 READ_FLAG( uiCode, "vps_nuh_layer_id_present_flag" ); vps->setNuhLayerIdPresentFlag(uiCode ? true : false); 2855 2855 vps->setLayerIdInNuh(0, 0); 2856 vps->setLayerId InVps(0, 0);2856 vps->setLayerIdxInVps(0, 0); 2857 2857 for(i = 1; i < vps->getMaxLayers(); i++) 2858 2858 { … … 2866 2866 vps->setLayerIdInNuh(i, i); 2867 2867 } 2868 vps->setLayerId InVps(vps->getLayerIdInNuh(i), i);2868 vps->setLayerIdxInVps(vps->getLayerIdInNuh(i), i); 2869 2869 2870 2870 if( !vps->getSplittingFlag() ) … … 2881 2881 #endif 2882 2882 #if VIEW_ID_RELATED_SIGNALING 2883 // if ( pcVPS->getNumViews() > 1 )2884 // However, this is a bug in the text since, view_id_len_minus1 is needed to parse view_id_val.2885 {2886 2883 #if O0109_VIEW_ID_LEN 2887 READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode ); 2888 #else 2889 READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode ); 2890 #endif 2891 } 2884 READ_CODE( 4, uiCode, "view_id_len" ); vps->setViewIdLen( uiCode ); 2885 #else 2886 READ_CODE( 4, uiCode, "view_id_len_minus1" ); vps->setViewIdLenMinus1( uiCode ); 2887 #endif 2892 2888 2893 2889 #if O0109_VIEW_ID_LEN … … 2910 2906 vps->setNumDirectRefLayers(0, 0); 2911 2907 // For other layers 2912 for( Int layerCtr = 1; layerCtr <= vps->getMaxLayers() - 1; layerCtr++) 2913 { 2908 for( Int layerCtr = 1; layerCtr < vps->getMaxLayers(); layerCtr++) 2909 { 2910 UInt layerId = vps->getLayerIdInNuh(layerCtr); 2914 2911 UInt numDirectRefLayers = 0; 2915 2912 for( Int refLayerCtr = 0; refLayerCtr < layerCtr; refLayerCtr++) … … 2918 2915 if(uiCode) 2919 2916 { 2920 vps->setRefLayerId(layer Ctr, numDirectRefLayers, refLayerCtr);2917 vps->setRefLayerId(layerId, numDirectRefLayers, vps->getLayerIdInNuh(refLayerCtr)); 2921 2918 numDirectRefLayers++; 2922 2919 } 2923 2920 } 2924 vps->setNumDirectRefLayers(layer Ctr, numDirectRefLayers);2921 vps->setNumDirectRefLayers(layerId, numDirectRefLayers); 2925 2922 } 2926 2923 #endif … … 3673 3670 { 3674 3671 vps->setLayerIdInNuh(i, i); 3675 vps->setLayerId InVps(vps->getLayerIdInNuh(i), i);3672 vps->setLayerIdxInVps(vps->getLayerIdInNuh(i), i); 3676 3673 } 3677 3674 … … 3868 3865 for(Int k = 0; k < vps->getNumLayersInIdList(optLsIdx); k++ ) { 3869 3866 Int lId = vps->getLayerSetLayerIdList(optLsIdx, k); 3870 maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerId InVps(lId)));3867 maxSLMinus1 = max(maxSLMinus1, vps->getMaxTSLayersMinus1(vps->getLayerIdxInVps(lId))); 3871 3868 } 3872 3869 MaxSubLayersInLayerSetMinus1[ i ] = maxSLMinus1; … … 4229 4226 { 4230 4227 #if VPS_VUI_TILES_NOT_IN_USE__FLAG 4231 layerIdx = vps->getLayerId InVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j));4228 layerIdx = vps->getLayerIdxInVps(vps->getRefLayerId(vps->getLayerIdInNuh(i), j)); 4232 4229 if (vps->getTilesInUseFlag(i) && vps->getTilesInUseFlag(layerIdx)) { 4233 4230 READ_FLAG( uiCode, "tile_boundaries_aligned_flag[i][j]" ); vps->setTileBoundariesAlignedFlag(i,j,(uiCode == 1)); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.h
r1029 r1043 103 103 104 104 #if SVC_EXTENSION 105 TDecTop* getLayerDec ( UInt LayerId ) { return m_ppcTDecTop[LayerId]; }105 TDecTop* getLayerDec ( UInt layerIdx ) { return m_ppcTDecTop[layerIdx]; } 106 106 #endif 107 107 protected: -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1029 r1043 252 252 } 253 253 #if CONFORMANCE_BITSTREAM_MODE 254 if( this->getLayerDec(pcPic->getLayerId ())->getConfModeFlag() )254 if( this->getLayerDec(pcPic->getLayerIdx())->getConfModeFlag() ) 255 255 { 256 256 // Add this reconstructed picture to the parallel buffer. 257 std::vector<TComPic> *thisLayerBuffer = (this->getLayerDec(pcPic->getLayerId ()))->getConfListPic();257 std::vector<TComPic> *thisLayerBuffer = (this->getLayerDec(pcPic->getLayerIdx()))->getConfListPic(); 258 258 thisLayerBuffer->push_back(*pcPic); 259 259 std::sort( thisLayerBuffer->begin(), thisLayerBuffer->end(), pocCompareFunction ); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h
r1029 r1043 118 118 #endif 119 119 #if SVC_EXTENSION 120 TDecTop* getLayerDec(UInt LayerId) { return m_ppcTDecTop[LayerId]; }120 TDecTop* getLayerDec(UInt layerIdx) { return m_ppcTDecTop[layerIdx]; } 121 121 #endif 122 122 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1040 r1043 483 483 484 484 #if FIX_NON_OUTPUT_LAYER 485 if( this->getLayerDec(pcPic->getLayerId ())->m_isOutputLayerFlag == false )485 if( this->getLayerDec(pcPic->getLayerIdx())->m_isOutputLayerFlag == false ) 486 486 { 487 487 pcPic->setOutputMark( false ); … … 764 764 765 765 #if P0182_VPS_VUI_PS_FLAG 766 UInt layerIdx = activeVPS->getLayerId InVps( m_layerId );766 UInt layerIdx = activeVPS->getLayerIdxInVps( m_layerId ); 767 767 768 768 if( activeVPS->getBaseLayerPSCompatibilityFlag(layerIdx) ) … … 788 788 789 789 #if R0227_REP_FORMAT_CONSTRAINT //Conformance checking for rep format -- rep format of current picture of current layer shall never be greater rep format defined in VPS for the current layer 790 UInt layerIdx = activeVPS->getLayerId InVps(m_apcSlicePilot->getLayerId());790 UInt layerIdx = activeVPS->getLayerIdxInVps(m_apcSlicePilot->getLayerId()); 791 791 792 792 if ( activeVPS->getVpsExtensionFlag() == 1 && (m_apcSlicePilot->getLayerId() == 0 || sps->getV1CompatibleSPSFlag() == 1) ) … … 2849 2849 2850 2850 #if VPS_EXTN_DIRECT_REF_LAYERS 2851 TDecTop* TDecTop::getRefLayerDec( UInt refLayerId c)2851 TDecTop* TDecTop::getRefLayerDec( UInt refLayerIdx ) 2852 2852 { 2853 2853 TComVPS* vps = m_parameterSetManagerDecoder.getActiveVPS(); … … 2857 2857 } 2858 2858 2859 return (TDecTop *)getLayerDec( vps->get RefLayerId( m_layerId, refLayerIdc) );2859 return (TDecTop *)getLayerDec( vps->getLayerIdxInVps( vps->getRefLayerId( m_layerId, refLayerIdx ) ) ); 2860 2860 } 2861 2861 #endif … … 2897 2897 { 2898 2898 Int mIdx = 0, sIdx = 0; 2899 Int iNuhLId = vps->getLayerIdInNuh(i); 2900 TDecTop *decTop = (TDecTop *)getLayerDec(iNuhLId); 2899 TDecTop *decTop = (TDecTop *)getLayerDec(i); 2901 2900 for ( Int j = 0; j < i; j++ ) 2902 2901 { … … 2961 2960 for ( Int j = latestDecIdx + 1; j < numTargetDecLayers; j++ ) 2962 2961 { 2963 Int jLidx = pcSlice->getVPS()->getLayerId InVps(targetDecLayerIdList[j]);2962 Int jLidx = pcSlice->getVPS()->getLayerIdxInVps(targetDecLayerIdList[j]); 2964 2963 if ( currTid <= pcSlice->getVPS()->getMaxTidIlRefPicsPlus1(latestDecLayerId,jLidx) - 1 ) 2965 2964 { … … 3109 3108 if( vps->getOutputLayerFlag( targetOlsIdx, i ) ) 3110 3109 { 3111 this->getLayerDec( vps->getLayer SetLayerIdList( targetLsIdx, i) )->m_isOutputLayerFlag = true;3110 this->getLayerDec( vps->getLayerIdxInVps( vps->getLayerSetLayerIdList( targetLsIdx, i ) ) )->m_isOutputLayerFlag = true; 3112 3111 } 3113 3112 } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r1029 r1043 242 242 #endif 243 243 #if POC_RESET_IDC_DECODER 244 Int getParseIdc() { return m_parseIdc;}245 Void setParseIdc(Int x) { m_parseIdc = x;}246 Void markAllPicsAsNoCurrAu();247 248 Int getLastPocPeriodId() { return m_lastPocPeriodId;}249 Void setLastPocPeriodId(Int x) { m_lastPocPeriodId = x;}250 251 Int getPrevPicOrderCnt() { return m_prevPicOrderCnt;}252 Void setPrevPicOrderCnt(Int const x) { m_prevPicOrderCnt = x;}253 #endif 254 UInt getLayerId () { return m_layerId;}255 Void setLayerId (UInt layer) { m_layerId = layer;}256 UInt getNumLayer () { return m_numLayer;}257 Void setNumLayer (UInt uiNum) { m_numLayer = uiNum;}258 TComList<TComPic*>* getListPic() { return &m_cListPic;}259 Void setLayerDec (TDecTop **p) { m_ppcTDecTop = p;}260 TDecTop* getLayerDec (UInt layer) { return m_ppcTDecTop[layer];}244 Int getParseIdc () { return m_parseIdc; } 245 Void setParseIdc (Int x) { m_parseIdc = x; } 246 Void markAllPicsAsNoCurrAu(); 247 248 Int getLastPocPeriodId () { return m_lastPocPeriodId; } 249 Void setLastPocPeriodId (Int x) { m_lastPocPeriodId = x; } 250 251 Int getPrevPicOrderCnt () { return m_prevPicOrderCnt; } 252 Void setPrevPicOrderCnt (Int const x) { m_prevPicOrderCnt = x; } 253 #endif 254 UInt getLayerId () { return m_layerId; } 255 Void setLayerId (UInt layer) { m_layerId = layer; } 256 UInt getNumLayer () { return m_numLayer; } 257 Void setNumLayer (UInt uiNum) { m_numLayer = uiNum; } 258 TComList<TComPic*>* getListPic () { return &m_cListPic; } 259 Void setLayerDec (TDecTop **p) { m_ppcTDecTop = p; } 260 TDecTop* getLayerDec (UInt layerIdx) { return m_ppcTDecTop[layerIdx]; } 261 261 #if R0235_SMALLEST_LAYER_ID 262 262 Void xDeriveSmallestLayerId(TComVPS* vps); 263 263 #endif 264 264 #if VPS_EXTN_DIRECT_REF_LAYERS 265 TDecTop* getRefLayerDec (UInt refLayerIdc);265 TDecTop* getRefLayerDec (UInt refLayerIdx); 266 266 Int getNumDirectRefLayers () { return m_numDirectRefLayers; } 267 267 Void setNumDirectRefLayers (Int num) { m_numDirectRefLayers = num; }
Note: See TracChangeset for help on using the changeset viewer.