Ignore:
Timestamp:
18 Jun 2013, 23:24:53 (11 years ago)
Author:
tech
Message:
  • changed IV-MERGE HLS to match Test Model 4 spec
  • incorporated iv-refpic list to TComSlice
  • removed TComDepthMapGenerator
Location:
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp

    r478 r479  
    581581  WRITE_FLAG( 0, "sps_extension_flag" );
    582582#endif
    583 #if H_3D_IV_MERGE
    584   if( pcSPS->getViewIndex() || pcSPS->isDepth() )
    585   {
    586     WRITE_FLAG( 0, "base_view_flag" );
    587     if( pcSPS->isDepth() )
    588     {
    589       WRITE_FLAG( 1, "depth_flag" );
    590       WRITE_UVLC( pcSPS->getViewIndex(), "view_idx" );
    591     }
    592     else
    593     {
    594       WRITE_FLAG( 0, "depth_flag" );
    595       WRITE_UVLC( pcSPS->getViewIndex() - 1, "view_idx_minus1" );
    596       WRITE_UVLC( pcSPS->getPredDepthMapGeneration(), "Pdm_generation" );
    597       if( pcSPS->getPredDepthMapGeneration() )
    598       {
    599         WRITE_UVLC( pcSPS->getMultiviewMvPredMode(), "multi_view_mv_pred_mode" );
    600       }
    601     }
    602   }
    603   else
    604   {
    605     WRITE_FLAG( 1, "base_view_flag" );   
    606   }
    607 #endif
    608583}
    609584
     
    766741    }
    767742  }
     743#if H_3D_GEN
     744  WRITE_FLAG( 1,                                             "vps_extension2_flag" );
     745  for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ )
     746  {
     747    if (layer != 0)
     748    {
     749      if ( !( pcVPS->getDepthId( layer ) == 1 ) )
     750      {
     751#if H_3D_IV_MERGE
     752        WRITE_FLAG( pcVPS->getIvMvPredFlag(layer) ? 1 : 0 , "ivMvPredFlag[i]");
     753#endif
     754      }         
     755    }       
     756  }
     757#else
    768758  WRITE_FLAG( 0,                                             "vps_extension2_flag" );
     759#endif
    769760#else
    770761  WRITE_FLAG( 0,                     "vps_extension_flag" );
     
    11041095    {
    11051096#if H_3D_IV_MERGE
    1106       WRITE_UVLC(((pcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) == PDM_USE_FOR_MERGE? MRG_MAX_NUM_CANDS_MEM: MRG_MAX_NUM_CANDS) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
     1097      Bool ivMvPredFlag = pcSlice->getVPS()->getIvMvPredFlag( pcSlice->getLayerIdInVps() ) ;
     1098      WRITE_UVLC( ( ivMvPredFlag ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
    11071099#else
    11081100      WRITE_UVLC(MRG_MAX_NUM_CANDS - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand");
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCfg.h

    r476 r479  
    375375  TAppComCamPara* m_cameraParameters;
    376376 
    377 #if H_3D_IV_MERGE
    378   UInt      m_uiPredDepthMapGeneration;
    379   UInt      m_uiMultiviewMvPredMode;
    380 #endif
    381377#if H_3D_VSO
    382378  //====== View Synthesis Optimization ======
     
    930926  Void      setDispCoeff                    ( Double  d )   { m_dDispCoeff  = d; }
    931927#endif // H_3D_VSO
    932 #if H_3D_IV_MERGE
    933   Void      setMultiviewMvPredMode              (UInt ui)   { m_uiMultiviewMvPredMode = ui;}
    934   Void      setPredDepthMapGeneration       ( UInt  u )      { m_uiPredDepthMapGeneration   = u; } 
    935 
    936   UInt      getMultiviewMvPredMode          ()              { return m_uiMultiviewMvPredMode;}
    937 #endif
    938928#endif // H_3D
    939929};
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp

    r478 r479  
    4949#include <time.h>
    5050#include <math.h>
    51 #if H_3D_IV_MERGE
    52 #include "../../App/TAppEncoder/TAppEncTop.h"
    53 #endif
     51
    5452using namespace std;
    5553//! \ingroup TLibEncoder
     
    109107  m_viewIndex  =   0;
    110108  m_isDepth = false;
    111 #if H_3D_IV_MERGE
    112   m_pcDepthMapGenerator = NULL;
    113 #endif
    114109#endif
    115110#endif
     
    160155  m_viewIndex            = pcTEncTop->getViewIndex();
    161156  m_isDepth              = pcTEncTop->getIsDepth();
    162 #if H_3D_IV_MERGE
    163   m_pcDepthMapGenerator  = pcTEncTop->getDepthMapGenerator();
    164 #endif
    165157#endif
    166158#endif
     
    502494    pcPic->setCurrSliceIdx(0);
    503495
     496#if H_3D_GEN
     497    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );     
     498#else
    504499    m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getSPS(), m_pcEncTop->getPPS() );
     500#endif
    505501    pcSlice->setLastIDR(m_iLastIDR);
    506502    pcSlice->setSliceIdx(0);
     
    510506    pcSlice->setLayerId     ( getLayerId() );
    511507    pcSlice->setViewId      ( getViewId()  );   
     508#if !H_3D_GEN
    512509    pcSlice->setVPS         ( m_pcEncTop->getVPS() );
     510#endif
    513511#if H_3D
    514512    pcPic  ->setViewIndex   ( getViewIndex() );
     
    516514    pcSlice->setViewIndex   ( getViewIndex()  );
    517515    pcSlice->setIsDepth( getIsDepth() );   
    518     pcSlice->setCamparaSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() );
    519 #endif
    520 #endif
     516    pcSlice->setCamparaSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() );   
     517#endif
     518#endif 
    521519    //set default slice level flag to the same as SPS level flag
    522520    pcSlice->setLFCrossSliceBoundaryFlag(  pcSlice->getPPS()->getLoopFilterAcrossSlicesEnabledFlag()  );
     
    682680#endif
    683681
    684 #if H_3D_IV_MERGE
    685     TAppEncTop* tAppEncTop = m_pcEncTop->getEncTop();
    686     TComPic * const pcTexturePic = m_pcEncTop->getIsDepth() ? tAppEncTop->getPicFromView( getViewIndex(), pcSlice->getPOC(), false ) : NULL;
    687     assert( !m_pcEncTop->getIsDepth() || pcTexturePic != NULL );
    688     pcSlice->setTexturePic( pcTexturePic );
     682#if H_3D
     683    pcSlice->setIvPicLists( m_ivPicLists );         
     684#if H_3D_IV_MERGE   
     685    assert( !m_pcEncTop->getIsDepth() || ( pcSlice->getTexturePic() != 0 ) );
     686#endif   
    689687#endif
    690688    //  Slice info. refinement
     
    10421040    m_storedStartCUAddrForEncodingSliceSegment.push_back(nextCUAddr);
    10431041    startCUAddrSliceSegmentIdx++;
    1044 #if H_3D_IV_MERGE
    1045     m_pcDepthMapGenerator->initViewComponent( pcPic );
    1046 #endif
    10471042#if H_3D_NBDV
    10481043      if(pcSlice->getViewIndex() && !pcSlice->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.h

    r478 r479  
    5959#include <vector>
    6060
    61 #if H_3D_IV_MERGE
    62 #include "TLibCommon/TComDepthMapGenerator.h"
    63 #endif
    6461//! \ingroup TLibEncoder
    6562//! \{
     
    110107  Int                     m_viewIndex;
    111108  Bool                    m_isDepth;
    112 #if H_3D_IV_MERGE
    113   TComDepthMapGenerator*  m_pcDepthMapGenerator;
    114 #endif
    115109#endif
    116110#endif
     
    172166 
    173167  TComList<TComPic*>*   getListPic()      { return m_pcListPic; }
    174 #if H_3D_IV_MERGE
    175   TEncTop* getEncTop() { return m_pcEncTop; }
    176 #endif
     168
    177169#if !H_MV
    178170  Void  printOutSummary      ( UInt uiNumAllPicCoded );
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.cpp

    r476 r479  
    176176 \param pPPS          PPS associated with the slice
    177177 */
     178#if H_3D_GEN
     179Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS )
     180#else
    178181Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS )
     182#endif
    179183{
    180184  Double dQP;
     
    182186 
    183187  rpcSlice = pcPic->getSlice(0);
     188#if H_3D_GEN
     189  rpcSlice->setVPS( pVPS );
     190#endif
    184191  rpcSlice->setSPS( pSPS );
    185192  rpcSlice->setPPS( pPPS );
     
    530537  rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() );
    531538#if H_3D_IV_MERGE
    532   rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()   + ((rpcSlice->getSPS()->getMultiviewMvPredMode() & PDM_USE_FOR_MERGE) ? 1:0)      );
     539  rpcSlice->setMaxNumMergeCand      ( m_pcCfg->getMaxNumMergeCand()   + ( rpcSlice->getVPS()->getIvMvPredFlag( rpcSlice->getLayerIdInVps() ) ? 1 : 0 ) );
    533540#else
    534541  rpcSlice->setMaxNumMergeCand        ( m_pcCfg->getMaxNumMergeCand()        );
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.h

    r446 r479  
    116116 
    117117  /// preparation of slice encoding (reference marking, QP and lambda)
     118#if H_3D_GEN
     119  Void    initEncSlice        ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,
     120                                Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS );
     121#else
    118122  Void    initEncSlice        ( TComPic*  pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd,
    119123                                Int iGOPid,   TComSlice*& rpcSlice, TComSPS* pSPS, TComPPS *pPPS );
     124#endif
    120125#if RATE_CONTROL_LAMBDA_DOMAIN
    121126  Void    resetQP             ( TComPic* pic, Int sliceQP, Double lambda );
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp

    r478 r479  
    120120  m_cLoopFilter.        create( g_uiMaxCUDepth );
    121121
    122 #if H_3D_IV_MERGE
    123   m_cDepthMapGenerator. create( false, getSourceWidth(), getSourceHeight(), g_uiMaxCUDepth, g_uiMaxCUWidth, g_uiMaxCUHeight, g_bitDepthY, PDM_SUB_SAMP_EXP_X(m_uiPredDepthMapGeneration), PDM_SUB_SAMP_EXP_Y(m_uiPredDepthMapGeneration) );
    124 #endif
    125122#if RATE_CONTROL_LAMBDA_DOMAIN
    126123  if ( m_RCEnableRateControl )
     
    228225  m_cLoopFilter.        destroy();
    229226  m_cRateCtrl.          destroy();
    230 #if H_3D_IV_MERGE
    231   m_cDepthMapGenerator. destroy();
    232 #endif
    233227  // SBAC RD
    234228  if( m_bUseSBACRD )
     
    290284}
    291285
    292 #if H_3D_IV_MERGE
    293 Void TEncTop::init( TAppEncTop* pcTAppEncTop)
    294 #else
    295286Void TEncTop::init()
    296 #endif
    297287{
    298288  // initialize SPS
     
    316306  m_cCuEncoder.   init( this );
    317307 
    318 #if H_3D_IV_MERGE
    319   m_pcTAppEncTop = pcTAppEncTop;
    320   m_cDepthMapGenerator.init( (TComPrediction*)this->getPredSearch(), m_pcTAppEncTop->getVPSAccess(), m_pcTAppEncTop->getSPSAccess(), m_pcTAppEncTop->getAUPicAccess() );
    321 #endif
    322308  // initialize transform & quantization class
    323309  m_pcCavlcCoder = getCavlcCoder();
     
    672658  {
    673659    m_cSPS.initCamParaSPS           ( m_viewIndex, m_uiCamParPrecision, m_bCamParInSliceHeader, m_aaiCodedScale, m_aaiCodedOffset );
    674 #if H_3D_IV_MERGE
    675     if( m_viewIndex )
    676     {
    677       m_cSPS.setPredDepthMapGeneration( m_viewIndex, false, m_uiPredDepthMapGeneration, m_uiMultiviewMvPredMode);
    678     }
    679     else
    680     {
    681       m_cSPS.setPredDepthMapGeneration( m_viewIndex, false );
    682     }
    683 #endif
    684   }
    685 #if H_3D_IV_MERGE
    686   else
    687   {
    688     m_cSPS.initCamParaSPSDepth           ( m_viewIndex);
    689     m_cSPS.setPredDepthMapGeneration( m_viewIndex, true );
    690   }
    691 #endif
     660  }
    692661#endif
    693662}
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.h

    r478 r479  
    5757#include "TEncPreanalyzer.h"
    5858#include "TEncRateCtrl.h"
    59 #if H_3D_IV_MERGE
    60 #include "TLibCommon/TComDepthMapGenerator.h"
    61 #endif
    6259//! \ingroup TLibEncoder
    6360//! \{
     
    6764// ====================================================================================================================
    6865
    69 #if H_3D_IV_MERGE
    70 class TAppEncTop;
    71 #endif
    7266/// encoder class
    7367class TEncTop : public TEncCfg
     
    10296  TEncSlice               m_cSliceEncoder;                ///< slice encoder
    10397  TEncCu                  m_cCuEncoder;                   ///< CU encoder
    104 #if H_3D_IV_MERGE
    105   TComDepthMapGenerator   m_cDepthMapGenerator;           ///< depth map generator
    106 #endif
    10798  // SPS
    10899  TComSPS                 m_cSPS;                         ///< SPS
     
    128119  TEncBinCABAC*           m_pcRDGoOnBinCodersCABAC;        ///< going on bin coder CABAC for RD stage per substream
    129120
    130 #if H_3D_IV_MERGE 
    131   TAppEncTop*             m_pcTAppEncTop;
    132 #endif
    133121  // quality control
    134122  TEncPreanalyzer         m_cPreanalyzer;                 ///< image characteristics analyzer for TM5-step3-like adaptive QP
     
    157145  Void      create          ();
    158146  Void      destroy         ();
    159 #if H_3D_IV_MERGE
    160   Void      init            ( TAppEncTop* pcTAppEncTop );
    161 #else
    162147  Void      init            ();
    163 #endif
    164148#if H_MV 
    165149  TComPicLists* getIvPicLists() { return m_ivPicLists; }
     
    201185  TEncSbac*               getRDGoOnSbacCoders   () { return  m_pcRDGoOnSbacCoders;   }
    202186  TEncRateCtrl*           getRateCtrl           () { return &m_cRateCtrl;             }
    203 #if H_3D_IV_MERGE
    204   TAppEncTop*             getEncTop             () { return m_pcTAppEncTop; }
    205 #endif
    206187  TComSPS*                getSPS                () { return  &m_cSPS;                 }
    207188  TComPPS*                getPPS                () { return  &m_cPPS;                 }
     
    224205  Void                    setIvPicLists         ( TComPicLists* picLists) { m_ivPicLists = picLists; }
    225206#endif
    226 #if H_3D_IV_MERGE
    227   TComDepthMapGenerator*  getDepthMapGenerator  () { return  &m_cDepthMapGenerator;   }
    228 #endif
    229207  // -------------------------------------------------------------------------------------------------------------------
    230208  // encoder function
Note: See TracChangeset for help on using the changeset viewer.