source: 3DVCSoftware/branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp @ 521

Last change on this file since 521 was 521, checked in by tech, 11 years ago

Integrated following changes:

  • H_MV_FIX1071, fix of encoder side reference list construction on IRAP pictures, same as in HM11.
  • H_3D_VSO_FIX_BORDRE_EXTENSION, fixed uninitialized borders for org-yuvs in VSO
  • H_MV_ENC_DEC_TRAC, added cu/pu level trace ( only enabled when ENC_DEC_TRACE is enabled)
  • Property svn:eol-style set to native
File size: 19.6 KB
Line 
1/* The copyright in this software is being made available under the BSD
2 * License, included below. This software may be subject to other third party
3 * and contributor rights, including patent rights, and no such rights are
4 * granted under this license. 
5 *
6 * Copyright (c) 2010-2013, ITU/ISO/IEC
7 * All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions are met:
11 *
12 *  * Redistributions of source code must retain the above copyright notice,
13 *    this list of conditions and the following disclaimer.
14 *  * Redistributions in binary form must reproduce the above copyright notice,
15 *    this list of conditions and the following disclaimer in the documentation
16 *    and/or other materials provided with the distribution.
17 *  * Neither the name of the ITU/ISO/IEC nor the names of its contributors may
18 *    be used to endorse or promote products derived from this software without
19 *    specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
25 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
31 * THE POSSIBILITY OF SUCH DAMAGE.
32 */
33
34/** \file     TAppDecTop.cpp
35    \brief    Decoder application class
36*/
37
38#include <list>
39#include <vector>
40#include <stdio.h>
41#include <fcntl.h>
42#include <assert.h>
43
44#include "TAppDecTop.h"
45#include "TLibDecoder/AnnexBread.h"
46#include "TLibDecoder/NALread.h"
47
48//! \ingroup TAppDecoder
49//! \{
50
51// ====================================================================================================================
52// Constructor / destructor / initialization / destroy
53// ====================================================================================================================
54
55TAppDecTop::TAppDecTop()
56#if !H_MV
57: m_iPOCLastDisplay(-MAX_INT)
58#else
59: m_numDecoders( 0 )
60#endif
61{
62  ::memset (m_abDecFlag, 0, sizeof (m_abDecFlag));
63#if H_MV
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;
68#endif
69}
70
71Void TAppDecTop::create()
72{
73}
74
75Void TAppDecTop::destroy()
76{
77  if (m_pchBitstreamFile)
78  {
79    free (m_pchBitstreamFile);
80    m_pchBitstreamFile = NULL;
81  }
82#if H_MV
83  for (Int decIdx = 0; decIdx < m_numDecoders; decIdx++)
84  {
85    if (m_pchReconFiles[decIdx])
86    {
87      free (m_pchReconFiles[decIdx]);
88      m_pchReconFiles[decIdx] = NULL;
89    }
90  }
91#endif
92  if (m_pchReconFile)
93  {
94    free (m_pchReconFile);
95    m_pchReconFile = NULL;
96  }
97#if H_3D_FIX
98  if (m_pchScaleOffsetFile)
99  {
100    free (m_pchScaleOffsetFile);
101    m_pchScaleOffsetFile = NULL; 
102  }
103#endif
104}
105
106// ====================================================================================================================
107// Public member functions
108// ====================================================================================================================
109
110/**
111 - create internal class
112 - initialize internal class
113 - until the end of the bitstream, call decoding function in TDecTop class
114 - delete allocated buffers
115 - destroy internal class
116 .
117 */
118Void TAppDecTop::decode()
119{
120  Int                 poc;
121#if H_MV
122  poc = -1; 
123#endif
124  TComList<TComPic*>* pcListPic = NULL;
125
126  ifstream bitstreamFile(m_pchBitstreamFile, ifstream::in | ifstream::binary);
127  if (!bitstreamFile)
128  {
129    fprintf(stderr, "\nfailed to open bitstream file `%s' for reading\n", m_pchBitstreamFile);
130    exit(EXIT_FAILURE);
131  }
132
133#if H_3D
134  if( m_pchScaleOffsetFile ) 
135  { 
136    m_pScaleOffsetFile = ::fopen( m_pchScaleOffsetFile, "wt" ); 
137    AOF( m_pScaleOffsetFile ); 
138  }
139  m_cCamParsCollector.init( m_pScaleOffsetFile );
140#endif
141  InputByteStream bytestream(bitstreamFile);
142
143  // create & initialize internal classes
144  xCreateDecLib();
145  xInitDecLib  ();
146#if !H_MV
147  m_iPOCLastDisplay += m_iSkipFrame;      // set the last displayed POC correctly for skip forward.
148
149  // main decoder loop
150  Bool recon_opened = false; // reconstruction file not yet opened. (must be performed after SPS is seen)
151#else
152  Int  pocCurrPic        = -MAX_INT;     
153  Int  pocLastPic        = -MAX_INT;   
154
155  Int  layerIdCurrPic    = 0; 
156
157  Int  decIdxLastPic     = 0; 
158  Int  decIdxCurrPic     = 0; 
159
160  Bool firstSlice        = true; 
161#endif
162 
163  while (!!bitstreamFile)
164  {
165    /* location serves to work around a design fault in the decoder, whereby
166     * the process of reading a new slice that is the first slice of a new frame
167     * requires the TDecTop::decode() method to be called again with the same
168     * nal unit. */
169    streampos location = bitstreamFile.tellg();
170#if H_MV
171#if ENC_DEC_TRACE
172    Int64 symCount = g_nSymbolCounter;
173#endif
174#endif
175    AnnexBStats stats = AnnexBStats();
176#if !H_MV
177    Bool bPreviousPictureDecoded = false;
178#endif
179
180    vector<uint8_t> nalUnit;
181    InputNALUnit nalu;
182    byteStreamNALUnit(bytestream, nalUnit, stats);
183
184    // call actual decoding function
185    Bool bNewPicture = false;
186#if H_MV
187    Bool newSliceDiffPoc   = false;
188    Bool newSliceDiffLayer = false;
189    Bool allLayersDecoded  = false;     
190#endif
191    if (nalUnit.empty())
192    {
193      /* this can happen if the following occur:
194       *  - empty input file
195       *  - two back-to-back start_code_prefixes
196       *  - start_code_prefix immediately followed by EOF
197       */
198      fprintf(stderr, "Warning: Attempt to decode an empty NAL unit\n");
199    }
200    else
201    {
202      read(nalu, nalUnit);
203#if H_MV     
204      Int decIdx     = xGetDecoderIdx( nalu.m_layerId , true );
205     
206      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu) )
207      {
208        bNewPicture = false;
209      }
210      else
211      { 
212        newSliceDiffLayer = nalu.isSlice() && ( nalu.m_layerId != layerIdCurrPic ) && !firstSlice;
213        newSliceDiffPoc   = m_tDecTop[decIdx]->decode(nalu, m_iSkipFrame, m_pocLastDisplay[decIdx], newSliceDiffLayer );
214        // decode function only returns true when all of the following conditions are true
215        // - poc in particular layer changes
216        // - nalu does not belong to first slice in layer
217        // - nalu.isSlice() == true     
218
219        bNewPicture       = newSliceDiffLayer || newSliceDiffPoc; 
220
221        if ( nalu.isSlice() && firstSlice )
222        {
223          layerIdCurrPic = nalu.m_layerId; 
224          pocCurrPic     = m_tDecTop[decIdx]->getCurrPoc(); 
225          decIdxCurrPic  = decIdx; 
226          firstSlice     = false; 
227        }
228
229        if ( bNewPicture || !bitstreamFile )
230        { 
231          layerIdCurrPic    = nalu.m_layerId; 
232         
233          pocLastPic        = pocCurrPic; 
234          pocCurrPic        = m_tDecTop[decIdx]->getCurrPoc(); 
235         
236          decIdxLastPic     = decIdxCurrPic; 
237          decIdxCurrPic     = decIdx; 
238
239          allLayersDecoded = ( pocCurrPic != pocLastPic );
240        }
241
242       
243#else
244      if( (m_iMaxTemporalLayer >= 0 && nalu.m_temporalId > m_iMaxTemporalLayer) || !isNaluWithinTargetDecLayerIdSet(&nalu)  )
245      {
246        if(bPreviousPictureDecoded)
247        {
248          bNewPicture = true;
249          bPreviousPictureDecoded = false;
250        }
251        else
252        {
253          bNewPicture = false;
254        }
255      }
256      else
257      {
258        bNewPicture = m_cTDecTop.decode(nalu, m_iSkipFrame, m_iPOCLastDisplay);
259#endif
260        if (bNewPicture)
261        {
262          bitstreamFile.clear();
263          /* location points to the current nalunit payload[1] due to the
264           * need for the annexB parser to read three extra bytes.
265           * [1] except for the first NAL unit in the file
266           *     (but bNewPicture doesn't happen then) */
267          bitstreamFile.seekg(location-streamoff(3));
268          bytestream.reset();
269#if ENC_DEC_TRACE
270#if H_MV_ENC_DEC_TRAC
271          const Bool resetCounter = false; 
272          if ( resetCounter )
273          {
274            g_nSymbolCounter  = symCount; // Only reset counter SH becomes traced twice
275          }
276          else
277          {
278            g_disableHLSTrace = true;     // Trancing of second parsing of SH is not carried out
279          }         
280#else
281          g_nSymbolCounter = symCount;
282#endif
283#endif
284        }
285#if !H_MV
286        bPreviousPictureDecoded = true; 
287#endif
288      }
289    }
290    if (bNewPicture || !bitstreamFile)
291    {
292#if H_MV
293      assert( decIdxLastPic != -1 ); 
294      m_tDecTop[decIdxLastPic]->endPicDecoding(poc, pcListPic, m_targetDecLayerIdSet );
295#else
296      m_cTDecTop.executeLoopFilters(poc, pcListPic);
297#endif
298    }
299#if H_3D
300    if ( allLayersDecoded || !bitstreamFile )
301    {
302      for( Int dI = 0; dI < m_numDecoders; dI++ )
303      {
304        TComPic* picLastCoded = m_ivPicLists.getPic( m_tDecTop[dI]->getLayerId(), pocLastPic );
305        assert( picLastCoded != NULL );       
306        picLastCoded->compressMotion();         
307      }
308    }
309#endif
310
311    if( pcListPic )
312    {
313#if H_MV
314      if ( m_pchReconFiles[decIdxLastPic] && !m_reconOpen[decIdxLastPic] )
315#else
316      if ( m_pchReconFile && !recon_opened )
317#endif
318      {
319        if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; }
320        if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; }
321
322#if H_MV
323        m_tVideoIOYuvReconFile[decIdxLastPic]->open( m_pchReconFiles[decIdxLastPic], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
324        m_reconOpen[decIdxLastPic] = true;
325      }
326      if ( bNewPicture && newSliceDiffPoc && 
327#else
328        m_cTVideoIOYuvReconFile.open( m_pchReconFile, true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
329        recon_opened = true;
330      }
331      if ( bNewPicture && 
332#endif
333           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
334            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
335            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
336            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
337            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) )
338      {
339#if H_MV
340        xFlushOutput( pcListPic, decIdxLastPic );
341#else
342        xFlushOutput( pcListPic );
343#endif
344      }
345      // write reconstruction to file
346      if(bNewPicture)
347      {
348#if H_MV
349        xWriteOutput( pcListPic, decIdxLastPic, nalu.m_temporalId );
350      }
351    }
352  }
353
354#if H_3D
355  if( m_cCamParsCollector.isInitialized() )
356  {
357    m_cCamParsCollector.setSlice( 0 );
358  }
359#endif
360  for(UInt decIdx = 0; decIdx < m_numDecoders; decIdx++)
361  {
362    xFlushOutput( m_tDecTop[decIdx]->getListPic(), decIdx );
363  }
364#else
365        xWriteOutput( pcListPic, nalu.m_temporalId );
366      }
367    }
368  }
369 
370  xFlushOutput( pcListPic );
371  // delete buffers
372  m_cTDecTop.deletePicBuffer();
373#endif
374     
375  // destroy internal classes
376  xDestroyDecLib();
377}
378
379// ====================================================================================================================
380// Protected member functions
381// ====================================================================================================================
382
383Void TAppDecTop::xCreateDecLib()
384{
385#if H_MV
386  // initialize global variables
387  initROM(); 
388#else
389  // create decoder class
390  m_cTDecTop.create();
391#endif
392}
393
394Void TAppDecTop::xDestroyDecLib()
395{
396#if H_MV
397  // destroy ROM
398  destroyROM();
399
400  for(Int decIdx = 0; decIdx < m_numDecoders ; decIdx++)
401  {
402    if( m_tVideoIOYuvReconFile[decIdx] )
403    {
404      m_tVideoIOYuvReconFile[decIdx]->close();
405      delete m_tVideoIOYuvReconFile[decIdx]; 
406      m_tVideoIOYuvReconFile[decIdx] = NULL ;
407    }
408
409    if( m_tDecTop[decIdx] )
410    {
411      m_tDecTop[decIdx]->deletePicBuffer();
412      m_tDecTop[decIdx]->destroy() ;
413    }
414    delete m_tDecTop[decIdx] ; 
415    m_tDecTop[decIdx] = NULL ;
416  }
417#else
418  if ( m_pchReconFile )
419  {
420    m_cTVideoIOYuvReconFile. close();
421  }
422 
423  // destroy decoder class
424  m_cTDecTop.destroy();
425#endif
426#if H_3D
427  m_cCamParsCollector.uninit();
428  if( m_pScaleOffsetFile ) 
429  { 
430    ::fclose( m_pScaleOffsetFile ); 
431  }
432#endif
433}
434
435Void TAppDecTop::xInitDecLib()
436{
437#if !H_MV
438  // initialize decoder class
439  m_cTDecTop.init();
440  m_cTDecTop.setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
441#endif
442}
443
444/** \param pcListPic list of pictures to be written to file
445    \todo            DYN_REF_FREE should be revised
446 */
447#if H_MV
448Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, Int decIdx, Int tId )
449#else
450Void TAppDecTop::xWriteOutput( TComList<TComPic*>* pcListPic, UInt tId )
451#endif
452{
453  TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
454  Int not_displayed = 0;
455
456  while (iterPic != pcListPic->end())
457  {
458    TComPic* pcPic = *(iterPic);
459#if H_MV
460    if(pcPic->getOutputMark() && pcPic->getPOC() > m_pocLastDisplay[decIdx])
461#else
462    if(pcPic->getOutputMark() && pcPic->getPOC() > m_iPOCLastDisplay)
463#endif
464    {
465       not_displayed++;
466    }
467    iterPic++;
468  }
469  iterPic   = pcListPic->begin();
470 
471  while (iterPic != pcListPic->end())
472  {
473    TComPic* pcPic = *(iterPic);
474   
475#if H_MV
476    if ( pcPic->getOutputMark() && (not_displayed >  pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_pocLastDisplay[decIdx]))
477#else
478    if ( pcPic->getOutputMark() && (not_displayed >  pcPic->getNumReorderPics(tId) && pcPic->getPOC() > m_iPOCLastDisplay))
479#endif
480    {
481      // write to file
482       not_displayed--;
483#if H_MV
484      if ( m_pchReconFiles[decIdx] )
485#else
486      if ( m_pchReconFile )
487#endif
488      {
489        const Window &conf = pcPic->getConformanceWindow();
490        const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
491#if H_MV
492        m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),
493#else
494        m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
495#endif
496                                       conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
497                                       conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
498                                       conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
499                                       conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
500      }
501     
502      // update POC of display order
503#if H_MV
504      m_pocLastDisplay[decIdx] = pcPic->getPOC();
505#else
506      m_iPOCLastDisplay = pcPic->getPOC();
507#endif
508     
509      // erase non-referenced picture in the reference picture list after display
510      if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
511      {
512#if !DYN_REF_FREE
513        pcPic->setReconMark(false);
514       
515        // mark it should be extended later
516        pcPic->getPicYuvRec()->setBorderExtension( false );
517       
518#else
519        pcPic->destroy();
520        pcListPic->erase( iterPic );
521        iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
522        continue;
523#endif
524      }
525      pcPic->setOutputMark(false);
526    }
527   
528    iterPic++;
529  }
530}
531
532/** \param pcListPic list of pictures to be written to file
533    \todo            DYN_REF_FREE should be revised
534 */
535#if H_MV
536Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic, Int decIdx )
537#else
538Void TAppDecTop::xFlushOutput( TComList<TComPic*>* pcListPic )
539#endif
540{
541  if(!pcListPic)
542  {
543    return;
544  } 
545  TComList<TComPic*>::iterator iterPic   = pcListPic->begin();
546
547  iterPic   = pcListPic->begin();
548 
549  while (iterPic != pcListPic->end())
550  {
551    TComPic* pcPic = *(iterPic);
552
553    if ( pcPic->getOutputMark() )
554    {
555      // write to file
556#if H_MV
557      if ( m_pchReconFiles[decIdx] )
558#else
559      if ( m_pchReconFile )
560#endif
561      {
562        const Window &conf = pcPic->getConformanceWindow();
563        const Window &defDisp = m_respectDefDispWindow ? pcPic->getDefDisplayWindow() : Window();
564#if H_MV
565        m_tVideoIOYuvReconFile[decIdx]->write( pcPic->getPicYuvRec(),
566#else
567        m_cTVideoIOYuvReconFile.write( pcPic->getPicYuvRec(),
568#endif
569                                       conf.getWindowLeftOffset() + defDisp.getWindowLeftOffset(),
570                                       conf.getWindowRightOffset() + defDisp.getWindowRightOffset(),
571                                       conf.getWindowTopOffset() + defDisp.getWindowTopOffset(),
572                                       conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset() );
573      }
574     
575      // update POC of display order
576#if H_MV
577      m_pocLastDisplay[decIdx] = pcPic->getPOC();
578#else
579      m_iPOCLastDisplay = pcPic->getPOC();
580#endif
581     
582      // erase non-referenced picture in the reference picture list after display
583      if ( !pcPic->getSlice(0)->isReferenced() && pcPic->getReconMark() == true )
584      {
585#if !DYN_REF_FREE
586        pcPic->setReconMark(false);
587       
588        // mark it should be extended later
589        pcPic->getPicYuvRec()->setBorderExtension( false );
590       
591#else
592        pcPic->destroy();
593        pcListPic->erase( iterPic );
594        iterPic = pcListPic->begin(); // to the beginning, non-efficient way, have to be revised!
595        continue;
596#endif
597      }
598      pcPic->setOutputMark(false);
599    }
600#if !H_MV
601#if !DYN_REF_FREE
602    if(pcPic)
603    {
604      pcPic->destroy();
605      delete pcPic;
606      pcPic = NULL;
607    }
608#endif
609#endif
610    iterPic++;
611  }
612#if H_MV
613  m_pocLastDisplay[decIdx] = -MAX_INT;
614#else
615  pcListPic->clear();
616  m_iPOCLastDisplay = -MAX_INT;
617#endif
618}
619
620/** \param nalu Input nalu to check whether its LayerId is within targetDecLayerIdSet
621 */
622Bool TAppDecTop::isNaluWithinTargetDecLayerIdSet( InputNALUnit* nalu )
623{
624  if ( m_targetDecLayerIdSet.size() == 0 ) // By default, the set is empty, meaning all LayerIds are allowed
625  {
626    return true;
627  }
628  for (std::vector<Int>::iterator it = m_targetDecLayerIdSet.begin(); it != m_targetDecLayerIdSet.end(); it++)
629  {
630#if H_MV
631    if ( nalu->m_layerId == (*it) )
632#else
633    if ( nalu->m_reservedZero6Bits == (*it) )
634#endif
635    {
636      return true;
637    }
638  }
639  return false;
640}
641
642#if H_MV
643Int TAppDecTop::xGetDecoderIdx( Int layerId, Bool createFlag /*= false */ )
644{
645  Int decIdx = -1; 
646  if ( m_layerIdToDecIdx[ layerId ] != -1 ) 
647  {     
648    decIdx = m_layerIdToDecIdx[ layerId ]; 
649  }
650  else
651  {     
652    assert ( createFlag ); 
653    assert( m_numDecoders < MAX_NUM_LAYERS ); 
654
655    decIdx = m_numDecoders; 
656
657    // Init decoder
658    m_tDecTop[ decIdx ] =  new TDecTop;
659    m_tDecTop[ decIdx ]->create();
660    m_tDecTop[ decIdx ]->init( );
661    m_tDecTop[ decIdx ]->setLayerId( layerId );
662    m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
663    m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists ); 
664#if H_3D
665   m_tDecTop[ decIdx ]->setCamParsCollector( &m_cCamParsCollector );
666#endif
667
668    // append pic list of new decoder to PicLists
669    assert( m_ivPicLists.size() == m_numDecoders );
670    m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
671
672    // create recon file related stuff     
673    Char* pchTempFilename = NULL;
674    if ( m_pchReconFile )
675    {     
676      Char buffer[4];     
677      sprintf(buffer,"_%i", layerId );
678      assert ( m_pchReconFile ); 
679      xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
680      assert( m_pchReconFiles.size() == m_numDecoders );
681    }
682
683    m_pchReconFiles.push_back( pchTempFilename );   
684
685    m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
686    m_reconOpen           [ decIdx ] = false;
687
688    // set others
689    m_pocLastDisplay      [ decIdx ] = -MAX_INT;
690    m_layerIdToDecIdx     [ layerId ] = decIdx; 
691
692    m_numDecoders++; 
693  };
694  return decIdx;
695}
696#endif
697//! \}
Note: See TracBrowser for help on using the repository browser.