Changeset 540 in SHVCSoftware for trunk/source/App/TAppDecoder
- Timestamp:
- 9 Jan 2014, 05:04:17 (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/SHM-4.1-dev (added) merged: 501-539 /trunk merged: 499
- Property svn:mergeinfo changed
-
trunk/source
- Property svn:mergeinfo changed
/branches/SHM-4.1-dev/source (added) merged: 502-522,524-533,535,537-539
- Property svn:mergeinfo changed
-
trunk/source/App/TAppDecoder/TAppDecCfg.cpp
r313 r540 69 69 string cfg_ReconFile [MAX_LAYERS]; 70 70 Int nLayerNum; 71 #if OUTPUT_LAYER_SET_INDEX 72 Int olsIdx; 73 #endif 71 74 #if AVC_BASE 72 75 string cfg_BLReconFile; … … 110 113 #if SVC_EXTENSION 111 114 ("LayerNum,-ls", nLayerNum, 1, "Number of layers to be decoded.") 115 #if OUTPUT_LAYER_SET_INDEX 116 ("OutpuLayerSetIdx,-olsidx", olsIdx, -1, "Index of output layer set to be decoded.") 117 #endif 112 118 #endif 113 119 ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers") … … 138 144 m_tgtLayerId = nLayerNum - 1; 139 145 assert( m_tgtLayerId >= 0 ); 146 #if OUTPUT_LAYER_SET_INDEX 147 this->getCommonDecoderParams()->setOutputLayerSetIdx( olsIdx ); 148 this->getCommonDecoderParams()->setTargetLayerId ( m_tgtLayerId ); 149 #endif 140 150 for(UInt layer=0; layer<= m_tgtLayerId; layer++) 141 151 { … … 201 211 fprintf(stderr, "File %s could not be opened. Using all LayerIds as default.\n", cfg_TargetDecLayerIdSetFile.c_str() ); 202 212 } 213 #if OUTPUT_LAYER_SET_INDEX 214 this->getCommonDecoderParams()->setTargetDecLayerIdSet( &m_targetDecLayerIdSet ); 215 #endif 203 216 } 204 217 -
trunk/source/App/TAppDecoder/TAppDecCfg.h
r313 r540 91 91 std::vector<Int> m_targetDecLayerIdSet; ///< set of LayerIds to be included in the sub-bitstream extraction process. 92 92 Int m_respectDefDispWindow; ///< Only output content inside the default display window 93 #if OUTPUT_LAYER_SET_INDEX 94 CommonDecoderParams m_commonDecoderParams; 95 #endif 93 96 94 97 public: … … 120 123 121 124 Bool parseCfg ( Int argc, Char* argv[] ); ///< initialize option class from configuration 125 #if OUTPUT_LAYER_SET_INDEX 126 CommonDecoderParams* getCommonDecoderParams() {return &m_commonDecoderParams;} 127 #endif 122 128 }; 123 129 -
trunk/source/App/TAppDecoder/TAppDecTop.cpp
r494 r540 145 145 // main decoder loop 146 146 Bool openedReconFile[MAX_LAYERS]; // reconstruction file not yet opened. (must be performed after SPS is seen) 147 Bool loopFiltered[MAX_LAYERS]; 148 memset( loopFiltered, false, sizeof( loopFiltered ) ); 149 147 150 for(UInt layer=0; layer<=m_tgtLayerId; layer++) 148 151 { … … 223 226 } 224 227 } 225 if (bNewPicture || !bitstreamFile) 228 229 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 226 230 { 227 231 #if O0194_DIFFERENT_BITDEPTH_EL_BL … … 230 234 g_bitDepthC = g_bitDepthCLayer[curLayerId]; 231 235 #endif 232 m_acTDecTop[curLayerId].executeLoopFilters(poc, pcListPic); 236 if (!loopFiltered[curLayerId] || bitstreamFile) 237 { 238 m_acTDecTop[curLayerId].executeLoopFilters(poc, pcListPic); 239 } 240 loopFiltered[curLayerId] = (nalu.m_nalUnitType == NAL_UNIT_EOS); 233 241 #if EARLY_REF_PIC_MARKING 234 242 m_acTDecTop[curLayerId].earlyPicMarking(m_iMaxTemporalLayer, m_targetDecLayerIdSet); … … 256 264 xFlushOutput( pcListPic, curLayerId ); 257 265 } 266 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 267 { 268 xFlushOutput( pcListPic, curLayerId ); 269 } 258 270 // write reconstruction to file 259 271 if(bNewPicture) … … 316 328 // main decoder loop 317 329 Bool openedReconFile = false; // reconstruction file not yet opened. (must be performed after SPS is seen) 330 Bool loopFiltered = false; 318 331 319 332 #if SYNTAX_OUTPUT … … 384 397 } 385 398 } 386 if (bNewPicture || !bitstreamFile) 387 { 388 m_cTDecTop.executeLoopFilters(poc, pcListPic); 399 if (bNewPicture || !bitstreamFile || nalu.m_nalUnitType == NAL_UNIT_EOS) 400 { 401 if (!loopFiltered || bitstreamFile) 402 { 403 m_cTDecTop.executeLoopFilters(poc, pcListPic); 404 } 405 loopFiltered = (nalu.m_nalUnitType == NAL_UNIT_EOS); 389 406 } 390 407 … … 408 425 xFlushOutput( pcListPic ); 409 426 } 427 if (nalu.m_nalUnitType == NAL_UNIT_EOS) 428 { 429 xFlushOutput( pcListPic ); 430 } 410 431 // write reconstruction to file 411 432 if(bNewPicture) … … 494 515 m_acTDecTop[layer].setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 495 516 m_acTDecTop[layer].setNumLayer( m_tgtLayerId + 1 ); 517 #if OUTPUT_LAYER_SET_INDEX 518 m_acTDecTop[layer].setCommonDecoderParams( this->getCommonDecoderParams() ); 519 #endif 496 520 } 497 521 … … 503 527 504 528 /** \param pcListPic list of pictures to be written to file 505 \todo DYN_REF_FREE should be revised506 */529 \todo DYN_REF_FREE should be revised 530 */ 507 531 #if SVC_EXTENSION 508 532 Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt layerId, UInt tId ) … … 511 535 #endif 512 536 { 537 if (pcListPic->empty()) 538 { 539 return; 540 } 541 513 542 TComList<TComPic*>::iterator iterPic = pcListPic->begin(); 514 543 Int numPicsNotYetDisplayed = 0; … … 730 759 #endif 731 760 { 732 if(!pcListPic )761 if(!pcListPic || pcListPic->empty()) 733 762 { 734 763 return;
Note: See TracChangeset for help on using the changeset viewer.