Ignore:
Timestamp:
23 May 2013, 15:40:36 (12 years ago)
Author:
tech
Message:

Integrated 3D encoder control, camera parameters, renderer and MV fixes.

Location:
branches/HTM-DEV-0.2-dev/source/App/TAppDecoder
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecCfg.cpp

    r368 r438  
    4545#include <cassert>
    4646#endif
     47
    4748#ifdef WIN32
    4849#define strdup _strdup
     
    7879  ("OutputBitDepth,d", m_outputBitDepthY, 0, "bit depth of YUV output luma component (default: use 0 for native depth)")
    7980  ("OutputBitDepthC,d", m_outputBitDepthC, 0, "bit depth of YUV output chroma component (default: use 0 for native depth)")
     81
    8082#if H_MV
    8183  ("MaxLayerId,-ls", m_maxLayerId, MAX_NUM_LAYER_IDS-1, "Maximum LayerId to be decoded.")
    8284#endif
     85
    8386  ("MaxTemporalLayer,t", m_iMaxTemporalLayer, -1, "Maximum Temporal Layer to be decoded. -1 to decode all layers")
    8487  ("SEIDecodedPictureHash", m_decodedPictureHashSEIEnabled, 1, "Control handling of decoded picture hash SEI messages\n"
     
    105108  /* convert std::string to c string for compatability */
    106109  m_pchBitstreamFile = cfg_BitstreamFile.empty() ? NULL : strdup(cfg_BitstreamFile.c_str());
     110
    107111  m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
    108112
     
    187191}
    188192#endif
     193
    189194//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r401 r438  
    5454
    5555TAppDecTop::TAppDecTop()
     56
    5657#if !H_MV
    5758: m_iPOCLastDisplay(-MAX_INT)
     
    5960: m_numDecoders( 0 )
    6061#endif
     62
    6163{
    6264  ::memset (m_abDecFlag, 0, sizeof (m_abDecFlag));
     
    7779    m_pchBitstreamFile = NULL;
    7880  }
     81
    7982#if H_MV
    8083  for (Int decIdx = 0; decIdx < m_numDecoders; decIdx++)
     
    112115  poc = -1;
    113116#endif
     117
    114118  TComList<TComPic*>* pcListPic = NULL;
    115119
     
    143147  Bool firstSlice        = true;
    144148#endif
     149
    145150 
    146151  while (!!bitstreamFile)
     
    151156     * nal unit. */
    152157    streampos location = bitstreamFile.tellg();
    153 #if H_MV
    154 #if ENC_DEC_TRACE
    155     Int64 symCount = g_nSymbolCounter;
    156 #endif
    157 #endif
    158158    AnnexBStats stats = AnnexBStats();
    159159#if !H_MV
    160160    Bool bPreviousPictureDecoded = false;
    161161#endif
    162 
    163162    vector<uint8_t> nalUnit;
    164163    InputNALUnit nalu;
     
    251250          bitstreamFile.seekg(location-streamoff(3));
    252251          bytestream.reset();
    253 #if H_MV
    254 #if ENC_DEC_TRACE
    255           g_nSymbolCounter = symCount;
    256 #endif
    257 #endif
    258 
    259252        }
    260253#if !H_MV
     
    283276    }
    284277#endif
    285 
    286278    if( pcListPic )
    287279    {
     
    294286        if (!m_outputBitDepthY) { m_outputBitDepthY = g_bitDepthY; }
    295287        if (!m_outputBitDepthC) { m_outputBitDepthC = g_bitDepthC; }
    296 
    297288#if H_MV
    298289        m_tVideoIOYuvReconFile[decIdxLastPic]->open( m_pchReconFiles[decIdxLastPic], true, m_outputBitDepthY, m_outputBitDepthC, g_bitDepthY, g_bitDepthC ); // write mode
     
    306297      if ( bNewPicture &&
    307298#endif
    308            (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_W_RADL
     299           (   nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR
    309300            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_IDR_N_LP
    310301            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_N_LP
    311             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_RADL
    312             || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA_W_LP ) )
     302            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLANT
     303            || nalu.m_nalUnitType == NAL_UNIT_CODED_SLICE_BLA ) )
    313304      {
    314305#if H_MV
     
    602593}
    603594
    604 #if H_MV
    605 Int TAppDecTop::xGetDecoderIdx( Int layerId, Bool createFlag /*= false */ )
    606 {
    607   Int decIdx = -1;
    608   if ( m_layerIdToDecIdx[ layerId ] != -1 )
    609   {     
    610     decIdx = m_layerIdToDecIdx[ layerId ];
    611   }
    612   else
    613   {     
    614     assert ( createFlag );
    615     assert( m_numDecoders < MAX_NUM_LAYERS );
    616 
    617     decIdx = m_numDecoders;
    618 
    619     // Init decoder
    620     m_tDecTop[ decIdx ] =  new TDecTop;
    621     m_tDecTop[ decIdx ]->create();
    622     m_tDecTop[ decIdx ]->init( );
    623     m_tDecTop[ decIdx ]->setLayerId( layerId );
    624     m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
    625     m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
    626 
    627     // append pic list of new decoder to PicLists
    628     assert( m_ivPicLists.size() == m_numDecoders );
    629     m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
    630 
    631     // create recon file related stuff     
    632     Char* pchTempFilename = NULL;
    633     if ( m_pchReconFile )
    634     {     
    635       Char buffer[4];     
    636       sprintf(buffer,"_%i", layerId );
    637       assert ( m_pchReconFile );
    638       xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
    639       assert( m_pchReconFiles.size() == m_numDecoders );
    640     }
    641 
    642     m_pchReconFiles.push_back( pchTempFilename );   
    643 
    644     m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
    645     m_reconOpen           [ decIdx ] = false;
    646 
    647     // set others
    648     m_pocLastDisplay      [ decIdx ] = -MAX_INT;
    649     m_layerIdToDecIdx     [ layerId ] = decIdx;
    650 
    651     m_numDecoders++;
    652   };
    653   return decIdx;
    654 }
    655 #endif
    656595//! \}
  • branches/HTM-DEV-0.2-dev/source/App/TAppDecoder/TAppDecTop.h

    r401 r438  
    7474  // for output control
    7575  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
     76
    7677#if H_MV
    7778  Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
     
    8990  Void  decode            (); ///< main decoding function
    9091 
     92
    9193protected:
    9294  Void  xCreateDecLib     (); ///< create internal classes
     
    9799  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
    98100  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file
    99   Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false );
     101  Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false )
     102  {
     103    Int decIdx = -1;
     104    if ( m_layerIdToDecIdx[ layerId ] != -1 )
     105    {     
     106      decIdx = m_layerIdToDecIdx[ layerId ];
     107    }
     108    else
     109    {     
     110      assert ( createFlag );
     111      assert( m_numDecoders < MAX_NUM_LAYERS );
     112
     113      decIdx = m_numDecoders;
     114     
     115      // Init decoder
     116      m_tDecTop[ decIdx ] =  new TDecTop;
     117      m_tDecTop[ decIdx ]->create();
     118      m_tDecTop[ decIdx ]->init( );
     119      m_tDecTop[ decIdx ]->setLayerId( layerId );
     120      m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
     121      m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
     122     
     123      // append pic list of new decoder to PicLists
     124      assert( m_ivPicLists.size() == m_numDecoders );
     125      m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
     126
     127      // create recon file related stuff     
     128      Char* pchTempFilename = NULL;
     129      if ( m_pchReconFile )
     130      {     
     131        Char buffer[4];     
     132        sprintf(buffer,"_%i", layerId );
     133        assert ( m_pchReconFile );
     134        xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
     135        assert( m_pchReconFiles.size() == m_numDecoders );
     136      }
     137
     138      m_pchReconFiles.push_back( pchTempFilename );   
     139
     140      m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
     141      m_reconOpen           [ decIdx ] = false;
     142
     143      // set others
     144      m_pocLastDisplay      [ decIdx ] = -MAX_INT;
     145      m_layerIdToDecIdx     [ layerId ] = decIdx;
     146
     147      m_numDecoders++;
     148    };
     149    return decIdx;
     150  }
    100151#else
    101152  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file
    102153  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
    103154#endif
     155
    104156  Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
    105157};
Note: See TracChangeset for help on using the changeset viewer.