Changeset 401 in 3DVCSoftware


Ignore:
Timestamp:
13 May 2013, 16:09:14 (11 years ago)
Author:
tech
Message:
  • Fixed trace files for MV-HEVC.
  • Fixed assertion mismatch due to NumPocTotalCurr.
Location:
branches/HTM-DEV-0.1-dev/source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.1-dev/source/App/TAppDecoder/TAppDecTop.cpp

    r368 r401  
    151151     * nal unit. */
    152152    streampos location = bitstreamFile.tellg();
     153#if H_MV
     154#if ENC_DEC_TRACE
     155    Int64 symCount = g_nSymbolCounter;
     156#endif
     157#endif
    153158    AnnexBStats stats = AnnexBStats();
    154159#if !H_MV
     
    246251          bitstreamFile.seekg(location-streamoff(3));
    247252          bytestream.reset();
     253#if H_MV
     254#if ENC_DEC_TRACE
     255          g_nSymbolCounter = symCount;
     256#endif
     257#endif
     258
    248259        }
    249260#if !H_MV
     
    591602}
    592603
     604#if H_MV
     605Int 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
    593656//! \}
  • branches/HTM-DEV-0.1-dev/source/App/TAppDecoder/TAppDecTop.h

    r368 r401  
    9797  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
    9898  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic, Int layerId ); ///< flush all remaining decoded pictures to file
    99   Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false )
    100   {
    101     Int decIdx = -1;
    102     if ( m_layerIdToDecIdx[ layerId ] != -1 )
    103     {     
    104       decIdx = m_layerIdToDecIdx[ layerId ];
    105     }
    106     else
    107     {     
    108       assert ( createFlag );
    109       assert( m_numDecoders < MAX_NUM_LAYERS );
    110 
    111       decIdx = m_numDecoders;
    112      
    113       // Init decoder
    114       m_tDecTop[ decIdx ] =  new TDecTop;
    115       m_tDecTop[ decIdx ]->create();
    116       m_tDecTop[ decIdx ]->init( );
    117       m_tDecTop[ decIdx ]->setLayerId( layerId );
    118       m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
    119       m_tDecTop[ decIdx ]->setIvPicLists( &m_ivPicLists );
    120      
    121       // append pic list of new decoder to PicLists
    122       assert( m_ivPicLists.size() == m_numDecoders );
    123       m_ivPicLists.push_back( m_tDecTop[ decIdx ]->getListPic() );
    124 
    125       // create recon file related stuff     
    126       Char* pchTempFilename = NULL;
    127       if ( m_pchReconFile )
    128       {     
    129         Char buffer[4];     
    130         sprintf(buffer,"_%i", layerId );
    131         assert ( m_pchReconFile );
    132         xAppendToFileNameEnd( m_pchReconFile , buffer, pchTempFilename );
    133         assert( m_pchReconFiles.size() == m_numDecoders );
    134       }
    135 
    136       m_pchReconFiles.push_back( pchTempFilename );   
    137 
    138       m_tVideoIOYuvReconFile[ decIdx ] = new TVideoIOYuv;
    139       m_reconOpen           [ decIdx ] = false;
    140 
    141       // set others
    142       m_pocLastDisplay      [ decIdx ] = -MAX_INT;
    143       m_layerIdToDecIdx     [ layerId ] = decIdx;
    144 
    145       m_numDecoders++;
    146     };
    147     return decIdx;
    148   }
     99  Int   xGetDecoderIdx    ( Int layerId, Bool createFlag = false );
    149100#else
    150101  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic , UInt tId); ///< write YUV to file
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r368 r401  
    578578  {
    579579#if L0323_DPB
     580#if H_MV
     581    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1[i]");
     582#else
    580583    READ_UVLC ( uiCode, "sps_max_dec_pic_buffering_minus1");
     584#endif
    581585    pcSPS->setMaxDecPicBuffering( uiCode + 1, i);
    582586#else
     
    584588    pcSPS->setMaxDecPicBuffering( uiCode, i);
    585589#endif
     590#if H_MV
     591    READ_UVLC ( uiCode, "sps_num_reorder_pics[i]" );
     592#else
    586593    READ_UVLC ( uiCode, "sps_num_reorder_pics" );
     594#endif
    587595    pcSPS->setNumReorderPics(uiCode, i);
     596#if H_MV
     597    READ_UVLC ( uiCode, "sps_max_latency_increase[i]");
     598#else
    588599    READ_UVLC ( uiCode, "sps_max_latency_increase");
     600#endif
    589601    pcSPS->setMaxLatencyIncrease( uiCode, i );
    590602
     
    694706{
    695707  UInt  uiCode;
    696  
     708   
    697709  READ_CODE( 4,  uiCode,  "vps_video_parameter_set_id" );         pcVPS->setVPSId( uiCode );
    698710  READ_CODE( 2,  uiCode,  "vps_reserved_three_2bits" );           assert(uiCode == 3);
     
    12041216      }
    12051217    }
    1206     // }
     1218    // } 
    12071219    TComRefPicListModification* refPicListModification = rpcSlice->getRefPicListModification();
     1220
    12081221    if(!rpcSlice->isIntra())
    12091222    {
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibDecoder/TDecTop.cpp

    r372 r401  
    5050  m_iMaxRefPicNum = 0;
    5151#if ENC_DEC_TRACE
     52#if H_MV
     53  if ( g_hTrace == NULL )
     54  {
     55#endif
    5256  g_hTrace = fopen( "TraceDec.txt", "wb" );
    5357  g_bJustDoIt = g_bEncDecTraceDisable;
    5458  g_nSymbolCounter = 0;
     59#if H_MV
     60  }
     61#endif
    5562#endif
    5663  m_pocCRA = 0;
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncBinCoderCABAC.cpp

    r324 r401  
    185185{
    186186  {
     187#if !H_MV
    187188    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    188189    DTRACE_CABAC_T( "\tstate=" )
     
    191192    DTRACE_CABAC_V( binValue )
    192193    DTRACE_CABAC_T( "\n" )
     194#endif
    193195  }
    194196  m_uiBinsCoded += m_binCountIncrement;
     
    231233{
    232234  {
     235#if !H_MV
    233236    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    234237    DTRACE_CABAC_T( "\tEPsymbol=" )
    235238    DTRACE_CABAC_V( binValue )
    236239    DTRACE_CABAC_T( "\n" )
     240#endif
    237241  }
    238242  m_uiBinsCoded += m_binCountIncrement;
     
    259263  for ( Int i = 0; i < numBins; i++ )
    260264  {
     265#if !H_MV
    261266    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    262267    DTRACE_CABAC_T( "\tEPsymbol=" )
    263268    DTRACE_CABAC_V( ( binValues >> ( numBins - 1 - i ) ) & 1 )
    264269    DTRACE_CABAC_T( "\n" )
     270#endif
    265271  }
    266272 
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncCavlc.cpp

    r368 r401  
    799799      TComReferencePictureSet altRps;
    800800      Bool useAltRps = false;
     801#if H_MV
     802      if (pcSlice->getRapPicFlag() && ( pcSlice->getLayerId() == 0 ) )
     803#else
    801804      if (pcSlice->getRapPicFlag())
     805#endif
    802806      {
    803807        for (Int picIdx = 0; !useAltRps && picIdx < rps->getNumberOfPictures(); picIdx++)
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncEntropy.cpp

    r324 r401  
    587587  if( pcCU->isIntra(uiAbsPartIdx) )
    588588  {
     589#if !H_MV
    589590    DTRACE_CABAC_VL( g_nSymbolCounter++ )
    590591    DTRACE_CABAC_T( "\tdecodeTransformIdx()\tCUDepth=" )
    591592    DTRACE_CABAC_V( uiDepth )
    592593    DTRACE_CABAC_T( "\n" )
     594#endif
    593595  }
    594596  else
  • branches/HTM-DEV-0.1-dev/source/Lib/TLibEncoder/TEncGOP.cpp

    r369 r401  
    28462846  {
    28472847    Int numModifications = 0;
    2848    
     2848
    28492849    for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
    28502850    {
     
    28532853
    28542854    // set inter-view modifications
     2855    Bool isModified = false;
     2856    Int tempList[16];
     2857    for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; }
     2858
    28552859    if( (maxRefListSize > 1) && (numModifications > 0) )
    28562860    {
    2857       refPicListModification->setRefPicListModificationFlagL( li, true );
    2858       Int tempList[16];
    2859       for( Int k = 0; k < 16; k++ ) { tempList[k] = -1; }
    2860 
    2861       Bool isModified = false;
    28622861      for( Int k = 0; k < ge.m_numInterViewRefPics; k++ )
    28632862      {
     
    28782877        }
    28792878      }
    2880       if( isModified )
    2881       {
    2882         Int temporalRefIdx = 0;
    2883         for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ )
    2884         {
    2885           if( tempList[i] >= 0 )
    2886           {
    2887             refPicListModification->setRefPicSetIdxL( li, i, tempList[i] );
    2888           }
    2889           else
    2890           {
    2891             refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx );
    2892             temporalRefIdx++;
    2893           }
    2894         }
    2895       }
    2896       else
    2897       {
    2898         refPicListModification->setRefPicListModificationFlagL( li, false );
    2899       }
    2900     }
     2879    }
     2880
     2881    refPicListModification->setRefPicListModificationFlagL( li, isModified ); 
     2882
     2883    if( isModified )
     2884    {
     2885      Int temporalRefIdx = 0;
     2886      for( Int i = 0; i < pcSlice->getNumRefIdx( ( li == 0 ) ? REF_PIC_LIST_0 : REF_PIC_LIST_1 ); i++ )
     2887      {
     2888        if( tempList[i] >= 0 )
     2889        {
     2890          refPicListModification->setRefPicSetIdxL( li, i, tempList[i] );
     2891        }
     2892        else
     2893        {
     2894          refPicListModification->setRefPicSetIdxL( li, i, temporalRefIdx );
     2895          temporalRefIdx++;
     2896        }
     2897      }
     2898    }   
    29012899  }
    29022900}
Note: See TracChangeset for help on using the changeset viewer.