Changeset 1396 in 3DVCSoftware for trunk/source/Lib/TLibEncoder


Ignore:
Timestamp:
11 Mar 2016, 16:54:51 (9 years ago)
Author:
tech
Message:

Merged HTM-16.0-dev1@1395.

Location:
trunk/source/Lib/TLibEncoder
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibEncoder/SyntaxElementWriter.cpp

    r1386 r1396  
    128128
    129129#if NH_MV_ENC_DEC_TRAC
    130 Void  SyntaxElementWriter::xWriteStringTr( UChar* value, UInt length, const Char *pSymbolName)
     130Void  SyntaxElementWriter::xWriteStringTr( UChar* value, UInt length, const TChar *pSymbolName)
    131131{
    132132  xWriteString(value, length);
  • trunk/source/Lib/TLibEncoder/SyntaxElementWriter.h

    r1386 r1396  
    9696  Void  xWriteFlagTr          ( UInt value,               const TChar *pSymbolName);
    9797#if NH_MV
    98   Void  xWriteStringTr        ( UChar* value, UInt length, const Char *pSymbolName);
     98  Void  xWriteStringTr        ( UChar* value, UInt length, const TChar *pSymbolName);
    9999#endif
    100100#endif
  • trunk/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1386 r1396  
    6969  fprintf( g_hTrace, "=========== Slice ===========\n");
    7070}
     71#endif
    7172
    7273Void  xTraceAccessUnitDelimiter ()
     
    7576}
    7677
    77 #endif
    7878#endif
    7979
     
    14281428    for( Int j = 0; j  <=  vps->getMaxSubLayersInLayerSetMinus1( currLsIdx ); j++ )
    14291429    { 
     1430#if NH_3D_FIX_TICKET_114
     1431      if( j > 0  &&  dpbSize->getSubLayerFlagInfoPresentFlag( i )  ) 
     1432#else
    14301433      if( j > 0  &&  dpbSize->getSubLayerDpbInfoPresentFlag( i, j )  ) 
     1434#endif
    14311435      {
    14321436        WRITE_FLAG( dpbSize->getSubLayerDpbInfoPresentFlag( i, j ) ? 1 : 0 , "sub_layer_dpb_info_present_flag" );
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r1386 r1396  
    4646#include "TLibCommon/TComSlice.h"
    4747#include <assert.h>
     48
     49#if NH_3D
     50#include "TAppCommon/TAppComCamPara.h"
     51#endif
    4852#if NH_3D_VSO
    49 #include "TAppCommon/TAppComCamPara.h"
    5053#include "TLibRenderer/TRenModSetupStrParser.h"
    5154#endif
     
    458461#endif
    459462
    460 #if NH_3D_VSO
     463#if NH_3D_VSO || NH_3D
    461464  Bool      m_isDepth;
    462465  Bool      m_isAuxDepth;
     
    464467  //====== Camera Parameters ======
    465468  TAppComCamPara* m_cameraParameters;
     469#endif
    466470 
     471#if NH_3D_VSO
    467472  //====== View Synthesis Optimization ======
    468473  TRenModSetupStrParser* m_renderModelParameters;
     
    504509  , m_viewId(-1)
    505510  , m_viewIndex(-1)
    506 #if NH_3D_VSO
     511#if NH_3D_VSO || NH_3D
    507512  , m_isDepth(false)
    508513  , m_isAuxDepth(false)
     514#endif
     515#if NH_3D_VSO
    509516  , m_bUseVSO(false)
    510517#endif
     
    555562  Void      setViewIndex                     ( Int viewIndex  )   { m_viewIndex  = viewIndex;  }
    556563  Int       getViewIndex                     ()                   { return m_viewIndex;    }
    557 #if NH_3D_VSO
     564#if NH_3D_VSO || NH_3D
    558565  Void      setIsDepth                       ( Bool isDepth )   { m_isDepth = isDepth; }
    559566  Bool      getIsDepth                       ()                 { return m_isDepth; }
     
    11571164  UInt      getSummaryVerboseness( ) const                           { return m_summaryVerboseness; }
    11581165
    1159 #if NH_3D_VSO
     1166#if NH_3D_VSO || NH_3D
    11601167  // Only flags that are not in the SPS3dExtension should go here.
    11611168  /// 3D Tools
     
    11631170 //==== CAMERA PARAMETERS  ==========
    11641171  Void      setCameraParameters             ( TAppComCamPara* c) { m_cameraParameters   = c; }
    1165  //==== VSO  ==========
     1172#endif
     1173#if NH_3D_VSO
     1174  //==== VSO  ==========
    11661175  Void      setRenderModelParameters ( TRenModSetupStrParser* c ) { m_renderModelParameters = c; }
    11671176  Bool      getUseVSO                       ()              { return m_bUseVSO;     }
  • trunk/source/Lib/TLibEncoder/TEncCu.cpp

    r1386 r1396  
    11991199      rpcBestCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    12001200#if NH_3D_VSO // M8
    1201     if ( m_pcRdCost->getUseVSO() )   
     1201    if ( m_pcRdCost->getUseLambdaScaleVSO() )   
    12021202    {
    12031203      rpcBestCU->getTotalCost()  = m_pcRdCost->calcRdCostVSO( rpcBestCU->getTotalBits(), rpcBestCU->getTotalDistortion() );   
     
    13401340      }
    13411341#if NH_3D_VSO // M10
    1342       if ( m_pcRdCost->getUseVSO() )
     1342      if ( m_pcRdCost->getUseLambdaScaleVSO() )
    13431343      {
    13441344        rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     
    29742974  rpcTempCU->getTotalBins() = ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    29752975#if NH_3D_VSO // M44
    2976   if ( m_pcRdCost->getUseVSO() )
     2976  if ( m_pcRdCost->getUseLambdaScaleVSO() )
    29772977  {
    29782978    rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
     
    30473047      pcCU->getTotalBins() += ((TEncBinCABAC *)((TEncSbac*)m_pcEntropyCoder->m_pcEntropyCoderIf)->getEncBinIf())->getBinsCoded();
    30483048#if NH_3D_VSO // M45
    3049       if ( m_pcRdCost->getUseVSO() )     
     3049      if ( m_pcRdCost->getUseLambdaScaleVSO() )     
    30503050      {
    30513051        pcCU->getTotalCost() = m_pcRdCost->calcRdCostVSO( pcCU->getTotalBits(), pcCU->getTotalDistortion() );     
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r1386 r1396  
    16471647          UInt uiSingleBits = xGetIntraBitsQT( rTu, true, false, false );
    16481648#if NH_3D_VSO // M NEW
    1649           if ( m_pcRdCost->getUseRenModel() )
     1649          if ( m_pcRdCost->getUseLambdaScaleVSO() )
    16501650          {
    16511651            singleCostTmp     = m_pcRdCost->calcRdCostVSO( uiSingleBits, singleDistTmpLuma );
     
    18871887
    18881888#if NH_3D_DIS
    1889 Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode )
     1889#if NH_3D_VSO
     1890Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist&       ruiDist, Double& dRDCost, UInt uiPredMode )
     1891#else
     1892Void TEncSearch::xIntraCodingDIS( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, UInt uiPredMode )
     1893#endif
    18901894{
    18911895  UInt    uiWidth           = pcCU     ->getWidth   ( 0 );
     
    19821986#endif
    19831987#if NH_3D_SDC_INTRA
    1984 Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
     1988#if NH_3D_VSO
     1989Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist&       ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
     1990#else
     1991Void TEncSearch::xIntraCodingSDC( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi  )
     1992#endif
     1993
     1994
    19851995{
    19861996  UInt uiWidth        = pcCU->getWidth ( 0 );
     
    22152225#endif
    22162226  {
     2227#if NH_3D_FIX_INTRA_SDC_VSO_OFF
     2228    ruiDist = m_pcRdCost->getDistPart( bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y );
     2229#else
    22172230    ruiDist = m_pcRdCost->getDistPart( bitDepthY, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, COMPONENT_Y, DF_SAD );
     2231#endif
    22182232  }
    22192233
     
    27432757  Pel* piOrg         = pcOrgYuv ->getAddr(COMPONENT_Y, 0, uiWidth );
    27442758  UInt uiStride      = pcPredYuv->getStride(COMPONENT_Y);
    2745 #endif
     2759
    27462760  Dist   uiDist = 0;
    27472761  Double dCost   = 0.0;
     
    27492763  Double  dBestCost   = MAX_DOUBLE;
    27502764  UInt     uiBestDISType = 0;
     2765#else
     2766  Distortion   uiDist = 0;
     2767  Double       dCost   = 0.0;
     2768  Distortion   uiBestDist = 0;
     2769  Double       dBestCost   = MAX_DOUBLE;
     2770  UInt         uiBestDISType = 0;
     2771#endif
    27512772
    27522773  for( UInt uiPredMode = 0; uiPredMode < 4 ; uiPredMode++ )
     
    52325253  {
    52335254    rcMv = *pcMvPred;
     5255#if NH_MV_FIX_VERT_MV_REST
     5256    if ( m_vertRestriction )
     5257    {
     5258      if (rcMv.getVer() > cMvSrchRngRB.getVer()<<2)
     5259      {
     5260        rcMv.setVer(cMvSrchRngRB.getVer()<<2);
     5261      }
     5262    }
     5263#endif
    52345264    const TComMv *pIntegerMv2Nx2NPred=0;
    52355265    if (pcCU->getPartitionSize(0) != SIZE_2Nx2N || pcCU->getDepth(0) != 0)
     
    63166346  }
    63176347
    6318   Dist ruiDist;
     6348#if NH_3D_VSO
     6349    Dist ruiDist;
     6350#else
     6351    Distortion ruiDist;
     6352#endif
    63196353  Double rdCost;
    63206354#if NH_3D_VSO // M13
     
    67876821
    67886822#if NH_3D_VSO // M NEW01
    6789                if ( m_pcRdCost->getUseRenModel() )
     6823               if ( m_pcRdCost->getUseLambdaScaleVSO() )
    67906824               {
    67916825                 currCompCost = m_pcRdCost->calcRdCostVSO(currCompBits, currCompDist);
     
    69556989
    69566990#if NH_3D_VSO
    6957     if ( m_pcRdCost->getUseRenModel() )
     6991    if ( m_pcRdCost->getUseLambdaScaleVSO() )
    69586992    {
    69596993      dSingleCost = m_pcRdCost->calcRdCostVSO( uiSingleBits, uiSingleDist );
     
    78987932
    78997933  // coarse wedge search
    7900   Dist uiBestDist   = RDO_DIST_MAX;
     7934#if NH_3D_VSO
     7935  Dist       uiBestDist   = RDO_DIST_MAX;
     7936#else
     7937  Distortion uiBestDist   = RDO_DIST_MAX;
     7938#endif
    79017939  UInt uiBestNodeId = 0;
    79027940  for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ )
     
    79087946    assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
    79097947
     7948#if !NH_3D_VSO
     7949    Distortion uiActDist = RDO_DIST_MAX;
     7950#else
    79107951    Dist uiActDist = RDO_DIST_MAX;
    7911 #if NH_3D_VSO
     7952
    79127953    if( m_pcRdCost->getUseVSO() )
    79137954    {
     
    79357976
    79367977  // refinement
     7978#if NH_3D_VSO
    79377979  Dist uiBestDistRef = uiBestDist;
     7980#else
     7981  Distortion uiBestDistRef = uiBestDist;
     7982#endif
    79387983  UInt uiBestTabIdxRef  = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx();
    79397984  for( UInt uiRefId = 0; uiRefId < DMM_NUM_WEDGE_REFINES; uiRefId++ )
     
    79467991      xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2, (1<<(bitDepthY-1)) );
    79477992      assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
     7993
     7994#if !NH_3D_VSO
     7995      Distortion uiActDist = RDO_DIST_MAX;
     7996#else
    79487997      Dist uiActDist = RDO_DIST_MAX;
    7949 #if NH_3D_VSO
    79507998      if( m_pcRdCost->getUseVSO() )
    79517999      {
  • trunk/source/Lib/TLibEncoder/TEncSearch.h

    r1386 r1396  
    343343  Void  xLoadIntraResultQT        ( const ComponentID compID, TComTU &rTu);
    344344#if NH_3D_DIS
    345   Void xIntraCodingDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, UInt uiPredMode );
     345#if NH_3D_VSO
     346  Void xIntraCodingDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist&       ruiDist, Double& dRDCost, UInt uiPredMode );
     347#else
     348  Void xIntraCodingDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, UInt uiPredMode );
     349#endif
    346350#endif
    347351
     
    356360#endif
    357361#if NH_3D_SDC_INTRA
    358   Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
     362#if NH_3D_VSO
     363  Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Dist& ruiDist      , Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
     364#else
     365  Void xIntraCodingSDC            ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComYuv* pcOrgYuv, TComYuv* pcPredYuv, Distortion& ruiDist, Double& dRDCost, Bool bZeroResidual, Int iSDCDeltaResi    );
     366#endif
    359367  Void xCalcConstantSDC           ( Pel* ptrSrc, UInt srcStride, UInt uiSize, Pel& valDC );
    360368#endif
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r1386 r1396  
    461461
    462462#if NH_3D_VSO
    463   m_pcRdCost->setUseLambdaScaleVSO  ( (m_pcCfg->getUseVSO() ||  m_pcCfg->getForceLambdaScaleVSO()) && ( m_pcCfg->getIsDepth()  | m_pcCfg->getIsAuxDepth() ) );
     463  m_pcRdCost->setUseLambdaScaleVSO  ( (m_pcCfg->getUseVSO() ||  m_pcCfg->getForceLambdaScaleVSO()) && ( m_pcCfg->getIsDepth() || m_pcCfg->getIsAuxDepth() ) );
    464464  m_pcRdCost->setLambdaVSO          ( dLambda * m_pcCfg->getLambdaScaleVSO() );
    465465
  • trunk/source/Lib/TLibEncoder/TEncTop.cpp

    r1386 r1396  
    9191TEncTop::~TEncTop()
    9292{
     93#if NH_3D_FIX_LEAK
     94#if NH_3D_IC
     95  if ( m_aICEnableCandidate != NULL )
     96  {
     97    delete[] m_aICEnableCandidate;
     98  }
     99
     100  if ( m_aICEnableNum != NULL )
     101  {
     102    delete[] m_aICEnableNum;
     103  }
     104#endif
     105
     106#endif
    93107#if ENC_DEC_TRACE
    94108  if (g_hTrace != stdout)
     
    16521666    }
    16531667
    1654     rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );
     1668    rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef, iEncViewSIdx );
    16551669  }
    16561670}
Note: See TracChangeset for help on using the changeset viewer.