Index: /branches/HTM-4.1-dev2-LG/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg
===================================================================
--- /branches/HTM-4.1-dev2-LG/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/CommonTestConditionsCfgs/baseCfg_2view+depth.cfg	(revision 145)
@@ -205,4 +205,8 @@
 #========== view synthesis optimization (VSO) ==========
 VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) I(s0.25 s0.5 s0.75)]  # VSO configuration string
+WVSO	                  : 1								      # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 
+VSOWeight                 : 10							              # weight of VSO ( in SAD case, cf. squared in SSE case )
+VSDWeight	          : 1							              # weight of VSD ( in SAD case, cf. squared in SSE case )
+DWeight	                  : 1							              # weight of depth distortion itself ( in SAD case, cf. squared in SSE case )
 
 #============ Misc. ================
Index: /branches/HTM-4.1-dev2-LG/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg
===================================================================
--- /branches/HTM-4.1-dev2-LG/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/CommonTestConditionsCfgs/baseCfg_3view+depth.cfg	(revision 145)
@@ -209,4 +209,9 @@
 #========== view synthesis optimization (VSO) ==========
 VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string
+WVSO	                  : 1								      # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 
+VSOWeight                 : 10							              # weight of VSO ( in SAD case, cf. squared in SSE case )
+VSDWeight	          : 1							              # weight of VSD ( in SAD case, cf. squared in SSE case )
+DWeight	                  : 1							              # weight of depth distortion itself ( in SAD case, cf. squared in SSE case )
+
 #============ Misc. ================
 SEIpictureDigest          : 0                                      # Control generation of picture_digest SEI messages
Index: /branches/HTM-4.1-dev2-LG/cfg/encoder_mvd.cfg
===================================================================
--- /branches/HTM-4.1-dev2-LG/cfg/encoder_mvd.cfg	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/cfg/encoder_mvd.cfg	(revision 145)
@@ -209,4 +209,9 @@
 VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0) B(oo2) I(s0.25 s0.5 s0.75 s1.25 s1.5 s1.75)][cx2 B(cc1) I(s1.25 s1.5 s1.75)] # VSO configuration string (3 view) 
 VSOConfig                 : [cx0 B(cc1) I(s0.25 s0.5 s0.75)][cx1 B(oo0)        I(s0.25 s0.5 s0.75)]                                                   # VSO configuration string (2 view) 
+WVSO	                  : 1								      # use of WVSO (Depth distortion metric with a weighted depth fidelity term) 
+VSOWeight                 : 10							              # weight of VSO ( in SAD case, cf. squared in SSE case )
+VSDWeight	          : 1							              # weight of VSD ( in SAD case, cf. squared in SSE case )
+DWeight	                  : 1							              # weight of depth distortion itself ( in SAD case, cf. squared in SSE case )
+
 
 
Index: /branches/HTM-4.1-dev2-LG/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- /branches/HTM-4.1-dev2-LG/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 145)
@@ -1740,5 +1740,6 @@
 #endif
 #if LGE_WVSO_A0119
-  printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );
+  if ( m_bUseWVSO )
+    printf("\nVSO : VSD : SAD weight = %d : %d : %d ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );
 #endif
   printf("\n\n");
Index: /branches/HTM-4.1-dev2-LG/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-4.1-dev2-LG/source/Lib/TLibCommon/TypeDef.h	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/source/Lib/TLibCommon/TypeDef.h	(revision 145)
@@ -101,5 +101,5 @@
 #define SAIT_VSO_EST_A0033                1 // JCT2-A0033 modification 3
 #define LGE_VSO_EARLY_SKIP_A0093          1 // JCT2-A0093 modification 4
-#define LGE_WVSO_A0119                    1 // JCT2-A0119 Depth Metric with a weighted depth fidelity term
+#define LGE_WVSO_A0119                    1 // JCT2-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term 
 
 #define OL_DEPTHLIMIT_A0044               1 //JCT2-A0044
Index: /branches/HTM-4.1-dev2-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp
===================================================================
--- /branches/HTM-4.1-dev2-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/source/Lib/TLibDecoder/TDecCAVLC.cpp	(revision 145)
@@ -1239,5 +1239,5 @@
   READ_CODE( 2, uiCode, "weighted_bipred_idc" );      // Use of Bi-Directional Weighting Prediction (B_SLICE)
   pcPPS->setWPBiPredIdc( uiCode );
-//printf("TDecCavlc::parsePPS():\tm_bUseWeightPred=%d\tm_uiBiPredIdc=%d\n", pcPPS->getUseWP(), pcPPS->getWPBiPredIdc());
+printf("TDecCavlc::parsePPS():\tm_bUseWeightPred=%d\tm_uiBiPredIdc=%d\n", pcPPS->getUseWP(), pcPPS->getWPBiPredIdc());
 
 #if H0388
Index: /branches/HTM-4.1-dev2-LG/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- /branches/HTM-4.1-dev2-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 145)
@@ -1918,6 +1918,6 @@
             if ( m_pcRdCost->getUseWVSO() )
             {    
-              Int iDWeight = m_pcRdCost->getDWeight();
-              Int iVSDWeight = m_pcRdCost->getVSDWeight();
+              Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+              Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
               Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
               uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight);
@@ -1933,8 +1933,8 @@
             if ( m_pcRdCost->getUseWVSO() )
             {    
-              Int iDWeight = m_pcRdCost->getDWeight()*m_pcRdCost->getDWeight();
-              Int iVSDWeight = m_pcRdCost->getVSOWeight()*m_pcRdCost->getVSOWeight();
-              Dist iD = (Dist) m_pcRdCost->getDistPart( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
-              uiSad = (Dist) (iDWeight * iD + iVSDWeight * uiSad) / (iDWeight + iVSDWeight);
+              Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
+              Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getDWeight();
+              Dist iD = (Dist) m_pcRdCost->calcHAD( piOrg, uiStride, piPred, uiStride, uiWidth, uiHeight );
+              uiSad = (Dist) (iDWeight * iD + iVSOWeight * uiSad) / (iDWeight + iVSOWeight);
             }
 #endif
Index: /branches/HTM-4.1-dev2-LG/source/Lib/TLibRenderer/TRenModel.cpp
===================================================================
--- /branches/HTM-4.1-dev2-LG/source/Lib/TLibRenderer/TRenModel.cpp	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/source/Lib/TLibRenderer/TRenModel.cpp	(revision 145)
Index: /branches/HTM-4.1-dev2-LG/source/Lib/TLibRenderer/TRenSingleModel.cpp
===================================================================
--- /branches/HTM-4.1-dev2-LG/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 144)
+++ /branches/HTM-4.1-dev2-LG/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 145)
