Changeset 110 in 3DVCSoftware for branches/HTM-4.0-LG/source/Lib/TLibEncoder


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/Lib/TLibEncoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • 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.