Changeset 446 in 3DVCSoftware for branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp
- Timestamp:
- 26 May 2013, 16:22:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp
r438 r446 54 54 55 55 TAppDecTop::TAppDecTop() 56 57 56 #if !H_MV 58 57 : m_iPOCLastDisplay(-MAX_INT) … … 60 59 : m_numDecoders( 0 ) 61 60 #endif 62 63 61 { 64 62 ::memset (m_abDecFlag, 0, sizeof (m_abDecFlag)); 65 63 #if H_MV 66 64 for (Int i = 0; i < MAX_NUM_LAYER_IDS; i++) m_layerIdToDecIdx[i] = -1; 65 #endif 66 #if H_3D 67 m_pScaleOffsetFile = 0; 67 68 #endif 68 69 } … … 79 80 m_pchBitstreamFile = NULL; 80 81 } 81 82 82 #if H_MV 83 83 for (Int decIdx = 0; decIdx < m_numDecoders; decIdx++) … … 115 115 poc = -1; 116 116 #endif 117 118 117 TComList<TComPic*>* pcListPic = NULL; 119 118 … … 125 124 } 126 125 126 #if H_3D 127 if( m_pchScaleOffsetFile ) 128 { 129 m_pScaleOffsetFile = ::fopen( m_pchScaleOffsetFile, "wt" ); 130 AOF( m_pScaleOffsetFile ); 131 } 132 m_cCamParsCollector.init( m_pScaleOffsetFile ); 133 #endif 127 134 InputByteStream bytestream(bitstreamFile); 128 135 … … 147 154 Bool firstSlice = true; 148 155 #endif 149 150 156 151 157 while (!!bitstreamFile) … … 156 162 * nal unit. */ 157 163 streampos location = bitstreamFile.tellg(); 164 #if H_MV 165 #if ENC_DEC_TRACE 166 Int64 symCount = g_nSymbolCounter; 167 #endif 168 #endif 158 169 AnnexBStats stats = AnnexBStats(); 159 170 #if !H_MV 160 171 Bool bPreviousPictureDecoded = false; 161 172 #endif 173 162 174 vector<uint8_t> nalUnit; 163 175 InputNALUnit nalu; … … 250 262 bitstreamFile.seekg(location-streamoff(3)); 251 263 bytestream.reset(); 264 #if H_MV 265 #if ENC_DEC_TRACE 266 g_nSymbolCounter = symCount; 267 #endif 268 #endif 252 269 } 253 270 #if !H_MV … … 276 293 } 277 294 #endif 295 278 296 if( pcListPic ) 279 297 { … … 286 304 if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; } 287 305 if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; } 306 288 307 #if H_MV 289 308 m_tVideoIOYuvReconFile[decIdxLastPic]->open( m_pchReconFiles[decIdxLastPic], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode … … 297 316 if ( bNewPicture && 298 317 #endif 299 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR 318 ( nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL 300 319 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP 301 320 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP 302 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA NT303 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA ) )321 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL 322 || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) ) 304 323 { 305 324 #if H_MV … … 318 337 } 319 338 339 #if H_3D 340 if( m_cCamParsCollector.isInitialized() ) 341 { 342 m_cCamParsCollector.setSlice( 0 ); 343 } 344 #endif 320 345 for(UInt decIdx = 0; decIdx < m_numDecoders; decIdx++) 321 346 { … … 383 408 // destroy decoder class 384 409 m_cTDecTop.destroy(); 410 #endif 411 #if H_3D 412 m_cCamParsCollector.uninit(); 413 if( m_pScaleOffsetFile ) 414 { 415 ::fclose( m_pScaleOffsetFile ); 416 } 385 417 #endif 386 418 } … … 593 625 } 594 626 627 #if H_MV 628 Int TAppDecTop::xGetDecoderIdx( Int layerId, Bool createFlag /*= false */ ) 629 { 630 Int decIdx = -1; 631 if ( m_layerIdToDecIdx[ layerId ] != -1 ) 632 { 633 decIdx = m_layerIdToDecIdx[ layerId ]; 634 } 635 else 636 { 637 assert ( createFlag ); 638 assert( m_numDecoders < MAX_NUM_LAYERS ); 639 640 decIdx = m_numDecoders; 641 642 // Init decoder 643 m_tDecTop[ decIdx ] = new TDecTop; 644 m_tDecTop[ decIdx ]->create(); 645 m_tDecTop[ decIdx ]->init( ); 646 m_tDecTop[ decIdx ]->setLayerId( layerId ); 647 m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled); 648 m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 649 #if H_3D 650 m_tDecTop[ decIdx ]->setCamParsCollector( &m_cCamParsCollector ); 651 #endif 652 653 // append pic list of new decoder to PicLists 654 assert( m_ivPicLists.size() == m_numDecoders ); 655 m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() ); 656 657 // create recon file related stuff 658 Char* pchTempFilename = NULL; 659 if ( m_pchReconFile ) 660 { 661 Char buffer[4]; 662 sprintf(buffer,"_%i", layerId ); 663 assert ( m_pchReconFile ); 664 xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename ); 665 assert( m_pchReconFiles.size() == m_numDecoders ); 666 } 667 668 m_pchReconFiles.push_back( pchTempFilename ); 669 670 m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv; 671 m_reconOpen [ decIdx ] = false; 672 673 // set others 674 m_pocLastDisplay [ decIdx ] = -MAX_INT; 675 m_layerIdToDecIdx [ layerId ] = decIdx; 676 677 m_numDecoders++; 678 }; 679 return decIdx; 680 } 681 #endif 595 682 //! \}
Note: See TracChangeset for help on using the changeset viewer.