Ignore:
Timestamp:
19 Nov 2012, 21:15:40 (12 years ago)
Author:
mitsubishi-htm
Message:

A second release, as planned

  • Migrate to HTM 4.1
  • Move VSP related switches to cfg file instead of #define in the source code
  • A few bug fixes
  • For VC project files, only VC9 file is updated

TODO

  • Migrate to HTM 5.0, to be used as anchor for CE1 toward Geneva meeting
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncGOP.cpp

    r166 r193  
    332332#endif
    333333
     334#if VSP_SLICE_HEADER && VSP_CFG
     335      pcSlice->setNumVspRefPics( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numVSPRefPics );
     336      pcSlice->setVspFlag( m_pcEncTop->getUseVSP() && pcSlice->getNumVspRefPics() > 0 );
     337      for( UInt i = 0; i < pcSlice->getNumVspRefPics(); i++ )
     338      {
     339        pcSlice->setVspRefPos( REF_PIC_LIST_0, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL0[i] );
     340        if( pcSlice->getSliceType() == B_SLICE )
     341        {
     342          pcSlice->setVspRefPos( REF_PIC_LIST_1, i, m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_VSPRefPosL1[i] );
     343        }
     344      }
     345#endif
     346
    334347#if VSP_N
     348#if VSP_CFG
     349      Int NumberOfVspRefsL0 = ( ( pcPic->getViewId()==0
     350                                || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth())
     351#if VSP_SLICE_HEADER
     352                                || !pcSlice->getVspFlag()
     353#endif
     354                                || pcSlice->getVspRefPos( REF_PIC_LIST_0, 0 ) == 0
     355                              ) ? 0 : 1 );
     356      Int NumberOfVspRefsL1 = ( ( pcPic->getViewId()==0
     357                                || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth())
     358#if VSP_SLICE_HEADER
     359                                || !pcSlice->getVspFlag()
     360#endif
     361                                || pcSlice->getVspRefPos( REF_PIC_LIST_1, 0 ) == 0
     362                              ) ? 0 : 1 );
     363      pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL0, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL0) ) );
     364      pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefsL1, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefsL1) ) );
     365#else
    335366      Int NumberOfVspRefs = ( ( pcPic->getViewId()==0
    336 #if VSP_TEXT_ONLY
    337                                 || m_pcEncTop->getIsDepth()
    338 #endif
     367                                || (m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth())
    339368#if VSP_SLICE_HEADER
    340                                 || !m_pcEncTop->getUseVSP()
     369                                || !pcSlice->getVspFlag()
    341370#endif
    342371                              ) ? 0 : 1 );
    343372      pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) );
    344373      pcSlice->setNumRefIdx( REF_PIC_LIST_1, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive + NumberOfVspRefs, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs() + NumberOfVspRefs) ) );
     374#endif
    345375#else
    346376      pcSlice->setNumRefIdx( REF_PIC_LIST_0, min( m_pcCfg->getGOPEntry( (getNalUnitType(uiPOCCurr) == NAL_UNIT_CODED_SLICE_IDV) ? MAX_GOP : iGOPid ).m_numRefPicsActive, (pcSlice->getRPS()->getNumberOfPictures() + pcSlice->getSPS()->getNumberOfUsableInterViewRefs()) ) );
     
    373403#if VSP_N
    374404      Bool bUseVsp = (pcPic->getViewId()!=0);
    375 #if VSP_TEXT_ONLY
    376       if( m_pcEncTop->getIsDepth() ) bUseVsp = false;
    377 #endif
     405      if( m_pcEncTop->getVSPDepthDisable() && m_pcEncTop->getIsDepth() ) bUseVsp = false;
    378406#if VSP_SLICE_HEADER
     407#if VSP_CFG
     408      if( !pcSlice->getVspFlag() ) bUseVsp = false;
     409#else
    379410      if( !m_pcEncTop->getUseVSP() ) bUseVsp = false;
    380411#endif
     412#endif
     413
     414#if VSP_SLICE_HEADER
     415      if( bUseVsp )
     416#endif
     417      {
     418        m_pcEncTop->getVSPBuf()->getCurrSlice()->setPOC( pcPic->getPOC() );
     419        m_pcEncTop->getVSPBuf()->getCurrSlice()->setViewId( pcPic->getViewId() );
     420      }
     421
    381422      pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics, bUseVsp ? m_pcEncTop->getVSPBuf() : NULL );
    382423#else
    383424      pcSlice->setRefPicListMvc( rcListPic, apcInterViewRefPics );
    384425#endif
     426
     427#if !VSP_CFG
    385428#if VSP_SLICE_HEADER
    386       pcSlice->setVspFlag( bUseVsp );
     429      pcSlice->setVspFlag( m_pcEncTop->getUseVSP() );
     430      pcSlice->setVspDepthDisableFlag( m_pcEncTop->getVSPDepthDisable() );
     431#endif
    387432#endif
    388433
     
    471516    Int iVSOMode = m_pcEncTop->getVSOMode();
    472517    m_pcRdCost->setVSOMode( iVSOMode  );
     518
    473519#if HHI_VSO_DIST_INT
    474520    m_pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() );
     
    491537    m_pcRdCost->setDepthPicYuv   ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) );
    492538#endif
    493 
     539#if LGE_WVSO_A0119
     540    Bool bUseWVSO  = m_pcEncTop->getUseWVSO();
     541    m_pcRdCost->setUseWVSO( bUseWVSO );
     542#endif
    494543
    495544  }
     
    11571206          m_pcSbacCoder->load( &pcSbacCoders[0] );
    11581207
    1159 #if DEBUGLOGOUT
    1160         char fname[128];
    1161         sprintf(fname, "%sV%02d_%05d%s.csv", "Log", pcSlice->getViewId(), uiPOCCurr, pcSlice->getIsDepth() ? "depth":"text");
    1162         getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileOpen( fname );
    1163 #endif
    1164 
    11651208        pcSlice->setTileOffstForMultES( uiOneBitstreamPerSliceLength );
    11661209        if (!bEntropySlice)
    11671210        {
     1211#if OL_DEPTHLIMIT_A0044 //start dumping partition information
     1212          m_pcSliceEncoder->setPartDumpFlag(1);
     1213#endif
    11681214          pcSlice->setTileLocationCount ( 0 );
    11691215          m_pcSliceEncoder->encodeSlice(pcPic, pcBitstreamRedirect, pcSubstreamsOut); // redirect is only used for CAVLC tile position info.
     1216#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
     1217          m_pcSliceEncoder->setPartDumpFlag(0);
     1218#endif
    11701219        }
    11711220        else
    11721221        {
     1222#if OL_DEPTHLIMIT_A0044 //start dumping partition information
     1223          m_pcSliceEncoder->setPartDumpFlag(1);
     1224#endif
    11731225          m_pcSliceEncoder->encodeSlice(pcPic, &nalu.m_Bitstream, pcSubstreamsOut); // nalu.m_Bitstream is only used for CAVLC tile position info.
    1174         }
    1175 
    1176 #if DEBUGLOGOUT
    1177         getSliceEncoder()->getCUEncoder()->m_cDebug.DebugLogFileClose();
    1178 #endif
     1226#if OL_DEPTHLIMIT_A0044 //stop dumping partition information
     1227          m_pcSliceEncoder->setPartDumpFlag(0);
     1228#endif
     1229        }
    11791230
    11801231        {
     
    21872238        printf( "V%d ", pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) );
    21882239      }
     2240#if VSP_CFG
     2241      else if( pcSlice->getViewId() == pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex )
     2242            && pcSlice->getPOC()    == pcSlice->getRefPOC( RefPicList(iRefList), iRefIndex ) )
     2243      {
     2244        printf( "VS " );
     2245      }
     2246#endif
    21892247      else
    21902248      {
     
    22032261        printf( "V%d ", pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) );
    22042262      }
     2263#if VSP_CFG
     2264      else if( pcSlice->getViewId() == pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) )
     2265            && pcSlice->getPOC()    == pcSlice->getRefPOC( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) )
     2266      {
     2267        printf( "VS " );
     2268      }
     2269#endif
    22052270      else
    22062271      {
Note: See TracChangeset for help on using the changeset viewer.