Changeset 120 in 3DVCSoftware for trunk/source/Lib


Ignore:
Timestamp:
30 Aug 2012, 19:52:58 (12 years ago)
Author:
tech
Message:

Cleanup of WVSO and fixed cfg-file switch

Location:
trunk/source/Lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibCommon/TComRdCost.h

    r116 r120  
    381381  Int                     m_iVSOWeight;
    382382  Int                     m_iVSDWeight;
    383   Bool                    m_bWVSO;
     383  Bool                    m_bUseWVSO;
    384384#endif
    385385
     
    417417  UInt    getVSOMode( )                  { return m_uiVSOMode; }
    418418#if LGE_WVSO_A0119
    419   Void    setWVSO ( Bool bIn )            { m_bWVSO = bIn; };
    420   Bool    getWVSO ( )                     { return m_bWVSO;};
     419  Void    setUseWVSO ( Bool bIn )         { m_bUseWVSO = bIn; };
     420  Bool    getUseWVSO ( )                  { return m_bUseWVSO;};
    421421  Void    setDWeight   ( Int iDWeight   ) { m_iDWeight = iDWeight; };
    422422  Int     getDWeight   ()                 { return m_iDWeight; };
  • trunk/source/Lib/TLibEncoder/TEncCfg.h

    r116 r120  
    205205  UInt      m_uiVSOMode;
    206206#if LGE_WVSO_A0119
    207   Bool      m_bWVSO;
     207  Bool      m_bUseWVSO;
    208208  Int       m_iVSOWeight;
    209209  Int       m_iVSDWeight;
     
    477477#endif
    478478#if LGE_WVSO_A0119
    479   Void      setWVSO                         ( Bool  b )     { m_bWVSO      = b; }
     479  Void      setUseWVSO                      ( Bool  b )     { m_bUseWVSO   = b; }
    480480  Void      setVSOWeight                    ( Int   i )     { m_iVSOWeight = i; }
    481481  Void      setVSDWeight                    ( Int   i )     { m_iVSDWeight = i; }
     
    563563#endif
    564564#if LGE_WVSO_A0119
    565   Bool      getWVSO                         ()      { return m_bWVSO;     }
     565  Bool      getUseWVSO                      ()      { return m_bUseWVSO;     }
    566566  Int       getVSOWeight                    ()      { return m_iVSOWeight;    }
    567567  Int       getVSDWeight                    ()      { return m_iVSDWeight;    }
     
    679679  Void  setSliceGranularity            ( Int  i )      { m_iSliceGranularity = i;       }
    680680  Int   getSliceGranularity            ()              { return m_iSliceGranularity;    }
    681   Void      setLFCrossSliceBoundaryFlag     ( Bool   bValue  )    { m_bLFCrossSliceBoundaryFlag = bValue; }
    682   Bool      getLFCrossSliceBoundaryFlag     ()                    { return m_bLFCrossSliceBoundaryFlag;   }
     681  Void  setLFCrossSliceBoundaryFlag    ( Bool   bValue  )    { m_bLFCrossSliceBoundaryFlag = bValue; }
     682  Bool  getLFCrossSliceBoundaryFlag    ()                    { return m_bLFCrossSliceBoundaryFlag;   }
    683683
    684684#if HHI_MPI
    685   Void      setUseMVI                  (Bool bVal)     {m_bUseMVI = bVal;}
    686 #endif
    687   Void      setUseSAO                  (Bool bVal)     {m_bUseSAO = bVal;}
    688   Bool      getUseSAO                  ()              {return m_bUseSAO;}
     685  Void  setUseMVI                      ( Bool bVal )   {m_bUseMVI = bVal;}
     686#endif
     687  Void  setUseSAO                      ( Bool bVal )   {m_bUseSAO = bVal;}
     688  Bool  getUseSAO                      ()              {return m_bUseSAO;}
    689689#if SAO_UNIT_INTERLEAVING
    690690  Void  setMaxNumOffsetsPerPic                   (Int iVal)            { m_maxNumOffsetsPerPic = iVal; }
     
    817817
    818818#if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    819   Void setUseDMM( Bool b) { m_bUseDMM = b;    }
    820   Bool getUseDMM()        { return m_bUseDMM; }
     819  Void      setUseDMM( Bool b) { m_bUseDMM = b;    }
     820  Bool      getUseDMM()        { return m_bUseDMM; }
    821821#endif
    822822
    823823#if OL_DEPTHLIMIT_A0044
    824   Void setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; }
    825   Bool getUseDPL()       {return m_bDepthPartitionLimiting;}
     824  Void      setUseDPL(Bool b) {m_bDepthPartitionLimiting = b; }
     825  Bool      getUseDPL()       {return m_bDepthPartitionLimiting;}
    826826#endif
    827827
  • trunk/source/Lib/TLibEncoder/TEncGOP.cpp

    r116 r120  
    444444    Int iVSOMode = m_pcEncTop->getVSOMode();
    445445    m_pcRdCost->setVSOMode( iVSOMode  );
     446
    446447#if HHI_VSO_DIST_INT
    447448    m_pcRdCost->setAllowNegDist( m_pcEncTop->getAllowNegDist() );
     
    465466#endif
    466467#if LGE_WVSO_A0119
    467     Bool bWVSO  = m_pcEncTop->getWVSO();
    468     m_pcRdCost->setWVSO( bWVSO );
     468    Bool bUseWVSO  = m_pcEncTop->getUseWVSO();
     469    m_pcRdCost->setUseWVSO( bUseWVSO );
    469470#endif
    470471
  • trunk/source/Lib/TLibEncoder/TEncSearch.cpp

    r119 r120  
    11301130  {
    11311131#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
    1139     ruiDist += m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
    1140 #endif
     1132    if ( m_pcRdCost->getUseWVSO() )
     1133    {   
     1134      Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     1135      Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     1136      Dist iD = (Dist) m_pcRdCost->getDistPart( piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight );
     1137      Dist iVSO = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
     1138      ruiDist += (iDWeight * iD + iVSOWeight * iVSO) / ( iDWeight + iVSOWeight);
     1139    }
     1140    else
     1141#endif
     1142    {
     1143      ruiDist += m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 );
     1144    }
    11411145  }
    11421146  else
     
    19121916            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 ) );
    19131917#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            if ( m_pcRdCost->getUseWVSO() )
     1919            {   
     1920              Int iDWeight = m_pcRdCost->getDWeight();
     1921              Int iVSDWeight = m_pcRdCost->getVSDWeight();
     1922              Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
     1923              uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight);
     1924            }
    19181925#endif
    19191926          }
     
    19231930            Bool bSad = !m_pcRdCost->getUseRenModel();
    19241931            uiSad = m_pcRdCost->getDistVS(pcCU, uiPartOffset, piPred, uiStride, piOrg, uiStride, uiWidth, uiHeight, bSad, 0 );
     1932#if LGE_WVSO_A0119
     1933            if ( m_pcRdCost->getUseWVSO() )
     1934            {   
     1935              Int iDWeight = m_pcRdCost->getDWeight()*m_pcRdCost->getDWeight();
     1936              Int iVSDWeight = m_pcRdCost->getVSOWeight()*m_pcRdCost->getVSOWeight();
     1937              Dist iD = (Dist) m_pcRdCost->getDistPart( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
     1938              uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight);
     1939            }
     1940#endif
    19251941          }
    1926 
    19271942        }
    19281943        else
     
    44074422      uiDistortion = m_pcRdCost->getDistVS( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight     , false, 0 );
    44084423#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);
     4424      if ( m_pcRdCost->getUseWVSO() )
     4425      {   
     4426        Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     4427        Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     4428        Dist iD   = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight      );
     4429        uiDistortion = (iDWeight * iD + iVSOWeight * (Dist)uiDistortion) / ( iDWeight + iVSOWeight);
     4430      }
    44134431#endif
    44144432    }
     
    47724790    uiDistortionBest = m_pcRdCost->getDistVS  ( pcCU, 0, rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight, false, 0    );
    47734791#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);
     4792    if ( m_pcRdCost->getUseWVSO() )
     4793    {   
     4794      Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     4795      Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     4796      Dist iD        = (Dist) m_pcRdCost->getDistPart( rpcYuvRec->getLumaAddr(), rpcYuvRec->getStride(),  pcYuvOrg->getLumaAddr(), pcYuvOrg->getStride(),  uiWidth,      uiHeight      );
     4797      uiDistortionBest = (iDWeight * iD + iVSOWeight * (Dist) uiDistortionBest) / ( iDWeight + iVSOWeight);
     4798    }
    47784799#endif
    47794800  }
     
    50135034        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 );
    50145035#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);
     5036        if ( m_pcRdCost->getUseWVSO() )
     5037        {   
     5038          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     5039          Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     5040          Dist iD   = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight );
     5041          uiDistY = (iDWeight * iD + iVSDWeight * (Dist)uiDistY) / ( iDWeight + iVSDWeight);
     5042        }
    50195043#endif
    50205044      }
     
    50235047      {     
    50245048        uiDistY = m_pcRdCost->getDistVS  ( pcCU, uiAbsPartIdx, pcPred->getLumaAddr( uiAbsPartIdx ), pcPred->getStride(), pcOrg->getLumaAddr( uiAbsPartIdx), pcOrg->getStride(), 1<< uiLog2TrSize, 1<< uiLog2TrSize, false, 0 ); // initialized with zero residual distortion
     5049#if LGE_WVSO_A0119
     5050        if ( m_pcRdCost->getUseWVSO() )
     5051        {   
     5052          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     5053          Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     5054          Dist iD   = (Dist) m_pcRdCost->getDistPart( m_pTempPel, trWidth, pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth, trHeight );
     5055          uiDistY = (iDWeight * iD + iVSOWeight * (Dist)uiDistY) / ( iDWeight + iVSOWeight);
     5056        }
     5057#endif
    50255058      }
    50265059    }
     
    50695102          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 );
    50705103#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);
     5104          if ( m_pcRdCost->getUseWVSO() )
     5105          {   
     5106            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     5107            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     5108            Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight );
     5109            uiNonzeroDistY = (iDWeight * iD + iVSDWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSDWeight);
     5110          }
    50755111#endif
    50765112        }
     
    50815117          uiNonzeroDistY = m_pcRdCost->getDistVS( pcCU, uiAbsPartIdx, m_cYuvRecTemp.getLumaAddr(uiAbsPartIdx), m_cYuvRecTemp.getStride(),
    50825118                                                  pcOrg->getLumaAddr( uiAbsPartIdx ), pcOrg->getStride(), 1<< uiLog2TrSize,   1<< uiLog2TrSize, false, 0 );
     5119#if LGE_WVSO_A0119
     5120          if ( m_pcRdCost->getUseWVSO() )
     5121          {   
     5122            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     5123            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     5124            Dist iD = (Dist) m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(),pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight );
     5125            uiNonzeroDistY = (iDWeight * iD + iVSOWeight * (Dist) uiNonzeroDistY) / ( iDWeight + iVSOWeight);
     5126          }
     5127#endif
    50835128        }
    50845129      }
     
    61596204          uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
    61606205#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);
     6206          if ( m_pcRdCost->getUseWVSO() )
     6207          {   
     6208            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6209            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6210            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6211            uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
     6212          }
    61656213#endif
    61666214        }
     
    61696217        {       
    61706218          uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
     6219#if LGE_WVSO_A0119
     6220          if ( m_pcRdCost->getUseWVSO() )
     6221          {   
     6222            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6223            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6224            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
     6225            uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight);
     6226          }
     6227#endif
    61716228        }
    61726229
     
    62776334        uiActDist = m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
    62786335#if LGE_WVSO_A0119
    6279         Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
    6280         Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
    6281         Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
    6282         uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight);
     6336        if ( m_pcRdCost->getUseWVSO() )
     6337        {   
     6338          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6339          Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6340          Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6341          uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight);
     6342        }
    62836343#endif
    62846344      }
     
    62876347      {     
    62886348        uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
     6349#if LGE_WVSO_A0119
     6350        if ( m_pcRdCost->getUseWVSO() )
     6351        {   
     6352          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6353          Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6354          Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6355          uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight);
     6356        }
     6357#endif
    62896358      }
    62906359    }
     
    63496418        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 );
    63506419#if LGE_WVSO_A0119
    6351         Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
    6352         Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
    6353         Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
    6354         uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight);
     6420        if ( m_pcRdCost->getUseWVSO() )
     6421        {   
     6422          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6423          Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
     6424          Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6425          uiActDist = (iDWeight * iD + iVSDWeight * (Int) uiActDist) / ( iDWeight + iVSDWeight);
     6426        }
    63556427#endif
    63566428      }
     
    63596431      {     
    63606432        uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, 0 );
     6433#if LGE_WVSO_A0119
     6434        if ( m_pcRdCost->getUseWVSO() )
     6435        {   
     6436          Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
     6437          Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
     6438          Dist iD = (Dist) m_pcRdCost->getDistPart( piPred, uiPredStride, piRef, uiRefStride, uiWidth, uiHeight, false, DF_SAD );
     6439          uiActDist = (iDWeight * iD + iVSOWeight * (Int) uiActDist) / ( iDWeight + iVSOWeight);
     6440        }
     6441#endif
    63616442      }
    63626443    }
  • trunk/source/Lib/TLibEncoder/TEncSlice.cpp

    r116 r120  
    377377#endif
    378378#if LGE_WVSO_A0119
    379   if( m_pcCfg->getWVSO() && m_pcCfg->isDepthCoder() )
     379  if( m_pcCfg->getUseWVSO() && m_pcCfg->isDepthCoder() )
    380380  {
    381381
     
    384384    iVSOWeight = m_pcCfg->getVSOWeight();
    385385    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 );
    390386
    391387    m_pcRdCost->setDWeight( iDWeight );
Note: See TracChangeset for help on using the changeset viewer.