Index: branches/HTM-12.2-dev2-Samsung/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-12.2-dev2-Samsung/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1095)
+++ branches/HTM-12.2-dev2-Samsung/source/Lib/TLibCommon/TComDataCU.cpp	(revision 1098)
@@ -3891,5 +3891,7 @@
 )
 {
+#if !SEC_A1_BASED_VSP_J0039
   UInt uiAbsPartAddr = m_uiAbsIdxInLCU + uiAbsPartIdx;
+#endif
 #if H_3D_IV_MERGE
   ////////////////////////////
@@ -4008,7 +4010,9 @@
 
   // above
+#if !SEC_A1_BASED_VSP_J0039
   UInt uiAbovePartIdx = 0;
   TComDataCU* pcCUAbove = 0;
   pcCUAbove = getPUAbove( uiAbovePartIdx, uiPartIdxRT );
+#endif
 
   if (getAvailableFlagB1())
@@ -4017,4 +4021,7 @@
 #if H_3D_VSP
     ,
+#if SEC_A1_BASED_VSP_J0039
+      false
+#else
       ( ( ( getAddr() - pcCUAbove->getAddr() ) == 0) && (pcCUAbove->getVSPFlag(uiAbovePartIdx) != 0) 
 #if H_3D_IC
@@ -4029,4 +4036,5 @@
       )
 #endif
+#endif
       , false
       ); 
@@ -4035,7 +4043,9 @@
 
   // above right
+#if !SEC_A1_BASED_VSP_J0039
   UInt uiAboveRightPartIdx = 0;
   TComDataCU* pcCUAboveRight = 0;
   pcCUAboveRight = getPUAboveRight( uiAboveRightPartIdx, uiPartIdxRT );
+#endif
 
   if (getAvailableFlagB0())
@@ -4044,4 +4054,7 @@
 #if H_3D_VSP
     ,
+#if SEC_A1_BASED_VSP_J0039
+      false
+#else
       ( ( ( getAddr() - pcCUAboveRight->getAddr() ) == 0) && (pcCUAboveRight->getVSPFlag(uiAboveRightPartIdx) != 0) 
 #if H_3D_IC
@@ -4056,4 +4069,5 @@
       )
 #endif
+#endif
       , false
       ); 
@@ -4062,6 +4076,8 @@
 
   // left bottom
+#if !SEC_A1_BASED_VSP_J0039
   UInt uiLeftBottomPartIdx = 0;
   TComDataCU* pcCULeftBottom = getPUBelowLeft( uiLeftBottomPartIdx, uiPartIdxLB );
+#endif
 
   if (getAvailableFlagA0())
@@ -4070,4 +4086,7 @@
 #if H_3D_VSP
     ,
+#if SEC_A1_BASED_VSP_J0039
+      false
+#else
       (pcCULeftBottom->getVSPFlag(uiLeftBottomPartIdx) != 0
 #if H_3D_IC
@@ -4082,4 +4101,5 @@
       )
 #endif
+#endif
       , false
       ); 
@@ -4088,7 +4108,9 @@
 
   // above left
+#if !SEC_A1_BASED_VSP_J0039
   UInt uiAboveLeftPartIdx = 0;
   TComDataCU* pcCUAboveLeft = 0;
   pcCUAboveLeft = getPUAboveLeft( uiAboveLeftPartIdx, uiAbsPartAddr );
+#endif
 
   if (getAvailableFlagB2())
@@ -4097,4 +4119,7 @@
 #if H_3D_VSP
     ,
+#if SEC_A1_BASED_VSP_J0039
+      false
+#else
       ( ( ( getAddr() - pcCUAboveLeft->getAddr() ) == 0) && (pcCUAboveLeft->getVSPFlag(uiAboveLeftPartIdx) != 0) 
 #if H_3D_IC
@@ -4108,4 +4133,5 @@
 #endif
       )
+#endif
 #endif
       , false
@@ -4486,5 +4512,9 @@
 
 #if H_3D
+#if SEC_A1_BASED_VSP_J0039
+  iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable;
+#else
   iCount += m_mergCands[MRG_A1].m_bAvailable + m_mergCands[MRG_B1].m_bAvailable + m_mergCands[MRG_B0].m_bAvailable;
+#endif
 #else
   //left
@@ -4595,4 +4625,46 @@
 #endif
 
+#if SEC_A1_BASED_VSP_J0039
+#if H_3D_VSP
+  /////////////////////////////////////////////////
+  //////// VIEW SYNTHESIS PREDICTION (VSP) ////////
+  /////////////////////////////////////////////////
+  if (iCount<getSlice()->getMaxNumMergeCand())
+  {
+    if (
+      (!getAvailableFlagA1() || !(pcCULeft->getVSPFlag(uiLeftPartIdx) != 0)) &&
+#if H_3D_IC
+      !bICFlag &&
+#endif
+#if H_3D_ARP
+      !bARPFlag &&
+#endif
+#if H_3D
+      (nPSW + nPSH > 12) &&
+#endif
+#if H_3D_DBBP
+      !bDBBPFlag &&
+#endif
+      xAddVspCand( mrgCandIdx, &cDisInfo, iCount ) )
+    {
+      return;
+    }
+
+    // early termination
+    if (iCount == getSlice()->getMaxNumMergeCand())
+    {
+      return;
+    }
+#endif
+#if H_3D_VSP
+  }
+#endif
+
+#if H_3D
+  iCount += m_mergCands[MRG_B0].m_bAvailable;
+#endif
+#endif
+
+
 #if H_3D_IV_MERGE 
   /////////////////////////////////////////////
@@ -4648,4 +4720,5 @@
 #endif // H_3D_IV_MERGE 
 
+#if !SEC_A1_BASED_VSP_J0039
 #if H_3D_VSP
   /////////////////////////////////////////////////
@@ -4681,4 +4754,5 @@
 #if H_3D
   }
+#endif
 #endif
 
Index: branches/HTM-12.2-dev2-Samsung/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-12.2-dev2-Samsung/source/Lib/TLibCommon/TypeDef.h	(revision 1095)
+++ branches/HTM-12.2-dev2-Samsung/source/Lib/TLibCommon/TypeDef.h	(revision 1098)
@@ -155,4 +155,6 @@
                                               // NTT_STORE_SPDV_VSP_G0148 Storing Sub-PU based DV for VSP
                                               // Restricted bi-prediction for VSP
+#define SEC_A1_BASED_VSP_J0039            1   // Removal of redundant VSP in Merge list
+
 
 #define H_3D_IV_MERGE                     1   // Inter-view motion merge candidate
@@ -257,9 +259,9 @@
 
 #define H_3D_DDD                          1   // Disparity derived depth coding
-#define LGE_DDD_REMOVAL_J0042_J0030    1   // DDD removal
+#define LGE_DDD_REMOVAL_J0042_J0030       1   // DDD removal
 
 #define H_3D_FCO                          0   // Flexible coding order for 3D
 #if H_3D_FCO
-#define H_3D_FCO                     1
+#define H_3D_FCO                          1
 #endif
 
@@ -906,4 +908,18 @@
 enum DefaultMergCandOrder
 {
+#if SEC_A1_BASED_VSP_J0039
+  MRG_T = 0,            ///< MPI
+  MRG_D,                ///< DDD
+  MRG_IVMC,             ///< Temporal inter-view
+  MRG_A1,               ///< Left
+  MRG_B1,               ///< Above
+  MRG_VSP,              ///< VSP
+  MRG_B0,               ///< Above right
+  MRG_IVDC,             ///< Disparity inter-view
+  MRG_A0,               ///< Left bottom
+  MRG_B2,               ///< Above left
+  MRG_IVSHIFT,          ///< Shifted IVMC of Shifted IVDC. (These are mutually exclusive)
+  MRG_COL               ///< Temporal co-located
+#else
   MRG_T = 0,            ///< MPI
   MRG_D,                ///< DDD
@@ -918,4 +934,5 @@
   MRG_IVSHIFT,          ///< Shifted IVMC of Shifted IVDC. (These are mutually exclusive)
   MRG_COL               ///< Temporal co-located
+#endif
 };
 #endif
