Index: trunk/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 210)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 296)
@@ -220,39 +220,32 @@
   
   /* File, I/O and source parameters */
-  ("InputFile_%d,i_%d",       m_pchInputFileList,       (char *) 0 , MAX_VIEW_NUM , "original Yuv input file name %d")
-  ("DepthInputFile_%d,di_%d", m_pchDepthInputFileList,  (char *) 0 , MAX_VIEW_NUM , "original Yuv depth input file name %d")
-  ("ReconFile_%d,o_%d",       m_pchReconFileList,       (char *) 0 , MAX_VIEW_NUM , "reconstructed Yuv output file name %d")
-  ("DepthReconFile_%d,do_%d", m_pchDepthReconFileList,  (char *) 0 , MAX_VIEW_NUM , "reconstructed Yuv depth output file name %d")
-  ("BitstreamFile,b", cfg_BitstreamFile, string(""), "bitstream output file name")
-  ("CodeDepthMaps",         m_bUsingDepthMaps, false, "Encode depth maps" )
-  ("CodedCamParsPrecision", m_iCodedCamParPrecision, STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" )
-  ("LambdaModifier0,-LM0", m_adLambdaModifier[ 0 ], ( double )1.0, "Lambda modifier for temporal layer 0")
-  ("LambdaModifier1,-LM1", m_adLambdaModifier[ 1 ], ( double )1.0, "Lambda modifier for temporal layer 1")
-  ("LambdaModifier2,-LM2", m_adLambdaModifier[ 2 ], ( double )1.0, "Lambda modifier for temporal layer 2")
-  ("LambdaModifier3,-LM3", m_adLambdaModifier[ 3 ], ( double )1.0, "Lambda modifier for temporal layer 3")
-  ("SourceWidth,-wdt",      m_iSourceWidth,  0, "Source picture width")
-  ("SourceHeight,-hgt",     m_iSourceHeight, 0, "Source picture height")
-#if PIC_CROPPING
-  ("CroppingMode",          m_croppingMode,  0, "Cropping mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")
-  ("CropLeft",              m_cropLeft,      0, "Left cropping/padding for cropping mode 3")
-  ("CropRight",             m_cropRight,     0, "Right cropping/padding for cropping mode 3")
-  ("CropTop",               m_cropTop,       0, "Top cropping/padding for cropping mode 3")
-  ("CropBottom",            m_cropBottom,    0, "Bottom cropping/padding for cropping mode 3")
-  ("HorizontalPadding,-pdx",m_aiPad[0],      0, "horizontal source padding for cropping mode 2")
-  ("VerticalPadding,-pdy",  m_aiPad[1],      0, "vertical source padding for cropping mode 2")
-#endif
+  ("InputFile_%d,i_%d",       m_pchInputFileList,       (char *) 0 , MAX_VIEW_NUM ,   "original Yuv input file name %d")
+  ("DepthInputFile_%d,di_%d", m_pchDepthInputFileList,  (char *) 0 , MAX_VIEW_NUM ,   "original Yuv depth input file name %d")
+  ("ReconFile_%d,o_%d",       m_pchReconFileList,       (char *) 0 , MAX_VIEW_NUM ,   "reconstructed Yuv output file name %d")
+  ("DepthReconFile_%d,do_%d", m_pchDepthReconFileList,  (char *) 0 , MAX_VIEW_NUM ,   "reconstructed Yuv depth output file name %d")
+  ("BitstreamFile,b",         cfg_BitstreamFile,        string(""),                   "bitstream output file name")
+  ("CodeDepthMaps",           m_bUsingDepthMaps,        false,                        "Encode depth maps" )
+  ("CodedCamParsPrecision",   m_iCodedCamParPrecision,  STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" )
+  ("LambdaModifier0,-LM0",    m_adLambdaModifier[ 0 ],  ( double )1.0,                "Lambda modifier for temporal layer 0")
+  ("LambdaModifier1,-LM1",    m_adLambdaModifier[ 1 ],  ( double )1.0,                "Lambda modifier for temporal layer 1")
+  ("LambdaModifier2,-LM2",    m_adLambdaModifier[ 2 ],  ( double )1.0,                "Lambda modifier for temporal layer 2")
+  ("LambdaModifier3,-LM3",    m_adLambdaModifier[ 3 ],  ( double )1.0,                "Lambda modifier for temporal layer 3")
+  ("SourceWidth,-wdt",        m_iSourceWidth,           0,                            "Source picture width")
+  ("SourceHeight,-hgt",       m_iSourceHeight,          0,                            "Source picture height")
+  ("CroppingMode",            m_croppingMode,           0,                            "Cropping mode (0: no cropping, 1:automatic padding, 2: padding, 3:cropping")
+  ("CropLeft",                m_cropLeft,               0,                            "Left cropping/padding for cropping mode 3")
+  ("CropRight",               m_cropRight,              0,                            "Right cropping/padding for cropping mode 3")
+  ("CropTop",                 m_cropTop,                0,                            "Top cropping/padding for cropping mode 3")
+  ("CropBottom",              m_cropBottom,             0,                            "Bottom cropping/padding for cropping mode 3")
+  ("HorizontalPadding,-pdx",  m_aiPad[0],               0,                            "horizontal source padding for cropping mode 2")
+  ("VerticalPadding,-pdy",    m_aiPad[1],               0,                            "vertical source padding for cropping mode 2")
   ("InputBitDepth",         m_uiInputBitDepth, 8u, "bit-depth of input file")
   ("BitDepth",              m_uiInputBitDepth, 8u, "deprecated alias of InputBitDepth")
   ("OutputBitDepth",        m_uiOutputBitDepth, 0u, "bit-depth of output file")
   ("InternalBitDepth",      m_uiInternalBitDepth, 0u, "Internal bit-depth (BitDepth+BitIncrement)")
-#if !PIC_CROPPING
-  ("HorizontalPadding,-pdx",m_aiPad[0],      0, "horizontal source padding size")
-  ("VerticalPadding,-pdy",  m_aiPad[1],      0, "vertical source padding size")
-  ("PAD",                   m_bUsePAD,   false, "automatic source padding of multiple of 16" )
-#endif
   ("FrameRate,-fr",         m_iFrameRate,        0, "Frame rate")
   ("FrameSkip,-fs",         m_FrameSkip,         0u, "Number of frames to skip at start of input YUV")
   ("FramesToBeEncoded,f",   m_iFrameToBeEncoded, 0, "number of frames to be encoded (default=all)")
-  ("FrameToBeEncoded",        m_iFrameToBeEncoded, 0, "deprecated alias of FramesToBeEncoded")
+  ("FrameToBeEncoded",      m_iFrameToBeEncoded, 0, "deprecated alias of FramesToBeEncoded")
   
   ("NumberOfViews",         m_iNumberOfViews,    0, "Number of views")
@@ -279,8 +272,4 @@
   ("DecodingRefreshType,-dr",m_iDecodingRefreshType, 0, "intra refresh, (0:none 1:CRA 2:IDR)")
   ("GOPSize,g",      m_iGOPSize,      1, "GOP size of temporal structure")
-#if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
-  ("MaxNumberOfReorderPictures",   m_numReorderFrames,               -1, "Max. number of reorder pictures: -1: encoder determines value, >=0: set explicitly")
-  ("MaxNumberOfReferencePictures", m_maxNumberOfReferencePictures, 6, "Max. number of reference pictures")
-#endif
   ("ListCombination,-lc", m_bUseLComb, true, "combined reference list flag for uni-prediction in B-slices")
   ("LCModification", m_bLCMod, false, "enables signalling of combined reference list derivation")
@@ -321,12 +310,4 @@
   ("TemporalLayerQPOffset_L3,-tq3", m_aiTLayerQPOffset[3], MAX_QP + 1, "QP offset of temporal layer 3")
   
-#if !H0566_TLA
-  ("TLayeringBasedOnCodingStruct,-tl", m_bTLayering, false, "Temporal ID is set based on the hierarchical coding structure")
-  
-  ("TLayerSwitchingFlag_L0,-ts0", m_abTLayerSwitchingFlag[0], false, "Switching flag for temporal layer 0")
-  ("TLayerSwitchingFlag_L1,-ts1", m_abTLayerSwitchingFlag[1], false, "Switching flag for temporal layer 1")
-  ("TLayerSwitchingFlag_L2,-ts2", m_abTLayerSwitchingFlag[2], false, "Switching flag for temporal layer 2")
-  ("TLayerSwitchingFlag_L3,-ts3", m_abTLayerSwitchingFlag[3], false, "Switching flag for temporal layer 3")
-#endif
 
   /* Entropy coding parameters */
@@ -340,9 +321,14 @@
   ("LoopFilterTcOffset_div2", m_loopFilterTcOffsetDiv2, 0 )
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+  ("IlluCompEnable", m_abUseIC, std::vector<Bool>(2, true), "Enable illumination compensation for inter-view prediction")
+#else
   ("IlluCompEnable",                  m_bUseIC                  , true         , "Use illumination compensation for inter-view prediction" )
 #endif
-#if DBL_CONTROL
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  ("IVSEnable",                       m_bUseIVS                 , true         , "Use inter-view vector scaling" )
+#endif
   ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, true)
-#endif
 
   /* Camera Paremetes */
@@ -391,10 +377,10 @@
   ("PredDepthMapGen",  m_uiPredDepthMapGeneration, (UInt)0, "generation of prediction depth maps for motion data prediction" )
 #endif
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
   ("MultiviewMvPred",  m_uiMultiviewMvPredMode,    (UInt)0, "usage of predicted depth maps" )
   ("MultiviewMvRegMode",        m_uiMultiviewMvRegMode,         (UInt)0, "regularization mode for multiview motion vectors" )
   ("MultiviewMvRegLambdaScale", m_dMultiviewMvRegLambdaScale, (Double)0, "lambda scale for multiview motion vector regularization" )
 #endif
-#if HHI_INTER_VIEW_RESIDUAL_PRED
+#if H3D_IVRP
   ("MultiviewResPred", m_uiMultiviewResPredMode,   (UInt)0, "usage of inter-view residual prediction" )
 #endif
@@ -405,16 +391,12 @@
   ("ALF", m_abUseALF, std::vector<Bool>(1,true), "Enables ALF")
   ("SAO", m_abUseSAO, std::vector<Bool>(1, true), "SAO")
-#if SAO_UNIT_INTERLEAVING
   ("MaxNumOffsetsPerPic", m_maxNumOffsetsPerPic, 2048, "2048: default")   
   ("SAOInterleaving", m_saoInterleavingFlag, false, "0: SAO Picture Mode, 1: SAO Interleaving ")   
-#endif
 
   ("ALFEncodePassReduction", m_iALFEncodePassReduction, 0, "0:Original 16-pass, 1: 1-pass, 2: 2-pass encoding")
 
   ("ALFMaxNumFilter,-ALFMNF", m_iALFMaxNumberFilters, 16, "16: No Constrained, 1-15: Constrained max number of filter")
-#if LCU_SYNTAX_ALF
   ("ALFParamInSlice", m_bALFParamInSlice, false, "ALF parameters in 0: APS, 1: slice header")
   ("ALFPicBasedEncode", m_bALFPicBasedEncode, true, "ALF picture-based encoding 0: false, 1: true")
-#endif
 
     ("SliceMode",            m_iSliceMode,           0, "0: Disable all Recon slice limits, 1: Enforce max # of LCUs, 2: Enforce max # of bytes")
@@ -439,7 +421,4 @@
     ("TileInfoPresentFlag",         m_iColumnRowInfoPresent,         1,          "0: tiles parameters are NOT present in the PPS. 1: tiles parameters are present in the PPS")
     ("UniformSpacingIdc",           m_iUniformSpacingIdr,            0,          "Indicates if the column and row boundaries are distributed uniformly")
-#if !REMOVE_TILE_DEPENDENCE
-    ("TileBoundaryIndependenceIdc", m_iTileBoundaryIndependenceIdr,  1,          "Indicates if the column and row boundaries break the prediction")
-#endif
     ("NumTileColumnsMinus1",        m_iNumColumnsMinus1,             0,          "Number of columns in a picture minus 1")
     ("ColumnWidthArray",            cfg_ColumnWidth,                 string(""), "Array containing ColumnWidth values in units of LCU")
@@ -456,8 +435,6 @@
     ("ScalingList",                 m_useScalingListId,              0,          "0: no scaling list, 1: default scaling lists, 2: scaling lists specified in ScalingListFile")
     ("ScalingListFile",             cfg_ScalingListFile,             string(""), "Scaling list file name")
-#if MULTIBITS_DATA_HIDING
     ("SignHideFlag,-SBH",                m_signHideFlag, 1)
     ("SignHideThreshold,-TSIG",          m_signHidingThreshold,         4)
-#endif
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
   ("DMM",                         m_bUseDMM,                       false,      "depth model modes flag")
@@ -477,7 +454,5 @@
   ("FEN", m_bUseFastEnc, false, "fast encoder setting")
   ("ECU", m_bUseEarlyCU, false, "Early CU setting") 
-#if FAST_DECISION_FOR_MRG_RD_COST
   ("FDM", m_useFastDecisionForMerge, true, "Fast decision for Merge RD Cost") 
-#endif
   ("CFM", m_bUseCbfFastMode, false, "Cbf fast mode setting")
 #if HHI_INTERVIEW_SKIP
@@ -617,5 +592,4 @@
   }
 
-#if PIC_CROPPING
   switch (m_croppingMode)
   {
@@ -667,22 +641,4 @@
     }
   }
-#else
-
-  // compute source padding size
-  if ( m_bUsePAD )
-  {
-    if ( m_iSourceWidth%MAX_PAD_SIZE )
-    {
-      m_aiPad[0] = (m_iSourceWidth/MAX_PAD_SIZE+1)*MAX_PAD_SIZE - m_iSourceWidth;
-    }
-    
-    if ( m_iSourceHeight%MAX_PAD_SIZE )
-    {
-      m_aiPad[1] = (m_iSourceHeight/MAX_PAD_SIZE+1)*MAX_PAD_SIZE - m_iSourceHeight;
-    }
-  }
-  m_iSourceWidth  += m_aiPad[0];
-  m_iSourceHeight += m_aiPad[1];
-#endif
   
   // allocate slice-based dQP values
@@ -890,5 +846,4 @@
   xConfirmPara( (m_iIntraPeriod > 0 && m_iIntraPeriod < m_iGOPSize) || m_iIntraPeriod == 0, "Intra period must be more than GOP size, or -1 , not 0" );
   xConfirmPara( m_iDecodingRefreshType < 0 || m_iDecodingRefreshType > 2,                   "Decoding Refresh Type must be equal to 0, 1 or 2" );
-#if H0736_AVC_STYLE_QP_RANGE
   xConfirmPara( m_aiQP[0] < -6 * ((Int)m_uiInternalBitDepth - 8) || m_aiQP[0] > 51,         "QP exceeds supported range (-QpBDOffsety to 51)" );
   if ( m_aiQP.size() >= 2 )
@@ -896,17 +851,6 @@
     xConfirmPara( m_aiQP[1] < -6 * ((Int)m_uiInternalBitDepth - 8) || m_aiQP[1] > 51,       "QP depth exceeds supported range (-QpBDOffsety to 51)" );
   }
-#else
-  xConfirmPara( m_aiQP[0] < 0 || m_aiQP[0] > 51,                                             "QP exceeds supported range (0 to 51)" );
-  if ( m_aiQP.size() >= 2 )
-  {
-    xConfirmPara( m_aiQP[1] < 0 || m_aiQP[1] > 51,                                           "QP Depth exceeds supported range (0 to 51)" );
-  }
-#endif
   xConfirmPara( m_iALFEncodePassReduction < 0 || m_iALFEncodePassReduction > 2,             "ALFEncodePassReduction must be equal to 0, 1 or 2");
-#if LCU_SYNTAX_ALF
   xConfirmPara( m_iALFMaxNumberFilters < 1,                                                 "ALFMaxNumFilter should be larger than 1");  
-#else
-  xConfirmPara( m_iALFMaxNumberFilters < 1 || m_iALFMaxNumberFilters > 16,                  "ALFMaxNumFilter exceeds supported range (1 to 16)");  
-#endif
   xConfirmPara( m_loopFilterBetaOffsetDiv2 < -13 || m_loopFilterBetaOffsetDiv2 > 13,          "Loop Filter Beta Offset div. 2 exceeds supported range (-13 to 13)");
   xConfirmPara( m_loopFilterTcOffsetDiv2 < -13 || m_loopFilterTcOffsetDiv2 > 13,              "Loop Filter Tc Offset div. 2 exceeds supported range (-13 to 13)");
@@ -934,11 +878,6 @@
   xConfirmPara( m_uiMaxCUWidth < 16,                                                        "Maximum partition width size should be larger than or equal to 16");
   xConfirmPara( m_uiMaxCUHeight < 16,                                                       "Maximum partition height size should be larger than or equal to 16");
-#if PIC_CROPPING
   xConfirmPara( (m_iSourceWidth  % (m_uiMaxCUWidth  >> (m_uiMaxCUDepth-1)))!=0,             "Resulting coded frame width must be a multiple of the minimum CU size");
   xConfirmPara( (m_iSourceHeight % (m_uiMaxCUHeight >> (m_uiMaxCUDepth-1)))!=0,             "Resulting coded frame height must be a multiple of the minimum CU size");
-#else
-  xConfirmPara( (m_iSourceWidth  % (m_uiMaxCUWidth  >> (m_uiMaxCUDepth-1)))!=0,             "Frame width should be multiple of minimum CU size");
-  xConfirmPara( (m_iSourceHeight % (m_uiMaxCUHeight >> (m_uiMaxCUDepth-1)))!=0,             "Frame height should be multiple of minimum CU size");
-#endif
   
   xConfirmPara( m_uiQuadtreeTULog2MinSize < 2,                                        "QuadtreeTULog2MinSize must be 2 or greater.");
@@ -967,5 +906,5 @@
   xConfirmPara    ( m_uiPredDepthMapGeneration >= 2 && !m_bUsingDepthMaps,            "PredDepthMapGen >= 2 requires CodeDepthMaps = 1" );
 #endif
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
   xConfirmPara    ( m_uiMultiviewMvPredMode > 7,                                      "MultiviewMvPred must be less than or equal to 7" );
   xConfirmPara    ( m_uiMultiviewMvPredMode > 0 && m_uiPredDepthMapGeneration == 0 ,  "MultiviewMvPred > 0 requires PredDepthMapGen > 0" );
@@ -977,5 +916,5 @@
   }
 #endif
-#if HHI_INTER_VIEW_RESIDUAL_PRED
+#if H3D_IVRP
   xConfirmPara    ( m_uiMultiviewResPredMode > 1,                                     "MultiviewResPred must be less than or equal to 1" );
   xConfirmPara    ( m_uiMultiviewResPredMode > 0 && m_uiPredDepthMapGeneration == 0 , "MultiviewResPred > 0 requires PredDepthMapGen > 0" );
@@ -998,9 +937,7 @@
   }
 #if ADAPTIVE_QP_SELECTION
-#if H0736_AVC_STYLE_QP_RANGE
   xConfirmPara( m_bUseAdaptQpSelect == true && m_aiQP[0] < 0,                                              "AdaptiveQpSelection must be disabled when QP < 0.");
   xConfirmPara( m_bUseAdaptQpSelect == true && m_aiQP[1] < 0,                                              "AdaptiveQpSelection must be disabled when QP < 0.");
   xConfirmPara( m_bUseAdaptQpSelect == true && (m_iChromaQpOffset !=0 || m_iChromaQpOffset2nd != 0 ),  "AdaptiveQpSelection must be disabled when ChromaQpOffset is not equal to 0.");
-#endif
 #endif
 
@@ -1013,17 +950,13 @@
   }
 
-#if FIXED_NUMBER_OF_TILES_SLICE_MODE
   xConfirmPara( m_iSliceMode < 0 || m_iSliceMode > 3, "SliceMode exceeds supported range (0 to 3)" );
-#endif
   if (m_iSliceMode!=0)
   {
     xConfirmPara( m_iSliceArgument < 1 ,         "SliceArgument should be larger than or equal to 1" );
   }
-#if FIXED_NUMBER_OF_TILES_SLICE_MODE
   if (m_iSliceMode==3)
   {
     xConfirmPara( m_iSliceGranularity > 0 ,      "When SliceMode == 3 is chosen, the SliceGranularity must be 0" );
   }
-#endif
   xConfirmPara( m_iEntropySliceMode < 0 || m_iEntropySliceMode > 2, "EntropySliceMode exceeds supported range (0 to 2)" );
   if (m_iEntropySliceMode!=0)
@@ -1035,10 +968,8 @@
   xConfirmPara( m_iSliceGranularity > m_iMaxCuDQPDepth, "SliceGranularity must be smaller smaller than or equal to maximum dqp depth" );
 
-#if NO_COMBINED_PARALLEL
   bool tileFlag = (m_iNumColumnsMinus1 > 0 || m_iNumRowsMinus1 > 0 );
   xConfirmPara( tileFlag && m_iEntropySliceMode,            "Tile and Entropy Slice can not be applied together");
   xConfirmPara( tileFlag && m_iWaveFrontSynchro,            "Tile and Wavefront can not be applied together");
   xConfirmPara( m_iWaveFrontSynchro && m_iEntropySliceMode, "Wavefront and Entropy Slice can not be applied together");  
-#endif
 
   // max CU width and height should be power of 2
@@ -1232,9 +1163,4 @@
       for( Int i = 0; i < MAX_GOP; i++ ) { isOK[i] = false; }
       Int numOK = 0;
-#if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
-      Int numReorderFramesRequired=0;
-      m_maxNumberOfReferencePictures=0;
-      Int lastDisp = -1;
-#endif
       m_extraRPSs[viewId] = 0;
       //start looping through frames in coding order until we can verify that the GOP structure is correct.
@@ -1420,59 +1346,20 @@
             }
           }
-#if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
-          if(m_maxNumberOfReferencePictures<numRefs)
-          {
-            m_maxNumberOfReferencePictures=numRefs;
-          }
-#endif
           refList[numRefs] = curPOC;
           numRefs++;
-#if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
-          Int nonDisplayed=0;
-          for(Int i=0; i<numRefs; i++) 
-          {
-            if(refList[i]==lastDisp+1) 
-            {
-              lastDisp=refList[i];
-              i=0;
-            }
-          }
-          for(Int i=0; i<numRefs; i++) 
-          {
-            if(refList[i]>lastDisp)
-            {
-              nonDisplayed++;
-            }
-          }
-          if(nonDisplayed>numReorderFramesRequired)
-          {
-            numReorderFramesRequired=nonDisplayed;
-          }
-#endif
         }
         checkGOP++;
       }
-#if !H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
-      if (m_numReorderFrames == -1)
-      {
-        m_numReorderFrames = numReorderFramesRequired;
-      }
-#endif
       xConfirmPara( errorGOP, "Invalid GOP structure given" );
-#if H0566_TLA
       m_maxTempLayer[viewId] = 1;
-#endif
       for( Int i = 0; i < m_iGOPSize; i++ ) 
       {
-#if H0566_TLA
         if( m_GOPListsMvc[viewId][i].m_temporalId >= m_maxTempLayer[viewId] )
         {
           m_maxTempLayer[viewId] = m_GOPListsMvc[viewId][i].m_temporalId + 1;
         }
-#endif
         xConfirmPara( m_GOPListsMvc[viewId][i].m_sliceType != 'B' && m_GOPListsMvc[viewId][i].m_sliceType != 'P', "Slice type must be equal to B or P" );
       }
 
-#if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
       for( Int i = 0; i < MAX_TLAYER; i++ )
       {
@@ -1531,12 +1418,6 @@
         m_maxDecPicBuffering[viewId][MAX_TLAYER-1] = m_numReorderPics[viewId][MAX_TLAYER-1];
       }
-#endif
-
-#if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
+
       xConfirmPara( m_bUseLComb == false && m_numReorderPics[viewId][MAX_TLAYER-1] != 0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" );  // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1.
-#else
-      xConfirmPara( m_bUseLComb==false && m_numReorderFrames!=0, "ListCombination can only be 0 in low delay coding (more precisely when L0 and L1 are identical)" );  // Note however this is not the full necessary condition as ref_pic_list_combination_flag can only be 0 if L0 == L1.
-      xConfirmPara( m_numReorderFrames < numReorderFramesRequired, "For the used GOP the encoder requires more pictures for reordering than specified in MaxNumberOfReorderPictures" );
-#endif
     }
   }
@@ -1648,9 +1529,5 @@
     }
   }
-#if PIC_CROPPING
   printf("Real     Format              : %dx%d %dHz\n", m_iSourceWidth - m_cropLeft - m_cropRight, m_iSourceHeight - m_cropTop - m_cropBottom, m_iFrameRate );
-#else
-  printf("Real     Format              : %dx%d %dHz\n", m_iSourceWidth - m_aiPad[0], m_iSourceHeight-m_aiPad[1], m_iFrameRate );
-#endif
   printf("Internal Format              : %dx%d %dHz\n", m_iSourceWidth, m_iSourceHeight, m_iFrameRate );
   printf("Frame index                  : %u - %d (%d frames)\n", m_FrameSkip, m_FrameSkip+m_iFrameToBeEncoded-1, m_iFrameToBeEncoded );
@@ -1720,9 +1597,7 @@
   
   printf("TOOL CFG General: ");  
-#if LCU_SYNTAX_ALF
   printf("ALFMNF:%d ", m_iALFMaxNumberFilters);
   printf("ALFInSlice:%d ", m_bALFParamInSlice);
   printf("ALFPicEnc:%d ", m_bALFPicBasedEncode);
-#endif
   printf("IBD:%d ", !!g_uiBitIncrement);
   printf("HAD:%d ", m_bUseHADME           );
@@ -1730,14 +1605,9 @@
   printf("SQP:%d ", m_uiDeltaQpRD         );
   printf("ASR:%d ", m_bUseASR             );
-#if !PIC_CROPPING
-  printf("PAD:%d ", m_bUsePAD             );
-#endif
   printf("LComb:%d ", m_bUseLComb         );
   printf("LCMod:%d ", m_bLCMod         );
   printf("FEN:%d ", m_bUseFastEnc         );
   printf("ECU:%d ", m_bUseEarlyCU         );
-#if FAST_DECISION_FOR_MRG_RD_COST
   printf("FDM:%d ", m_useFastDecisionForMerge );
-#endif
   printf("CFM:%d ", m_bUseCbfFastMode         );
   printf("RQT:%d ", 1     );
@@ -1754,12 +1624,6 @@
   }
   printf("CIP:%d ", m_bUseConstrainedIntraPred);
-#if BURST_IPCM
   printf("PCM:%d ", (m_usePCM && (1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);
-#else
-  printf("PCM:%d ", ((1<<m_uiPCMLog2MinSize) <= m_uiMaxCUWidth)? 1 : 0);
-#endif
-#if SAO_UNIT_INTERLEAVING
   printf("SAOInterleaving:%d ", (m_saoInterleavingFlag)?(1):(0));
-#endif
 #if LOSSLESS_CODING
   printf("LosslessCuEnabled:%d ", (m_useLossless)? 1:0 );
@@ -1767,7 +1631,4 @@
   printf("WPP:%d ", (Int)m_bUseWeightPred);
   printf("WPB:%d ", m_uiBiPredIdc);
-#if !REMOVE_TILE_DEPENDENCE
-  printf("TileBoundaryIndependence:%d ", m_iTileBoundaryIndependenceIdr ); 
-#endif
   printf("TileLocationInSliceHdr:%d ", m_iTileLocationInSliceHeaderFlag);
   printf("TileMarker:%d", m_iTileMarkerFlag);
@@ -1792,7 +1653,5 @@
 #endif
 
-#if MULTIBITS_DATA_HIDING
   printf(" SignBitHidingFlag:%d SignBitHidingThreshold:%d", m_signHideFlag, m_signHidingThreshold);
-#endif
   printf("\n");
   printf("TOOL CFG VIDEO  : ");
@@ -1804,7 +1663,13 @@
 #endif
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+  printf("IlluCompEnable: %d %d", m_abUseIC[0] ? 1 : 0, m_abUseIC[1] ? 1 : 0);
+#else
   printf("IlluCompEnable: %d ", m_bUseIC);
 #endif
-
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  printf("IVSEnable: %d ", m_bUseIVS);
+#endif
   printf("\n");
 
Index: trunk/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 210)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 296)
@@ -73,5 +73,4 @@
   Int       m_iSourceWidth;                                   ///< source width in pixel
   Int       m_iSourceHeight;                                  ///< source height in pixel
-#if PIC_CROPPING
   Int       m_croppingMode;
   Int       m_cropLeft;
@@ -79,9 +78,5 @@
   Int       m_cropTop;
   Int       m_cropBottom;
-#endif
   Int       m_iFrameToBeEncoded;                              ///< number of encoded frames
-#if !PIC_CROPPING
-  Bool      m_bUsePAD;                                        ///< flag for using source padding
-#endif
   Int       m_aiPad[2];                                       ///< number of padded pixels for width and height
   
@@ -100,11 +95,6 @@
   Int       m_extraRPSs[MAX_VIEW_NUM];
   GOPEntryMvc m_GOPListsMvc[MAX_VIEW_NUM][MAX_GOP+1];
-#if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
   Int       m_numReorderPics[MAX_VIEW_NUM][MAX_TLAYER];       ///< total number of reorder pictures
   Int       m_maxDecPicBuffering[MAX_VIEW_NUM][MAX_TLAYER];   ///< total number of reference pictures needed for decoding
-#else
-  Int       m_numReorderFrames;                               ///< total number of reorder pictures
-  Int       m_maxNumberOfReferencePictures;                   ///< total number of reference pictures needed for decoding
-#endif
   Bool      m_bUseLComb;                                      ///< flag for using combined reference list for uni-prediction in B-slices (JCTVC-D421)
   Bool      m_bLCMod;                                         ///< flag for specifying whether the combined reference list for uni-prediction in B-slices is uploaded explicitly
@@ -136,10 +126,5 @@
   Int       m_iQPAdaptationRange;                             ///< dQP range by QP adaptation
   
-#if H0566_TLA
   Int       m_maxTempLayer[MAX_VIEW_NUM];                     ///< Max temporal layer
-#else
-  Bool      m_bTLayering;                                     ///< indicates whether temporal IDs are set based on the hierarchical coding structure
-  Bool      m_abTLayerSwitchingFlag[MAX_TLAYER];              ///< temporal layer switching flags corresponding to each temporal layer
-#endif
 
   // coding unit (CU) definition
@@ -170,10 +155,15 @@
   vector<Bool> m_abUseSAO;
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+  vector<Bool> m_abUseIC;                                    ///< flag for using illumination compensation for inter-view prediction
+#else
   Bool      m_bUseIC;                                     ///< flag for using illumination compensation for inter-view prediction
 #endif
-#if SAO_UNIT_INTERLEAVING
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+  Bool      m_bUseIVS;                                        ///< flag for using inter-view vector scaling
+#endif
   Int       m_maxNumOffsetsPerPic;                            ///< SAO maximun number of offset per picture
   Bool      m_saoInterleavingFlag;                            ///< SAO interleaving flag
-#endif
   // coding tools (loop filter)
   vector<Bool> m_abUseALF;                                    ///< flag for using adaptive loop filter [0] - video, [1] - depth
@@ -181,8 +171,6 @@
   
   Int       m_iALFMaxNumberFilters;                           ///< ALF Max Number Filters in one picture
-#if LCU_SYNTAX_ALF
   Bool      m_bALFParamInSlice;
   Bool      m_bALFPicBasedEncode;
-#endif
 
   vector<Bool> m_abLoopFilterDisable;                         ///< flag for using deblocking filter filter [0] - video, [1] - depth
@@ -190,7 +178,5 @@
   Int       m_loopFilterBetaOffsetDiv2;                     ///< beta offset for deblocking filter
   Int       m_loopFilterTcOffsetDiv2;                       ///< tc offset for deblocking filter
-#if DBL_CONTROL
   Bool      m_DeblockingFilterControlPresent;                 ///< deblocking filter control present flag in PPS
-#endif
  
   Bool      m_bUseLMChroma;                                  ///< JL: Chroma intra prediction based on luma signal
@@ -226,16 +212,14 @@
   UInt      m_uiPredDepthMapGeneration;                       ///< using of (virtual) depth maps for texture coding
 #endif
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
   UInt      m_uiMultiviewMvPredMode;                          ///< usage of predictors for multi-view mv prediction
   UInt      m_uiMultiviewMvRegMode;                           ///< regularization for multiview motion vectors
   Double    m_dMultiviewMvRegLambdaScale;                     ///< lambda scale for multiview motion vectors regularization
 #endif
-#if HHI_INTER_VIEW_RESIDUAL_PRED
+#if H3D_IVRP
   UInt      m_uiMultiviewResPredMode;          ///< using multiview residual prediction
 #endif
 
-#if FAST_DECISION_FOR_MRG_RD_COST
   Bool      m_useFastDecisionForMerge;         ///< flag for using Fast Decision Merge RD-Cost 
-#endif
   Bool      m_bUseCbfFastMode;                 ///< flag for using Cbf Fast PU Mode Decision
   Int       m_iSliceMode;                      ///< 0: Disable all Recon slice limits, 1 : Maximum number of largest coding units per slice, 2: Maximum number of bytes in a slice
@@ -250,7 +234,4 @@
   Int       m_iColumnRowInfoPresent;
   Int       m_iUniformSpacingIdr;
-#if !REMOVE_TILE_DEPENDENCE
-  Int       m_iTileBoundaryIndependenceIdr;
-#endif
   Int       m_iNumColumnsMinus1;
   char*     m_pchColumnWidth;
@@ -280,8 +261,6 @@
 #endif
 
-#if MULTIBITS_DATA_HIDING
   Int       m_signHideFlag;
   Int       m_signHidingThreshold;
-#endif
 #if HHI_MPI
   Bool      m_bUseMVI;  ///< flag for using Motion Vector Inheritance for depth map coding
Index: trunk/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 210)
+++ trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 296)
@@ -97,5 +97,4 @@
     m_acTEncTopList[iViewIdx]->setSourceWidth                  ( m_iSourceWidth );
     m_acTEncTopList[iViewIdx]->setSourceHeight                 ( m_iSourceHeight );
-#if PIC_CROPPING
     m_acTEncTopList[iViewIdx]->setCroppingMode                 ( m_croppingMode );
     m_acTEncTopList[iViewIdx]->setCropLeft                     ( m_cropLeft );
@@ -103,5 +102,4 @@
     m_acTEncTopList[iViewIdx]->setCropTop                      ( m_cropTop );
     m_acTEncTopList[iViewIdx]->setCropBottom                   ( m_cropBottom );
-#endif
     m_acTEncTopList[iViewIdx]->setFrameToBeEncoded             ( m_iFrameToBeEncoded );
     m_acTEncTopList[iViewIdx]->setViewId                       ( iViewIdx );
@@ -121,4 +119,7 @@
     m_cVPS.setDependentFlag                                    ( iViewIdx ? true:false, layerId );
     m_cVPS.setDependentLayer                                   ( layerId - (m_bUsingDepthMaps ? 2:1), layerId );
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    m_cVPS.setIVScalingFlag                                    ( m_bUseIVS );
+#endif
 #endif
     
@@ -135,5 +136,4 @@
     m_acTEncTopList[iViewIdx]->setGopList                      ( m_GOPListsMvc[iViewIdx] );
     m_acTEncTopList[iViewIdx]->setExtraRPSs                    ( m_extraRPSs[iViewIdx] );
-#if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
     for(Int i = 0; i < MAX_TLAYER; i++)
     {
@@ -141,8 +141,4 @@
       m_acTEncTopList[iViewIdx]->setMaxDecPicBuffering         ( m_maxDecPicBuffering[iViewIdx][i], i );
     }
-#else
-    m_acTEncTopList[iViewIdx]->setNumReorderFrames             ( m_numReorderFrames );
-    m_acTEncTopList[iViewIdx]->setMaxNumberOfReferencePictures ( m_maxNumberOfReferencePictures );
-#endif
     for( UInt uiLoop = 0; uiLoop < MAX_TLAYER; ++uiLoop )
     {
@@ -154,10 +150,5 @@
     m_acTEncTopList[iViewIdx]->setPad                          ( m_aiPad );
     
-#if H0566_TLA
     m_acTEncTopList[iViewIdx]->setMaxTempLayer                 ( m_maxTempLayer[iViewIdx] );
-#else
-    m_acTEncTopList[iViewIdx]->setTLayering                    ( m_bTLayering );
-    m_acTEncTopList[iViewIdx]->setTLayerSwitchingFlag          ( m_abTLayerSwitchingFlag );
-#endif
 
     m_acTEncTopList[iViewIdx]->setDisInter4x4                  ( m_bDisInter4x4);
@@ -173,7 +164,5 @@
     m_acTEncTopList[iViewIdx]->setLoopFilterBetaOffset         ( m_loopFilterBetaOffsetDiv2  );
     m_acTEncTopList[iViewIdx]->setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
-#if DBL_CONTROL
     m_acTEncTopList[iViewIdx]->setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
-#endif
 
   //====== Motion search ========
@@ -198,9 +187,5 @@
 #if LOSSLESS_CODING
     Int lowestQP;
-#if H0736_AVC_STYLE_QP_RANGE
     lowestQP =  - ( (Int)(6*(g_uiBitDepth + g_uiBitIncrement - 8)) );
-#else
-    lowestQP = 0;
-#endif
     if ((m_iMaxDeltaQP == 0 ) && (m_aiQP[0] == lowestQP) && (m_useLossless == true))
     {
@@ -232,10 +217,10 @@
     m_acTEncTopList[iViewIdx]->setPdmOffset                    (       m_cCameraData.getPdmOffset        () );
 #endif
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
     m_acTEncTopList[iViewIdx]->setMultiviewMvPredMode          ( m_uiMultiviewMvPredMode );
     m_acTEncTopList[iViewIdx]->setMultiviewMvRegMode           ( iViewIdx ? m_uiMultiviewMvRegMode       : 0   );
     m_acTEncTopList[iViewIdx]->setMultiviewMvRegLambdaScale    ( iViewIdx ? m_dMultiviewMvRegLambdaScale : 0.0 );
 #endif
-#if HHI_INTER_VIEW_RESIDUAL_PRED
+#if H3D_IVRP
     m_acTEncTopList[iViewIdx]->setMultiviewResPredMode         ( m_uiMultiviewResPredMode );
 #endif
@@ -257,7 +242,4 @@
     m_acTEncTopList[iViewIdx]->setdQPs                         ( m_aidQP        );
     m_acTEncTopList[iViewIdx]->setUseRDOQ                      ( m_abUseRDOQ[0] );
-#if !PIC_CROPPING
-    m_acTEncTopList[iViewIdx]->setUsePAD                       ( m_bUsePAD      );
-#endif
     m_acTEncTopList[iViewIdx]->setQuadtreeTULog2MaxSize        ( m_uiQuadtreeTULog2MaxSize );
     m_acTEncTopList[iViewIdx]->setQuadtreeTULog2MinSize        ( m_uiQuadtreeTULog2MinSize );
@@ -266,7 +248,5 @@
     m_acTEncTopList[iViewIdx]->setUseFastEnc                   ( m_bUseFastEnc  );
     m_acTEncTopList[iViewIdx]->setUseEarlyCU                   ( m_bUseEarlyCU  ); 
-#if FAST_DECISION_FOR_MRG_RD_COST
     m_acTEncTopList[iViewIdx]->setUseFastDecisionForMerge      ( m_useFastDecisionForMerge  );
-#endif
     m_acTEncTopList[iViewIdx]->setUseCbfFastMode               ( m_bUseCbfFastMode  );
 #if HHI_INTERVIEW_SKIP
@@ -301,10 +281,8 @@
       m_acTEncTopList[iViewIdx]->setSliceArgument ( m_iSliceArgument * ( iNumPartInCU >> ( m_iSliceGranularity << 1 ) ) );
     }
-#if FIXED_NUMBER_OF_TILES_SLICE_MODE
     if(m_iSliceMode==AD_HOC_SLICES_FIXED_NUMBER_OF_TILES_IN_SLICE)
     {
       m_acTEncTopList[iViewIdx]->setSliceArgument ( m_iSliceArgument );
     }
-#endif
     m_acTEncTopList[iViewIdx]->setSliceGranularity        ( m_iSliceGranularity         );
     if(m_iSliceMode == 0 )
@@ -315,10 +293,15 @@
     m_acTEncTopList[iViewIdx]->setUseSAO               ( m_abUseSAO[0]     );
 #if LGE_ILLUCOMP_B0045
+#if LGE_ILLUCOMP_DEPTH_C0046
+    m_acTEncTopList[iViewIdx]->setUseIC                ( m_abUseIC[0]      );
+#else
     m_acTEncTopList[iViewIdx]->setUseIC                ( m_bUseIC          );
 #endif
-#if SAO_UNIT_INTERLEAVING
+#endif
+#if INTER_VIEW_VECTOR_SCALING_C0115
+    m_acTEncTopList[iViewIdx]->setUseIVS               ( m_bUseIVS          );
+#endif
     m_acTEncTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic);
     m_acTEncTopList[iViewIdx]->setSaoInterleavingFlag (m_saoInterleavingFlag);
-#endif
     m_acTEncTopList[iViewIdx]->setPCMInputBitDepthFlag  ( m_bPCMInputBitDepthFlag); 
     m_acTEncTopList[iViewIdx]->setPCMFilterDisableFlag  ( m_bPCMFilterDisableFlag); 
@@ -328,7 +311,4 @@
     m_acTEncTopList[iViewIdx]->setColumnRowInfoPresent       ( m_iColumnRowInfoPresent );
     m_acTEncTopList[iViewIdx]->setUniformSpacingIdr          ( m_iUniformSpacingIdr );
-#if !REMOVE_TILE_DEPENDENCE
-    m_acTEncTopList[iViewIdx]->setTileBoundaryIndependenceIdr( m_iTileBoundaryIndependenceIdr );
-#endif
     m_acTEncTopList[iViewIdx]->setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
     m_acTEncTopList[iViewIdx]->setNumRowsMinus1              ( m_iNumRowsMinus1 );
@@ -347,9 +327,5 @@
     m_acTEncTopList[iViewIdx]->setMaxTileMarkerOffset         ( m_dMaxTileMarkerOffset );
     m_acTEncTopList[iViewIdx]->setTileBehaviorControlPresentFlag( m_iTileBehaviorControlPresentFlag );
-#if !REMOVE_TILE_DEPENDENCE
-    if(m_iTileBoundaryIndependenceIdr == 0 || uiTilesCount == 1)
-#else
     if(uiTilesCount == 1)
-#endif
     {
       m_bLFCrossTileBoundaryFlag = true; 
@@ -366,10 +342,7 @@
     m_acTEncTopList[iViewIdx]->setUseScalingListId           ( m_useScalingListId  );
     m_acTEncTopList[iViewIdx]->setScalingListFile            ( m_scalingListFile   );
-#if MULTIBITS_DATA_HIDING
     m_acTEncTopList[iViewIdx]->setSignHideFlag(m_signHideFlag);
     m_acTEncTopList[iViewIdx]->setTSIG(m_signHidingThreshold);
-#endif
-
-#if LCU_SYNTAX_ALF
+
     if(uiTilesCount > 1)
     {
@@ -379,5 +352,4 @@
     m_acTEncTopList[iViewIdx]->setALFParamInSlice              ( m_bALFParamInSlice);
     m_acTEncTopList[iViewIdx]->setALFPicBasedEncode            ( m_bALFPicBasedEncode);
-#endif
 
     //====== Depth tools ========
@@ -435,5 +407,4 @@
       m_acTEncDepthTopList[iViewIdx]->setSourceWidth                  ( m_iSourceWidth );
       m_acTEncDepthTopList[iViewIdx]->setSourceHeight                 ( m_iSourceHeight );
-#if PIC_CROPPING
       m_acTEncDepthTopList[iViewIdx]->setCroppingMode                 ( m_croppingMode );
       m_acTEncDepthTopList[iViewIdx]->setCropLeft                     ( m_cropLeft );
@@ -441,5 +412,4 @@
       m_acTEncDepthTopList[iViewIdx]->setCropTop                      ( m_cropTop );
       m_acTEncDepthTopList[iViewIdx]->setCropBottom                   ( m_cropBottom );
-#endif
       m_acTEncDepthTopList[iViewIdx]->setFrameToBeEncoded             ( m_iFrameToBeEncoded );
       m_acTEncDepthTopList[iViewIdx]->setViewId                       ( iViewIdx );
@@ -470,5 +440,4 @@
       m_acTEncDepthTopList[iViewIdx]->setGopList                      ( m_GOPListsMvc[iViewIdx] );
       m_acTEncDepthTopList[iViewIdx]->setExtraRPSs                    ( m_extraRPSs[iViewIdx] );
-#if H0567_DPB_PARAMETERS_PER_TEMPORAL_LAYER
       for(Int i = 0; i < MAX_TLAYER; i++)
       {
@@ -476,8 +445,4 @@
         m_acTEncDepthTopList[iViewIdx]->setMaxDecPicBuffering         ( m_maxDecPicBuffering[iViewIdx][i], i );
       }
-#else
-      m_acTEncDepthTopList[iViewIdx]->setNumReorderFrames             ( m_numReorderFrames );
-      m_acTEncDepthTopList[iViewIdx]->setMaxNumberOfReferencePictures ( m_maxNumberOfReferencePictures );
-#endif
       for( UInt uiLoop = 0; uiLoop < MAX_TLAYER; ++uiLoop )
       {
@@ -489,10 +454,5 @@
       m_acTEncDepthTopList[iViewIdx]->setPad                          ( m_aiPad );
 
-#if H0566_TLA
       m_acTEncDepthTopList[iViewIdx]->setMaxTempLayer                 ( m_maxTempLayer[iViewIdx] );
-#else
-      m_acTEncDepthTopList[iViewIdx]->setTLayering                    ( m_bTLayering );
-      m_acTEncDepthTopList[iViewIdx]->setTLayerSwitchingFlag          ( m_abTLayerSwitchingFlag );
-#endif
 
       m_acTEncDepthTopList[iViewIdx]->setDisInter4x4                  ( m_bDisInter4x4);
@@ -508,7 +468,5 @@
       m_acTEncDepthTopList[iViewIdx]->setLoopFilterBetaOffset         ( m_loopFilterBetaOffsetDiv2  );
       m_acTEncDepthTopList[iViewIdx]->setLoopFilterTcOffset           ( m_loopFilterTcOffsetDiv2    );
-#if DBL_CONTROL
       m_acTEncDepthTopList[iViewIdx]->setDeblockingFilterControlPresent( m_DeblockingFilterControlPresent);
-#endif
 
       //====== Motion search ========
@@ -550,7 +508,4 @@
       m_acTEncDepthTopList[iViewIdx]->setdQPs                         ( m_aidQPdepth   );
       m_acTEncDepthTopList[iViewIdx]->setUseRDOQ                      ( m_abUseRDOQ[1] );
-#if !PIC_CROPPING
-      m_acTEncDepthTopList[iViewIdx]->setUsePAD                       ( m_bUsePAD      );
-#endif
       m_acTEncDepthTopList[iViewIdx]->setQuadtreeTULog2MaxSize        ( m_uiQuadtreeTULog2MaxSize );
       m_acTEncDepthTopList[iViewIdx]->setQuadtreeTULog2MinSize        ( m_uiQuadtreeTULog2MinSize );
@@ -559,7 +514,5 @@
       m_acTEncDepthTopList[iViewIdx]->setUseFastEnc                   ( m_bUseFastEnc  );
       m_acTEncDepthTopList[iViewIdx]->setUseEarlyCU                   ( m_bUseEarlyCU  ); 
-#if FAST_DECISION_FOR_MRG_RD_COST
       m_acTEncDepthTopList[iViewIdx]->setUseFastDecisionForMerge      ( m_useFastDecisionForMerge  );
-#endif
       m_acTEncDepthTopList[iViewIdx]->setUseCbfFastMode               ( m_bUseCbfFastMode  );
 #if HHI_INTERVIEW_SKIP
@@ -595,10 +548,10 @@
       m_acTEncDepthTopList[iViewIdx]->setPredDepthMapGeneration       ( 0 );
 #endif
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
       m_acTEncDepthTopList[iViewIdx]->setMultiviewMvPredMode          ( 0 );
       m_acTEncDepthTopList[iViewIdx]->setMultiviewMvRegMode           ( 0 );
       m_acTEncDepthTopList[iViewIdx]->setMultiviewMvRegLambdaScale    ( 0.0 );
 #endif
-#if HHI_INTER_VIEW_RESIDUAL_PRED
+#if H3D_IVRP
       m_acTEncDepthTopList[iViewIdx]->setMultiviewResPredMode         ( 0 );
 #endif
@@ -623,10 +576,8 @@
         m_acTEncDepthTopList[iViewIdx]->setSliceArgument ( m_iSliceArgument * ( iNumPartInCU >> ( m_iSliceGranularity << 1 ) ) );
       }
-#if FIXED_NUMBER_OF_TILES_SLICE_MODE
       if(m_iSliceMode==AD_HOC_SLICES_FIXED_NUMBER_OF_TILES_IN_SLICE)
       {
         m_acTEncDepthTopList[iViewIdx]->setSliceArgument ( m_iSliceArgument );
       }
-#endif
       m_acTEncDepthTopList[iViewIdx]->setSliceGranularity        ( m_iSliceGranularity         );
       if(m_iSliceMode == 0 )
@@ -639,8 +590,9 @@
       m_acTEncDepthTopList[iViewIdx]->setUseIC                ( false     );
 #endif
-#if SAO_UNIT_INTERLEAVING
+#if INTER_VIEW_VECTOR_SCALING_C0115
+     m_acTEncDepthTopList[iViewIdx]->setUseIVS                ( m_bUseIVS );
+#endif
       m_acTEncDepthTopList[iViewIdx]->setMaxNumOffsetsPerPic (m_maxNumOffsetsPerPic);
       m_acTEncDepthTopList[iViewIdx]->setSaoInterleavingFlag (m_saoInterleavingFlag);
-#endif
       m_acTEncDepthTopList[iViewIdx]->setPCMInputBitDepthFlag  ( m_bPCMInputBitDepthFlag); 
       m_acTEncDepthTopList[iViewIdx]->setPCMFilterDisableFlag  ( m_bPCMFilterDisableFlag); 
@@ -650,7 +602,4 @@
       m_acTEncDepthTopList[iViewIdx]->setColumnRowInfoPresent       ( m_iColumnRowInfoPresent );
       m_acTEncDepthTopList[iViewIdx]->setUniformSpacingIdr          ( m_iUniformSpacingIdr );
-#if !REMOVE_TILE_DEPENDENCE
-      m_acTEncDepthTopList[iViewIdx]->setTileBoundaryIndependenceIdr( m_iTileBoundaryIndependenceIdr );
-#endif
       m_acTEncDepthTopList[iViewIdx]->setNumColumnsMinus1           ( m_iNumColumnsMinus1 );
       m_acTEncDepthTopList[iViewIdx]->setNumRowsMinus1              ( m_iNumRowsMinus1 );
@@ -669,9 +618,5 @@
       m_acTEncDepthTopList[iViewIdx]->setMaxTileMarkerOffset         ( m_dMaxTileMarkerOffset );
       m_acTEncDepthTopList[iViewIdx]->setTileBehaviorControlPresentFlag( m_iTileBehaviorControlPresentFlag );
-#if !REMOVE_TILE_DEPENDENCE
-      if(m_iTileBoundaryIndependenceIdr == 0 || uiTilesCount == 1)
-#else
       if(uiTilesCount == 1)
-#endif
       {
         m_bLFCrossTileBoundaryFlag = true; 
@@ -688,10 +633,7 @@
       m_acTEncDepthTopList[iViewIdx]->setUseScalingListId           ( m_useScalingListId  );
       m_acTEncDepthTopList[iViewIdx]->setScalingListFile            ( m_scalingListFile   );
-#if MULTIBITS_DATA_HIDING
       m_acTEncDepthTopList[iViewIdx]->setSignHideFlag(m_signHideFlag);
       m_acTEncDepthTopList[iViewIdx]->setTSIG(m_signHidingThreshold);
-#endif
-
-#if LCU_SYNTAX_ALF
+
       if(uiTilesCount > 1)
       {
@@ -701,5 +643,4 @@
       m_acTEncDepthTopList[iViewIdx]->setALFParamInSlice              ( m_bALFParamInSlice);
       m_acTEncDepthTopList[iViewIdx]->setALFPicBasedEncode            ( m_bALFPicBasedEncode);
-#endif
 
   //====== Depth tools ========
@@ -728,5 +669,5 @@
   }
 
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
   else if( m_uiMultiviewMvRegMode )
   {
@@ -815,5 +756,5 @@
       m_acTEncDepthTopList[iViewIdx]->create();
     }
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
     else if( m_uiMultiviewMvRegMode )
     {
@@ -931,5 +872,5 @@
   TComPicYuv*       pcPicYuvRec = NULL;
   TComPicYuv*       pcDepthPicYuvRec = NULL;
-  
+
   // initialize internal class & member variables
   xInitLibCfg();
@@ -962,5 +903,5 @@
   pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxCUDepth );
 
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
   if( m_uiMultiviewMvRegMode )
   {
@@ -982,5 +923,5 @@
         m_acTVideoIOYuvInputFileList[iViewIdx]->read( pcPicYuvOrg, m_aiPad );
       
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
         if( m_uiMultiviewMvRegMode && iViewIdx )
         {
@@ -989,5 +930,5 @@
 #endif
 
-#if HHI_INTER_VIEW_MOTION_PRED
+#if H3D_IVMP
         m_acTEncTopList[iViewIdx]->initNewPic( pcPicYuvOrg, ( m_uiMultiviewMvRegMode && iViewIdx ? pcPdmDepthOrg : 0 ) );
 #else
@@ -1033,5 +974,5 @@
       if ( iNextPoc < m_iFrameToBeEncoded )
       {
-      m_cCameraData.update( iNextPoc );
+        m_cCameraData.update( iNextPoc );
       }
 #endif
@@ -1096,4 +1037,17 @@
 #endif
         iNumEncoded = 0;
+
+#if MERL_VSP_C0152
+        Int iCurPoc = m_acTEncDepthTopList[iViewIdx]->getFrameId(gopId);
+        if( iCurPoc < m_acTEncDepthTopList[iViewIdx]->getFrameToBeEncoded() && iViewIdx!=0 )
+        {
+          TComPic* pcBaseTxtPic   = getPicFromView(  0, m_acTEncDepthTopList[iViewIdx]->getFrameId(gopId), false ); //get base view reconstructed texture
+          TComPic* pcBaseDepthPic = getPicFromView(  0, m_acTEncDepthTopList[iViewIdx]->getFrameId(gopId), true );  //get base view reconstructed depth
+          TEncSlice* pEncSlice = m_acTEncTopList[iViewIdx]->getSliceEncoder();
+          pEncSlice->setRefPicBaseTxt(pcBaseTxtPic);
+          pEncSlice->setRefPicBaseDepth(pcBaseDepthPic);
+        }
+        setBWVSPLUT( iViewIdx, gopId, false);
+#endif
         // call encoding function for one frame
         m_acTEncTopList[iViewIdx]->encode( eos[iViewIdx], pcPicYuvOrg, *m_picYuvRec[iViewIdx], outputAccessUnits, iNumEncoded, gopId );
@@ -1103,4 +1057,15 @@
         {
           Int  iNumDepthEncoded = 0;
+#if MERL_VSP_C0152
+        Int iCurPocDepth = m_acTEncDepthTopList[iViewIdx]->getFrameId(gopId);
+        if( iCurPocDepth < m_acTEncDepthTopList[iViewIdx]->getFrameToBeEncoded() && iViewIdx!=0 )
+        {
+          TComPic* pcBaseDepthPic = getPicFromView(  0, m_acTEncDepthTopList[iViewIdx]->getFrameId(gopId), true );
+          TEncSlice* pcSlice = (TEncSlice*) m_acTEncDepthTopList[iViewIdx]->getSliceEncoder();
+          pcSlice->setRefPicBaseDepth(pcBaseDepthPic);
+        }
+        setBWVSPLUT( iViewIdx, gopId, true);
+#endif
+
           // call encoding function for one depth frame
           m_acTEncDepthTopList[iViewIdx]->encode( depthEos[iViewIdx], pcDepthPicYuvOrg, *m_picYuvDepthRec[iViewIdx], outputAccessUnits, iNumDepthEncoded, gopId );
@@ -1114,5 +1079,5 @@
 #endif
 
-#if HHI_INTERVIEW_SKIP || HHI_INTER_VIEW_MOTION_PRED || HHI_INTER_VIEW_RESIDUAL_PRED
+#if HHI_INTERVIEW_SKIP || H3D_IVMP || H3D_IVRP
       for( Int iViewIdx = 0; iViewIdx < m_iNumberOfViews; iViewIdx++ )
       {
@@ -1147,9 +1112,5 @@
   
 #if !QC_MVHEVC_B0046
-#if FIX_DEL_NULLPTR
   if ( pcPdmDepthOrg != NULL && m_uiMultiviewMvRegMode )
-#else
-  if ( pcPdmDepthOrg != NULL )
-#endif
   {
     pcPdmDepthOrg->destroy();
@@ -1292,9 +1253,5 @@
         if (m_pchReconFileList[iViewIdx])
         {
-#if PIC_CROPPING
           m_acTVideoIOYuvReconFileList[iViewIdx]->write( pcPicYuvRec, m_cropLeft, m_cropRight, m_cropTop, m_cropBottom );
-#else
-          m_acTVideoIOYuvReconFileList[iViewIdx]->write( pcPicYuvRec, m_aiPad );
-#endif
         }
       }
@@ -1303,9 +1260,5 @@
         if (m_pchDepthReconFileList[iViewIdx])
         {
-#if PIC_CROPPING
           m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write( pcPicYuvRec, m_cropLeft, m_cropRight, m_cropTop, m_cropBottom );
-#else
-          m_acTVideoIOYuvDepthReconFileList[iViewIdx]->write( pcPicYuvRec, m_aiPad );
-#endif
         }
       }
@@ -1360,5 +1313,4 @@
     {
     case NAL_UNIT_CODED_SLICE:
-#if H0566_TLA
 #if !QC_REM_IDV_B0046
     case NAL_UNIT_CODED_SLICE_IDV:
@@ -1366,9 +1318,4 @@
     case NAL_UNIT_CODED_SLICE_TLA:
     case NAL_UNIT_CODED_SLICE_CRA:
-#else
-    case NAL_UNIT_CODED_SLICE_DATAPART_A:
-    case NAL_UNIT_CODED_SLICE_DATAPART_B:
-    case NAL_UNIT_CODED_SLICE_CDR:
-#endif
     case NAL_UNIT_CODED_SLICE_IDR:
     case NAL_UNIT_SPS:
@@ -1634,3 +1581,30 @@
 #endif
 
+#if MERL_VSP_C0152
+Void TAppEncTop::setBWVSPLUT(Int iCodedViewIdx, Int gopId, Bool isDepth)
+{
+  //first view does not have VSP 
+  if((iCodedViewIdx == 0)) return;
+
+  AOT( iCodedViewIdx <= 0);
+  AOT( iCodedViewIdx >= m_iNumberOfViews );
+
+  Int iNeighborViewId = 0;
+  //setting look-up table
+  Int* piShiftLUT = m_cCameraData.getBaseViewShiftLUTI()[iNeighborViewId][iCodedViewIdx][0];
+
+  if(isDepth)
+  {
+    TEncSlice* pcEncSlice = (TEncSlice*) m_acTEncDepthTopList[iCodedViewIdx]->getSliceEncoder();
+    pcEncSlice->setBWVSPLUTParam(  piShiftLUT, LOG2_DISP_PREC_LUT );
+  }
+  else
+  {
+    TEncSlice* pcEncSlice = (TEncSlice*) m_acTEncTopList[iCodedViewIdx]->getSliceEncoder();
+    pcEncSlice->setBWVSPLUTParam(  piShiftLUT, LOG2_DISP_PREC_LUT );
+  }
+
+}
+#endif
+
 //! \}
Index: trunk/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 210)
+++ trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 296)
@@ -99,4 +99,5 @@
   TRenTop  m_cUsedPelsRenderer;                               ///< renderer for used pels map
 #endif
+
 protected:
   // initialization
@@ -165,4 +166,7 @@
 #endif
 
+#if MERL_VSP_C0152
+  Void setBWVSPLUT( Int iCodedViewIdx, Int gopId, Bool isDepth);
+#endif
 };// END CLASS DEFINITION TAppEncTop
 
