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
Location:
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r166 r193  
    17571757      }
    17581758    }
     1759#if VSP_N
     1760    if( pcSPS->getViewId() )
     1761    {
     1762      READ_FLAG( uiCode, "vsp_present_flag" );
     1763      pcSPS->setVspPresentFlag( (Bool)uiCode );
     1764#if VSP_CFG
     1765      if( pcSPS->getVspPresentFlag() )
     1766      {
     1767        READ_FLAG( uiCode, "vsp_depth_present_flag" );
     1768        pcSPS->setVspDepthPresentFlag( (Bool)uiCode );
     1769      }
     1770#endif
     1771    }
     1772#endif
    17591773    READ_FLAG( uiCode, "sps_extension2_flag");
    17601774    if (uiCode)
     
    17811795  UInt  uiCode;
    17821796  Int   iCode;
    1783  
     1797#if VSP_CFG
     1798  Int   iNumOfVspRefsL0 = 0;
     1799  Int   iNumOfVspRefsL1 = 0;
     1800#endif
    17841801#if ENC_DEC_TRACE
    17851802  xTraceSliceHeader(rpcSlice);
     
    20062023      READ_UVLC (    uiCode, "aps_id" );  rpcSlice->setAPSId(uiCode);
    20072024    }
     2025
     2026#if VSP_SLICE_HEADER && VSP_CFG
     2027    if( rpcSlice->getSPS()->getViewId()!=0
     2028     && rpcSlice->getSliceType() != I_SLICE
     2029     && rpcSlice->getSPS()->getVspPresentFlag()
     2030      )
     2031    {
     2032      if( !rpcSlice->getSPS()->isDepth() || rpcSlice->getSPS()->getVspDepthPresentFlag() )
     2033      {
     2034        READ_UVLC( uiCode, "num_vsp_ref_pics");
     2035        rpcSlice->setVspFlag( uiCode > 0 ? true : false );
     2036        rpcSlice->setNumVspRefPics( uiCode );
     2037        //printf("SH:num_vsp_ref_pics(%d)\n",uiCode);
     2038        for( UInt i = 0; i < rpcSlice->getNumVspRefPics(); i++ )
     2039        {
     2040          READ_UVLC( uiCode, "vsp_ref_list0_pos");
     2041          rpcSlice->setVspRefPos( REF_PIC_LIST_0, i, uiCode );
     2042          //printf("SH:vsp_ref_list0_pos(%d)\n",uiCode);
     2043          if( rpcSlice->getSliceType() == B_SLICE )
     2044          {
     2045            READ_UVLC( uiCode, "vsp_ref_list1_pos");
     2046            rpcSlice->setVspRefPos( REF_PIC_LIST_1, i, uiCode );
     2047            //printf("SH:vsp_ref_list1_pos(%d)\n",uiCode);
     2048          }
     2049        }
     2050        iNumOfVspRefsL0 = ( (rpcSlice->getSPS()->getViewId()==0
     2051                         || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth())
     2052                         || !rpcSlice->getVspFlag()
     2053                         || rpcSlice->getVspRefPos(REF_PIC_LIST_0, 0) == 0 ) ? 0 : 1 );
     2054        iNumOfVspRefsL1 = ( (rpcSlice->getSPS()->getViewId()==0
     2055                         || (!rpcSlice->getSPS()->getVspDepthPresentFlag() && rpcSlice->getSPS()->isDepth())
     2056                         || !rpcSlice->getVspFlag()
     2057                         || rpcSlice->getVspRefPos(REF_PIC_LIST_1, 0) == 0 ) ? 0 : 1 );
     2058      }
     2059    }
     2060#endif
     2061
    20082062    if (!rpcSlice->isIntra())
    20092063    {
     
    20112065      if (uiCode)
    20122066      {
    2013         READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" );  rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 );
     2067        READ_CODE (3, uiCode, "num_ref_idx_l0_active_minus1" ); 
     2068#if VSP_CFG
     2069        rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 + iNumOfVspRefsL0 );
     2070#else
     2071        rpcSlice->setNumRefIdx( REF_PIC_LIST_0, uiCode + 1 );
     2072#endif
    20142073        if (rpcSlice->isInterB())
    20152074        {
    2016           READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" );  rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 );
     2075          READ_CODE (3, uiCode, "num_ref_idx_l1_active_minus1" ); 
     2076#if VSP_CFG
     2077          rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 + iNumOfVspRefsL1 );
     2078#else
     2079          rpcSlice->setNumRefIdx( REF_PIC_LIST_1, uiCode + 1 );
     2080#endif
    20172081        }
    20182082        else
     
    21832247    if(uiCode)
    21842248    {
    2185       READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" );      rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 );
     2249      READ_UVLC( uiCode, "num_ref_idx_lc_active_minus1" );     
     2250#if VSP_CFG
     2251      rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 + iNumOfVspRefsL0 );
     2252#else
     2253      rpcSlice->setNumRefIdx( REF_PIC_LIST_C, uiCode + 1 );
     2254#endif
    21862255     
    21872256#if H0412_REF_PIC_LIST_RESTRICTION
     
    23482417#endif
    23492418
     2419#if !VSP_CFG
    23502420#if VSP_SLICE_HEADER
    23512421  if( rpcSlice->getSPS()->getViewId()!=0
    2352 #if VSP_TEXT_ONLY
    2353       && !(rpcSlice->getSPS()->isDepth())
    2354 #endif
     2422   && rpcSlice->getSPS()->getVspPresentFlag()
    23552423    )
    23562424  {
    23572425    READ_FLAG( uiCode, "vsp_flag" );
    23582426    rpcSlice->setVspFlag( uiCode ? true : false );
    2359   }
     2427    if( rpcSlice->getVspFlag() )
     2428    {
     2429      READ_FLAG( uiCode, "vsp_depth_disable_flag" );
     2430      rpcSlice->setVspDepthDisableFlag( uiCode ? true : false );
     2431    }
     2432  }
     2433#endif
    23602434#endif
    23612435
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.cpp

    r166 r193  
    351351#if FORCE_REF_VSP==1
    352352    if( pcCU->isSkipped(uiAbsPartIdx) && pcCU->getSlice()->getViewId() != 0 )
    353 #if VSP_TEXT_ONLY
    354     if( !pcCU->getSlice()->getSPS()->isDepth() )
     353#if VSP_CFG
     354    if( pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || !pcCU->getSlice()->getSPS()->isDepth() )
     355#else
     356    if( !pcCU->getSlice()->getVspDepthDisableFlag() || !pcCU->getSlice()->getSPS()->isDepth() )
    355357#endif
    356358    {
     
    385387    if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == uiDepth )
    386388    {
    387 #if DEBUGLOGOUT
    388       PredMode   eOrgPred = pcCU->getPredictionMode( uiAbsPartIdx );
    389 #endif
    390389      TComDataCU *pcTextureCU = pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() );
    391390      pcCU->copyTextureMotionDataFrom( pcTextureCU, uiDepth, pcCU->getZorderIdxInCU() + uiAbsPartIdx, uiAbsPartIdx );
    392 #if DEBUGLOGOUT
    393       if( eOrgPred == MODE_SKIP )
    394         pcCU->setPredModeSubParts( MODE_SKIP, uiAbsPartIdx, uiDepth );
    395       m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
    396 #endif
    397391
    398392      UInt uiCurrPartNumb = pcCU->getPic()->getNumPartInCU() >> (uiDepth << 1);
     
    437431#endif
    438432    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    439 #if DEBUGLOGOUT
    440 #if HHI_MPI
    441     if( pcCU->getTextureModeDepth( uiAbsPartIdx ) != uiDepth )
    442 #endif
    443       m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
    444 #endif
    445433    return;
    446434  }
     
    472460
    473461    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    474 #if DEBUGLOGOUT
    475     m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
    476 #endif
    477462    return;
    478463  }
     
    508493    {
    509494      xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    510 #if DEBUGLOGOUT
    511       m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
    512 #endif
    513495      return;
    514496    }
     
    610592  setdQPFlag( bCodeDQP );
    611593  xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    612 #if DEBUGLOGOUT
    613   m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
    614 #endif
    615594}
    616595
     
    710689 
    711690  xCopyToPic( m_ppcCU[uiDepth], pcPic, uiAbsPartIdx, uiDepth );
    712 #if DEBUGIMGOUT
    713   xColsetToPicMerge( m_ppcCU[uiDepth], pcPic->getPicYuvRecDbg(), uiAbsPartIdx, uiDepth );
    714 #endif
    715691}
    716692
     
    724700  // inter prediction
    725701  m_pcPrediction->motionCompensation( pcCU, m_ppcYuvReco[uiDepth] );
     702
    726703#if HHI_MPI
    727704  if( pcCU->getTextureModeDepth( 0 ) != -1 )
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecCu.h

    r166 r193  
    4646#include "TLibCommon/TComPrediction.h"
    4747#include "TDecEntropy.h"
    48 #if DEBUGIMGOUT || DEBUGLOGOUT
    49 #include "TLibCommon/DebugLog.h"
    50 #endif
    5148
    5249//! \ingroup TLibDecoder
     
    8481  virtual ~TDecCu();
    8582 
    86 #if DEBUGLOGOUT
    87   DebugLog            m_cDebug;
    88 #endif
    89 
    9083  /// initialize access channels
    9184  Void  init                    ( TDecEntropy* pcEntropyDecoder, TComTrQuant* pcTrQuant, TComPrediction* pcPrediction );
     
    132125  Void xFillPCMBuffer           (TComDataCU* pCU, UInt absPartIdx, UInt depth);
    133126#endif
    134 #if DEBUGIMGOUT
    135   Void xColsetToPic             ( TComDataCU* pcCU, TComPicYuv* pcPicYuv, UInt uiZorderIdx, UInt uiDepth );
    136   Void xColsetToPicMerge        ( TComDataCU* pcCU, TComPicYuv* pcPicYuv, UInt uiZorderIdx, UInt uiDepth );
    137 #endif
    138127};
    139128
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecEntropy.cpp

    r166 r193  
    310310#if VSP_MV_ZERO
    311311          Int iRefIdx = pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->getRefIdx(uiSubPartIdx);
    312           if( pcCU->getSlice()->getViewId() && iRefIdx >= 0 && (pcCU->getSlice()->getRefViewId( RefPicList( uiRefListIdx ), iRefIdx ) == NUM_VIEW_VSP) )
     312          if( pcCU->getSlice()->getViewId() && iRefIdx >= 0 && pcCU->isVspRef( RefPicList( uiRefListIdx ), iRefIdx ) )
    313313          {
    314314            pcCU->getCUMvField( RefPicList( uiRefListIdx ) )->setAllMvd( TComMv(0, 0), pcCU->getPartitionSize( uiSubPartIdx ), uiSubPartIdx, uiDepth, uiPartIdx );
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecGop.cpp

    r100 r193  
    463463          printf( "V%d ", pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex ) );
    464464        }
     465#if VSP_CFG
     466        else if( pcSlice->getViewId() == pcSlice->getRefViewId( RefPicList(iRefList), iRefIndex )
     467              && pcSlice->getPOC()    == pcSlice->getRefPOC( RefPicList(iRefList), iRefIndex ) )
     468        {
     469          printf( "VS " );
     470        }
     471#endif
    465472        else
    466473        {
     
    479486          printf( "V%d ", pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) );
    480487        }
     488#if VSP_CFG
     489        else if( pcSlice->getViewId() == pcSlice->getRefViewId( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) )
     490              && pcSlice->getPOC()    == pcSlice->getRefPOC( (RefPicList)pcSlice->getListIdFromIdxOfLC(iRefIndex), pcSlice->getRefIdxFromIdxOfLC(iRefIndex) ) )
     491        {
     492          printf( "VS " );
     493        }
     494#endif
    481495        else
    482496        {
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSbac.cpp

    r166 r193  
    636636  uiNumCand = pcCU->getSlice()->getMaxNumMergeCand();
    637637#if HHI_MPI
    638 #if VSP_TEXT_ONLY
     638#if VSP_N
    639639  TComDataCU* pcTextCU = pcCU->getSlice()->getSPS()->getUseMVI() ? pcCU->getSlice()->getTexturePic()->getCU( pcCU->getAddr() ) : NULL;
    640640  Int aiRefIdxVsp[2] = { pcTextCU ? pcTextCU->getCUMvField( RefPicList(0) )->getRefIdx( uiAbsPartIdx ) : -1,
    641641                         pcTextCU ? pcTextCU->getCUMvField( RefPicList(1) )->getRefIdx( uiAbsPartIdx ) : -1 };
    642   const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE
    643     && !( aiRefIdxVsp[0] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(0), aiRefIdxVsp[0] ) == NUM_VIEW_VSP )
    644     && !( aiRefIdxVsp[1] >= 0 && pcTextCU->getSlice()->getRefViewId( RefPicList(1), aiRefIdxVsp[1] ) == NUM_VIEW_VSP );
    645 #else
    646   const Bool bMVIAvailable = pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
     642#if VSP_CFG
     643  const Bool bMVIAvailable = (pcCU->getSlice()->getSPS()->getVspDepthPresentFlag() || pcCU->getSlice()->getViewId()==0)
     644                                ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE
     645                                : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE
     646                                  && !( aiRefIdxVsp[0] >= pcCU->getSlice()->getNumRefIdx( RefPicList(0) ) )
     647                                  && !( aiRefIdxVsp[1] >= pcCU->getSlice()->getNumRefIdx( RefPicList(1) ) );
     648#else
     649  const Bool bMVIAvailable = pcCU->getSlice()->getVspDepthDisableFlag() ? pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE
     650                                                                          && !( aiRefIdxVsp[0] >= 0 && pcTextCU->isVspRef( RefPicList(0), aiRefIdxVsp[0] ) )
     651                                                                          && !( aiRefIdxVsp[1] >= 0 && pcTextCU->isVspRef( RefPicList(1), aiRefIdxVsp[1] ) )
     652                                                                        : pcCU->getSlice()->getSPS()->getUseMVI() && pcCU->getSlice()->getSliceType() != I_SLICE;
     653#endif
    647654#endif
    648655  const UInt uiMviMergePos = bMVIAvailable ? HHI_MPI_MERGE_POS : uiNumCand;
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecSlice.cpp

    r166 r193  
    102102  rpcPic->setPicYuvResi( 0 );
    103103 
    104 #if DEBUGLOGOUT
    105   char fname[128];
    106   sprintf(fname, "%sV%02d_%05d%s.csv", "DecLog", rpcPic->getSlice(0)->getViewId(), rpcPic->getPOC(), rpcPic->getSlice(0)->getIsDepth() ? "depth":"text");
    107   m_pcCuDecoder->m_cDebug.DebugLogFileOpen( fname );
    108 #endif
    109104#if ENC_DEC_TRACE
    110105  g_bJustDoIt = g_bEncDecTraceEnable;
     
    444439#endif
    445440  }
    446 #if DEBUGLOGOUT
    447   m_pcCuDecoder->m_cDebug.DebugLogFileClose();
    448 #endif
    449441
    450442}
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibDecoder/TDecTop.cpp

    r166 r193  
    541541  }
    542542#endif
    543 
    544543}
    545544
     
    986985        m_pcPicVSP->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    987986        m_pcPicVSP->setCurrSliceIdx(0);
    988         m_pcPicVSP->getCurrSlice()->setViewId( NUM_VIEW_VSP );
    989987        m_pcPicVSP->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() );
    990988        m_pcPicVSP->getCurrSlice()->setSPS( m_apcSlicePilot->getSPS() );
     
    10131011        m_pcPicAvail->create( m_apcSlicePilot->getSPS()->getPicWidthInLumaSamples(), m_apcSlicePilot->getSPS()->getPicHeightInLumaSamples(), g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
    10141012        m_pcPicAvail->setCurrSliceIdx(0);
    1015         m_pcPicAvail->getCurrSlice()->setViewId( 99 );
    10161013        m_pcPicAvail->getCurrSlice()->setViewOrderIdx( m_apcSlicePilot->getSPS()->getViewOrderIdx() );
    10171014        m_pcPicAvail->getCurrSlice()->setSPS( m_apcSlicePilot->getSPS() );
     
    13021299#if VSP_N
    13031300    Bool bUseVsp = (m_viewId!=0);
    1304 #if VSP_TEXT_ONLY
    1305     if( m_isDepth ) bUseVsp = false;
     1301#if VSP_CFG
     1302    if( !pcSlice->getSPS()->getVspDepthPresentFlag() && m_isDepth ) bUseVsp = false;
     1303#else
     1304    if( pcSlice->getVspDepthDisableFlag() && m_isDepth ) bUseVsp = false;
    13061305#endif
    13071306#if VSP_SLICE_HEADER
     
    13121311    if( bUseVsp )
    13131312#endif
     1313    {
    13141314      m_pcPicVSP->getCurrSlice()->setPOC( pcPic->getPOC() );
     1315      m_pcPicVSP->getCurrSlice()->setViewId( pcPic->getViewId() );
     1316    }
    13151317
    13161318    pcSlice->setRefPicListMvc( m_cListPic, apcInterViewRefPics, bUseVsp ? m_pcPicVSP : NULL );
     
    14231425  if( getTAppDecTop()->getUseDepth() )
    14241426  {
    1425     getTAppDecTop()->storeVSPInBuffer( m_pcPicVSP, m_pcPicAvail, pcSlice->getViewId(), pcSlice->getSPS()->getViewOrderIdx(), pcSlice->getPOC(), m_isDepth );
     1427#if VSP_CFG
     1428    if( pcSlice->getSPS()->getVspDepthPresentFlag() || !m_isDepth )
     1429#else
     1430    if( !pcSlice->getVspDepthDisableFlag() || !m_isDepth )
     1431#endif
     1432      getTAppDecTop()->storeVSPInBuffer( m_pcPicVSP, m_pcPicAvail, pcSlice->getViewId(), pcSlice->getSPS()->getViewOrderIdx(), pcSlice->getPOC(), m_isDepth );
     1433#if VSP_N_DUMP
     1434    if( m_pcPicVSP && pcSlice->getViewId() != 0 && pcSlice->getNumRefIdx(REF_PIC_LIST_0)!=0){
     1435        Char acFilenameBase[1024];
     1436        ::sprintf(acFilenameBase,"ref_dec_%sv%d_%04d.yuv",(m_isDepth?"D":"T"),pcSlice->getViewId(), pcSlice->getPOC());
     1437        pcSlice->getRefPic(REF_PIC_LIST_0, pcSlice->getNumRefIdx(REF_PIC_LIST_0)-1)->getPicYuvRec()->dump(acFilenameBase,0);
     1438    }
     1439#endif
    14261440  }
    14271441#endif
Note: See TracChangeset for help on using the changeset viewer.