Index: branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/App/TAppDecoder/TAppDecTop.cpp	(revision 542)
@@ -95,5 +95,5 @@
     m_pchReconFile = NULL;
   }
-#if H_3D_FIX
+#if H_3D
   if (m_pchScaleOffsetFile)
   {
Index: branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 542)
@@ -1096,9 +1096,5 @@
      0.753550, 0.800000  
   }; 
-#if H_3D_CLEANUPS
   if ( m_bUseVSO && m_bVSOLSTable )
-#else
-  if ( m_bVSOLSTable )
-#endif
   {
     Int firstDepthLayer = -1; 
Index: branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.cpp	(revision 542)
@@ -123,7 +123,5 @@
 #if H_3D
   vps.initViewIndex(); 
-#if H_3D_GEN
   xSetVPSExtension2        ( vps ); 
-#endif
   m_ivPicLists.setVPS      ( &vps ); 
 #endif
@@ -1194,5 +1192,5 @@
 }
 #endif
-#if H_3D_GEN
+#if H_3D
 Void TAppEncTop::xSetVPSExtension2( TComVPS& vps )
 {
Index: branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.h	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/App/TAppEncoder/TAppEncTop.h	(revision 542)
@@ -123,5 +123,5 @@
   Int  xGetMax( std::vector<Int>& vec);
 #endif
-#if H_3D_GEN
+#if H_3D
   Void xSetVPSExtension2( TComVPS& vps );
 #endif
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/TAppComCamPara.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/TAppComCamPara.cpp	(revision 542)
@@ -965,7 +965,4 @@
   //--- determine (virtual) camera parameter shift between view order index 1 and base view (view order index 0) ---
   Double        dCamPosShift, dPicPosShift;
-#if H_3D_PDM_CAM_PARAS
-  Int           iMinVOI       = (1<<30);
-#endif
   Int           iMinAbsVOI    = (1<<30);
   Int           iMinAbsVOIId  = 0;
@@ -975,7 +972,4 @@
     if( iAbsVOI < iMinAbsVOI )
     {
-#if H_3D_PDM_CAM_PARAS
-      iMinVOI      = m_aiViewOrderIndex[ iBaseId ];
-#endif
       iMinAbsVOI   = iAbsVOI;
       iMinAbsVOIId = iBaseId;
@@ -984,7 +978,4 @@
   AOF( iMinAbsVOIId != 0 && iMinAbsVOI != 0 );
   xGetCameraShifts( 0, iMinAbsVOIId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );
-#if H_3D_PDM_CAM_PARAS
-  Double  dCamPosShiftVOI01     = dCamPosShift / Double( iMinVOI );
-#endif
 
   //--- determine maximum absolute camera position shift, precision, and base scale ---
@@ -999,41 +990,4 @@
     }
   }
-
-#if H_3D_PDM_CAM_PARAS
-  Int     iPrecision  = 0;
-#if 0 // enabling this lines might be reasonable, but produces different results for the 2 view and 3 view test cases
-  Double  dEpsilon    = 1e-15;
-  Double  dAbsCamPosShiftVOI01  = ( dCamPosShiftVOI01 < 0.0 ? -dCamPosShiftVOI01 : dCamPosShiftVOI01 );
-  Double  dShiftRatio = dMaxAbsCamPosShift / dAbsCamPosShiftVOI01 - dEpsilon;
-  for( ; (Double)( 1 << iPrecision ) < dShiftRatio; iPrecision++ );
-#endif
-  Int     iPrecShift  = iPrecision + PDM_INTER_CALC_SHIFT + PDM_VIRT_DEPTH_PRECISION - 2;
-  AOF(    iPrecShift  < PDM_INTERNAL_CALC_BIT_DEPTH );
-  Int     iScaleVOI01 = 1 << iPrecShift;
-  m_iPdmPrecision     = iPrecision;
-
-  //--- loop over target views ---
-  for( Int iTargetId = 1; iTargetId < m_iNumberOfBaseViews; iTargetId++ )
-  {
-    // set scale and offset parameters for other views
-    for( Int iBaseId = 0; iBaseId < iTargetId; iBaseId++ )
-    {
-      xGetCameraShifts( (UInt)iBaseId, (UInt)iTargetId, m_uiFirstFrameId, dCamPosShift, dPicPosShift );
-      Double  dScale      = Double( iScaleVOI01 ) * dCamPosShiftVOI01 / dCamPosShift;
-      Int     iDiv        = m_aiViewOrderIndex[ iTargetId ] - m_aiViewOrderIndex[ iBaseId ];
-      Int     iAdd        = ( iDiv > 0 ? iDiv / 2 : -iDiv / 2 );
-      Int     iScalePred  = ( iScaleVOI01 + iAdd ) / iDiv;
-      Double  dFactor     = dScale / (Double)iScalePred * pow( 2.0, PDM_LOG4_SCALE_DENOMINATOR );
-      Int     iNominator  = (Int)floor( dFactor + .5 );
-      Int     iNomDelta   = iNominator - ( 1 << PDM_LOG4_SCALE_DENOMINATOR );
-      Int     iScale      = Int( ( (Int64)iNominator * (Int64)iScalePred + (Int64)( ( 1 << PDM_LOG4_SCALE_DENOMINATOR ) >> 1 ) ) >> PDM_LOG4_SCALE_DENOMINATOR );
-      Double  dOffset     = -dPicPosShift * Double( iScale ) * pow( 2.0, 2 - PDM_OFFSET_SHIFT );
-      Int     iOffset     = (Int)floor( dOffset + .5 );
-
-      m_aaiPdmScaleNomDelta [ iTargetId ][ iBaseId ]  = iNomDelta;
-      m_aaiPdmOffset        [ iTargetId ][ iBaseId ]  = iOffset;
-    }
-  }
-#endif
 }
 
@@ -1059,10 +1013,4 @@
   m_aaiScaleAndOffsetSet      = 0;
 
-#if H_3D_PDM_CAM_PARAS
-  m_iPdmPrecision             = 0;
-  m_aaiPdmScaleNomDelta       = 0;
-  m_aaiPdmOffset              = 0;
-#endif
-
   m_adBaseViewShiftParameter  = 0;
   m_aiBaseViewShiftParameter  = 0;
@@ -1098,8 +1046,4 @@
   xDeleteArray( m_aaiScaleAndOffsetSet,      m_iNumberOfBaseViews );
 
-#if H_3D_PDM_CAM_PARAS
-  xDeleteArray( m_aaiPdmScaleNomDelta,       m_iNumberOfBaseViews );
-  xDeleteArray( m_aaiPdmOffset,              m_iNumberOfBaseViews );
-#endif
 }
 
@@ -1344,12 +1288,4 @@
   xInit2dArray  ( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiScaleAndOffsetSet, 0 );
 
-#if H_3D_PDM_CAM_PARAS
-  xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmScaleNomDelta     );
-  xCreate2dArray( (UInt)m_iNumberOfBaseViews, (UInt)m_iNumberOfBaseViews,  m_aaiPdmOffset            );
-
-  //===== init disparity to virtual depth conversion parameters =====
-  xSetPdmConversionParams();
-#endif
-
   //===== init arrays for first frame =====
   xSetShiftParametersAndLUT( m_uiFirstFrameId );
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/TAppComCamPara.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/TAppComCamPara.h	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TAppCommon/TAppComCamPara.h	(revision 542)
@@ -89,11 +89,4 @@
   Int**               m_aaiScaleAndOffsetSet;                 ///< array indicating whether scale and offset have been set
 
-#if H_3D_PDM_CAM_PARAS
-  // parameters for virtual depth map generation
-  Int                 m_iPdmPrecision;                        ///< additional precision for disparity - virtual depth conversion
-  Int**               m_aaiPdmScaleNomDelta;                  ///< [TargetView][RefView] delta for nominator of scale factor
-  Int**               m_aaiPdmOffset;                         ///< [TargetView][RefView] offset parameter
-#endif
-
   // scale and offset parameters
   Double***           m_adBaseViewShiftParameter;             ///< ShiftParameters between BaseViews e.g. [2][1][0] shift scale from view 2 to view 1; [2][1][1] shift offset from view 2 to view 1
@@ -217,11 +210,4 @@
   Int**               getCodedScale             ()  { return m_aaiCodedScale;           }
   Int**               getCodedOffset            ()  { return m_aaiCodedOffset;          }
-
-#if H_3D_PDM_CAM_PARAS
-  // parameters for virtual depth map generation
-  Int                 getPdmPrecision           ()  { return m_iPdmPrecision;           }
-  Int**               getPdmScaleNomDelta       ()  { return m_aaiPdmScaleNomDelta;     }
-  Int**               getPdmOffset              ()  { return m_aaiPdmOffset;            }
-#endif
 };
 
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/CommonDef.h	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/CommonDef.h	(revision 542)
@@ -60,5 +60,5 @@
 #define HM_VERSION        "11.0"                ///< 
 #else
-#define NV_VERSION        "10.1"                 ///< Current software version
+#define NV_VERSION        "11.0"                 ///< Current software version
 #endif
 
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp	(revision 542)
@@ -3095,18 +3095,6 @@
 #endif
         //pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx());
-#if H_3D_CLEANUPS //Notes from QC: for BVSP coded blocks, the reference index shall not be equal to -1 due to the adoption of JCT3V-D0191
+#if H_3D //Notes from QC: for BVSP coded blocks, the reference index shall not be equal to -1 due to the adoption of JCT3V-D0191
         pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,pcMvFieldNeighbours[iCount<<1].getRefIdx());
-#else
-        if (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0)
-        {
-          for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_0); i++)
-          {
-            if (getSlice()->getRefPOC(REF_PIC_LIST_0, i) == getSlice()->getPOC())
-            {
-              pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,i);
-              break;
-            }
-          }
-        }
 #endif
       }
@@ -3124,27 +3112,7 @@
           clipMv(cMvPred);
 #endif
-          //pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx());
-#if H_3D_CLEANUPS
           pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx());
-#else
-          if (pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0)
-          {
-            for (Int i=0; i<getSlice()->getNumRefIdx(REF_PIC_LIST_1); i++)
-            {
-              if (getSlice()->getRefPOC(REF_PIC_LIST_1, i) == getSlice()->getPOC())
-              {
-                pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,i);
-                break;
-              }
-            }
-          }
-#endif
         }
       }
-#if !H_3D_CLEANUPS
-      if (!((pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && !getSlice()->isInterB())
-        || (pcMvFieldNeighbours[iCount<<1].getRefIdx()<0 && pcMvFieldNeighbours[(iCount<<1)+1].getRefIdx()<0 && getSlice()->isInterB())))
-      {
-#endif
 #if H_3D_NBDV
       pcMvFieldNeighbours[iCount<<1    ].getMv().setIDVFlag (false);
@@ -3156,11 +3124,4 @@
       }
       iCount ++;
-#if !H_3D_CLEANUPS
-      }
-      else
-      {
-        assert(0);
-      }
-#endif
     }
   }
@@ -3174,9 +3135,6 @@
     
   Int iPdmInterDir;
-#if H_3D_CLEANUPS
+
   if( iPdmDir[0] )
-#else
-  if( iPdmDir[0] && ivMvPredFlag )
-#endif
   {
     abCandIsInter        [ iCount ] = true;
@@ -3199,5 +3157,4 @@
     iCount ++;
   } 
-#if H_3D_CLEANUPS
   // early termination
   if (iCount == getSlice()->getMaxNumMergeCand()) 
@@ -3206,25 +3163,5 @@
   }
 #endif
-#endif
-
-#if !H_3D_IV_MERGE
-#if H_3D_NBDV //Notes from QC: DvMCP related variables.  
-  //acPdmMv[0].m_bDvMcp = acPdmMv[1].m_bDvMcp = acPdmMv[2].m_bDvMcp = acPdmMv[3].m_bDvMcp = false; 
-#endif
-
-#if H_3D_NBDV //Notes from QC: Some examples to show how to use the NBDV and DoNBDV variables. Remove this comment once it is done 
-  DisInfo cDisInfo;
-  cDisInfo.bDV = false; 
-  //if(!bNoPdmMerge) 
-  //{
-    //cDisInfo.bDV = getDvInfo(uiAbsPartIdx).bDV;
-    //cDisInfo.m_aVIdxCan = getDvInfo(uiAbsPartIdx).m_aVIdxCan;
-    //cDisInfo.m_acNBDV = getDvInfo(uiAbsPartIdx).m_acNBDV;
-//#if H_3D_NBDV_REF
-    //cDisInfo.m_acDoNBDV = getDvInfo(uiAbsPartIdx).m_acDoNBDV;
-//#endif
-  //}
-#endif
-#endif
+
   //left
   UInt uiLeftPartIdx = 0;
@@ -3402,9 +3339,5 @@
 
 #if H_3D_IV_MERGE 
-#if H_3D_CLEANUPS
   if( iPdmDir[1] )
-#else
-  if(ivMvPredFlag && iPdmDir[1] )
-#endif
   {
     assert(iCount < getSlice()->getMaxNumMergeCand());
@@ -5087,24 +5020,14 @@
           clipMv( cDispVec );
           pDInfo->m_acNBDV = cDispVec;
-#if H_3D_CLEANUPS
           pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ];
           assert(pDInfo->m_aVIdxCan == 0); //Notes from QC: only works for CTC
-#else
-          pDInfo->m_aVIdxCan = 0;
-#endif
 #if H_3D_NBDV_REF
-#if H_3D_CLEANUPS
           TComPic* picDepth = getSlice()->getIvPic( true, pDInfo->m_aVIdxCan );
-#else
-          TComPic* picDepth = getSlice()->getIvPic( true, 0 );
-#endif
           assert(picDepth!=NULL);
 
           if (picDepth && bDepthRefine)
-#if H_3D_CLEANUPS
+          {
             estimateDVFromDM (pDInfo->m_aVIdxCan, uiPartIdx, picDepth, uiPartAddr, &cDispVec);
-#else
-            estimateDVFromDM(0, uiPartIdx, picDepth, uiPartAddr, &cDispVec ); // from base view
-#endif
+          }
           pDInfo->m_acDoNBDV = cDispVec;
 #endif
@@ -5338,35 +5261,5 @@
 {
   TComSlice*    pcSlice         = getSlice ();  
-#if H_3D_CLEANUPS //Notes from QC: to be aligned with the spec. 
   Int iViewIndex = pDInfo->m_aVIdxCan;
-#else
-  Bool valid     = false;
-
-  Int iViewIndex = 0;
-
-  for( UInt uiBIndex = 0; uiBIndex < pcSlice->getViewIndex( ) && !valid; uiBIndex++ )
-  {
-    UInt        uiBaseIndex = uiBIndex;    
-    TComPic*    pcBasePic   = pcSlice->getIvPic( false, uiBaseIndex );
-    for( Int iRefListId = 0; iRefListId < 2 && !valid; iRefListId++ )
-    {
-      RefPicList  eRefPicListTest = RefPicList( iRefListId );
-      Int         iNumRefPics = pcSlice->getNumRefIdx( eRefPicListTest ) ;
-      for( Int iRefIndex = 0; iRefIndex < iNumRefPics; iRefIndex++ )
-      { 
-        if(pcBasePic->getPOC() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getPOC() 
-          && pcBasePic->getViewIndex() == pcSlice->getRefPic( eRefPicListTest, iRefIndex )->getViewIndex())
-        {
-          valid = true;
-          iViewIndex = uiBaseIndex;
-          break;
-        }
-      }
-    }
-  }
-
-  if (!valid)
-    return false;
-#endif
   //--- get base CU/PU and check prediction mode ---
   TComPic*    pcBasePic   = pcSlice->getIvPic( false, iViewIndex );
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.cpp	(revision 542)
@@ -118,5 +118,5 @@
 , m_icSkipParseFlag               ( false )
 #endif
-#if H_3D_GEN
+#if H_3D
 , m_depthToDisparityB             ( NULL )
 , m_depthToDisparityF             ( NULL )
@@ -158,5 +158,5 @@
   delete[] m_puiSubstreamSizes;
   m_puiSubstreamSizes = NULL;
-#if H_3D_GEN    
+#if H_3D
   for( UInt i = 0; i < getViewIndex(); i++ )
   {
@@ -1529,5 +1529,5 @@
 #endif
   }
-#if H_3D_GEN
+#if H_3D
   for( Int i = 0; i < MAX_NUM_LAYERS; i++ )
   {
@@ -2636,5 +2636,5 @@
 }
 #endif
-#if H_3D_GEN
+#if H_3D
 Void TComSlice::setIvPicLists( TComPicLists* m_ivPicLists )
 {
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComSlice.h	(revision 542)
@@ -1568,5 +1568,5 @@
   Bool      m_icSkipParseFlag;
 #endif
-#if H_3D_GEN
+#if H_3D
   TComPic*   m_ivPicsCurrPoc [2][MAX_NUM_LAYERS];  
   Int**      m_depthToDisparityB; 
@@ -1630,5 +1630,5 @@
   TComPic*  getRefPic           ( RefPicList e, Int iRefIdx)    { return  m_apcRefPicList[e][iRefIdx];  }
   Int       getRefPOC           ( RefPicList e, Int iRefIdx)    { return  m_aiRefPOCList[e][iRefIdx];   }
-#if H_3D_GEN
+#if H_3D
   TComPic*  getIvPic            ( Bool depthFlag, Int viewIndex){ return  m_ivPicsCurrPoc[ depthFlag ? 1 : 0 ][ viewIndex ]; }
 #endif
@@ -1849,5 +1849,5 @@
 #endif
 #endif
-#if H_3D_GEN
+#if H_3D
   Void    setIvPicLists( TComPicLists* m_ivPicLists );
   Void    setDepthToDisparityLUTs();
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TypeDef.h	(revision 542)
@@ -55,5 +55,5 @@
 
 #ifndef HEVC_EXT
-#define HEVC_EXT                    2
+#define HEVC_EXT                    1
 #endif
 
@@ -76,5 +76,4 @@
                                               // HHI_QTLPC_RAU_OFF_C0160     // JCT3V-C0160 change 2: quadtree limitation and predictive coding switched off in random access units 
 
-#define H_3D_PDM_CAM_PARAS                0 ///< PDM related parts of camera parameters, should be removed if not used anymore.
 #define H_3D_VSO                          1   // VSO, View synthesis optimization, includes: 
                                               // HHI_VSO
@@ -110,14 +109,4 @@
                                               // LG_D0092: Multiple VSP candidate allowed
 
-#if H_3D_VSP
-#define H_3D_VSP_POSITION                 3   // The only supported position
-#define H_3D_VSP_BLOCKSIZE                4   // Supported values: 1, 2, and 4
-#if H_3D_VSP_BLOCKSIZE == 1
-#define H_3D_VSP_CONSTRAINED              1   // Constrained VSP @ 1x1
-#else
-#define H_3D_VSP_CONSTRAINED              0
-#endif
-#endif
-
 #define H_3D_IV_MERGE                     1   // Inter-view motion merge candidate
                                               // HHI_INTER_VIEW_MOTION_PRED 
@@ -130,8 +119,5 @@
 #define H_3D_TMVP                         1   // QC_TMVP_C0047 
                                               // Sony_M23639
-#define H_3D_GEN                          1   // Some general changes can be removed after merge 
-#define H_3D_CLEANUPS                     1   // Temporary for minor fixes can be removed after merge 
-#define H_3D_FIX                          1   // Temporary for minor fixes can be removed after merge 
-#define H_3D_VSO_FIX_BORDRE_EXTENSION     1   // Temporary for minor fixes can be removed after merge 
+
 #define H_3D_DIM                          1   // DIM, Depth intra modes, includes:
                                               // HHI_DMM_WEDGE_INTRA
@@ -156,4 +142,5 @@
 /////////////////////////////////////////////////////////////////////////////////////////
 
+
 ///// ***** VIEW SYNTHESIS OPTIMIZAION *********
 #if H_3D_VSO                                  
@@ -169,5 +156,4 @@
 ////   ****** Neighbouring block-based Disparity Vector  *********
 #if H_3D_NBDV
-#if H_3D_CLEANUPS
 #define DVFROM_LEFTBELOW                  0
 #define DVFROM_LEFT                       1
@@ -176,12 +162,4 @@
 #define DVFROM_ABOVELEFT                  4
 #define IDV_CANDS                         5
-#else
-#define IDV_CANDS                         6
-#define DVFROM_LEFTBELOW                  1
-#define DVFROM_LEFT                       2
-#define DVFROM_ABOVERIGHT                 3
-#define DVFROM_ABOVE                      4
-#define DVFROM_ABOVELEFT                  5
-#endif
 #endif
 ///// ***** ADVANCED INTERVIEW RESIDUAL PREDICTION *********
@@ -198,4 +176,15 @@
                                               // HHI_DEPTH_INTRA_SEARCH_RAU_C0160
                                               // LG_ZEROINTRADEPTHRESI_A0087
+#endif
+
+///// ***** VIEW SYNTHESIS PREDICTION *********
+#if H_3D_VSP
+#define H_3D_VSP_POSITION                 3   // The only supported position
+#define H_3D_VSP_BLOCKSIZE                4   // Supported values: 1, 2, and 4
+#if H_3D_VSP_BLOCKSIZE == 1
+#define H_3D_VSP_CONSTRAINED              1   // Constrained VSP @ 1x1
+#else
+#define H_3D_VSP_CONSTRAINED              0
+#endif
 #endif
 
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecGop.cpp	(revision 542)
@@ -159,5 +159,5 @@
   }
 #endif
-#if H_3D_GEN
+#if H_3D
   pcSlice->setDepthToDisparityLUTs(); 
 #endif
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp	(revision 542)
@@ -913,5 +913,5 @@
 #endif
 
-#if H_3D_GEN
+#if H_3D
     pcSlice->setIvPicLists( m_ivPicLists );         
 #if H_3D_IV_MERGE    
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.h	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.h	(revision 542)
@@ -89,7 +89,4 @@
   Int**   m_aaiCodedScale;
   Int*    m_aiViewId;  
-#if !H_3D_FIX  
-  Int*    m_aiLayerIdx;
-#endif
 
   Bool*   m_bViewReceived;
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCavlc.cpp	(revision 542)
@@ -801,5 +801,5 @@
     WRITE_FLAG ( 0,                    "vps_shvc_reserved_zero_flag" ); 
 
-#if H_3D_GEN  
+#if H_3D
   WRITE_FLAG( 1,                                             "vps_extension2_flag" );
   m_pcBitIf->writeAlignOne();      
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 542)
@@ -471,5 +471,5 @@
     pcPic->setCurrSliceIdx(0);
 
-#if H_3D_GEN
+#if H_3D
     m_pcSliceEncoder->initEncSlice ( pcPic, iPOCLast, pocCurr, iNumPicRcvd, iGOPid, pcSlice, m_pcEncTop->getVPS(), m_pcEncTop->getSPS(), m_pcEncTop->getPPS(), getLayerId() );     
 #else
@@ -482,16 +482,11 @@
     pcPic  ->setLayerId     ( getLayerId()   );
     pcPic  ->setViewId      ( getViewId()    );    
-#if !H_3D_GEN    
+#if !H_3D
     pcSlice->setLayerId     ( getLayerId() );
     pcSlice->setViewId      ( getViewId()  );    
     pcSlice->setVPS         ( m_pcEncTop->getVPS() );
-#endif
-#if H_3D
+#else
     pcPic  ->setViewIndex   ( getViewIndex() ); 
     pcPic  ->setIsDepth( getIsDepth() );
-#if !H_3D_GEN
-    pcSlice->setViewIndex   ( getViewIndex()  );
-    pcSlice->setIsDepth( getIsDepth() );    
-#endif
     pcSlice->setCamparaSlice( pcPic->getCodedScale(), pcPic->getCodedOffset() );    
 #endif
@@ -1078,5 +1073,5 @@
         pcPic->setNumDdvCandPics(pcPic->getDisCandRefPictures(iColPoc));
       }
-#if H_3D_GEN
+#if H_3D
       pcSlice->setDepthToDisparityLUTs(); 
 
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 542)
@@ -176,5 +176,5 @@
  \param pPPS          PPS associated with the slice
  */
-#if H_3D_GEN
+#if H_3D
 Void TEncSlice::initEncSlice( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId )
 #else
@@ -186,5 +186,5 @@
   
   rpcSlice = pcPic->getSlice(0);
-#if H_3D_GEN 
+#if H_3D
   // GT: Should also be activated for MV-HEVC at some stage
   rpcSlice->setVPS( pVPS );
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.h
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.h	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSlice.h	(revision 542)
@@ -116,5 +116,5 @@
   
   /// preparation of slice encoding (reference marking, QP and lambda)
-#if H_3D_GEN
+#if H_3D
   Void    initEncSlice        ( TComPic* pcPic, Int pocLast, Int pocCurr, Int iNumPicRcvd, 
                                 Int iGOPid, TComSlice*& rpcSlice, TComVPS* pVPS, TComSPS* pSPS, TComPPS *pPPS, Int layerId ); 
Index: branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp	(revision 541)
+++ branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncTop.cpp	(revision 542)
@@ -511,7 +511,5 @@
   // mark it should be extended
   rpcPic->getPicYuvRec()->setBorderExtension(false);
-#if H_3D_VSO_FIX_BORDRE_EXTENSION
   rpcPic->getPicYuvOrg()->setBorderExtension(false);
-#endif
 }
 
