Changeset 1394 in 3DVCSoftware for branches/HTM-16.0-dev1/source/Lib/TLibEncoder


Ignore:
Timestamp:
4 Mar 2016, 09:42:34 (9 years ago)
Author:
tech
Message:

Clean-up VSO.

Location:
branches/HTM-16.0-dev1/source/Lib/TLibEncoder
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/SyntaxElementWriter.cpp

    r1386 r1394  
    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);
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/SyntaxElementWriter.h

    r1386 r1394  
    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
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncCavlc.cpp

    r1392 r1394  
    6969  fprintf( g_hTrace, "=========== Slice ===========\n");
    7070}
     71#endif
    7172
    7273Void  xTraceAccessUnitDelimiter ()
     
    7576}
    7677
    77 #endif
    7878#endif
    7979
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncCfg.h

    r1386 r1394  
    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;     }
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncCu.cpp

    r1386 r1394  
    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() );     
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncSearch.cpp

    r1386 r1394  
    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++ )
     
    63166337  }
    63176338
    6318   Dist ruiDist;
     6339#if NH_3D_VSO
     6340    Dist ruiDist;
     6341#else
     6342    Distortion ruiDist;
     6343#endif
    63196344  Double rdCost;
    63206345#if NH_3D_VSO // M13
     
    67876812
    67886813#if NH_3D_VSO // M NEW01
    6789                if ( m_pcRdCost->getUseRenModel() )
     6814               if ( m_pcRdCost->getUseLambdaScaleVSO() )
    67906815               {
    67916816                 currCompCost = m_pcRdCost->calcRdCostVSO(currCompBits, currCompDist);
     
    69556980
    69566981#if NH_3D_VSO
    6957     if ( m_pcRdCost->getUseRenModel() )
     6982    if ( m_pcRdCost->getUseLambdaScaleVSO() )
    69586983    {
    69596984      dSingleCost = m_pcRdCost->calcRdCostVSO( uiSingleBits, uiSingleDist );
     
    78987923
    78997924  // coarse wedge search
    7900   Dist uiBestDist   = RDO_DIST_MAX;
     7925#if NH_3D_VSO
     7926  Dist       uiBestDist   = RDO_DIST_MAX;
     7927#else
     7928  Distortion uiBestDist   = RDO_DIST_MAX;
     7929#endif
    79017930  UInt uiBestNodeId = 0;
    79027931  for( UInt uiNodeId = 0; uiNodeId < pacWedgeNodeList->size(); uiNodeId++ )
     
    79087937    assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
    79097938
     7939#if !NH_3D_VSO
     7940    Distortion uiActDist = RDO_DIST_MAX;
     7941#else
    79107942    Dist uiActDist = RDO_DIST_MAX;
    7911 #if NH_3D_VSO
     7943
    79127944    if( m_pcRdCost->getUseVSO() )
    79137945    {
     
    79357967
    79367968  // refinement
     7969#if NH_3D_VSO
    79377970  Dist uiBestDistRef = uiBestDist;
     7971#else
     7972  Distortion uiBestDistRef = uiBestDist;
     7973#endif
    79387974  UInt uiBestTabIdxRef  = pacWedgeNodeList->at(uiBestNodeId).getPatternIdx();
    79397975  for( UInt uiRefId = 0; uiRefId < DMM_NUM_WEDGE_REFINES; uiRefId++ )
     
    79467982      xCalcBiSegDCs  ( piRef,  uiRefStride,  pbPattern, uiStride, refDC1, refDC2, (1<<(bitDepthY-1)) );
    79477983      assignBiSegDCs( piPred, uiPredStride, pbPattern, uiStride, refDC1, refDC2 );
     7984
     7985#if !NH_3D_VSO
     7986      Distortion uiActDist = RDO_DIST_MAX;
     7987#else
    79487988      Dist uiActDist = RDO_DIST_MAX;
    7949 #if NH_3D_VSO
    79507989      if( m_pcRdCost->getUseVSO() )
    79517990      {
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncSearch.h

    r1386 r1394  
    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
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncSlice.cpp

    r1386 r1394  
    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
  • branches/HTM-16.0-dev1/source/Lib/TLibEncoder/TEncTop.cpp

    r1392 r1394  
    16661666    }
    16671667
    1668     rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );
     1668    rendererModel->setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef, iEncViewSIdx );
    16691669  }
    16701670}
Note: See TracChangeset for help on using the changeset viewer.