Changeset 1049 in SHVCSoftware for branches/SHM-dev/source
- Timestamp:
- 3 Mar 2015, 23:36:18 (10 years ago)
- Location:
- branches/SHM-dev/source
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/App/TAppDecoder/TAppDecTop.cpp
r1044 r1049 1545 1545 for( Int dpbLayerCtr = 0; dpbLayerCtr < dpbStatus.m_numLayers; dpbLayerCtr++) 1546 1546 { 1547 Int layerId x= dpbStatus.m_targetDecLayerIdList[dpbLayerCtr];1547 Int layerId = dpbStatus.m_targetDecLayerIdList[dpbLayerCtr]; 1548 1548 // Output all picutres "decoded" in that layer that have POC less than the current picture 1549 std::vector<TComPic> *layerBuffer = (m_acTDecTop->getLayerDec(layerId x))->getConfListPic();1549 std::vector<TComPic> *layerBuffer = (m_acTDecTop->getLayerDec(layerId))->getConfListPic(); 1550 1550 // Write all pictures to the file. 1551 if( this->getDecodedYuvLayerRefresh(layerId x) )1552 { 1553 m_outputBitDepth[CHANNEL_TYPE_LUMA] = g_bitDepth[CHANNEL_TYPE_LUMA] = g_bitDepthLayer[CHANNEL_TYPE_LUMA][layerId x];1554 m_outputBitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][layerId x];1551 if( this->getDecodedYuvLayerRefresh(layerId) ) 1552 { 1553 m_outputBitDepth[CHANNEL_TYPE_LUMA] = g_bitDepth[CHANNEL_TYPE_LUMA] = g_bitDepthLayer[CHANNEL_TYPE_LUMA][layerId]; 1554 m_outputBitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepth[CHANNEL_TYPE_CHROMA] = g_bitDepthLayer[CHANNEL_TYPE_CHROMA][layerId]; 1555 1555 1556 1556 char tempFileName[256]; 1557 strcpy(tempFileName, this->getDecodedYuvLayerFileName( layerId x).c_str());1558 m_confReconFile[layerId x].open(tempFileName, true, m_outputBitDepth, m_outputBitDepth, g_bitDepth ); // write mode1559 this->setDecodedYuvLayerRefresh( layerId x, false );1557 strcpy(tempFileName, this->getDecodedYuvLayerFileName( layerId ).c_str()); 1558 m_confReconFile[layerId].open(tempFileName, true, m_outputBitDepth, m_outputBitDepth, g_bitDepth ); // write mode 1559 this->setDecodedYuvLayerRefresh( layerId, false ); 1560 1560 } 1561 1561 … … 1575 1575 { 1576 1576 TComPicYuv* pPicCYuvRec = checkPic.getPicYuvRec(); 1577 m_confReconFile[layerId x].write( pPicCYuvRec, m_outputColourSpaceConvert,1577 m_confReconFile[layerId].write( pPicCYuvRec, m_outputColourSpaceConvert, 1578 1578 conf.getWindowLeftOffset() * xScal + defDisp.getWindowLeftOffset(), 1579 1579 conf.getWindowRightOffset() * xScal + defDisp.getWindowRightOffset(), -
branches/SHM-dev/source/Lib/TLibCommon/TComPic.h
r1043 r1049 200 200 Void setLayerId (UInt layerId) { m_layerId = layerId; } 201 201 UInt getLayerId () { return m_layerId; } 202 UInt getLayerIdx () { return this->getSlice(0)->getVPS()->getLayerIdxInVps(m_layerId); }203 202 Bool isSpatialEnhLayer(UInt refLayerIdc) { return m_bSpatialEnhLayer[refLayerIdc]; } 204 203 Void setSpatialEnhLayerFlag (UInt refLayerIdc, Bool b) { m_bSpatialEnhLayer[refLayerIdc] = b; } -
branches/SHM-dev/source/Lib/TLibCommon/TComSlice.h
r1046 r1049 1089 1089 Void setNuhLayerIdPresentFlag(Bool x) { m_nuhLayerIdPresentFlag = x; } 1090 1090 1091 UInt getLayerIdInNuh(Int id){ return m_layerIdInNuh[id]; }1092 Void setLayerIdInNuh(Int id, UInt x){ m_layerIdInNuh[id] = x; }1091 UInt getLayerIdInNuh(Int layerIdx) { return m_layerIdInNuh[id]; } 1092 Void setLayerIdInNuh(Int layerIdx, UInt x) { m_layerIdInNuh[id] = x; } 1093 1093 1094 1094 UInt getDimensionId(Int lyrId, Int id) { return m_dimensionId[lyrId][id]; } -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1047 r1049 2991 2991 { 2992 2992 #if O0225_MAX_TID_FOR_REF_LAYERS 2993 for( j = i+1; j < = vps->getMaxLayers() - 1; j++)2993 for( j = i+1; j < vps->getMaxLayers(); j++) 2994 2994 { 2995 2995 if(vps->getDirectDependencyFlag(j, i)) … … 3009 3009 { 3010 3010 #if O0225_MAX_TID_FOR_REF_LAYERS 3011 for( j = i+1; j < = vps->getMaxLayers() - 1; j++)3011 for( j = i+1; j < vps->getMaxLayers(); j++) 3012 3012 { 3013 3013 vps->setMaxTidIlRefPicsPlus1(i, j, 7); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecCu.h
r1043 r1049 103 103 104 104 #if SVC_EXTENSION 105 TDecTop* getLayerDec ( UInt layerId x ) { return m_ppcTDecTop[layerIdx]; }105 TDecTop* getLayerDec ( UInt layerId ) { return m_ppcTDecTop[layerId]; } 106 106 #endif 107 107 protected: -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.cpp
r1043 r1049 252 252 } 253 253 #if CONFORMANCE_BITSTREAM_MODE 254 if( this->getLayerDec(pcPic->getLayerId x())->getConfModeFlag() )254 if( this->getLayerDec(pcPic->getLayerId())->getConfModeFlag() ) 255 255 { 256 256 // Add this reconstructed picture to the parallel buffer. 257 std::vector<TComPic> *thisLayerBuffer = (this->getLayerDec(pcPic->getLayerId x()))->getConfListPic();257 std::vector<TComPic> *thisLayerBuffer = (this->getLayerDec(pcPic->getLayerId()))->getConfListPic(); 258 258 thisLayerBuffer->push_back(*pcPic); 259 259 std::sort( thisLayerBuffer->begin(), thisLayerBuffer->end(), pocCompareFunction ); -
branches/SHM-dev/source/Lib/TLibDecoder/TDecGop.h
r1043 r1049 118 118 #endif 119 119 #if SVC_EXTENSION 120 TDecTop* getLayerDec(UInt layerId x) { return m_ppcTDecTop[layerIdx]; }120 TDecTop* getLayerDec(UInt layerId) { return m_ppcTDecTop[layerId]; } 121 121 #endif 122 122 -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.cpp
r1047 r1049 483 483 484 484 #if FIX_NON_OUTPUT_LAYER 485 if( this->getLayerDec(pcPic->getLayerId x())->m_isOutputLayerFlag == false )485 if( this->getLayerDec(pcPic->getLayerId())->m_isOutputLayerFlag == false ) 486 486 { 487 487 pcPic->setOutputMark( false ); … … 1096 1096 resetPocRestrictionCheckParameters(); 1097 1097 #endif 1098 markAllPicsAsNoCurrAu( );1098 markAllPicsAsNoCurrAu(m_apcSlicePilot->getVPS()); 1099 1099 #if P0297_VPS_POC_LSB_ALIGNED_FLAG 1100 1100 for (UInt i = 0; i < MAX_LAYERS; i++) 1101 1101 { 1102 m_ppcTDecTop[ i]->m_pocDecrementedInDPBFlag = false;1102 m_ppcTDecTop[m_apcSlicePilot->getVPS()->getLayerIdInNuh(i)]->m_pocDecrementedInDPBFlag = false; 1103 1103 } 1104 1104 #endif … … 2857 2857 } 2858 2858 2859 return (TDecTop *)getLayerDec( vps->get LayerIdxInVps( vps->getRefLayerId( m_layerId, refLayerIdx )) );2859 return (TDecTop *)getLayerDec( vps->getRefLayerId( m_layerId, refLayerIdx ) ); 2860 2860 } 2861 2861 #endif … … 2864 2864 Void TDecTop::setRefLayerParams( TComVPS* vps ) 2865 2865 { 2866 for(UInt layer = 0; layer < m_numLayer; layer++)2867 { 2868 TDecTop *decTop = (TDecTop *)getLayerDec( layer);2866 for(UInt layerIdx = 0; layerIdx < m_numLayer; layerIdx++) 2867 { 2868 TDecTop *decTop = (TDecTop *)getLayerDec(vps->getLayerIdInNuh(layerIdx)); 2869 2869 decTop->setNumSamplePredRefLayers(0); 2870 2870 decTop->setNumMotionPredRefLayers(0); … … 2877 2877 decTop->setMotionPredRefLayerId(i, 0); 2878 2878 } 2879 for(Int j = 0; j < layer ; j++)2880 { 2881 if (vps->getDirectDependencyFlag(layer , j))2882 { 2883 decTop->setRefLayerId(decTop->getNumDirectRefLayers(), vps->getLayerIdInNuh(layer ));2879 for(Int j = 0; j < layerIdx; j++) 2880 { 2881 if (vps->getDirectDependencyFlag(layerIdx, j)) 2882 { 2883 decTop->setRefLayerId(decTop->getNumDirectRefLayers(), vps->getLayerIdInNuh(layerIdx)); 2884 2884 decTop->setNumDirectRefLayers(decTop->getNumDirectRefLayers() + 1); 2885 2885 2886 Int samplePredEnabledFlag = (vps->getDirectDependencyType(layer , j) + 1) & 1;2886 Int samplePredEnabledFlag = (vps->getDirectDependencyType(layerIdx, j) + 1) & 1; 2887 2887 decTop->setSamplePredEnabledFlag(j, samplePredEnabledFlag == 1 ? true : false); 2888 2888 decTop->setNumSamplePredRefLayers(decTop->getNumSamplePredRefLayers() + samplePredEnabledFlag); 2889 2889 2890 Int motionPredEnabledFlag = ((vps->getDirectDependencyType(layer , j) + 1) & 2) >> 1;2890 Int motionPredEnabledFlag = ((vps->getDirectDependencyType(layerIdx, j) + 1) & 2) >> 1; 2891 2891 decTop->setMotionPredEnabledFlag(j, motionPredEnabledFlag == 1 ? true : false); 2892 2892 decTop->setNumMotionPredRefLayers(decTop->getNumMotionPredRefLayers() + motionPredEnabledFlag); … … 3108 3108 if( vps->getOutputLayerFlag( targetOlsIdx, i ) ) 3109 3109 { 3110 this->getLayerDec( vps->getLayer IdxInVps( vps->getLayerSetLayerIdList( targetLsIdx, i )) )->m_isOutputLayerFlag = true;3110 this->getLayerDec( vps->getLayerSetLayerIdList( targetLsIdx, i ) )->m_isOutputLayerFlag = true; 3111 3111 } 3112 3112 } … … 3130 3130 #endif 3131 3131 #if POC_RESET_IDC_DECODER 3132 Void TDecTop::markAllPicsAsNoCurrAu( )3132 Void TDecTop::markAllPicsAsNoCurrAu(TComVPS *vps) 3133 3133 { 3134 3134 for(Int i = 0; i < MAX_LAYERS; i++) 3135 3135 { 3136 TComList<TComPic*>* listPic = this->getLayerDec( i)->getListPic();3136 TComList<TComPic*>* listPic = this->getLayerDec(vps->getLayerIdInNuh(i))->getListPic(); 3137 3137 TComList<TComPic*>::iterator iterPic = listPic->begin(); 3138 3138 while ( iterPic != listPic->end() ) -
branches/SHM-dev/source/Lib/TLibDecoder/TDecTop.h
r1047 r1049 244 244 Int getParseIdc () { return m_parseIdc; } 245 245 Void setParseIdc (Int x) { m_parseIdc = x; } 246 Void markAllPicsAsNoCurrAu ();246 Void markAllPicsAsNoCurrAu (TComVPS *vps); 247 247 248 248 Int getLastPocPeriodId () { return m_lastPocPeriodId; } … … 258 258 TComList<TComPic*>* getListPic () { return &m_cListPic; } 259 259 Void setLayerDec (TDecTop **p) { m_ppcTDecTop = p; } 260 TDecTop* getLayerDec (UInt layerId x) { return m_ppcTDecTop[layerIdx];}260 TDecTop* getLayerDec (UInt layerId) { return m_ppcTDecTop[layerId]; } 261 261 #if R0235_SMALLEST_LAYER_ID 262 262 Void xDeriveSmallestLayerId(TComVPS* vps);
Note: See TracChangeset for help on using the changeset viewer.