Changeset 476 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/App


Ignore:
Timestamp:
18 Jun 2013, 05:16:27 (12 years ago)
Author:
mediatek-htm
Message:

Integration of 3D-HEVC merge related coding tools:
Inter-view motion merge candidate
HHI_INTER_VIEW_MOTION_PRED
SAIT_IMPROV_MOTION_PRED_M24829, improved inter-view motion vector prediction
QC_MRG_CANS_B0048 , JCT3V-B0048, B0086, B0069
OL_DISMV_POS_B0069 , different pos for disparity MV candidate, B0069
MTK_INTERVIEW_MERGE_A0049 , second part
QC_AMVP_MRG_UNIFY_IVCAN_C0051
TEXTURE MERGING CANDIDATE , JCT3V-C0137

Notes: Two configurations are added:
PredDepthMapGen : 1
MultiviewMvPred : 7

From: yiwen.chen@… (MediaTek)

Location:
branches/HTM-DEV-0.3-dev2/source/App
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp

    r456 r476  
    641641    m_tDecTop[ decIdx ] =  new TDecTop;
    642642    m_tDecTop[ decIdx ]->create();
     643#if H_3D_IV_MERGE
     644    m_tDecTop[ decIdx ]->init(this );
     645#else
    643646    m_tDecTop[ decIdx ]->init( );
     647#endif
    644648    m_tDecTop[ decIdx ]->setLayerId( layerId );
    645649    m_tDecTop[ decIdx ]->setDecodedPictureHashSEIEnabled(m_decodedPictureHashSEIEnabled);
     
    678682}
    679683#endif
     684#if H_3D_IV_MERGE
     685TComPic* TAppDecTop::xGetPicFromView( Int viewIdx, Int poc, Bool isDepth )
     686{
     687  assert( ( viewIdx >= 0 ) );
     688
     689  TComList<TComPic*>* apcListPic = m_tDecTop[ (isDepth ? 1 : 0) + viewIdx * 2 ]->getListPic();
     690
     691  TComPic* pcPic = NULL;
     692  for( TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++ )
     693  {
     694    if( (*it)->getPOC() == poc )
     695    {
     696      pcPic = *it;
     697      break;
     698    }
     699  }
     700  return pcPic;
     701}
     702#endif
     703
    680704//! \}
  • branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.h

    r446 r476  
    4949#include "TAppDecCfg.h"
    5050
     51#if H_3D_IV_MERGE
     52#include "TLibCommon/TComDepthMapGenerator.h"
     53#endif
    5154//! \ingroup TAppDecoder
    5255//! \{
     
    7376    // for output control
    7477  Bool                            m_abDecFlag[ MAX_GOP ];         ///< decoded flag in one GOP
     78
     79#if H_3D_IV_MERGE
     80  Int  m_fcoViewDepthId;
     81  Char m_fcoOrder[MAX_VIEW_NUM*2];
     82#endif
    7583#if H_MV
    7684  Int                             m_pocLastDisplay      [ MAX_NUM_LAYERS ]; ///< last POC in display order
     
    8290  FILE*                           m_pScaleOffsetFile;
    8391  CamParsCollector                m_cCamParsCollector;
     92#if H_3D_IV_MERGE
     93  TComVPSAccess                   m_cVPSAccess;
     94  TComSPSAccess                   m_cSPSAccess;
     95  TComAUPicAccess                 m_cAUPicAccess;
     96#endif
    8497#endif
    8598public:
     
    90103  Void  destroy           (); ///< destroy internal members
    91104  Void  decode            (); ///< main decoding function
    92  
     105
     106#if H_3D_IV_MERGE
     107  TDecTop* getTDecTop     ( Int viewIdx, Bool isDepth );
     108  TComPic*              getPicFromView     ( Int viewIdx, Int poc, bool isDepth ) { return xGetPicFromView( viewIdx, poc, isDepth ); }
     109#endif
     110
     111#if H_3D_IV_MERGE
     112  TComVPSAccess*    getVPSAccess  () { return &m_cVPSAccess;   }
     113  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
     114  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
     115  TDecTop*          getDecTop0    () { return m_tDecTop[0]; }
     116#endif
     117
    93118protected:
    94119  Void  xCreateDecLib     (); ///< create internal classes
    95120  Void  xDestroyDecLib    (); ///< destroy internal classes
    96121  Void  xInitDecLib       (); ///< initialize decoder class
    97  
     122
     123#if H_3D_IV_MERGE
     124  TComPic* xGetPicFromView( Int viewIdx, Int poc, Bool isDepth );
     125#endif
     126
    98127#if H_MV
    99128  Void  xWriteOutput      ( TComList<TComPic*>* pcListPic, Int layerId, Int tId ); ///< write YUV to file
     
    104133  Void  xFlushOutput      ( TComList<TComPic*>* pcListPic ); ///< flush all remaining decoded pictures to file
    105134#endif
     135
    106136  Bool  isNaluWithinTargetDecLayerIdSet ( InputNALUnit* nalu ); ///< check whether given Nalu is within targetDecLayerIdSet
    107137};
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp

    r446 r476  
    717717
    718718#endif //HHI_VSO
     719
     720#if H_3D_IV_MERGE
     721  ("PredDepthMapGen",  m_uiPredDepthMapGeneration, (UInt)0, "generation of prediction depth maps for motion data prediction" )
     722  ("MultiviewMvPred",  m_uiMultiviewMvPredMode,    (UInt)0, "usage of predicted depth maps" )
     723#endif
    719724#endif //H_3D
    720725  ;
     
    14391444  xConfirmPara( ((UInt) m_numberOfLayers >> 1 ) != m_cCameraData.getBaseViewNumbers().size(),   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
    14401445  xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
     1446#if H_3D_IV_MERGE
     1447  xConfirmPara    ( m_uiPredDepthMapGeneration > 2,                                   "PredDepthMapGen must be less than or equal to 2" );
     1448  xConfirmPara    ( m_uiMultiviewMvPredMode > 7,                                      "MultiviewMvPred must be less than or equal to 7" ); 
     1449  xConfirmPara    ( m_uiMultiviewMvPredMode > 0 && m_uiPredDepthMapGeneration == 0 ,  "MultiviewMvPred > 0 requires PredDepthMapGen > 0" );
     1450#endif
    14411451#if H_3D_VSO
    14421452    if( m_bUseVSO )
     
    22782288  printf("WVSO:%d ", m_bUseWVSO ); 
    22792289#endif
     2290#if H_3D_IV_MERGE
     2291  printf("MultiviewMvPred:%d", m_uiMultiviewMvPredMode);
     2292#endif
    22802293  printf("\n\n"); 
    22812294
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.h

    r446 r476  
    381381  TAppComCamPara m_cCameraData;
    382382  Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
     383#if H_3D_IV_MERGE
     384  UInt      m_uiMultiviewMvPredMode;   
     385  UInt      m_uiPredDepthMapGeneration;
     386#endif
    383387#if H_3D_VSO
    384388  Char*     m_pchVSOConfig;
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp

    r446 r476  
    128128    m_frameRcvd                 .push_back(0);
    129129    m_acTEncTopList             .push_back(new TEncTop);
     130#if H_3D_IV_MERGE
     131//    m_acTEncDepthTopList        .push_back(new TEncTop);
     132#endif
    130133    m_acTVideoIOYuvInputFileList.push_back(new TVideoIOYuv);
    131134    m_acTVideoIOYuvReconFileList.push_back(new TVideoIOYuv);
    132135    m_picYuvRec                 .push_back(new TComList<TComPicYuv*>) ;
    133 
     136#if H_3D_IV_MERGE
     137    //m_acTEncDepthTopList[iViewIdx]->setFrameRate                    ( m_iFrameRate );
     138    //m_acTEncDepthTopList[iViewIdx]->setFrameSkip                    ( m_FrameSkip );
     139    //m_acTEncDepthTopList[iViewIdx]->setSourceWidth                  ( m_iSourceWidth );
     140    //m_acTEncDepthTopList[iViewIdx]->setSourceHeight                 ( m_iSourceHeight );
     141    //m_acTEncDepthTopList[iViewIdx]->setCroppingMode                 ( m_croppingMode );
     142    //m_acTEncDepthTopList[iViewIdx]->setCropLeft                     ( m_cropLeft );
     143    //m_acTEncDepthTopList[iViewIdx]->setCropRight                    ( m_cropRight );
     144    //m_acTEncDepthTopList[iViewIdx]->setCropTop                      ( m_cropTop );
     145    //m_acTEncDepthTopList[iViewIdx]->setCropBottom                   ( m_cropBottom );
     146    //m_acTEncDepthTopList[iViewIdx]->setFrameToBeEncoded             ( m_iFrameToBeEncoded );
     147    //m_acTEncDepthTopList[iViewIdx]->setViewId                       ( iViewIdx );
     148    //m_acTEncDepthTopList[iViewIdx]->setIsDepth                      ( true );
     149
     150    //m_acTEncDepthTopList[iViewIdx]->setViewOrderIdx                 ( m_cCameraData.getViewOrderIndex()[ iViewIdx ] );
     151
     152    //m_acTEncDepthTopList[iViewIdx]->setLayerId                      ( layerId );
     153
     154#endif
    134155    m_ivPicLists.push_back( m_acTEncTopList[ layer ]->getListPic()  );
    135156    TEncTop& m_cTEncTop = *m_acTEncTopList[ layer ];  // It is not a member, but this name helps avoiding code duplication !!!
     
    143164    m_cTEncTop.setIsDepth                      ( isDepth );
    144165    //====== Camera Parameters =========
     166#if H_3D_IV_MERGE
     167      //m_acTEncDepthTopList[iViewIdx]->setCamParPrecision              ( 0 );
     168      //m_acTEncDepthTopList[iViewIdx]->setCamParInSliceHeader          ( false );
     169      //m_acTEncDepthTopList[iViewIdx]->setCodedScale                   ( 0 );
     170      //m_acTEncDepthTopList[iViewIdx]->setCodedOffset                  ( 0 );
     171#endif
    145172    m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
    146173    m_cTEncTop.setCamParPrecision              ( isDepth ? false : m_cCameraData.getCamParsCodedPrecision  () );
     
    166193    m_cTEncTop.setDWeight                      ( isDepth ? m_iDWeight             : 0     );
    167194#endif // H_3D_VSO
     195#if H_3D_IV_MERGE
     196    m_cTEncTop.setMultiviewMvPredMode          ( m_uiMultiviewMvPredMode     );
     197    m_cTEncTop.setPredDepthMapGeneration       ( m_uiPredDepthMapGeneration );
     198#endif
    168199#endif // H_3D
    169200
     
    189220 
    190221  //====== Coding Structure ========
     222#if H_3D_IV_MERGE
     223      //m_acTEncDepthTopList[iViewIdx]->setIntraPeriod                  ( m_iIntraPeriod );
     224      //m_acTEncDepthTopList[iViewIdx]->setDecodingRefreshType          ( m_iDecodingRefreshType );
     225      //m_acTEncDepthTopList[iViewIdx]->setGOPSize                      ( m_iGOPSize );
     226      //m_acTEncDepthTopList[iViewIdx]->setGopList                      ( m_GOPListsMvc[iViewIdx] );
     227      //m_acTEncDepthTopList[iViewIdx]->setExtraRPSs                    ( m_extraRPSs[iViewIdx] );
     228#endif
    191229  m_cTEncTop.setIntraPeriod                  ( m_iIntraPeriod );
    192230  m_cTEncTop.setDecodingRefreshType          ( m_iDecodingRefreshType );
     
    207245    m_cTEncTop.setNumReorderPics             ( m_numReorderPics[i], i );
    208246    m_cTEncTop.setMaxDecPicBuffering         ( m_maxDecPicBuffering[i], i );
    209   }
     247#if H_3D_IV_MERGE
     248        m_acTEncDepthTopList[iViewIdx]->setNumReorderPics             ( m_numReorderPics[iViewIdx][i], i );
     249        m_acTEncDepthTopList[iViewIdx]->setMaxDecPicBuffering         ( m_maxDecPicBuffering[iViewIdx][i], i );
     250#endif
     251  }
     252#if H_3D_IV_MERGE
     253      m_acTEncDepthTopList[iViewIdx]->setQP                           ( m_aiQP[1] );
     254
     255      m_acTEncDepthTopList[iViewIdx]->setTemporalLayerQPOffset        ( m_aiTLayerQPOffset );
     256      m_acTEncDepthTopList[iViewIdx]->setPad                          ( m_aiPad );
     257
     258      m_acTEncDepthTopList[iViewIdx]->setMaxTempLayer                 ( m_maxTempLayer[iViewIdx] );
     259
     260      m_acTEncDepthTopList[iViewIdx]->setDisInter4x4                  ( m_bDisInter4x4);
     261
     262      m_acTEncDepthTopList[iViewIdx]->setUseNSQT( m_enableNSQT );
     263      m_acTEncDepthTopList[iViewIdx]->setUseAMP( m_enableAMP );
     264#endif
    210265#endif
    211266  for( UInt uiLoop = 0; uiLoop < MAX_TLAYER; ++uiLoop )
    212267  {
    213268    m_cTEncTop.setLambdaModifier( uiLoop, m_adLambdaModifier[ uiLoop ] );
     269#if H_3D_IV_MERGE
     270//        m_acTEncDepthTopList[iViewIdx]->setLambdaModifier( uiLoop, m_adLambdaModifier[ uiLoop ] );
     271#endif
    214272  }
    215273#if H_MV
     
    231289 
    232290  //====== Loop/Deblock Filter ========
     291#if H_3D_IV_MERGE
     292      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterDisable            ( m_abLoopFilterDisable[1]   );
     293      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterOffsetInAPS        ( m_loopFilterOffsetInAPS );
     294      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterBetaOffset         ( m_loopFilterBetaOffsetDiv2  );
     295      //m_acTEncDepthTopList[iViewIdx]->setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
     296      //m_acTEncDepthTopList[iViewIdx]->setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
     297#endif
    233298#if H_MV
    234299  m_cTEncTop.setLoopFilterDisable            ( m_bLoopFilterDisable[layer]);
     
    604669  for(Int layer=0; layer<m_numberOfLayers; layer++)
    605670  {
     671#if H_3D_IV_MERGE
     672    m_acTEncTopList[layer]->init(this );
     673#else
    606674    m_acTEncTopList[layer]->init( );
     675#endif
    607676  }
    608677#else
     
    10321101}
    10331102#endif
     1103#if H_3D_IV_MERGE
     1104TComPic* TAppEncTop::xGetPicFromView( Int viewIdx, Int poc, Bool isDepth )
     1105{
     1106  assert( ( viewIdx >= 0 ) && ( viewIdx < m_iNumberOfViews ) );
     1107
     1108  TComList<TComPic*>* apcListPic =  m_acTEncTopList[(isDepth ? 1 : 0) + viewIdx * 2]->getListPic() ;
     1109
     1110 
     1111
     1112  TComPic* pcPic = NULL;
     1113  for(TComList<TComPic*>::iterator it=apcListPic->begin(); it!=apcListPic->end(); it++)
     1114  {
     1115    if( (*it)->getPOC() == poc )
     1116    {
     1117      pcPic = *it ;
     1118      break ;
     1119    }
     1120  }
     1121
     1122  return pcPic;
     1123};
     1124#endif
    10341125//! \}
  • branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.h

    r446 r476  
    4848#if H_3D
    4949#include "../../Lib/TLibRenderer/TRenTop.h"
     50#if H_3D_IV_MERGE
     51#include "TLibCommon/TComDepthMapGenerator.h"
     52#endif
    5053#endif
    5154
     
    8992  TRenModel                   m_cRendererModel;   
    9093#endif
     94
     95#if H_3D_IV_MERGE
     96  TComVPSAccess               m_cVPSAccess;
     97  TComSPSAccess               m_cSPSAccess;
     98  TComAUPicAccess             m_cAUPicAccess;
     99#endif
    91100protected:
    92101  // initialization
     
    114123  void rateStatsAccum(const AccessUnit& au, const std::vector<UInt>& stats);
    115124  void printRateSummary();
    116  
     125#if H_3D_IV_MERGE
     126  TComPic* xGetPicFromView( Int viewIdx, Int iPoc, Bool isDepth );
     127#endif
    117128#if H_MV
    118129  Void xSetLayerIds               ( TComVPS& vps ); 
     
    126137 
    127138  Void        encode      ();                               ///< main encoding function
     139#if H_3D_IV_MERGE
     140  TComPic*              getPicFromView     ( Int viewIdx, Int poc, Bool isDepth ) { return xGetPicFromView( viewIdx, poc, isDepth ); }
     141#endif
    128142#if H_MV
    129143  TEncTop*    getTEncTop( UInt layer ) { return  m_acTEncTopList[layer]; }  ///< return pointer to encoder class for specific layer
    130144#else
    131145  TEncTop&    getTEncTop  ()   { return  m_cTEncTop; }      ///< return encoder class pointer reference
     146#endif
     147
     148#if H_3D_IV_MERGE
     149  TComVPSAccess*    getVPSAccess  () { return &m_cVPSAccess;   }
     150  TComSPSAccess*    getSPSAccess  () { return &m_cSPSAccess;   }
     151  TComAUPicAccess*  getAUPicAccess() { return &m_cAUPicAccess; }
    132152#endif
    133153};// END CLASS DEFINITION TAppEncTop
Note: See TracChangeset for help on using the changeset viewer.