Changeset 110 in 3DVCSoftware
- Timestamp:
- 22 Aug 2012, 03:51:38 (12 years ago)
- 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 335 335 ("AllowNegDist", m_bAllowNegDist , true , "Allow negative Distortion in VSO") 336 336 #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 337 343 338 344 #endif … … 644 650 #endif 645 651 652 #if LGE_WVSO_A0119 653 m_bWVSO = m_bUseVSO && m_bWVSO && m_bUsingDepthMaps; 654 #endif 646 655 xCleanUpVectors(); 647 656 … … 1688 1697 #if HHI_VSO 1689 1698 printf("VSO:%d ", m_bUseVSO ); 1690 #endif 1699 #endif 1700 #if LGE_WVSO_A0119 1701 printf("WVSO:%d ", m_bWVSO ); 1702 #endif 1691 1703 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX 1692 1704 printf("DMM:%d ", m_bUseDMM ); … … 1694 1706 #if HHI_MPI 1695 1707 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 ); 1696 1711 #endif 1697 1712 printf("\n\n"); -
branches/HTM-4.0-LG/source/App/TAppEncoder/TAppEncCfg.h
r102 r110 297 297 Bool m_bUseEstimatedVSD; ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3) 298 298 #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 300 305 // coding tools (depth intra modes) 301 306 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX -
branches/HTM-4.0-LG/source/App/TAppEncoder/TAppEncTop.cpp
r102 r110 207 207 m_acTEncTopList[iViewIdx]->setUseEstimatedVSD ( false ); 208 208 #endif 209 #if LGE_WVSO_A0119 210 m_acTEncTopList[iViewIdx]->setWVSO ( false ); 211 #endif 209 212 #endif 210 213 … … 524 527 m_acTEncDepthTopList[iViewIdx]->setUseEstimatedVSD ( m_bUseEstimatedVSD ); 525 528 #endif 529 #if LGE_WVSO_A0119 530 m_acTEncDepthTopList[iViewIdx]->setWVSO ( m_bWVSO ); 531 #endif 526 532 #endif 527 533 … … 690 696 AOT(true); 691 697 } 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 692 711 } 693 712 #endif -
branches/HTM-4.0-LG/source/Lib/TLibCommon/TComRdCost.h
r100 r110 377 377 Bool m_bUseEstimatedVSD; 378 378 #endif 379 #if LGE_WVSO_A0119 380 Int m_iDWeight; 381 Int m_iVSOWeight; 382 Int m_iVSDWeight; 383 Bool m_bWVSO; 384 #endif 379 385 380 386 Bool m_bUseVSO; … … 410 416 Void setVSOMode( UInt uiIn); 411 417 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 413 428 #if HHI_VSO_DIST_INT 414 429 Void setAllowNegDist ( Bool bAllowNegDist ); -
branches/HTM-4.0-LG/source/Lib/TLibCommon/TypeDef.h
r105 r110 94 94 #define SAIT_VSO_EST_A0033 1 // JCT2-A0033 modification 3 95 95 #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 97 97 98 98 #define HHI_INTERVIEW_SKIP 1 -
branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncCfg.h
r100 r110 204 204 Double m_dLambdaScaleVSO; 205 205 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 206 212 #endif 207 213 #if SAIT_VSO_EST_A0033 … … 466 472 Void setAllowNegDist ( Bool b ) { m_bAllowNegDist = b; }; 467 473 #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 468 480 #endif 469 481 … … 545 557 #if HHI_VSO_DIST_INT 546 558 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; } 547 565 #endif 548 566 #endif -
branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncGOP.cpp
r102 r110 464 464 m_pcRdCost->setDepthPicYuv ( m_pcEncTop->getEncTop()->getPicYuvFromView( pcSlice->getViewId(), pcSlice->getPOC(), true, false ) ); 465 465 #endif 466 466 #if LGE_WVSO_A0119 467 Bool bWVSO = m_pcEncTop->getWVSO(); 468 m_pcRdCost->setWVSO( bWVSO ); 469 #endif 467 470 468 471 } -
branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncSearch.cpp
r100 r110 1129 1129 if ( m_pcRdCost->getUseVSO() ) 1130 1130 { 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 1131 1139 ruiDist += m_pcRdCost->getDistVS ( pcCU, uiAbsPartIdx, piReco, uiStride, piOrg, uiStride, uiWidth, uiHeight, false, 0 ); 1140 #endif 1132 1141 } 1133 1142 else … … 1902 1911 1903 1912 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 1904 1919 } 1905 1920 else … … 4391 4406 { 4392 4407 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 4393 4414 } 4394 4415 else … … 4750 4771 { 4751 4772 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 4752 4779 } 4753 4780 else … … 4985 5012 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 4986 5013 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 4987 5020 } 4988 5021 else … … 5035 5068 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 5036 5069 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 5037 5076 } 5038 5077 else … … 6119 6158 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6120 6159 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 6121 6166 } 6122 6167 else … … 6232 6277 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6233 6278 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 6234 6285 } 6235 6286 else … … 6298 6349 TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv(); 6299 6350 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 6300 6357 } 6301 6358 else -
branches/HTM-4.0-LG/source/Lib/TLibEncoder/TEncSlice.cpp
r102 r110 376 376 m_pcRdCost->setDisparityCoeff( m_pcCfg->getDispCoeff() ); 377 377 #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 379 397 #if RDOQ_CHROMA_LAMBDA 380 398 // for RDOQ
Note: See TracChangeset for help on using the changeset viewer.