Changeset 110 in 3DVCSoftware


Ignore:
Timestamp:
22 Aug 2012, 03:51:38 (12 years ago)
Author:
lg
Message:

LGE_WVSO_A0119 integration (non-CTC)

Location:
branches/HTM-4.0-LG/source
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0-LG/source/App/TAppEncoder/TAppEncCfg.cpp

    r100 r110  
    335335  ("AllowNegDist",                    m_bAllowNegDist           , true          , "Allow negative Distortion in VSO")
    336336#endif
     337#if LGE_WVSO_A0119
     338  ("WVSO",                            m_bWVSO                   , true         , "Use WVSO" )
     339  ("VSOWeight",                       m_iVSOWeight              , 10                                     , "VSO Weight" )
     340  ("VSDWeight",                       m_iVSDWeight             , 1                                        , "SAIT Weight" )
     341  ("DWeight",                                                                           m_iDWeight                                                  , 1                                          , "SSE Weight" )
     342#endif
    337343
    338344#endif
     
    644650#endif
    645651
     652#if LGE_WVSO_A0119
     653  m_bWVSO = m_bUseVSO && m_bWVSO && m_bUsingDepthMaps;
     654#endif
    646655  xCleanUpVectors();
    647656
     
    16881697#if HHI_VSO
    16891698  printf("VSO:%d ", m_bUseVSO             );
    1690 #endif 
     1699#endif
     1700#if LGE_WVSO_A0119
     1701  printf("WVSO:%d ", m_bWVSO );
     1702#endif
    16911703#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    16921704  printf("DMM:%d ", m_bUseDMM );
     
    16941706#if HHI_MPI
    16951707  printf("MVI:%d ", m_bUseMVI ? 1 : 0 );
     1708#endif
     1709#if LGE_WVSO_A0119
     1710  printf("\nVSO : SAIT : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );
    16961711#endif
    16971712  printf("\n\n");
  • branches/HTM-4.0-LG/source/App/TAppEncoder/TAppEncCfg.h

    r102 r110  
    297297  Bool      m_bUseEstimatedVSD;                           ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 
    298298#endif
    299 
     299#if LGE_WVSO_A0119
     300  Bool      m_bWVSO;                                    ///< flag for using View Synthesis Optimization 
     301  Int                           m_iVSOWeight;
     302  Int       m_iVSDWeight;
     303  Int                           m_iDWeight;
     304#endif
    300305  // coding tools (depth intra modes)
    301306#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
  • branches/HTM-4.0-LG/source/App/TAppEncoder/TAppEncTop.cpp

    r102 r110  
    207207    m_acTEncTopList[iViewIdx]->setUseEstimatedVSD              ( false );
    208208#endif
     209#if LGE_WVSO_A0119
     210    m_acTEncTopList[iViewIdx]->setWVSO                                                                                           ( false );
     211#endif
    209212#endif
    210213
     
    524527      m_acTEncDepthTopList[iViewIdx]->setUseEstimatedVSD              ( m_bUseEstimatedVSD );
    525528#endif
     529#if LGE_WVSO_A0119
     530      m_acTEncDepthTopList[iViewIdx]->setWVSO                          ( m_bWVSO      );
     531#endif
    526532#endif
    527533
     
    690696      AOT(true);
    691697    }
     698#if LGE_WVSO_A0119
     699    for ( Int iViewNum = 0; iViewNum < m_iNumberOfViews; iViewNum++ )
     700    {
     701      for (Int iContent = 0; iContent < 2; iContent++ )
     702      {
     703        TEncTop* pcEncTop = ( iContent == 0 ) ? m_acTEncTopList[iViewNum] : m_acTEncDepthTopList[iViewNum];
     704        pcEncTop->setWVSO( m_bWVSO );
     705        pcEncTop->setVSOWeight( m_iVSOWeight );
     706        pcEncTop->setVSDWeight( m_iVSDWeight );
     707        pcEncTop->setDWeight( m_iDWeight );
     708      }
     709    }
     710#endif
    692711  }
    693712#endif
  • branches/HTM-4.0-LG/source/Lib/TLibCommon/TComRdCost.h

    r100 r110  
    377377  Bool                    m_bUseEstimatedVSD;
    378378#endif
     379#if LGE_WVSO_A0119
     380  Int                                                                                   m_iDWeight;
     381  Int                                                                                   m_iVSOWeight;
     382  Int                     m_iVSDWeight;
     383  Bool                    m_bWVSO;
     384#endif
    379385
    380386  Bool                    m_bUseVSO;
     
    410416  Void    setVSOMode( UInt uiIn);
    411417  UInt    getVSOMode( )                  { return m_uiVSOMode; }
    412 
     418#if LGE_WVSO_A0119
     419  Void    setWVSO ( Bool bIn )         { m_bWVSO = bIn; };
     420  Bool    getWVSO ( )                  { return m_bWVSO;};
     421  Void          setDWeight ( Int iDWeight )                     { m_iDWeight = iDWeight; };
     422  Int                   getDWeight ()                                                                           { return m_iDWeight; };
     423  Void          setVSOWeight ( Int iVSOWeight ) { m_iVSOWeight = iVSOWeight; };
     424  Int                   getVSOWeight ()                                                                 { return m_iVSOWeight; };
     425  Void          setVSDWeight ( Int iVSDWeight ) { m_iVSDWeight = iVSDWeight; };
     426  Int                   getVSDWeight ()                                                                 { return m_iVSDWeight; };
     427#endif
    413428#if HHI_VSO_DIST_INT
    414429  Void    setAllowNegDist ( Bool bAllowNegDist );
  • branches/HTM-4.0-LG/source/Lib/TLibCommon/TypeDef.h

    r105 r110  
    9494#define SAIT_VSO_EST_A0033                1 // JCT2-A0033 modification 3
    9595#define LGE_VSO_EARLY_SKIP_A0093          1 // JCT2-A0093 modification 4
    96 
     96#define LGE_WVSO_A0119                    1 // JCT2-A0119 Depth Metric with a weighted depth fidelity term
    9797
    9898#define HHI_INTERVIEW_SKIP                1
  • branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncCfg.h

    r100 r110  
    204204  Double    m_dLambdaScaleVSO;
    205205  UInt      m_uiVSOMode;
     206#if LGE_WVSO_A0119
     207  Bool      m_bWVSO;
     208  Int                           m_iVSOWeight;
     209  Int       m_iVSDWeight;
     210  Int                           m_iDWeight;
     211#endif
    206212#endif
    207213#if SAIT_VSO_EST_A0033
     
    466472  Void      setAllowNegDist                 ( Bool b  )     { m_bAllowNegDist     = b; };
    467473#endif
     474#if LGE_WVSO_A0119
     475  Void      setWVSO                                                                                                     ( Bool  b )     { m_bWVSO                               = b; }
     476  Void      setVSOWeight                                                                                ( Int   i )     { m_iVSOWeight  = i; }
     477  Void      setVSDWeight                                                                                ( Int   i )     { m_iVSDWeight  = i; }
     478  Void      setDWeight                                                                                  ( Int   i )     { m_iDWeight  = i; }
     479#endif
    468480#endif
    469481
     
    545557#if HHI_VSO_DIST_INT
    546558  Bool      getAllowNegDist                 ()      { return m_bAllowNegDist;     }
     559#endif
     560#if LGE_WVSO_A0119
     561  Bool      getWVSO                         ()      { return m_bWVSO;     }
     562  Int       getVSOWeight                    ()      { return m_iVSOWeight;    }
     563  Int       getVSDWeight                    ()      { return m_iVSDWeight;    }
     564  Int       getDWeight                                                                      ()      { return m_iDWeight;    }
    547565#endif
    548566#endif
  • branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncGOP.cpp

    r102 r110  
    464464    m_pcRdCost->setDepthPicYuv   ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) );
    465465#endif
    466 
     466#if LGE_WVSO_A0119
     467    Bool bWVSO  = m_pcEncTop->getWVSO();
     468    m_pcRdCost->setWVSO( bWVSO );
     469#endif
    467470
    468471  }
  • branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncSearch.cpp

    r100 r110  
    11291129  if ( m_pcRdCost->getUseVSO() )
    11301130  {
     1131#if LGE_WVSO_A0119
     1132    Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     1133    Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     1134    Dist iD = (Dist) m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
     1135    Dist iVSO = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
     1136    ruiDist += (iDWeight * iD + iVSOWeight * iVSO) / ( iDWeight + iVSOWeight);
     1137
     1138#else
    11311139    ruiDist += m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
     1140#endif
    11321141  }
    11331142  else
     
    19021911
    19031912            uiSad = (Dist) ( m_pcRdCost->getDistPart( piPred, uiStride, piOrg, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiPartOffset), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiPartOffset), pcVirRec->getStride(), uiWidth, uiHeight ) );
     1913#if LGE_WVSO_A0119
     1914            Int iDWeight = m_pcRdCost->getDWeight();
     1915            Int iVSDWeight = m_pcRdCost->getVSDWeight();
     1916            Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
     1917            uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight);
     1918#endif
    19041919          }
    19051920          else
     
    43914406    {
    43924407      uiDistortion = m_pcRdCost->getDistVS( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight     , false, 0 );
     4408#if LGE_WVSO_A0119
     4409      Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     4410      Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     4411      Dist iD   = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight      );
     4412      uiDistortion = (iDWeight * iD + iVSOWeight * (Dist)uiDistortion) / ( iDWeight + iVSOWeight);
     4413#endif
    43934414    }
    43944415    else   
     
    47504771  {
    47514772    uiDistortionBest = m_pcRdCost->getDistVS  ( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight, false, 0    );
     4773#if LGE_WVSO_A0119
     4774    Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     4775    Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     4776    Dist iD        = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight      );
     4777    uiDistortionBest = (iDWeight * iD + iVSOWeight * (Dist) uiDistortionBest) / ( iDWeight + iVSOWeight);
     4778#endif
    47524779  }
    47534780  else
     
    49855012        TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
    49865013        uiDistY = m_pcRdCost->getDistPart( m_pTempPel, 1<< uiLog2TrSize, pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPartIdx), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPartIdx), pcVirRec->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize );
     5014#if LGE_WVSO_A0119
     5015        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     5016        Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     5017        Dist iD   = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight );
     5018        uiDistY = (iDWeight * iD + iVSDWeight * (Dist)uiDistY) / ( iDWeight + iVSDWeight);
     5019#endif
    49875020      }
    49885021      else
     
    50355068          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
    50365069          uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( uiAbsPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcResi->getLumaAddr( uiAbsPartIdx ), pcResi->getStride(), pcVirRec->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiAbsPartIdx ), pcVirOrg->getLumaAddr( pcCU->getAddr(), pcCU->getZorderIdxInCU()+uiAbsPartIdx ), pcVirRec->getStride(), 1<< uiLog2TrSize,    1<< uiLog2TrSize );
     5070#if LGE_WVSO_A0119
     5071          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     5072          Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     5073          Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight );
     5074          uiNonzeroDistY = (iDWeight * iD + iVSDWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSDWeight);
     5075#endif
    50375076        }
    50385077        else
     
    61196158          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
    61206159          uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6160#if LGE_WVSO_A0119
     6161          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6162          Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6163          Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6164          uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
     6165#endif
    61216166        }
    61226167        else       
     
    62326277        TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
    62336278        uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
     6279#if LGE_WVSO_A0119
     6280        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6281        Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6282        Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6283        uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight);
     6284#endif
    62346285      }
    62356286      else
     
    62986349        TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
    62996350        uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPtIdx), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()+uiAbsPtIdx), pcVirRec->getStride(), uiWidth, uiHeight );
     6351#if LGE_WVSO_A0119
     6352        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6353        Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6354        Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6355        uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight);
     6356#endif
    63006357      }
    63016358      else
  • branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncSlice.cpp

    r102 r110  
    376376  m_pcRdCost->setDisparityCoeff( m_pcCfg->getDispCoeff() );
    377377#endif
    378 
     378#if LGE_WVSO_A0119
     379  if( m_pcCfg->getWVSO() && m_pcCfg->isDepthCoder() )
     380  {
     381
     382    Int iDWeight, iVSOWeight, iVSDWeight;
     383    iDWeight = m_pcCfg->getDWeight();
     384    iVSOWeight = m_pcCfg->getVSOWeight();
     385    iVSDWeight = m_pcCfg->getVSDWeight();
     386    //    if( rpcSlice->getViewId() )  iDWeight = ( iDWeight >> 1 );
     387    //    if( rpcSlice->getPOC() % 8 != 0 )  iDWeight = ( iDWeight >> 1 );
     388    //    if( rpcSlice->getPOC() % 4 != 0 )  iDWeight = ( iDWeight >> 1 );
     389    //    if( rpcSlice->getPOC() % 2 != 0 )  iDWeight = ( iDWeight >> 1 );
     390
     391    m_pcRdCost->setDWeight( iDWeight );
     392    m_pcRdCost->setVSOWeight( iVSOWeight );
     393    m_pcRdCost->setVSDWeight( iVSDWeight );
     394
     395  }
     396#endif
    379397#if RDOQ_CHROMA_LAMBDA
    380398// for RDOQ
Note: See TracChangeset for help on using the changeset viewer.