Index: branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1325)
@@ -68,7 +68,4 @@
   string cfg_ReconFile;
   string cfg_TargetDecLayerIdSetFile;
-#if NH_3D
-  string cfg_ScaleOffsetFile;
-#endif
   string outputColourSpaceConvert;
   Int warnUnknowParameter = 0;
@@ -82,8 +79,4 @@
   ("ReconFile,o",               cfg_ReconFile,                         string(""), "reconstructed YUV output file name\n"
                                                                                    "YUV writing is skipped if omitted")
-#if NH_3D
-  ("ScaleOffsetFile,p",         cfg_ScaleOffsetFile,                   string(""), "file with coded scales and offsets")
-  ("Depth420OutputFlag",        m_depth420OutputFlag,                  true      , "Output depth layers in 4:2:0 ") 
-#endif
   ("WarnUnknowParameter,w",     warnUnknowParameter,                                  0, "warn for unknown configuration parameters instead of failing")
   ("SkipFrames,s",              m_iSkipFrame,                          0,          "number of frames to skip before random access")
@@ -148,7 +141,4 @@
   m_pchReconFile = cfg_ReconFile.empty() ? NULL : strdup(cfg_ReconFile.c_str());
 
-#if NH_3D
-  m_pchScaleOffsetFile = cfg_ScaleOffsetFile.empty() ? NULL : strdup(cfg_ScaleOffsetFile.c_str());
-#endif
 
   if (!m_pchBitstreamFile)
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecCfg.h
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecCfg.h	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecCfg.h	(revision 1325)
@@ -93,8 +93,4 @@
   Bool          m_printPicOutput;                     ///< Print information on picture output
   Bool          m_printReceivedNalus;                 ///< Print information on received NAL units
-#if NH_3D
-  Char*         m_pchScaleOffsetFile;                   ///< output coded scale and offset parameters
-  Bool          m_depth420OutputFlag;                   ///< output depth layers in 4:2:0
-#endif
 
   Void xAppendToFileNameEnd( Char* pchInputFileName, const Char* pchStringToAppend, Char*& rpchOutputFileName); ///< create filenames
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecTop.cpp	(revision 1325)
@@ -93,7 +93,4 @@
   m_cvsStartFound                   = false;
 #endif
-#if NH_3D
-    m_pScaleOffsetFile              = 0;
-#endif
 }
 
@@ -139,11 +136,4 @@
     m_pchReconFile = NULL;
   }
-#if NH_3D
-  if (m_pchScaleOffsetFile)
-  {
-    free (m_pchScaleOffsetFile);
-    m_pchScaleOffsetFile = NULL;
-  }
-#endif
 }
 
@@ -401,7 +391,4 @@
   // initialize global variables
   initROM();
-#if NH_3D_DMM
-  initWedgeLists();
-#endif
 #else
   // create decoder class
@@ -444,11 +431,4 @@
   m_cTDecTop.destroy();
 #endif
-#if NH_3D
-  m_cCamParsCollector.uninit();
-  if( m_pScaleOffsetFile )
-  {
-    ::fclose( m_pScaleOffsetFile );
-  }
-#endif
 }
 
@@ -456,7 +436,4 @@
 {
 
-#if NH_3D
-  m_cCamParsCollector.setCodeScaleOffsetFile( m_pScaleOffsetFile );
-#endif
 #if NH_MV
   m_dpb.setPrintPicOutput(m_printPicOutput);
@@ -1035,10 +1012,4 @@
     xFinalizeAU ( );
 
-#if NH_3D
-  if( m_cCamParsCollector.isInitialized() )
-  {
-    m_cCamParsCollector.setSlice( 0 );
-  }
-#endif
    xFlushOutput(); 
    m_dpb.emptyAllSubDpbs();
@@ -1068,7 +1039,4 @@
     m_newVpsActivatedbyCurAu  = true; //TBD
     m_newVpsActivatedbyCurPic = true;
-#if NH_3D
-    m_dpb.setVPS( m_vps ); 
-#endif
   }
 
@@ -1192,17 +1160,4 @@
 Void TAppDecTop::xFinalizeAU()
 {
-#if NH_3D
-  if ( !m_curAu.empty())
-  {
-    for (TComList<TComPic*>::iterator it = m_curAu.begin(); it != m_curAu.end(); it++)
-    {
-      TComPic* pic = (*it);
-      if ( !pic->getHasGeneratedRefPics() )
-      {
-        pic->compressMotion(1);
-      }
-    }
-  }
-#endif
 }
 
@@ -2664,7 +2619,4 @@
       m_tDecTop[ decIdx ]->setDecodedSEIMessageOutputStream(&os);
     }
-#if NH_3D
-   m_tDecTop[ decIdx ]->setCamParsCollector( &m_cCamParsCollector );
-#endif
 
     // append pic list of new decoder to PicLists
@@ -2888,15 +2840,4 @@
   }
 
-#if NH_3D
-  if( m_pchScaleOffsetFile )
-  {
-    m_pScaleOffsetFile = ::fopen( m_pchScaleOffsetFile, "wt" );
-    if (!m_pScaleOffsetFile)
-    {
-      fprintf(stderr, "\nUnable to open file `%s' for writing decoded Camera Parameters messages\n", m_pchScaleOffsetFile);
-      exit(EXIT_FAILURE);
-    }
-  }
-#endif
 }
 
@@ -2987,9 +2928,5 @@
       conf.getWindowTopOffset()    + defDisp.getWindowTopOffset(),
       conf.getWindowBottomOffset() + defDisp.getWindowBottomOffset(),
-#if NH_3D
-      m_depth420OutputFlag && curPic->getIsDepth() ? CHROMA_420 : NUM_CHROMA_FORMAT
-#else
       NUM_CHROMA_FORMAT
-#endif
       , m_bClipOutputVideoToRec709Range);
   }
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecTop.h
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecTop.h	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppDecoder/TAppDecTop.h	(revision 1325)
@@ -117,8 +117,4 @@
 
   Bool                            m_reconOpen           [ MAX_NUM_LAYERS ]; ///< reconstruction file opened
-#if NH_3D
-  FILE*                           m_pScaleOffsetFile;
-  CamParsCollector                m_cCamParsCollector;
-#endif
 #else
   TDecTop                         m_cTDecTop;                     ///< decoder class
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1325)
@@ -73,7 +73,4 @@
 #if NH_MV
   MULTIVIEWMAIN = 6,
-#if NH_3D
-  MAIN3D = 8, 
-#endif
 #endif
   MONOCHROME_8      = 1008,
@@ -129,7 +126,4 @@
   m_targetPivotValue = NULL;
 
-#if KWU_RC_MADPRED_E0227
-  m_depthMADPred = 0;
-#endif
 }
 
@@ -194,21 +188,4 @@
       m_GOPListMvc[i] = NULL;
     }
-  }
-#endif
-#if NH_3D
-#if NH_3D_VSO
-  if (  m_pchVSOConfig != NULL)
-  {
-    free (  m_pchVSOConfig );
-  }
-#endif
-  if ( m_pchCameraParameterFile != NULL )
-  {
-    free ( m_pchCameraParameterFile ); 
-  }
-
-  if ( m_pchBaseViewCameraNumbers != NULL )
-  {
-    free ( m_pchBaseViewCameraNumbers ); 
   }
 #endif
@@ -267,7 +244,4 @@
   }
 #endif
-#if NH_3D
-  in>>entry.m_interCompPredFlag;
-#endif
 
   return in;
@@ -303,7 +277,4 @@
 #if NH_MV
   ,{"multiview-main"     , Profile::MULTIVIEWMAIN      },
-#if NH_3D
-   {"3d-main"            , Profile::MAIN3D             }
-#endif
 #endif
 
@@ -332,7 +303,4 @@
 #if NH_MV
     {"multiview-main"     , MULTIVIEWMAIN   },
-#if NH_3D
-    {"3d-main"            , MAIN3D          },
-#endif
 #endif
     {"monochrome",         MONOCHROME_8     },
@@ -774,10 +742,5 @@
   string        cfg_levels; 
   string        cfg_tiers; 
-#if NH_3D
-  cfg_dimensionLength.push_back( 2  );  // depth
-  cfg_dimensionLength.push_back( 32 );  // texture 
-#else
   cfg_dimensionLength.push_back( 64 ); 
-#endif 
 #endif
   string cfg_dQPFile;
@@ -848,16 +811,9 @@
 #if NH_MV
   ("NumberOfLayers",        m_numberOfLayers     , 1,                     "Number of layers")
-#if !NH_3D
   ("ScalabilityMask",       m_scalabilityMask    , 2                    , "Scalability Mask: 2: Multiview, 8: Auxiliary, 10: Multiview + Auxiliary")    
-#else
-  ("ScalabilityMask",       m_scalabilityMask    , 3                    , "Scalability Mask, 1: Texture 3: Texture + Depth ")    
-#endif  
   ("DimensionIdLen",        m_dimensionIdLen     , cfg_dimensionLength  , "Number of bits used to store dimensions Id")
   ("ViewOrderIndex",        m_viewOrderIndex     , std::vector<Int>(1,0), "View Order Index per layer")
   ("ViewId",                m_viewId             , std::vector<Int>(1,0), "View Id per View Order Index")
   ("AuxId",                 m_auxId              , std::vector<Int>(1,0), "AuxId per layer")
-#if NH_3D
-  ("DepthFlag",             m_depthFlag          , std::vector<Int>(1,0), "Depth Flag")
-#endif
   ("TargetEncLayerIdList",  m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded")  
   ("LayerIdInNuh",          m_layerIdInNuh        , std::vector<Int>(1,0), "LayerId in Nuh")  
@@ -1125,11 +1081,4 @@
   ( "RCForceIntraQP",                                 m_RCForceIntraQP,                                 false, "Rate control: force intra QP to be equal to initial QP" )
 
-#if KWU_RC_VIEWRC_E0227
-  ("ViewWiseTargetBits, -vtbr" ,  m_viewTargetBits,  std::vector<Int>(1, 32), "View-wise target bit-rate setting")
-  ("TargetBitAssign, -ta", m_viewWiseRateCtrl, false, "View-wise rate control on/off")
-#endif
-#if KWU_RC_MADPRED_E0227
-  ("DepthMADPred, -dm", m_depthMADPred, (UInt)0, "Depth based MAD prediction on/off")
-#endif
 #if NH_MV
 // A lot of this stuff could should actually be derived by the encoder.
@@ -1315,50 +1264,4 @@
   ("OutputVpsInfo",                                   m_outputVpsInfo,                false                     ,"Output information about the layer dependencies and layer sets")
 #endif
-#if NH_3D
-/* Camera parameters */  
-  ("Depth420OutputFlag",                              m_depth420OutputFlag,           true                     , "Output depth layers in 4:2:0 ") 
-  ("CameraParameterFile,cpf",                         m_pchCameraParameterFile,    (Char *) 0,                    "Camera Parameter File Name")
-  ("BaseViewCameraNumbers",                           m_pchBaseViewCameraNumbers,  (Char *) 0,                    "Numbers of base views")
-  ("CodedCamParsPrecision",                           m_iCodedCamParPrecision,      STD_CAM_PARAMETERS_PRECISION, "precision for coding of camera parameters (in units of 2^(-x) luma samples)" )
-
-#if NH_3D_VSO
-  /* View Synthesis Optimization */
-  ("VSOConfig",                                       m_pchVSOConfig            , (Char *) 0                    ,"VSO configuration")
-  ("VSO",                                             m_bUseVSO                 , false                         ,"Use VSO" )    
-  ("VSOMode",                                         m_uiVSOMode               , (UInt)   4                    ,"VSO Mode")
-  ("LambdaScaleVSO",                                  m_dLambdaScaleVSO         , (Double) 1                    ,"Lambda Scaling for VSO")
-  ("VSOLSTable",                                      m_bVSOLSTable             , true                          ,"Depth QP dependent video/depth rate allocation by Lagrange multiplier" )      
-  ("ForceLambdaScaleVSO",                             m_bForceLambdaScaleVSO    , false                         ,"Force using Lambda Scale VSO also in non-VSO-Mode")
-  ("AllowNegDist",                                    m_bAllowNegDist           , true                          ,"Allow negative Distortion in VSO")
-                                                                                                              
-  ("UseEstimatedVSD",                                 m_bUseEstimatedVSD        , true                          ,"Model based VSD estimation instead of rendering based for some encoder decisions" )      
-  ("VSOEarlySkip",                                    m_bVSOEarlySkip           , true                          ,"Early skip of VSO computation if synthesis error assumed to be zero" )      
-                                                                                                               
-  ("WVSO",                                            m_bUseWVSO                , true                          ,"Use depth fidelity term for VSO" )
-  ("VSOWeight",                                       m_iVSOWeight              , 10                            ,"Synthesized View Distortion Change weight" )
-  ("VSDWeight",                                       m_iVSDWeight              , 1                             ,"View Synthesis Distortion estimate weight" )
-  ("DWeight",                                         m_iDWeight                , 1                             ,"Depth Distortion weight" )
-#endif //HHI_VSO
-/* 3D- HEVC Tools */                                                            
-  ("QTL"                   ,                          m_bUseQTL                 , true                          , "Use depth quad tree limitation (encoder only)" )
-  ("IvMvPredFlag"          ,                          m_ivMvPredFlag            , BoolAry1d(2,true)             , "Inter-view motion prediction"              )
-  ("IvMvScalingFlag"       ,                          m_ivMvScalingFlag         , BoolAry1d(2,true)             , "Inter-view motion vector scaling"          )
-  ("Log2SubPbSizeMinus3"   ,                          m_log2SubPbSizeMinus3     , 0                             , "Log2 minus 3 of sub Pb size"               )
-  ("IvResPredFlag"         ,                          m_ivResPredFlag           , true                          , "Inter-view residual prediction"            )
-  ("DepthRefinementFlag"   ,                          m_depthRefinementFlag     , true                          , "Depth to refine disparity"                 )
-  ("ViewSynthesisPredFlag" ,                          m_viewSynthesisPredFlag   , true                          , "View synthesis prediction"                 )
-  ("DepthBasedBlkPartFlag" ,                          m_depthBasedBlkPartFlag   , true                          , "Depth base block partitioning"             )
-  ("MpiFlag"               ,                          m_mpiFlag                 , true                          , "Motion inheritance from texture to depth"  )
-  ("Log2MpiSubPbSizeMinus3",                          m_log2MpiSubPbSizeMinus3  , 0                             , "Log2 minus 3 of sub Pb size for MPI"       )
-  ("IntraContourFlag"      ,                          m_intraContourFlag        , true                          , "Intra contour mode"                        )
-  ("IntraWedgeFlag"        ,                          m_intraWedgeFlag          , true                          , "Intra wedge mode and segmental depth DCs"  )
-  ("IntraSdcFlag"          ,                          m_intraSdcFlag            , true                          , "Intra depth DCs"                           )
-  ("QtPredFlag"            ,                          m_qtPredFlag              , true                          , "Quad tree prediction from texture to depth")
-  ("InterSdcFlag"          ,                          m_interSdcFlag            , true                          , "Inter depth DCs"                           )
-  ("DepthIntraSkip"        ,                          m_depthIntraSkipFlag      , true                          , "Depth intra skip mode"                     )
-  ("DLT"                   ,                          m_useDLT                  , true                          , "Depth lookup table"                        )
-  ("IlluCompEnable"        ,                          m_abUseIC                 , true                          , "Enable illumination compensation"          )
-  ("IlluCompLowLatencyEnc" ,                          m_bUseLowLatencyICEnc     , false                         , "Enable low-latency illumination compensation encoding")
-#endif //NH_3D
     
   ;
@@ -1555,9 +1458,5 @@
   if( cfg_profiles.empty() )
   {
-#if NH_3D
-    cfg_profiles = string("main main 3d-main");
-#else
     cfg_profiles = string("main main multiview-main");    
-#endif
     fprintf(stderr, "\nWarning: No profiles given, using defaults: %s", cfg_profiles.c_str() );
     anyEmpty = true; 
@@ -1798,7 +1697,4 @@
   xResizeVector( m_auxId );
 
-#if NH_3D
-  xResizeVector( m_depthFlag ); 
-#endif
   xResizeVector( m_fQP ); 
 
@@ -2004,85 +1900,4 @@
   }
 
-#if NH_3D
-#if NH_3D_VSO
-  // Table base optimization 
-  // Q&D
-  Double adLambdaScaleTable[] = 
-  {  0.031250, 0.031639, 0.032029, 0.032418, 0.032808, 0.033197, 0.033586, 0.033976, 0.034365, 0.034755, 
-  0.035144, 0.035533, 0.035923, 0.036312, 0.036702, 0.037091, 0.037480, 0.037870, 0.038259, 0.038648, 
-  0.039038, 0.039427, 0.039817, 0.040206, 0.040595, 0.040985, 0.041374, 0.041764, 0.042153, 0.042542, 
-  0.042932, 0.043321, 0.043711, 0.044100, 0.044194, 0.053033, 0.061872, 0.070711, 0.079550, 0.088388, 
-  0.117851, 0.147314, 0.176777, 0.235702, 0.294628, 0.353553, 0.471405, 0.589256, 0.707107, 0.707100, 
-  0.753550, 0.800000  
-  }; 
-  if ( m_bUseVSO && m_bVSOLSTable )
-  {
-    Int firstDepthLayer = -1; 
-    for (Int layer = 0; layer < m_numberOfLayers; layer++ )
-    {
-      if ( m_depthFlag[ layer ])
-      {
-        firstDepthLayer = layer;
-        break; 
-      }
-    }
-    AOT( firstDepthLayer == -1 );
-    AOT( (m_iQP[firstDepthLayer] < 0) || (m_iQP[firstDepthLayer] > 51));
-    m_dLambdaScaleVSO *= adLambdaScaleTable[m_iQP[firstDepthLayer]]; 
-  }
-  if ( m_bUseVSO && m_uiVSOMode == 4)
-  {
-    m_cRenModStrParser.setString( m_iNumberOfViews, m_pchVSOConfig );
-    m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ), 
-      m_internalBitDepth[ CHANNEL_TYPE_LUMA],
-      (UInt)m_iCodedCamParPrecision,
-      m_FrameSkip,
-      (UInt)m_framesToBeEncoded,
-      m_pchCameraParameterFile,
-      m_pchBaseViewCameraNumbers,
-      NULL,
-      m_cRenModStrParser.getSynthViews(),
-      LOG2_DISP_PREC_LUT );
-  }
-  else if ( m_bUseVSO && m_uiVSOMode != 4 )
-  {
-    m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ), 
-      m_internalBitDepth[ CHANNEL_TYPE_LUMA],
-      (UInt)m_iCodedCamParPrecision,
-      m_FrameSkip,
-      (UInt)m_framesToBeEncoded,
-      m_pchCameraParameterFile,
-      m_pchBaseViewCameraNumbers,
-      m_pchVSOConfig,
-      NULL,
-      LOG2_DISP_PREC_LUT );
-  }
-  else
-  {
-    m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ), 
-      m_internalBitDepth[ CHANNEL_TYPE_LUMA],
-      (UInt) m_iCodedCamParPrecision,
-      m_FrameSkip,
-      (UInt) m_framesToBeEncoded,
-      m_pchCameraParameterFile,
-      m_pchBaseViewCameraNumbers,
-      NULL,
-      NULL,
-      LOG2_DISP_PREC_LUT );
-  }
-#else
-  m_cCameraData     .init     ( ((UInt) m_iNumberOfViews ), 
-    m_internalBitDepth[ CHANNEL_TYPE_LUMA],
-    (UInt) m_iCodedCamParPrecision,
-    m_FrameSkip,
-    (UInt) m_framesToBeEncoded,
-    m_pchCameraParameterFile,
-    m_pchBaseViewCameraNumbers,
-    NULL,
-    NULL,
-    LOG2_DISP_PREC_LUT );
-#endif
-  m_cCameraData.check( false, true );
-#endif
 
   // check validity of input parameters
@@ -2262,16 +2077,6 @@
   xConfirmPara( (m_layerIdInNuh.size()!=1) && (m_layerIdInNuh.size() < m_numberOfLayers) , "LayerIdInNuh must be given for all layers. ");
 
-#if NH_3D
-  xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 3, "Scalability Mask must be equal to 2 or 3. ");
-#else
   xConfirmPara( m_scalabilityMask != 2 && m_scalabilityMask != 8 && m_scalabilityMask != 10, "Scalability Mask must be equal to 2, 8 or 10");
-#endif
-
-#if NH_3D
-  if ( m_scalabilityMask & ( 1 << DEPTH_ID ) )
-  {
-    m_dimIds.push_back( m_depthFlag ); 
-  }
-#endif
+
 
   m_dimIds.push_back( m_viewOrderIndex );   
@@ -2340,5 +2145,4 @@
       xConfirmPara( allEqual , "Each layer shall have a different position in scalability space." );
 
-#if !H_3D_FCO
       if ( numDiff  == 1 ) 
       {
@@ -2351,5 +2155,4 @@
         xConfirmPara( shallBeButIsNotIncreasing,  "DimensionIds shall be increasing within one dimension. " );
       }
-#endif
     }
   }
@@ -2558,13 +2361,4 @@
   xConfirmPara(  m_maxNumMergeCand < 1,  "MaxNumMergeCand must be 1 or greater.");
   xConfirmPara(  m_maxNumMergeCand > 5,  "MaxNumMergeCand must be 5 or smaller.");
-#if NH_3D
-  xConfirmPara( m_log2SubPbSizeMinus3 < 0,                                        "Log2SubPbSizeMinus3 must be equal to 0 or greater.");
-  xConfirmPara( m_log2SubPbSizeMinus3 > 3,                                        "Log2SubPbSizeMinus3 must be equal to 3 or smaller.");
-  xConfirmPara( (1<< ( m_log2SubPbSizeMinus3 + 3) ) > m_uiMaxCUWidth,              "Log2SubPbSizeMinus3 must be  equal to log2(maxCUSize)-3 or smaller.");
- 
-  xConfirmPara( m_log2MpiSubPbSizeMinus3 < 0,                                        "Log2MpiSubPbSizeMinus3 must be equal to 0 or greater.");
-  xConfirmPara( m_log2MpiSubPbSizeMinus3 > 3,                                        "Log2MpiSubPbSizeMinus3 must be equal to 3 or smaller.");
-  xConfirmPara( (1<< (m_log2MpiSubPbSizeMinus3 + 3)) > m_uiMaxCUWidth,               "Log2MpiSubPbSizeMinus3 must be equal to log2(maxCUSize)-3 or smaller.");
-#endif
 #if ADAPTIVE_QP_SELECTION
 #if NH_MV
@@ -2629,17 +2423,4 @@
   }
 
-#if NH_3D
-  xConfirmPara( m_pchCameraParameterFile    == 0                ,   "CameraParameterFile must be given");
-  xConfirmPara( m_pchBaseViewCameraNumbers  == 0                ,   "BaseViewCameraNumbers must be given" );
-  xConfirmPara( m_iNumberOfViews != m_cCameraData.getBaseViewNumbers().size() ,   "Number of Views in BaseViewCameraNumbers must be equal to NumberOfViews" );
-  xConfirmPara    ( m_iCodedCamParPrecision < 0 || m_iCodedCamParPrecision > 5,       "CodedCamParsPrecision must be in range of 0..5" );
-#if NH_3D_VSO
-    if( m_bUseVSO )
-    {
-      xConfirmPara(   m_pchVSOConfig            == 0                             ,   "VSO Setup string must be given");
-      xConfirmPara( m_uiVSOMode > 4 ,                                                "VSO Mode must be less than 5");
-    }
-#endif
-#endif
   // max CU width and height should be power of 2
   UInt ui = m_uiMaxCUWidth;
@@ -3386,8 +3167,4 @@
   xPrintParaVector( "AuxId", m_auxId );
 #endif
-#if NH_3D
-  xPrintParaVector( "DepthLayerFlag", m_depthFlag ); 
-  printf("Coded Camera Param. Precision     : %d\n", m_iCodedCamParPrecision);  
-#endif
 #if NH_MV  
   xPrintParaVector( "QP"               , m_fQP                ); 
@@ -3556,48 +3333,8 @@
     printf("ForceIntraQP                      : %d\n", m_RCForceIntraQP );
 
-#if KWU_RC_MADPRED_E0227
-    printf("Depth based MAD prediction   : %d\n", m_depthMADPred);
-#endif
-#if KWU_RC_VIEWRC_E0227
-    printf("View-wise Rate control       : %d\n", m_viewWiseRateCtrl);
-    if(m_viewWiseRateCtrl)
-    {
-
-      printf("ViewWiseTargetBits           : ");
-      for (Int i = 0 ; i < m_iNumberOfViews ; i++)
-        printf("%d ", m_viewTargetBits[i]);
-      printf("\n");
-    }
-    else
-    {
-      printf("TargetBitrate                : %d\n", m_RCTargetBitrate );
-    }
-#endif
 
   }
 
   printf("Max Num Merge Candidates          : %d\n", m_maxNumMergeCand);
-#if NH_3D
-  printf("BaseViewCameraNumbers             : %s\n", m_pchBaseViewCameraNumbers ); 
-  printf("Coded Camera Param. Precision     : %d\n", m_iCodedCamParPrecision);
-#if NH_3D_VSO
-  printf("Force use of Lambda Scale         : %d\n", m_bForceLambdaScaleVSO );
-
-  if ( m_bUseVSO )
-  {    
-    printf("VSO Lambda Scale                  : %5.2f\n", m_dLambdaScaleVSO );
-    printf("VSO Mode                          : %d\n",    m_uiVSOMode       );
-    printf("VSO Config                        : %s\n",    m_pchVSOConfig    );
-    printf("VSO Negative Distortion           : %d\n",    m_bAllowNegDist ? 1 : 0);
-    printf("VSO LS Table                      : %d\n",    m_bVSOLSTable ? 1 : 0);
-    printf("VSO Estimated VSD                 : %d\n",    m_bUseEstimatedVSD ? 1 : 0);
-    printf("VSO Early Skip                    : %d\n",    m_bVSOEarlySkip ? 1 : 0);   
-    if ( m_bUseWVSO )
-    {
-      printf("Dist. Weights (VSO/VSD/SAD)       : %d/%d/%d\n ", m_iVSOWeight, m_iVSDWeight, m_iDWeight );    
-    }    
-  }
-#endif //HHI_VSO
-#endif //NH_3D
   printf("\n");
 #if NH_MV
@@ -3661,32 +3398,4 @@
   printf(" SignBitHidingFlag:%d ", m_signHideFlag);
   printf("RecalQP:%d", m_recalculateQPAccordingToLambda ? 1 : 0 );
-#if NH_3D_VSO
-  printf(" VSO:%d ", m_bUseVSO   );
-  printf("WVSO:%d ", m_bUseWVSO );  
-#endif
-#if NH_3D
-  printf( "QTL:%d "                  , m_bUseQTL);
-  printf( "IlluCompEnable:%d "       , m_abUseIC);
-  printf( "IlluCompLowLatencyEnc:%d ",  m_bUseLowLatencyICEnc);
-  printf( "DLT:%d ", m_useDLT );
-
-
-  printf( "IvMvPred:%d %d "            , m_ivMvPredFlag[0] ? 1 : 0, m_ivMvPredFlag[1]  ? 1 : 0);
-  printf( "IvMvScaling:%d %d "         , m_ivMvScalingFlag[0] ? 1 : 0 , m_ivMvScalingFlag[1]  ? 1 : 0);
-
-  printf( "Log2SubPbSizeMinus3:%d "    , m_log2SubPbSizeMinus3            );
-  printf( "IvResPred:%d "              , m_ivResPredFlag          ? 1 : 0 );
-  printf( "DepthRefinement:%d "        , m_depthRefinementFlag    ? 1 : 0 );
-  printf( "ViewSynthesisPred:%d "      , m_viewSynthesisPredFlag  ? 1 : 0 );
-  printf( "DepthBasedBlkPart:%d "      , m_depthBasedBlkPartFlag  ? 1 : 0 );
-  printf( "Mpi:%d "                    , m_mpiFlag                ? 1 : 0 );
-  printf( "Log2MpiSubPbSizeMinus3:%d " , m_log2MpiSubPbSizeMinus3         );
-  printf( "IntraContour:%d "           , m_intraContourFlag       ? 1 : 0 );
-  printf( "IntraWedge:%d "             , m_intraWedgeFlag         ? 1 : 0 );
-  printf( "IntraSdc:%d "               , m_intraSdcFlag           ? 1 : 0 );
-  printf( "QtPred:%d "                 , m_qtPredFlag             ? 1 : 0 );
-  printf( "InterSdc:%d "               , m_interSdcFlag           ? 1 : 0 );
-  printf( "DepthIntraSkip:%d "         , m_depthIntraSkipFlag     ? 1 : 0 );
-#endif
 
   printf("\n\n");
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.h	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncCfg.h	(revision 1325)
@@ -44,9 +44,4 @@
 #include <sstream>
 #include <vector>
-#if NH_3D
-#include "TAppCommon/TAppComCamPara.h"
-#include "TLibRenderer/TRenModel.h"
-#include "TLibRenderer/TRenModSetupStrParser.h"
-#endif
 //! \ingroup TAppEncoder
 //! \{
@@ -80,7 +75,4 @@
   std::vector<Int>       m_viewOrderIndex;                    ///< view order index  
   std::vector<Int>       m_auxId;                             ///< auxiliary id
-#if NH_3D
-  std::vector<Int>       m_depthFlag;                         ///< depth flag
-#endif
   std::vector<Int>       m_targetEncLayerIdList;              ///< layer Ids in Nuh to be encoded
   std::vector<Int>       m_layerIdInNuh;                      ///< layer Id in Nuh for each layer 
@@ -133,8 +125,4 @@
 
 
-#if NH_3D
-  Bool      m_abUseIC;
-  Bool      m_bUseLowLatencyICEnc;
-#endif
 
 #endif
@@ -452,11 +440,4 @@
   Bool      m_RCForceIntraQP;                     ///< force all intra picture to use initial QP or not
   
-#if KWU_RC_VIEWRC_E0227
-  vector<Int>     m_viewTargetBits;
-  Bool      m_viewWiseRateCtrl;                              ///< Flag for using view-wise rate control
-#endif
-#if KWU_RC_MADPRED_E0227
-  UInt       m_depthMADPred;
-#endif
 
 ScalingListMode m_useScalingListId;                         ///< using quantization matrix
@@ -518,55 +499,4 @@
   Bool              m_outputVpsInfo;
 #endif
-#if NH_3D
-  // Output Format
-  Bool      m_depth420OutputFlag;                             ///< Output depth layers in 4:2:0 format
-  // Camera parameters
-  Char*     m_pchCameraParameterFile;                         ///< camera parameter file
-  Char*     m_pchBaseViewCameraNumbers;
-  TAppComCamPara m_cCameraData;
-  Int       m_iCodedCamParPrecision;                          ///< precision for coding of camera parameters
-#if NH_3D_VSO
-  Char*     m_pchVSOConfig;
-  Bool      m_bUseVSO;                                        ///< flag for using View Synthesis Optimization
-  Bool      m_bVSOLSTable;                                    ///< Depth QP dependent Lagrange parameter optimization (m23714)
-  Bool      m_bVSOEarlySkip;                                  ///< Early skip of VSO computation (JCT3V-A0093 modification 4)
-                                                              
-  //// Used for development by GT, might be removed later     
-  Double    m_dLambdaScaleVSO;                                ///< Scaling factor for Lambda in VSO mode
-  Bool      m_bForceLambdaScaleVSO;                           ///< Use Lambda Scale for depth even if VSO is turned off
-  Bool      m_bAllowNegDist;                                  ///< Allow negative distortion in VSO
-  UInt      m_uiVSOMode;                                      ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full  
-                                                              
-  // SAIT_VSO_EST_A0033                                       
-  Bool      m_bUseEstimatedVSD;                               ///< Flag for using model based VSD estimation instead of VSO for some encoder decisions (JCT3V-A0033 modification 3)  
-                                                              
-  // LGE_WVSO_A0119                                           
-  Bool      m_bUseWVSO;                                       ///< flag for using View Synthesis Optimization  
-  Int       m_iVSOWeight;
-  Int       m_iVSDWeight;
-  Int       m_iDWeight;
-
-  // Ren Model String
-  TRenModSetupStrParser       m_cRenModStrParser;
-#endif
-
-  Bool       m_useDLT;                                        ///< flag for using DLT
-  Bool       m_bUseQTL;                                        ///< flag for using depth QuadTree Limitation
-  BoolAry1d  m_ivMvPredFlag;
-  BoolAry1d  m_ivMvScalingFlag;
-  Int        m_log2SubPbSizeMinus3;
-  Bool       m_ivResPredFlag;
-  Bool       m_depthRefinementFlag;
-  Bool       m_viewSynthesisPredFlag;
-  Bool       m_depthBasedBlkPartFlag;
-  Bool       m_mpiFlag;
-  Int        m_log2MpiSubPbSizeMinus3;
-  Bool       m_intraContourFlag;
-  Bool       m_intraWedgeFlag;
-  Bool       m_intraSdcFlag;
-  Bool       m_qtPredFlag;
-  Bool       m_interSdcFlag;
-  Bool       m_depthIntraSkipFlag; 
-#endif
   // internal member functions
   Void  xCheckParameter ();                                   ///< check validity of configuration values
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1325)
@@ -87,11 +87,5 @@
 #endif
   
-#if NH_3D
-  vps.createCamPars(m_iNumberOfViews);  
-#endif
-
-#if NH_3D_DLT
-  TComDLT dlt = TComDLT();
-#endif
+
 
 #if NH_MV
@@ -145,11 +139,4 @@
   xSetDpbSize              ( vps ); 
   xSetVPSVUI               ( vps ); 
-#if NH_3D
-  xSetCamPara              ( vps ); 
-  m_ivPicLists.setVPS      ( &vps );
-#endif
-#if NH_3D_DLT
-  xDeriveDltArray          ( vps, &dlt );
-#endif
   if ( m_targetEncLayerIdList.size() == 0 )
   {
@@ -182,30 +169,4 @@
   }
 
-#if NH_3D
-  // Set 3d tool parameters
-  for (Int d = 0; d < 2; d++)
-  {  
-    m_sps3dExtension.setIvMvPredFlag          ( d, m_ivMvPredFlag[d]       );
-    m_sps3dExtension.setIvMvScalingFlag       ( d, m_ivMvScalingFlag[d]    );
-    if (d == 0 )
-    {    
-      m_sps3dExtension.setLog2SubPbSizeMinus3   ( d, m_log2SubPbSizeMinus3   );
-      m_sps3dExtension.setIvResPredFlag         ( d, m_ivResPredFlag         );
-      m_sps3dExtension.setDepthRefinementFlag   ( d, m_depthRefinementFlag   );
-      m_sps3dExtension.setViewSynthesisPredFlag ( d, m_viewSynthesisPredFlag );
-      m_sps3dExtension.setDepthBasedBlkPartFlag ( d, m_depthBasedBlkPartFlag );
-    }
-    else
-    {    
-      m_sps3dExtension.setMpiFlag               ( d, m_mpiFlag               );
-      m_sps3dExtension.setLog2MpiSubPbSizeMinus3( d, m_log2MpiSubPbSizeMinus3);
-      m_sps3dExtension.setIntraContourFlag      ( d, m_intraContourFlag      );
-      m_sps3dExtension.setIntraSdcWedgeFlag     ( d, m_intraSdcFlag || m_intraWedgeFlag     );
-      m_sps3dExtension.setQtPredFlag            ( d, m_qtPredFlag            );
-      m_sps3dExtension.setInterSdcFlag          ( d, m_interSdcFlag          );
-      m_sps3dExtension.setDepthIntraSkipFlag    ( d, m_depthIntraSkipFlag    );  
-    }
-  }
-#endif
 
 
@@ -217,41 +178,4 @@
     m_acTVideoIOYuvInputFileList.push_back(new TVideoIOYuv);
     m_acTVideoIOYuvReconFileList.push_back(new TVideoIOYuv);
-#if NH_3D    
-    Int profileIdc = -1; 
-    for (Int olsIdx = 0; olsIdx < vps.getNumOutputLayerSets(); olsIdx++ )
-    {   
-      Int lsIdx = vps.olsIdxToLsIdx( olsIdx );
-      for(Int i = 0; i < vps.getNumLayersInIdList( lsIdx ); i++ )
-      {
-        if( vps.getLayerIdInNuh( layerIdInVps) == vps.getLayerSetLayerIdList(lsIdx, i) )
-        {
-          Int ptlIdx = vps.getProfileTierLevelIdx( olsIdx, i );
-          if ( ptlIdx != -1 )
-          {
-            Int curProfileIdc = vps.getPTL(ptlIdx)->getGeneralPTL()->getProfileIdc(); 
-            if (profileIdc == -1)   
-            {
-              profileIdc = curProfileIdc; 
-            }
-            else
-            {   
-              if ( profileIdc != curProfileIdc )
-              {              
-                fprintf(stderr, "Error: ProfileIdc for layer with index %d in VPS not equal in all OLSs. \n", layerIdInVps );
-                exit(EXIT_FAILURE);
-              }
-            }
-          }
-        }
-      }
-    }
-
-    if (profileIdc == -1 )
-    {
-      fprintf(stderr, "Error: No profile given for layer with index %d in VPS not equal in all OLS. \n", layerIdInVps );
-      exit(EXIT_FAILURE);
-    }
-    m_acTEncTopList[ layerIdInVps ]->setProfileIdc( profileIdc ); 
-#endif
   }
 
@@ -276,39 +200,4 @@
     m_cTEncTop.setViewId                       ( vps.getViewId      (  layerId ) );
     m_cTEncTop.setViewIndex                    ( vps.getViewIndex   (  layerId ) );
-#if NH_3D
-    Bool isDepth = ( vps.getDepthId     ( layerId ) != 0 ) ;
-    m_cTEncTop.setIsDepth                      ( isDepth );
-    //====== Camera Parameters =========
-    m_cTEncTop.setCameraParameters             ( &m_cCameraData );     
-#if NH_3D_VSO
-    //====== VSO =========
-    m_cTEncTop.setRenderModelParameters        ( &m_cRenModStrParser ); 
-    m_cTEncTop.setForceLambdaScaleVSO          ( isDepth ? m_bForceLambdaScaleVSO : false );
-    m_cTEncTop.setLambdaScaleVSO               ( isDepth ? m_dLambdaScaleVSO      : 1     );
-    m_cTEncTop.setVSOMode                      ( isDepth ? m_uiVSOMode            : 0     );
-
-    m_cTEncTop.setAllowNegDist                 ( isDepth ? m_bAllowNegDist        : false );
-
-    // SAIT_VSO_EST_A0033
-    m_cTEncTop.setUseEstimatedVSD              ( isDepth ? m_bUseEstimatedVSD     : false );
-
-    // LGE_WVSO_A0119
-    m_cTEncTop.setUseWVSO                      ( isDepth ? m_bUseWVSO             : false );   
-    m_cTEncTop.setVSOWeight                    ( isDepth ? m_iVSOWeight           : 0     );
-    m_cTEncTop.setVSDWeight                    ( isDepth ? m_iVSDWeight           : 0     );
-    m_cTEncTop.setDWeight                      ( isDepth ? m_iDWeight             : 0     );
-#endif // H_3D_VSO
-#if NH_3D_IC
-    m_cTEncTop.setUseIC                        ( vps.getViewIndex( layerId ) == 0 || isDepth ? false : m_abUseIC );
-    m_cTEncTop.setUseICLowLatencyEnc           ( m_bUseLowLatencyICEnc );
-#endif
-
-    
-    m_cTEncTop.setUseDMM                       ( isDepth ? m_intraWedgeFlag   : false );
-    m_cTEncTop.setUseSDC                       ( isDepth ? m_intraSdcFlag     : false );
-    m_cTEncTop.setUseDLT                       ( isDepth ? m_useDLT   : false );
-    m_cTEncTop.setUseQTL                       ( isDepth ? m_bUseQTL  : false );
-    m_cTEncTop.setSps3dExtension               ( m_sps3dExtension );
-#endif // NH_3D
 
     m_cTEncTop.setIvPicLists                   ( &m_ivPicLists ); 
@@ -316,7 +205,4 @@
   m_cTEncTop.setVPS(&vps);
 
-#if NH_3D_DLT
-  m_cTEncTop.setDLT(dlt);
-#endif
 
 #if NH_MV
@@ -425,9 +311,5 @@
   m_cTEncTop.setChromaCrQpOffset                                  ( m_crQpOffset  );
 
-#if NH_3D
-  m_cTEncTop.setChromaFormatIdc                                   ( isDepth ? CHROMA_400 : m_chromaFormatIDC );
-#else
   m_cTEncTop.setChromaFormatIdc                                   ( m_chromaFormatIDC  );
-#endif
 
 #if ADAPTIVE_QP_SELECTION
@@ -643,19 +525,6 @@
   m_cTEncTop.setScalingListFile                                   ( m_scalingListFile   );
   m_cTEncTop.setSignHideFlag                                      ( m_signHideFlag);
-#if KWU_RC_VIEWRC_E0227 || KWU_RC_MADPRED_E0227
-  if(!m_cTEncTop.getIsDepth())    //only for texture
-  {
-    m_cTEncTop.setUseRateCtrl                                     ( m_RCEnableRateControl );
-  }                                                          
-  else                                                       
-  {                                                          
-    m_cTEncTop.setUseRateCtrl                                     ( 0 );
-  }
-#else
   m_cTEncTop.setUseRateCtrl                                       ( m_RCEnableRateControl );
-#endif
-#if !KWU_RC_VIEWRC_E0227
   m_cTEncTop.setTargetBitrate                                     ( m_RCTargetBitrate );
-#endif
   m_cTEncTop.setKeepHierBit                                       ( m_RCKeepHierarchicalBit );
   m_cTEncTop.setLCULevelRC                                        ( m_RCLCULevelRC );
@@ -663,71 +532,4 @@
   m_cTEncTop.setInitialQP                                         ( m_RCInitialQP );
   m_cTEncTop.setForceIntraQP                                      ( m_RCForceIntraQP );
-#if KWU_RC_MADPRED_E0227
-  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
-  {
-    m_cTEncTop.setUseDepthMADPred(layerIdInVps ? m_depthMADPred       : 0);
-    if(m_cTEncTop.getUseDepthMADPred())
-    {
-      m_cTEncTop.setCamParam(&m_cCameraData);
-    }
-  }
-#endif
-#if KWU_RC_VIEWRC_E0227
-  if(m_cTEncTop.getUseRateCtrl() && !m_cTEncTop.getIsDepth())
-  {
-    m_cTEncTop.setUseViewWiseRateCtrl(m_viewWiseRateCtrl);
-    if(m_iNumberOfViews == 1)
-    {
-      if(m_viewWiseRateCtrl)
-      {
-        m_cTEncTop.setTargetBitrate(m_viewTargetBits[layerIdInVps>>1]);
-      }
-      else
-      {
-        m_cTEncTop.setTargetBitrate       ( m_RCTargetBitrate );
-      }
-    }
-    else
-    {
-      if(m_viewWiseRateCtrl)
-      {
-        m_cTEncTop.setTargetBitrate(m_viewTargetBits[layerIdInVps>>1]);
-      }
-      else
-      {
-        if(m_iNumberOfViews == 2)
-        {
-          if(m_cTEncTop.getViewId() == 0)
-          {
-            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*80)/100 );
-          }
-          else if(m_cTEncTop.getViewId() == 1)
-          {
-            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*20)/100 );
-          }
-        }
-        else if(m_iNumberOfViews == 3)
-        {
-          if(m_cTEncTop.getViewId() == 0)
-          {
-            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*66)/100 );
-          }
-          else if(m_cTEncTop.getViewId() == 1)
-          {
-            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*17)/100 );
-          }
-          else if(m_cTEncTop.getViewId() == 2)
-          {
-            m_cTEncTop.setTargetBitrate              ( (m_RCTargetBitrate*17)/100 );
-          }
-        }
-        else
-        {
-          m_cTEncTop.setTargetBitrate              ( m_RCTargetBitrate );
-        }
-      }
-    }
-  }
-#endif
   m_cTEncTop.setTransquantBypassEnableFlag                        ( m_TransquantBypassEnableFlag );
   m_cTEncTop.setCUTransquantBypassFlagForceValue                  ( m_CUTransquantBypassFlagForce );
@@ -776,41 +578,4 @@
   }
 #endif
-#if NH_3D_VSO
-  if ( m_bUseVSO )
-  {
-    if ( m_uiVSOMode == 4 )
-    {
-#if H_3D_VSO_EARLY_SKIP
-      m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0, m_bVSOEarlySkip );
-#else
-      m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0 );
-#endif
-      for ( Int layer = 0; layer < m_numberOfLayers ; layer++ )
-      {
-        TEncTop* pcEncTop =  m_acTEncTopList[ layer ]; 
-        Int iViewNum      = pcEncTop->getViewIndex(); 
-        Int iContent      = pcEncTop->getIsDepth() ? 1 : 0; 
-        Int iNumOfModels  = m_cRenModStrParser.getNumOfModelsForView(iViewNum, iContent);
-
-        Bool bUseVSO      = (iNumOfModels != 0);
-
-        pcEncTop->setUseVSO( bUseVSO );
-        pcEncTop->getRdCost()->setRenModel( bUseVSO ? &m_cRendererModel : NULL );
-
-        for (Int iCurModel = 0; iCurModel < iNumOfModels; iCurModel++ )
-        {
-          Int iModelNum; Int iLeftViewNum; Int iRightViewNum; Int iDump; Int iOrgRefNum; Int iBlendMode;
-
-          m_cRenModStrParser.getSingleModelData  ( iViewNum, iContent, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ;
-          m_cRendererModel  .createSingleModel   ( iViewNum, iContent, iModelNum, iLeftViewNum, iRightViewNum, (iOrgRefNum != -1), iBlendMode );
-        }            
-      }
-    }
-    else
-    {
-      AOT(true);
-    }
-  }
-#endif
 }
 
@@ -820,7 +585,4 @@
   // initialize global variables
   initROM();
-#if NH_3D_DMM
-  initWedgeLists( true );
-#endif
 
   for( Int layer=0; layer < m_numberOfLayers; layer++)
@@ -886,9 +648,5 @@
   for(Int layer=0; layer<m_numberOfLayers; layer++)
   {
-#if KWU_RC_MADPRED_E0227
-    m_acTEncTopList[layer]->init( isFieldCoding, this );
-#else
     m_acTEncTopList[layer]->init( isFieldCoding );
-#endif
   }
 #else
@@ -918,7 +676,5 @@
   }
 
-#if !NH_3D
   TComPicYuv*       pcPicYuvOrg = new TComPicYuv;
-#endif
   TComPicYuv*       pcPicYuvRec = NULL;
 
@@ -954,14 +710,4 @@
   list<AccessUnit> outputAccessUnits; ///< list of access units to write out.  is populated by the encoding process
   
-#if NH_3D
-  TComPicYuv* picYuvOrg[2]; 
-  TComPicYuv  picYuvTrueOrg[2]; 
-  for (Int d = 0; d < 2 ; d++)
-  {
-    picYuvOrg[d] = new TComPicYuv;
-    picYuvOrg[d]   ->create( m_iSourceWidth, m_isField ? m_iSourceHeightOrg : m_iSourceHeight, ( d > 0 ) ? CHROMA_400 : m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true );
-    picYuvTrueOrg[d].create( m_iSourceWidth, m_isField ? m_iSourceHeightOrg : m_iSourceHeight, ( d > 0 ) ? CHROMA_400 : m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true );
-  }
-#else
   TComPicYuv cPicYuvTrueOrg;
 
@@ -977,5 +723,4 @@
     cPicYuvTrueOrg.create(m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true );
   }
-#endif
 #if NH_MV
   while ( (m_targetEncLayerIdList.size() != 0 ) && !allEos )
@@ -983,8 +728,4 @@
     for(Int layer=0; layer < m_numberOfLayers; layer++ )
     {
-#if NH_3D
-      TComPicYuv* pcPicYuvOrg    =  picYuvOrg    [ m_depthFlag[layer] ];
-      TComPicYuv& cPicYuvTrueOrg =  picYuvTrueOrg[ m_depthFlag[layer] ];
-#endif
       if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) ))
       {
@@ -1022,17 +763,6 @@
     for ( Int gopId=0; gopId < gopSize; gopId++ )
     {
-#if NH_3D
-      UInt iNextPoc = m_acTEncTopList[0] -> getFrameId( gopId );
-      if ( iNextPoc < m_framesToBeEncoded )
-      {
-        m_cCameraData.update( iNextPoc );
-      }
-#endif
       for(Int layer=0; layer < m_numberOfLayers; layer++ )
       {
-#if NH_3D
-        TComPicYuv* pcPicYuvOrg    =  picYuvOrg    [ m_depthFlag[layer] ];
-        TComPicYuv& cPicYuvTrueOrg =  picYuvTrueOrg[ m_depthFlag[layer] ];
-#endif
         if (!xLayerIdInTargetEncLayerIdList( m_vps->getLayerIdInNuh( layer ) ))
         {
@@ -1040,11 +770,4 @@
         }
 
-#if NH_3D_VSO        
-          if( m_bUseVSO && m_bUseEstimatedVSD && iNextPoc < m_framesToBeEncoded )
-          {
-            m_cCameraData.setDispCoeff( iNextPoc, m_acTEncTopList[layer]->getViewIndex() );
-            m_acTEncTopList[layer]  ->setDispCoeff( m_cCameraData.getDispCoeff() );
-          }
-#endif
 
         Int   iNumEncoded = 0;
@@ -1113,20 +836,8 @@
 #endif
 
-#if NH_3D
-  // delete original YUV buffer
-  for (Int d = 0; d < 2; d++)
-  {
-    picYuvOrg[d]->destroy();
-    delete picYuvOrg[d];
-    picYuvOrg[d] = NULL;
-
-    picYuvTrueOrg[d].destroy();
-  }
-#else
   // delete original YUV buffer
   pcPicYuvOrg->destroy();
   delete pcPicYuvOrg;
   pcPicYuvOrg = NULL;
-#endif
 
 #if !NH_MV
@@ -1134,7 +845,5 @@
   m_cTEncTop.deletePicBuffer();
 #endif
-#if !NH_3D
   cPicYuvTrueOrg.destroy();
-#endif
 
   // delete buffers & classes
@@ -1144,12 +853,4 @@
   printRateSummary();
 
-#if H_3D_REN_MAX_DEV_OUT
-  Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation(); 
-
-  if ( !(dMaxDispDiff < 0) )
-  {  
-    printf("\n Max. possible shift error: %12.3f samples.\n", dMaxDispDiff );
-  }
-#endif
 
   return;
@@ -1188,9 +889,5 @@
   {
     rpcPicYuvRec = new TComPicYuv;
-#if NH_3D
-    rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_depthFlag[layer] > 0 ? CHROMA_400 : m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true );
-#else
     rpcPicYuvRec->create( m_iSourceWidth, m_iSourceHeight, m_chromaFormatIDC, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, true );
-#endif
 
   }
@@ -1270,9 +967,5 @@
       if (m_pchReconFileList[layerIdx])
       {
-#if NH_3D
-        m_acTVideoIOYuvReconFileList[layerIdx]->write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_depth420OutputFlag && m_depthFlag[layerIdx ] ? CHROMA_420 : NUM_CHROMA_FORMAT, m_isTopFieldFirst );
-#else
         m_acTVideoIOYuvReconFileList[layerIdx]->write( pcPicYuvRecTop, pcPicYuvRecBottom, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, NUM_CHROMA_FORMAT, m_isTopFieldFirst );
-#endif
       }
     }
@@ -1327,9 +1020,5 @@
       if (m_pchReconFileList[layerIdx])
       {
-#if NH_3D
-        m_acTVideoIOYuvReconFileList[layerIdx]->write( pcPicYuvRec, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom, m_depth420OutputFlag && m_depthFlag[layerIdx ] ? CHROMA_420 : NUM_CHROMA_FORMAT  );
-#else
         m_acTVideoIOYuvReconFileList[layerIdx]->write( pcPicYuvRec, ipCSC, m_confWinLeft, m_confWinRight, m_confWinTop, m_confWinBottom );
-#endif
 
       }    
@@ -1456,75 +1145,4 @@
 }
 
-#if NH_3D_DLT
-Void TAppEncTop::xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt)
-{
-  TComPicYuv*       pcDepthPicYuvOrg = new TComPicYuv;
-  TComPicYuv*       pcDepthPicYuvTrueOrg = new TComPicYuv;
-  // allocate original YUV buffer
-  pcDepthPicYuvOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, false );
-  pcDepthPicYuvTrueOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, m_uiMaxCUWidth, m_uiMaxCUHeight, m_uiMaxTotalCUDepth, false );
-  
-  TVideoIOYuv* depthVideoFile = new TVideoIOYuv;
-  
-  UInt uiMaxDepthValue = ((1 << m_inputBitDepth[CHANNEL_TYPE_LUMA])-1);
-  
-  std::vector<Bool> abValidDepths(256, false);
-  
-  depthVideoFile->open( m_pchInputFileList[layer], false, m_inputBitDepth, m_MSBExtendedBitDepth, m_internalBitDepth );
-  
-  Int iHeight   = pcDepthPicYuvOrg->getHeight(COMPONENT_Y);
-  Int iWidth    = pcDepthPicYuvOrg->getWidth(COMPONENT_Y);
-  Int iStride   = pcDepthPicYuvOrg->getStride(COMPONENT_Y);
-  
-  Pel* pInDM    = pcDepthPicYuvOrg->getAddr(COMPONENT_Y);
-  
-  for(Int uiFrame=0; uiFrame < uiNumFrames; uiFrame++ )
-  {
-    depthVideoFile->read( pcDepthPicYuvOrg, pcDepthPicYuvTrueOrg, IPCOLOURSPACE_UNCHANGED, m_aiPad, m_InputChromaFormatIDC, m_bClipInputVideoToRec709Range );
-    
-    // check all pixel values
-    for (Int i=0; i<iHeight; i++)
-    {
-      Int rowOffset = i*iStride;
-      
-      for (Int j=0; j<iWidth; j++)
-      {
-        Pel depthValue = pInDM[rowOffset+j];
-        abValidDepths[depthValue] = true;
-      }
-    }
-  }
-  
-  depthVideoFile->close();
-  delete depthVideoFile; 
-  
-  pcDepthPicYuvOrg->destroy();
-  delete pcDepthPicYuvOrg;
-  pcDepthPicYuvTrueOrg->destroy();
-  delete pcDepthPicYuvTrueOrg;
-  
-  // convert boolean array to idx2Depth LUT
-  std::vector<Int> aiIdx2DepthValue(256, 0);
-  Int iNumDepthValues = 0;
-  for(Int p=0; p<=uiMaxDepthValue; p++)
-  {
-    if( abValidDepths[p] == true)
-    {
-      aiIdx2DepthValue[iNumDepthValues++] = p;
-    }
-  }
-  
-  if( uiNumFrames == 0 || gCeilLog2(iNumDepthValues) == m_inputBitDepth[CHANNEL_TYPE_LUMA] )
-  {
-    dlt->setUseDLTFlag(layer, false);
-  }
-  
-  // assign LUT
-  if( dlt->getUseDLTFlag(layer) )
-  {
-    dlt->setDepthLUTs(layer, aiIdx2DepthValue, iNumDepthValues);
-  }
-}
-#endif
 
 #if NH_MV
@@ -1556,7 +1174,4 @@
 
 
-#if NH_3D
-  vps.initViewCompLayer( ); 
-#endif
 }
 
@@ -1635,10 +1250,4 @@
       Int curLayerIdInNuh = vps.getLayerIdInNuh( curLayerIdInVps );      
       Int maxTid = -1; 
-#if NH_3D
-      if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) )
-      {
-        if ( m_depthFlag[ curLayerIdInVps] == m_depthFlag[ refLayerIdInVps ] )
-        {
-#endif
           for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
           {        
@@ -1647,9 +1256,5 @@
             for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++)
             {
-#if NH_3D
-              if ( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[ j ] ) == refLayerIdInNuh )
-#else
               if ( vps.getIdDirectRefLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[ j ] ) == refLayerIdInNuh )
-#endif
               {
                 Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
@@ -1658,50 +1263,4 @@
             }
           }              
-#if NH_3D
-        }
-        else
-        {        
-          if( m_depthFlag[ curLayerIdInVps ] && ( m_mpiFlag|| m_qtPredFlag || m_intraContourFlag ) ) 
-          {          
-            Int nuhLayerIdTex = vps.getLayerIdInNuh( vps.getViewIndex( curLayerIdInNuh ), false ); 
-            if ( nuhLayerIdTex == refLayerIdInNuh )
-            {
-              for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
-              {        
-                GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-                GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-                if ( geCur.m_interCompPredFlag )
-                {
-                  Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
-                  maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId ); 
-                }
-              }
-            }
-          }
-          if( !m_depthFlag[ curLayerIdInVps ] && vps.getNumRefListLayers( curLayerIdInNuh) > 0  && ( m_depthRefinementFlag || m_viewSynthesisPredFlag || m_depthBasedBlkPartFlag ) ) 
-          {             
-            for( Int i = 0; i < ( getGOPSize() + 1); i++ ) 
-            {        
-              GOPEntry geCur =  m_GOPListMvc[curLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-              GOPEntry geRef =  m_GOPListMvc[refLayerIdInVps][( i < getGOPSize()  ? i : MAX_GOP )];
-
-              if ( geCur.m_interCompPredFlag )
-              {
-                for (Int j = 0; j < geCur.m_numActiveRefLayerPics; j++ )
-                {
-                  Int nuhLayerIdDep = vps.getLayerIdInNuh( vps.getViewIndex( vps.getIdRefListLayer( curLayerIdInNuh, geCur.m_interLayerPredLayerIdc[j] ) ), true ); 
-                  if ( nuhLayerIdDep == refLayerIdInNuh )
-                  {
-                    Bool refLayerZero   = ( i == getGOPSize() ) && ( refLayerIdInVps == 0 );
-                    maxTid = std::max( maxTid, refLayerZero ? 0 : geRef.m_temporalId ); 
-                  }
-                }
-              }
-            }
-          }        
-        }
-      } // if ( vps.getDirectDependencyFlag( curLayerIdInVps, refLayerIdInVps ) ) 
-      vps.setMaxTidIlRefPicsPlus1( refLayerIdInVps, curLayerIdInVps, maxTid + 1 );
-#endif
     }  // Loop curLayerIdInVps
   } // Loop refLayerIdInVps
@@ -1752,13 +1311,7 @@
       
       // check if all reference layers when allRefLayerActiveFlag is equal to 1 are reference layer pictures specified in the gop entry
-#if NH_3D
-      for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ) && allRefLayersActiveFlag; k++ )
-      {
-        Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdRefListLayer( layerIdInNuh , k ) ); 
-#else
       for (Int k = 0; k < vps.getNumDirectRefLayers( layerIdInNuh ) && allRefLayersActiveFlag; k++ )
       {
         Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh , k ) ); 
-#endif
         if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
         {
@@ -1778,13 +1331,7 @@
       {   
         Bool referenceLayerFoundFlag = false; 
-#if NH_3D
-        for (Int k = 0; k < vps.getNumRefListLayers( layerIdInNuh ); k++ )
-        {
-          Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdRefListLayer( layerIdInNuh, k) );
-#else
         for (Int k = 0; k < vps.getNumDirectRefLayers( layerIdInNuh ); k++ )
         {
           Int refLayerIdInVps = vps.getLayerIdInVps( vps.getIdDirectRefLayer( layerIdInNuh, k) );
-#endif
           if ( vps.getSubLayersVpsMaxMinus1(refLayerIdInVps) >= tId  && ( tId == 0 || vps.getMaxTidIlRefPicsPlus1(refLayerIdInVps,layerIdInVps) > tId )  )
           {          
@@ -1915,7 +1462,4 @@
     break; 
   case Profile::MULTIVIEWMAIN:
-#if NH_3D
-  case Profile::MAIN3D:
-#endif
     ptl->setMax12bitConstraintFlag      ( true  ); 
     ptl->setMax12bitConstraintFlag      ( true  );
@@ -1939,11 +1483,4 @@
 
   Bool anyDepth = false; 
-#if NH_3D
-  for ( Int i = 0; i < m_numberOfLayers; i++ )
-  {
-    vps.setVpsRepFormatIdx( i, m_depthFlag[ i ] ? 1 : 0 );
-    anyDepth = anyDepth || m_depthFlag[ i ];
-  }
-#endif
 
   vps.setRepFormatIdxPresentFlag( anyDepth ); 
@@ -2350,38 +1887,4 @@
 }
 
-#if NH_3D
-Void TAppEncTop::xSetCamPara                ( TComVPS& vps )
-{
-  vps.setCpPrecision( m_cCameraData.getCamParsCodedPrecision()); 
-
-  for ( Int n = 1; n < vps.getNumViews(); n++ )
-  {  
-    Int i      = vps.getViewOIdxList( n ); 
-    Int iInVps = vps.getVoiInVps    ( i ); 
-    vps.setNumCp( iInVps,  n);   
-
-    if ( vps.getNumCp( iInVps ) > 0 )
-    {
-      vps.setCpInSliceSegmentHeaderFlag( iInVps, m_cCameraData.getVaryingCameraParameters() );
-
-      for( Int m = 0; m < vps.getNumCp( iInVps ); m++ )
-      {
-        vps.setCpRefVoi( iInVps, m, vps.getViewOIdxList( m ) ); 
-        if( !vps.getCpInSliceSegmentHeaderFlag( iInVps ) ) 
-        {
-          Int j = vps.getCpRefVoi( iInVps, m );
-          Int jInVps = vps.getVoiInVps( j );         
-
-          vps.setVpsCpScale   ( iInVps, jInVps, m_cCameraData.getCodedScale() [ jInVps ][ iInVps ] ) ;
-          vps.setVpsCpInvScale( iInVps, jInVps, m_cCameraData.getCodedScale() [ iInVps ][ jInVps ] ) ;
-          vps.setVpsCpOff     ( iInVps, jInVps, m_cCameraData.getCodedOffset()[ jInVps ][ iInVps ] ) ;
-          vps.setVpsCpInvOff  ( iInVps, jInVps, m_cCameraData.getCodedOffset()[ iInVps ][ jInVps ] ) ;
-        }
-      }
-    }
-  }
-  vps.deriveCpPresentFlag(); 
-}
-#endif
 
 
@@ -2395,109 +1898,3 @@
 
 
-#if NH_3D_DLT
-Void TAppEncTop::xDeriveDltArray( TComVPS& vps, TComDLT* dlt )
-{
-  Int  iNumDepthViews  = 0;
-  Bool bDltPresentFlag = false;
-
-  for ( Int layer = 0; layer <= vps.getMaxLayersMinus1(); layer++ )
-  {
-    Bool isDepth = ( vps.getDepthId( layer ) == 1 );
-
-    if ( isDepth )
-    {
-      iNumDepthViews++;
-    }
-
-    dlt->setUseDLTFlag( layer , isDepth && m_useDLT );
-    if( dlt->getUseDLTFlag( layer ) )
-    {
-      xAnalyzeInputBaseDepth(layer, max(m_iIntraPeriod[layer], 24), &vps, dlt);
-      bDltPresentFlag = bDltPresentFlag || dlt->getUseDLTFlag(layer);
-      dlt->setInterViewDltPredEnableFlag(layer, (dlt->getUseDLTFlag(layer) && (layer>1)));
-      
-      // ----------------------------- determine whether to use bit-map -----------------------------
-      Bool bDltBitMapRepFlag       = false;
-      UInt uiNumBitsNonBitMap      = 0;
-      UInt uiNumBitsBitMap         = 0;
-      
-      UInt uiMaxDiff               = 0;
-      UInt uiMinDiff               = MAX_INT;
-      UInt uiLengthMinDiff         = 0;
-      UInt uiLengthDltDiffMinusMin = 0;
-      
-      std::vector<Int> aiIdx2DepthValue_coded(256, 0);
-      UInt uiNumDepthValues_coded = 0;
-      
-      uiNumDepthValues_coded = dlt->getNumDepthValues(layer);
-      for( UInt ui = 0; ui<uiNumDepthValues_coded; ui++ )
-      {
-        aiIdx2DepthValue_coded[ui] = dlt->idx2DepthValue(layer, ui);
-      }
-      
-      if( dlt->getInterViewDltPredEnableFlag( layer ) )
-      {
-        AOF( vps.getDepthId( 1 ) == 1 );
-        AOF( layer > 1 );
-        // assumes ref layer id to be 1
-        std::vector<Int> piRefDLT = dlt->idx2DepthValue( 1 );
-        UInt uiRefNum = dlt->getNumDepthValues( 1 );
-        dlt->getDeltaDLT(layer, piRefDLT, uiRefNum, aiIdx2DepthValue_coded, uiNumDepthValues_coded);
-      }
-      
-      std::vector<UInt> puiDltDiffValues(uiNumDepthValues_coded, 0);
-      
-      for (UInt d = 1; d < uiNumDepthValues_coded; d++)
-      {
-        puiDltDiffValues[d] = aiIdx2DepthValue_coded[d] - aiIdx2DepthValue_coded[d-1];
-        
-        if ( uiMaxDiff < puiDltDiffValues[d] )
-        {
-          uiMaxDiff = puiDltDiffValues[d];
-        }
-        
-        if ( uiMinDiff > puiDltDiffValues[d] )
-        {
-          uiMinDiff = puiDltDiffValues[d];
-        }
-      }
-      
-      // counting bits
-      // diff coding branch
-      uiNumBitsNonBitMap += 8;                          // u(v) bits for num_depth_values_in_dlt[layerId] (i.e. num_entry[ layerId ])
-      
-      if ( uiNumDepthValues_coded > 1 )
-      {
-        uiNumBitsNonBitMap += 8;                        // u(v) bits for max_diff[ layerId ]
-      }
-      
-      if ( uiNumDepthValues_coded > 2 )
-      {
-        uiLengthMinDiff    = (UInt) gCeilLog2(uiMaxDiff + 1);
-        uiNumBitsNonBitMap += uiLengthMinDiff;          // u(v)  bits for min_diff[ layerId ]
-      }
-      
-      uiNumBitsNonBitMap += 8;                          // u(v) bits for dlt_depth_value0[ layerId ]
-      
-      if (uiMaxDiff > uiMinDiff)
-      {
-        uiLengthDltDiffMinusMin = (UInt) gCeilLog2(uiMaxDiff - uiMinDiff + 1);
-        uiNumBitsNonBitMap += uiLengthDltDiffMinusMin * (uiNumDepthValues_coded - 1);  // u(v) bits for dlt_depth_value_diff_minus_min[ layerId ][ j ]
-      }
-      
-      // bit map branch
-      uiNumBitsBitMap = 1 << m_inputBitDepth[CHANNEL_TYPE_LUMA];
-      
-      // determine bDltBitMapFlag
-      bDltBitMapRepFlag = (uiNumBitsBitMap > uiNumBitsNonBitMap) ? false : true;
-      
-      dlt->setUseBitmapRep(layer, bDltBitMapRepFlag);
-    }
-  }
-
-  dlt->setDltPresentFlag( bDltPresentFlag );
-  dlt->setNumDepthViews ( iNumDepthViews  );
-  dlt->setDepthViewBitDepth( m_inputBitDepth[CHANNEL_TYPE_LUMA] );
-}
-#endif
 //! \}
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncTop.h	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppEncoder/TAppEncTop.h	(revision 1325)
@@ -46,11 +46,5 @@
 #include "TLibCommon/AccessUnit.h"
 #include "TAppEncCfg.h"
-#if NH_3D
-#include "../../Lib/TLibRenderer/TRenTop.h"
-#endif
 
-#if KWU_RC_MADPRED_E0227
-class TEncTop;
-#endif
 //! \ingroup TAppEncoder
 //! \{
@@ -90,14 +84,7 @@
 #endif
 
-#if NH_3D
-  TComSps3dExtension         m_sps3dExtension;              ///< Currently all layers share the same sps 3D Extension  
-#endif
 
   UInt m_essentialBytes;
   UInt m_totalBytes;
-#if NH_3D_VSO
-  TRenTop                     m_cRendererTop; 
-  TRenModel                   m_cRendererModel;   
-#endif
 protected:
   // initialization
@@ -144,14 +131,7 @@
   Void xSetDpbSize                ( TComVPS& vps );
   Void xSetVPSVUI                 ( TComVPS& vps );
-#if NH_3D
-  Void xSetCamPara                ( TComVPS& vps );
-#endif
   GOPEntry* xGetGopEntry( Int layerIdInVps, Int poc );
   Int  xGetMax( std::vector<Int>& vec);
   Bool xLayerIdInTargetEncLayerIdList( Int nuhLayerId );
-#endif
-#if NH_3D_DLT
-  Void xDeriveDltArray( TComVPS& vps, TComDLT* dlt );
-  Void xAnalyzeInputBaseDepth(UInt layer, UInt uiNumFrames, TComVPS* vps, TComDLT* dlt);
 #endif
 
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/RendererMain.cpp
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/RendererMain.cpp	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/RendererMain.cpp	(revision 1325)
@@ -35,50 +35,4 @@
 #include <time.h>
 #include "../../Lib/TLibCommon/CommonDef.h"
-#if NH_3D
-#include "TAppRendererTop.h"
-// ====================================================================================================================
-// Main function
-// ====================================================================================================================
-
-int main(int argc, char* argv[])
-  {
-
-  TAppRendererTop  cTAppRendererTop;
-
-  // print information
-  fprintf( stdout, "\n" );
-  fprintf( stdout, "3D-HTM software: Renderer Version [%s]", NV_VERSION);  
-  fprintf( stdout, NVM_ONOS );
-  fprintf( stdout, NVM_COMPILEDBY );
-  fprintf( stdout, NVM_BITS );
-  fprintf( stdout, "\n" );
-
-  // create application renderer class
-  cTAppRendererTop.create();
-
-  // parse configuration
-  if(!cTAppRendererTop.parseCfg( argc, argv ))
-  {
-    cTAppRendererTop.destroy();
-    return 1;
-  }
-
-  // starting time
-  double dResult;
-  long lBefore = clock();
-
-  // call rendering function
-  cTAppRendererTop.go();
-
-  // ending time
-  dResult = (double)(clock()-lBefore) / CLOCKS_PER_SEC;
-  printf("\n Total Time: %12.3f sec.\n", dResult);
-
-  // destroy application renderer class
-  cTAppRendererTop.destroy();
-
-  return 0;
-}
-#else
 
 #include <iostream>
@@ -89,4 +43,3 @@
 }
 
-#endif // NH_3D
 
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererCfg.cpp
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererCfg.cpp	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererCfg.cpp	(revision 1325)
@@ -44,482 +44,2 @@
 #include "../../Lib/TAppCommon/program_options_lite.h"
 
-#if NH_3D
-
-using namespace std;
-namespace po = df::program_options_lite;
-
-// ====================================================================================================================
-// Local constants
-// ====================================================================================================================
-
-#define MAX_INPUT_VIEW_NUM          10
-#define MAX_OUTPUT_VIEW_NUM         64
-
-// ====================================================================================================================
-// Constructor / destructor / initialization / destroy
-// ====================================================================================================================
-
-
-TAppRendererCfg::TAppRendererCfg()
-{
-  
-}
-
-TAppRendererCfg::~TAppRendererCfg()
-{
-  for(Int i = 0; i< m_pchVideoInputFileList.size(); i++ )
-  {
-    if ( m_pchVideoInputFileList[i] != NULL )
-      free (m_pchVideoInputFileList[i]);
-  }
-
-  for(Int i = 0; i< m_pchDepthInputFileList.size(); i++ )
-  {
-    if ( m_pchDepthInputFileList[i] != NULL )
-      free (m_pchDepthInputFileList[i]);
-  }
-
-  for(Int i = 0; i< m_pchSynthOutputFileList.size(); i++ )
-  {
-    if ( m_pchSynthOutputFileList[i] != NULL )
-      free (m_pchSynthOutputFileList[i]);
-  }
-
-  if ( m_pchVideoInputFileBaseName  ) free( m_pchVideoInputFileBaseName );
-  if ( m_pchDepthInputFileBaseName  ) free( m_pchDepthInputFileBaseName );
-  if ( m_pchSynthOutputFileBaseName ) free( m_pchSynthOutputFileBaseName);
-  if ( m_pchCameraParameterFile     ) free( m_pchCameraParameterFile    );
-  if ( m_pchBaseViewCameraNumbers   ) free( m_pchBaseViewCameraNumbers  );
-  if ( m_pchSynthViewCameraNumbers  ) free( m_pchSynthViewCameraNumbers );
-  if ( m_pchViewConfig              ) free( m_pchViewConfig         );
-}
-
-Void TAppRendererCfg::create()
-{
-}
-
-Void TAppRendererCfg::destroy()
-{
-}
-
-// ====================================================================================================================
-// Public member functions
-// ====================================================================================================================
-
-/** \param  argc        number of arguments
-\param  argv        array of arguments
-\retval             true when success
-*/
-Bool TAppRendererCfg::parseCfg( Int argc, Char* argv[] )
-{
-  bool do_help = false;
-
-  po::Options opts;
-  opts.addOptions()
-    ("help", do_help, false, "this help text")
-    ("c", po::parseConfigFile, "configuration file name")
-
-    /* File I/O */
-    ("VideoInputFileBaseName,v",  m_pchVideoInputFileBaseName,  (Char*) 0, "Basename to generate video input file names")
-    ("DepthInputFileBaseName,d",  m_pchDepthInputFileBaseName,  (Char*) 0, "Basename to generate depth input file names")
-    ("SynthOutputFileBaseName,s", m_pchSynthOutputFileBaseName, (Char*) 0, "Basename to generate synthesized output file names")
-    ("ContOutputFileNumbering", m_bContOutputFileNumbering  ,  false   , "Continuous Output File Numbering")
-    ("Sweep"                  , m_bSweep                    ,  false   , "Store all views in first Output File")
-
-    ("VideoInputFile_%d,v_%d",  m_pchVideoInputFileList ,    (Char *) 0, MAX_INPUT_VIEW_NUM , "Original Yuv video input file name %d")
-    ("DepthInputFile_%d,d_%d",  m_pchDepthInputFileList ,    (Char *) 0, MAX_INPUT_VIEW_NUM , "Original Yuv depth input file name %d")
-    ("SynthOutputFile_%d,s_%d", m_pchSynthOutputFileList,    (Char *) 0, MAX_OUTPUT_VIEW_NUM, "Synthesized Yuv output file name %d")
-
-    ("InputBitDepth",           m_inputBitDepth[0],                     8, "Bit-depth of input file")
-    ("OutputBitDepth",          m_outputBitDepth[0],                    0, "Bit-depth of output file (default:InternalBitDepth)")
-    ("InternalBitDepth",        m_internalBitDepth[0],                  0, "Bit-depth the renderer operates at. (default:InputBitDepth)"                                                                          "If different to InputBitDepth, source data will be converted")
-
-    ("InputBitDepthC",        m_inputBitDepth[1],    0, "As per InputBitDepth but for chroma component. (default:InputBitDepth)")
-    ("OutputBitDepthC",       m_outputBitDepth[1],   0, "As per OutputBitDepth but for chroma component. (default:InternalBitDepthC)")
-    ("InternalBitDepthC",     m_internalBitDepth[1], 0, "As per InternalBitDepth but for chroma component. (default:IntrenalBitDepth)")
-
-    /* Source Specification */
-    ("SourceWidth,-wdt",        m_iSourceWidth,                       0, "Source picture width")
-    ("SourceHeight,-hgt",       m_iSourceHeight,                      0, "Source picture height")
-    ("FrameSkip,-fs",           m_iFrameSkip,                         0, "Number of frames to skip at start of input YUV")
-    ("FramesToBeRendered,f",    m_iFramesToBeRendered,                0, "Number of frames to be rendered (default=all)")
-
-    /* Camera Specification */
-    ("CameraParameterFile,-cpf", m_pchCameraParameterFile,          (Char *) 0, "Camera Parameter File Name")
-    ("BaseViewCameraNumbers"  , m_pchBaseViewCameraNumbers,        (Char *) 0, "Numbers of base views")
-    ("SynthViewCameraNumbers" , m_pchSynthViewCameraNumbers,       (Char *) 0, "Numbers of views to synthesis")
-    ("ViewConfig"             , m_pchViewConfig,                   (Char *) 0, "View Configuration"               )
-
-    /* Renderer Modes */
-    ("Log2SamplingFactor",      m_iLog2SamplingFactor,                0, "Factor for horizontal up sampling before processing"     )
-    ("UVup"              ,      m_bUVUp               ,            true, "Up sampling of chroma planes before processing"          )
-    ("PreProcMode"       ,      m_iPreProcMode        ,               0, "Depth preprocessing: 0 = None, 1 = Binomial filtering"   )
-    ("PreFilterSize"     ,      m_iPreFilterSize      ,               0, "For PreProcMode 1: Half Size of filter kernel"           )
-    ("SimEnhance"        ,      m_bSimEnhance         ,           true, "Similarity enhancement of video" )
-    ("BlendMode"         ,      m_iBlendMode          ,               0, "Blending of left and right image: 0: average, 1: only holes from right, 2: only holes from left, 3: first view in BaseViewOrder as main view" )
-    ("BlendZThresPerc"   ,      m_iBlendZThresPerc    ,              30, "Z-difference threshold for blending in percent of total Z-range"   )
-    ("BlendUseDistWeight",      m_bBlendUseDistWeight ,            true, "0: blend using average; 1: blend factor depends on view distance"  )
-    ("BlendHoleMargin"   ,      m_iBlendHoleMargin    ,               6, "Margin around holes to fill with other view"                       )
-    ("InterpolationMode" ,      m_iInterpolationMode  ,               4, "0: NN, 1:linear (int), 2:linear (double) , 3:cubic Hermite spline (double), 4: 8-tap (int)" )
-    ("HoleFillingMode"   ,      m_iHoleFillingMode    ,               1, "0: None, 1: line wise background extension"              )
-    ("PostProcMode"      ,      m_iPostProcMode       ,               0, "0: None, 1: horizontal 3-tap median"                     )
-    ("RenderMode"        ,      m_iRenderMode         ,               0, "0: Use renderer, 1: use model renderer, 10: create used pels map")
-    ("ShiftPrecision"    ,      m_iShiftPrecision     ,               2, "Shift Precision for Interpolation Mode 4"                )
-    ("TemporalDepthFilter",     m_bTempDepthFilter    ,           false, "Temporal depth filtering"                                )
-    ("RenderDirection"   ,      m_iRenderDirection    ,               0, "0: Interpolate, 1: Extrapolate from left, 2: Extrapolate from right")
-    ("UsedPelMapMarExt"  ,      m_iUsedPelMapMarExt   ,               0, "Margin Extension in Pels for used pels map generation"   );
-
-  po::setDefaults(opts);
-  po::scanArgv(opts, argc, (const char**) argv);
-
-  if (argc == 1 || do_help)
-  {
-    /* argc == 1: no options have been specified */
-    po::doHelp(cout, opts);
-    xPrintUsage();
-    return false;
-  }
-
-  /*
-  * Set any derived parameters before checking
-  */
-
-  /* rules for input, output and internal bitdepths as per help text */
-  if (!m_internalBitDepth[0]) { m_internalBitDepth[0] = m_inputBitDepth[0]; }
-  if (!m_internalBitDepth[1]) { m_internalBitDepth[1] = m_internalBitDepth[0]; }
-  if (!m_inputBitDepth[1])    { m_inputBitDepth[1]    = m_inputBitDepth[0]; }
-  if (!m_outputBitDepth[0])   { m_outputBitDepth[0]   = m_internalBitDepth[0]; }
-  if (!m_outputBitDepth[1])   { m_outputBitDepth[1]   = m_internalBitDepth[1]; }
-
-  UInt  uiInputBitDepth   = 8;
-  UInt  uiCamParPrecision = 5;
-
-  m_bUseSetupString = ( m_pchViewConfig != NULL ) && ( m_iRenderMode != 0);
-
-  if ( m_iRenderMode == 10 )
-  {
-    m_cCameraData.init( MAX_INPUT_VIEW_NUM, uiInputBitDepth, uiCamParPrecision, (UInt)m_iFrameSkip, (UInt)m_iFramesToBeRendered,
-      m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, NULL, NULL, m_iLog2SamplingFactor+m_iShiftPrecision );
-    m_iNumberOfInputViews  = (Int) m_cCameraData.getBaseViewNumbers() .size();
-    m_iNumberOfOutputViews = m_iNumberOfInputViews - 1;
-    m_iRenderDirection     = 1;
-  }
-  else
-  {
-  if ( m_bUseSetupString )
-  {
-    std::vector<Int>  iaTempViews;
-    std::vector<Int>* piaTempViews;
-    m_cCameraData     .convertNumberString( m_pchBaseViewCameraNumbers, iaTempViews, VIEW_NUM_PREC );
-    m_cRenModStrParser.setString( (Int) iaTempViews.size(), m_pchViewConfig );
-    piaTempViews               = m_cRenModStrParser.getSynthViews();
-    m_iNumberOfOutputViews     = (Int) m_cRenModStrParser.getNumOfModels();
-    m_iNumberOfInputViews      = (Int) m_cRenModStrParser.getNumOfBaseViews();
-    m_bContOutputFileNumbering = true;
-
-  m_cCameraData.init( MAX_INPUT_VIEW_NUM, uiInputBitDepth, uiCamParPrecision, (UInt)m_iFrameSkip, (UInt)m_iFramesToBeRendered,
-      m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, NULL, piaTempViews, m_iLog2SamplingFactor+m_iShiftPrecision );
-  }
-  else
-  {
-  m_cCameraData.init( MAX_INPUT_VIEW_NUM, uiInputBitDepth, uiCamParPrecision, (UInt)m_iFrameSkip, (UInt)m_iFramesToBeRendered,
-      m_pchCameraParameterFile, m_pchBaseViewCameraNumbers, m_pchSynthViewCameraNumbers, NULL, m_iLog2SamplingFactor+m_iShiftPrecision );
-  m_iNumberOfOutputViews = (Int) m_cCameraData.getSynthViewNumbers().size();
-  m_iNumberOfInputViews  = (Int) m_cCameraData.getBaseViewNumbers() .size();
-  }
-  }
-
-  if (m_pchSynthOutputFileBaseName != NULL)
-    xConfirmParameter( strrchr(m_pchSynthOutputFileBaseName,'$')  == 0, "'$' must be a character in SynthOutputFileBaseName");
-
-  if (m_pchDepthInputFileBaseName != NULL)
-    xConfirmParameter( strrchr(m_pchDepthInputFileBaseName, '$')  == 0, "'$' must be a character in DepthInputFileBaseName" );
-
-  if (m_pchVideoInputFileBaseName != NULL)
-    xConfirmParameter( strrchr(m_pchVideoInputFileBaseName, '$')  == 0, "'$' must be a character in VideoInputFileBaseName" );
-
-  xCreateFileNames();
-
-  /*
-  * check validity of input parameters
-  */
-  xCheckParameter();
-  m_cCameraData.check( m_iRenderDirection == 0, m_iFramesToBeRendered != 0 );
-
-  // print-out parameters
-  xPrintParameter();
-
-  return true;
-}
-
-
-// ====================================================================================================================
-// Private member functions
-// ====================================================================================================================
-
-Void TAppRendererCfg::xCheckParameter()
-{
-  bool check_failed = false; /* abort if there is a fatal configuration problem */
-#define xConfirmPara(a,b) check_failed |= xConfirmParameter(a,b)
-  // check range of parameters
-
-  /// File I/O
-
-  // source specification
-  xConfirmPara( m_iSourceWidth        <= 0,                   "Source width  must be greater than 0" );
-  xConfirmPara( m_iSourceHeight       <= 0,                   "Source height must be greater than 0" );
-  xConfirmPara( m_iFrameSkip          <  0,                   "Frame Skipping must be more than or equal to 0" );
-  xConfirmPara( m_iFramesToBeRendered <  0,                   "Total Number Of Frames rendered must be more than 1" );
-
-  // bit depth 
-  xConfirmPara( m_internalBitDepth[0] != m_internalBitDepth[1],  "InternalBitDepth for luma and chroma must be equal. "); 
-  xConfirmPara( m_inputBitDepth[0] < 8,                        "InputBitDepth must be at least 8" );
-  xConfirmPara( m_inputBitDepth[1] < 8,                        "InputBitDepthC must be at least 8" );
-
-  // camera specification
-  xConfirmPara( m_iNumberOfInputViews  > MAX_INPUT_VIEW_NUM , "NumberOfInputViews must be less than of equal to MAX_INPUT_VIEW_NUM");
-  xConfirmPara( m_iNumberOfOutputViews > MAX_OUTPUT_VIEW_NUM, "NumberOfOutputViews must be less than of equal to MAX_OUTPUT_VIEW_NUM");
-
-
-  xConfirmPara( m_iRenderDirection < 0 || m_iRenderDirection > 2  , "RenderDirection must be greater than or equal to 0 and less than 3");
-  xConfirmPara(m_iNumberOfOutputViews < 1,                    "Number of OutputViews must be greater or equal to 1");
-  if ( m_iRenderDirection == 0 )
-  {
-    xConfirmPara( m_iNumberOfInputViews < 2,                  "Number of InputViews must be more than or equal to 2");
-  }
-  else
-  {
-    xConfirmPara( m_iNumberOfInputViews < 1,                  "Number of InputViews must be more than or equal to 1");
-  }
-
-  xConfirmPara( m_iLog2SamplingFactor < 0 || m_iLog2SamplingFactor >  4, "Log2SamplingFactor must be more than or equal to 0 and less than 5"  );
-  xConfirmPara( m_iPreProcMode        < 0 || m_iPreProcMode        >  1, "PreProcMode        must be more than or equal to 0 and less than 2"  );
-
-
-  xConfirmPara( m_iPreFilterSize      < 0 || m_iPreFilterSize      >  3, "PreFilterSize      must be more than or equal to 0 and less than 4" );
-  xConfirmPara( m_iBlendMode          < 0 || m_iBlendMode          >  3, "BlendMode          must be more than or equal to 0 and less than 4"  );
-  xConfirmPara( m_iBlendZThresPerc    < 0 || m_iBlendZThresPerc    > 100,"BlendZThresPerc    must be more than or equal to 0 and less than 101"  );
-  xConfirmPara( m_iBlendHoleMargin    < 0 || m_iBlendHoleMargin    >  20,"BlendHoleMargin    must be more than or equal to 0 and less than 19"  );
-  xConfirmPara( m_iInterpolationMode  < 0 || m_iInterpolationMode  >  4, "InterpolationMode  must be more than or equal to 0 and less than 5"  );
-  xConfirmPara( m_iHoleFillingMode    < 0 || m_iHoleFillingMode    >  1, "HoleFillingMode    must be more than or equal to 0 and less than 2"  );
-  xConfirmPara( m_iPostProcMode       < 0 || m_iPostProcMode       >  2, "PostProcMode       must be more than or equal to 0 and less than 3"  );
-
-  Int iNumNonNULL;
-  for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchDepthInputFileList[iNumNonNULL]; iNumNonNULL++) {};  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
-  for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfInputViews)  && m_pchVideoInputFileList[iNumNonNULL]; iNumNonNULL++) {};  xConfirmPara( iNumNonNULL < m_iNumberOfInputViews,  "Number of DepthInputFiles  must be greater than or equal to number of BaseViewNumbers" );
-
-
-  if ( !m_bSweep )
-  {
-    for (iNumNonNULL = 0; (iNumNonNULL < m_iNumberOfOutputViews) && m_pchSynthOutputFileList[iNumNonNULL]; iNumNonNULL++) {}; xConfirmPara( iNumNonNULL < m_iNumberOfOutputViews, "Number of SynthOutputFiles must be greater than or equal to number of SynthViewNumbers" );
-  }
-  else
-  {
-      xConfirmPara( iNumNonNULL < 1, "Number of SynthOutputFiles must be equal to or more than 1" );
-  }
-
-#undef xConfirmPara
-  if ( check_failed )
-  {
-    exit(EXIT_FAILURE);
-  }
-
-}
-
-
-
-Void TAppRendererCfg::xPrintParameter()
-{
-  printf("\n");
-  for( Int iCounter = 0; iCounter < m_iNumberOfInputViews; iCounter++)
-  {
-    printf("InputVideoFile_%i        : %s\n", iCounter, m_pchVideoInputFileList[iCounter]);
-  }
-  for( Int iCounter = 0; iCounter < m_iNumberOfInputViews; iCounter++)
-  {
-    printf("InputDepthFile_%i        : %s\n", iCounter, m_pchDepthInputFileList[iCounter]);
-  }
-
-  for( Int iCounter = 0; iCounter < m_iNumberOfOutputViews; iCounter++)
-  {
-    printf("SynthOutputFile_%i       : %s\n", iCounter, m_pchSynthOutputFileList[iCounter]);
-  }
-
-  printf("Format                  : %dx%d \n", m_iSourceWidth, m_iSourceHeight );
-  printf("Frame index             : %d - %d (%d frames)\n", m_iFrameSkip, m_iFrameSkip+m_iFramesToBeRendered-1, m_iFramesToBeRendered);
-  printf("CameraParameterFile     : %s\n", m_pchCameraParameterFile );
-  printf("BaseViewNumbers         : %s  (%d views) \n", m_pchBaseViewCameraNumbers , m_iNumberOfInputViews  );
-  printf("Sweep                   : %d\n", m_bSweep               );
-
-  if ( m_bUseSetupString )
-  {
-    printf("ViewConfig              : %s\n", m_pchViewConfig );
-  }
-  else
-  {
-  printf("SynthViewNumbers        : %s  (%d views) \n", m_pchSynthViewCameraNumbers, m_iNumberOfOutputViews );
-  }
-
-  printf("Log2SamplingFactor      : %d\n", m_iLog2SamplingFactor );
-  printf("UVUp                    : %d\n", m_bUVUp               );
-  printf("PreProcMode             : %d\n", m_iPreProcMode        );
-  printf("PreFilterSize           : %d\n", m_iPreFilterSize      );
-  printf("SimEnhance              : %d\n", m_bSimEnhance         );
-  printf("BlendMode               : %d\n", m_iBlendMode          );
-  printf("BlendZThresPerc         : %d\n", m_iBlendZThresPerc    );
-  printf("BlendUseDistWeight      : %d\n", m_bBlendUseDistWeight );
-  printf("BlendHoleMargin         : %d\n", m_iBlendHoleMargin    );
-  printf("InterpolationMode       : %d\n", m_iInterpolationMode  );
-  printf("HoleFillingMode         : %d\n", m_iHoleFillingMode    );
-  printf("PostProcMode            : %d\n", m_iPostProcMode       );
-  printf("ShiftPrecision          : %d\n", m_iShiftPrecision     );
-  printf("TemporalDepthFilter     : %d\n", m_bTempDepthFilter    );
-  printf("RenderMode              : %d\n", m_iRenderMode         );
-  printf("RendererDirection       : %d\n", m_iRenderDirection       );
-
-  if (m_iRenderMode == 10 )
-  {
-    printf("UsedPelMapMarExt        : %d\n", m_iUsedPelMapMarExt );
-  }
-
-  printf("\n");
-
-  //  printf("TOOL CFG: ");
-  //  printf("ALF:%d ", m_bUseALF             );
-  //  printf("\n");
-
-  fflush(stdout);
-}
-
-Void TAppRendererCfg::xPrintUsage()
-{
-  printf( "\n" );
-  printf( "  Example: TAppRenderer.exe -c test.cfg\n\n");
-}
-
-Bool TAppRendererCfg::xConfirmParameter(Bool bflag, const char* message)
-{
-  if (!bflag)
-    return false;
-
-  printf("Error: %s\n",message);
-  return true;
-}
-
-
-Void TAppRendererCfg::xCreateFileNames()
-{
-  if ( m_iRenderMode == 10 )
-    return;
-
-  Int iPrecBefore;
-  Int iPrecAfter;
-
-  xGetMaxPrecision( m_cCameraData.getSynthViewNumbers(), iPrecBefore, iPrecAfter );
-
-
-  if (iPrecBefore > LOG10_VIEW_NUM_PREC )
-  {
-    std::cerr << "Error: View Numbers with more than " << LOG10_VIEW_NUM_PREC << " digits are not supported" << std::endl;
-    exit(EXIT_FAILURE);
-  }
-
-  AOT( !m_bContOutputFileNumbering && (m_cCameraData.getSynthViewNumbers().size() != m_iNumberOfOutputViews ));
-  for(Int iIdx = 0; iIdx < m_iNumberOfOutputViews; iIdx++)
-  {
-    //GT; Create ReconFileNames
-    if (m_pchSynthOutputFileList[iIdx] == NULL )
-    {
-      if ( m_bContOutputFileNumbering )
-      {
-        xAddNumberToFileName( m_pchSynthOutputFileBaseName, m_pchSynthOutputFileList[iIdx], (Int) ((iIdx+1) * VIEW_NUM_PREC) , 2, 0  );
-      }
-      else
-      {
-        xAddNumberToFileName( m_pchSynthOutputFileBaseName, m_pchSynthOutputFileList[iIdx], m_cCameraData.getSynthViewNumbers()[iIdx], iPrecBefore, iPrecAfter  );
-      }
-    }
-  }
-
-  xGetMaxPrecision( m_cCameraData.getBaseViewNumbers(), iPrecBefore, iPrecAfter );
-  for(Int iIdx = 0; iIdx < m_cCameraData.getBaseViewNumbers().size() ; iIdx++)
-  {
-    //GT; Create ReconFileNames
-    if (m_pchVideoInputFileList[iIdx] == NULL )
-    {
-      xAddNumberToFileName( m_pchVideoInputFileBaseName, m_pchVideoInputFileList[iIdx], m_cCameraData.getBaseViewNumbers()[iIdx], iPrecBefore, iPrecAfter  );
-    }
-
-    if (m_pchDepthInputFileList[iIdx] == NULL )
-    {
-      xAddNumberToFileName( m_pchDepthInputFileBaseName, m_pchDepthInputFileList[iIdx], m_cCameraData.getBaseViewNumbers()[iIdx], iPrecBefore, iPrecAfter  );
-    }
-  }
-}
-
-Void TAppRendererCfg::xAddNumberToFileName( Char* pchSourceFileName, Char*& rpchTargetFileName, Int iNumberToAdd, UInt uiPrecBefore, UInt uiPrecAfter )
-{
-
-  if ( pchSourceFileName == NULL )
-  {
-    std::cerr << "No BaseName for file name generation given." << std::endl;
-    AOT(true);
-    exit(EXIT_FAILURE);
-  }
-
-  Char pchNumberBuffer[2* LOG10_VIEW_NUM_PREC + 2];
-  Char pchPrintBuffer[10];
-
-  Double dNumberToAdd = ( (Double) iNumberToAdd ) / VIEW_NUM_PREC;
-
-  UInt uiWidth = uiPrecBefore;
-
-  if (uiPrecAfter != 0)
-  {
-    uiWidth += uiPrecAfter + 1;
-  }
-
-  sprintf( pchPrintBuffer, "%%0%d.%df", uiWidth, uiPrecAfter );
-  sprintf( pchNumberBuffer, pchPrintBuffer, dNumberToAdd );
-
-  if ( uiPrecAfter > 0 ) pchNumberBuffer[ uiPrecBefore ] = '_';
-
-  size_t iInLength  = strlen(pchSourceFileName);
-  size_t iAddLength = strlen(pchNumberBuffer);
-
-  rpchTargetFileName = (Char*) malloc(iInLength+iAddLength+1);
-
-  Char* pchPlaceHolder = strrchr(pchSourceFileName,'$');
-  assert( pchPlaceHolder );
-
-  size_t iCharsToPlaceHolder = pchPlaceHolder - pchSourceFileName;
-  size_t iCharsToEnd         = iInLength      - iCharsToPlaceHolder;
-
-  strncpy(rpchTargetFileName                               , pchSourceFileName                      , iCharsToPlaceHolder);
-  strncpy(rpchTargetFileName+iCharsToPlaceHolder           , pchNumberBuffer                        , iAddLength         );
-  strncpy(rpchTargetFileName+iCharsToPlaceHolder+iAddLength, pchSourceFileName+iCharsToPlaceHolder+1, iCharsToEnd-1      );
-  rpchTargetFileName[iInLength+iAddLength-1] = '\0';
-}
-
-Void TAppRendererCfg::xGetMaxPrecision( IntAry1d aiIn, Int& iPrecBefore, Int& iPrecAfter )
-{
-  iPrecBefore = 0;
-  iPrecAfter  = 0;
-
-  for (UInt uiK = 0; uiK < aiIn.size(); uiK ++ )
-  {
-    if ( aiIn[uiK] == 0 ) continue;
-
-    Int iCurPrec;
-    iCurPrec = 0;
-    for ( Int iCur = aiIn[uiK]; iCur != 0; iCur /= 10, iCurPrec++ );
-    iPrecBefore = max(iPrecBefore, iCurPrec - LOG10_VIEW_NUM_PREC );
-
-    iCurPrec = 0;
-    for ( Int iCur = 1;  aiIn[uiK] % iCur == 0; iCur *= 10, iCurPrec++);
-    iCurPrec = LOG10_VIEW_NUM_PREC - std::min((Int) LOG10_VIEW_NUM_PREC, iCurPrec-1 );
-    iPrecAfter = max(iPrecAfter, iCurPrec );
-  }
-}
-
-#endif
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererCfg.h
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererCfg.h	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererCfg.h	(revision 1325)
@@ -47,94 +47,3 @@
 #include <vector>
 
-#if NH_3D
-
-// ====================================================================================================================
-// Class definition
-// ====================================================================================================================
-
-/// encoder configuration class
-class TAppRendererCfg
-{
-protected:
-
-  //// file I/O ////
-  Char*              m_pchVideoInputFileBaseName;      ///< input video  file base name, placeholder for numbering $$
-  Char*              m_pchDepthInputFileBaseName;      ///< input depth  file base name, placeholder for numbering $$
-  Char*              m_pchSynthOutputFileBaseName;     ///< output synth file base name, placeholder for numbering $$
-  Bool               m_bContOutputFileNumbering;       ///< use continous numbering instead of view numbering
-  Bool               m_bSweep;                         ///< 1: Store view range in file
-
-
-  // bit-depth      ( Currently internal, output and input luma and chroma bit-depth are required to be equal to 8 )
-  Int                m_inputBitDepth[2];               ///< bit-depth of input file (luma/chroma component)  
-  Int                m_outputBitDepth[2];              ///< bit-depth of output file (luma/chroma component)    
-  Int                m_internalBitDepth[2];            ///< bit-depth renderer operates at in luma/chroma (input/output files will be converted)
-
-
-  // derived
-  std::vector<Char*> m_pchVideoInputFileList;          ///< source file names
-  std::vector<Char*> m_pchDepthInputFileList;          ///< source depth file names
-  std::vector<Char*> m_pchSynthOutputFileList;         ///< output reconstruction file names
-
-  //// source specification ////
-  Int                m_iSourceWidth;                   ///< source width in pixel
-  Int                m_iSourceHeight;                  ///< source height in pixel
-  Int                m_iFrameSkip;                     ///< number of skipped frames from the beginning
-  Int                m_iFramesToBeRendered;            ///< number of rendered frames
-
-  ////camera specification ////
-  Char*               m_pchCameraParameterFile;         ///< camera parameter file
-  Char*               m_pchSynthViewCameraNumbers;      ///< numbers of views to synthesize
-  Char*               m_pchViewConfig;                  ///< String to setup renderer
-  Char*               m_pchBaseViewCameraNumbers;       ///< numbers of base views
-
-  // derived
-  TAppComCamPara      m_cCameraData;                    ///< class to store camera parameters
-  TRenModSetupStrParser m_cRenModStrParser;             ///< class to manage View to be rendered
-  Bool                m_bUseSetupString;                ///< true if setup string is used
-
-  Int                 m_iNumberOfInputViews;            ///< number of input Views
-  Int                 m_iNumberOfOutputViews;           ///< number views to synthesize
-
-  //// renderer Modes ////
-  Int                 m_iRenderDirection;               ///< 0: interpolate, 1: extrapolate from left, 2: extrapolate from right
-
-  Int                 m_iLog2SamplingFactor;            ///< factor for horizontal upsampling before processing
-  Bool                m_bUVUp;                          ///< upsampling of chroma planes before processing
-  Int                 m_iPreProcMode;                   ///< depth pre-processing: 0 = none, 1 = binominal filtering
-  Int                 m_iPreFilterSize;                 ///< for PreProcMode = 1: size of filter kernel
-  Bool                m_bSimEnhance;                    ///< Similarity enhancement before blending
-  Int                 m_iBlendMode;                     ///< merging of left and right image: 0 = average, 1 = only holes from right, 2 = only holes from left
-  Int                 m_iBlendZThresPerc;               ///< z-difference threshold for blending in percent of total z-range
-  Bool                m_bBlendUseDistWeight;            ///< 0: blend using average; 1: blend factor depends on view distance
-  Int                 m_iBlendHoleMargin;               ///< Margin around boundaries
-  Bool                m_bTempDepthFilter;               ///< Zheijang temporal enhancement filter
-  Int                 m_iInterpolationMode;             ///< 0: NN, 1: linear, 2: cspline
-  Int                 m_iHoleFillingMode;               ///< 0: none, 1: line wise background extension
-  Int                 m_iPostProcMode;                  ///< 0: none, 1: horizontal 3-tap median
-  Int                 m_iRenderMode;                      ///< 0: use renderer
-  Int                 m_iShiftPrecision;                ///< Precision used for Interpolation Mode 4
-  Int                 m_iUsedPelMapMarExt;              ///< Used Pel map extra margin
-
-  Void xCheckParameter ();                              ///< check validity of configuration values
-  Void xPrintParameter ();                              ///< print configuration values
-  Void xPrintUsage     ();                              ///< print usage
-
-  Void xCreateFileNames();
-  Void xGetMaxPrecision( IntAry1d adIn, Int& iPrecBefore, Int& iPrecAfter );
-  Void xAddNumberToFileName( Char* pchSourceFileName, Char*& rpchTargetFileName, Int iNumberToAdd, UInt uiPrecBefore, UInt uiPrecAfter );
-public:
-  TAppRendererCfg();
-  virtual ~TAppRendererCfg();
-
-public:
-  Void  create    ();                                         ///< create option handling class
-  Void  destroy   ();                                         ///< destroy option handling class
-  Bool  parseCfg  ( Int argc, Char* argv[] );                 ///< parse configuration file to fill member variables
-  Bool  xConfirmParameter(Bool bflag, const Char* message);
-
-
-};// END CLASS DEFINITION TAppRendererCfg
-
-#endif // __TAppRENDERERCFG__
 #endif // NH_3D
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererTop.cpp
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 1325)
@@ -41,1012 +41,2 @@
 #include "TAppRendererTop.h"
 
-#if NH_3D
-
-// ====================================================================================================================
-// Constructor / destructor / initialization / destroy
-// ====================================================================================================================
-
-TAppRendererTop::TAppRendererTop()
-{
-
-}
-
-TAppRendererTop::~TAppRendererTop()
-{
-
-}
-
-
-Void TAppRendererTop::xCreateLib()
-{
-  m_pcRenTop = new TRenTop();
-
-  for(Int iViewIdx=0; iViewIdx<m_iNumberOfInputViews; iViewIdx++)
-  {
-    TVideoIOYuv* pcVideoInput = new TVideoIOYuv;
-    TVideoIOYuv* pcDepthInput = new TVideoIOYuv;
-
-//    ( Char* pchFile, Bool bWriteMode, const Int fileBitDepth[MAX_NUM_CHANNEL_TYPE], const Int MSBExtendedBitDepth[MAX_NUM_CHANNEL_TYPE], const Int internalBitDepth[MAX_NUM_CHANNEL_TYPE] )
-
-    pcVideoInput->open( m_pchVideoInputFileList[iViewIdx], false, m_inputBitDepth, m_internalBitDepth, m_internalBitDepth );  // read mode
-    pcDepthInput->open( m_pchDepthInputFileList[iViewIdx], false, m_inputBitDepth, m_internalBitDepth, m_internalBitDepth );  // read mode
-    pcVideoInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight, CHROMA_420 );
-    pcDepthInput->skipFrames(m_iFrameSkip, m_iSourceWidth, m_iSourceHeight, CHROMA_420 );
-
-    m_apcTVideoIOYuvVideoInput.push_back( pcVideoInput );
-    m_apcTVideoIOYuvDepthInput.push_back( pcDepthInput );
-  }
-
-  for(Int iViewIdx=0; iViewIdx<m_iNumberOfOutputViews; iViewIdx++)
-  {
-    TVideoIOYuv* pcSynthOutput = new TVideoIOYuv;
-    pcSynthOutput->open( m_pchSynthOutputFileList[iViewIdx], true, m_outputBitDepth, m_internalBitDepth, m_internalBitDepth );  // write mode
-    m_apcTVideoIOYuvSynthOutput.push_back( pcSynthOutput );
-  }
-}
-
-
-Void TAppRendererTop::xDestroyLib()
-{
-  delete m_pcRenTop;
-
-  for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfInputViews; iViewIdx++ )
-  {
-    m_apcTVideoIOYuvVideoInput[iViewIdx]->close();
-    m_apcTVideoIOYuvDepthInput[iViewIdx]->close();
-
-    delete m_apcTVideoIOYuvDepthInput[iViewIdx];
-    delete m_apcTVideoIOYuvVideoInput[iViewIdx];
-  };
-
-  for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfOutputViews; iViewIdx++ )
-  {
-    m_apcTVideoIOYuvSynthOutput[iViewIdx]->close();
-    delete m_apcTVideoIOYuvSynthOutput[iViewIdx];
-  };
-}
-
-Void TAppRendererTop::xInitLib()
-{
-    m_pcRenTop->init(
-    m_iSourceWidth,
-    m_iSourceHeight,
-    (m_iRenderDirection != 0),
-    m_iLog2SamplingFactor,
-    m_iLog2SamplingFactor+m_iShiftPrecision,
-    m_bUVUp,
-    m_iPreProcMode,
-    m_iPreFilterSize,
-    m_iBlendMode,
-    m_iBlendZThresPerc,
-    m_bBlendUseDistWeight,
-    m_iBlendHoleMargin,
-    m_iInterpolationMode,
-    m_iHoleFillingMode,
-    m_iPostProcMode,
-    m_iUsedPelMapMarExt
-    );
-}
-
-// ====================================================================================================================
-// Public member functions
-// ====================================================================================================================
-
-
-
-Void TAppRendererTop::render()
-{
-  xCreateLib();
-  xInitLib();
-
-  // Create Buffers Input Views;
-  std::vector<TComPicYuv*> apcPicYuvBaseVideo;
-  std::vector<TComPicYuv*> apcPicYuvBaseDepth;
-
-  // TemporalImprovement Filter
-  std::vector<TComPicYuv*> apcPicYuvLastBaseVideo;
-  std::vector<TComPicYuv*> apcPicYuvLastBaseDepth;
-
-  Int aiPad[2] = { 0, 0 };
-
-  TComPicYuv* pcNewOrg = new TComPicYuv;
-  pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-
-  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-  {
-    TComPicYuv* pcNewVideoPic = new TComPicYuv;
-    TComPicYuv* pcNewDepthPic = new TComPicYuv;
-
-    pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-    apcPicYuvBaseVideo.push_back(pcNewVideoPic);
-
-    pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true);
-    apcPicYuvBaseDepth.push_back(pcNewDepthPic);
-
-    //Temporal improvement Filter
-    if ( m_bTempDepthFilter )
-    {
-      pcNewVideoPic = new TComPicYuv;
-      pcNewDepthPic = new TComPicYuv;
-
-      pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-      apcPicYuvLastBaseVideo.push_back(pcNewVideoPic);
-
-      pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-      apcPicYuvLastBaseDepth.push_back(pcNewDepthPic);
-    }
-  }
-
-  // Create Buffer for synthesized View
-  TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
-  pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-
-  Bool bAnyEOS = false;
-
-  Int iNumOfRenderedFrames = 0;
-  Int iFrame = 0;
-
-  while ( ( ( iNumOfRenderedFrames < m_iFramesToBeRendered ) || ( m_iFramesToBeRendered == 0 ) ) && !bAnyEOS )
-  {
-    if ( iFrame >= m_iFrameSkip ) 
-    {
-      // read in depth and video
-      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
-      {
-        m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx],pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
-
-        apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder();
-
-        bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
-
-        m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx],pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
-        apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder();
-        bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
-
-        if ( m_bTempDepthFilter && (iFrame >= m_iFrameSkip) )
-        {
-          m_pcRenTop->temporalFilterVSRS( apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], apcPicYuvLastBaseVideo[iBaseViewIdx], apcPicYuvLastBaseDepth[iBaseViewIdx], ( iFrame == m_iFrameSkip) );
-        }
-      }
-    }
-    else    
-    {
-      std::cout << "Skipping Frame " << iFrame << std::endl;
-
-      iFrame++;
-      continue;
-    }
-
-    m_cCameraData.update( (UInt)iFrame - m_iFrameSkip );
-
-    for(Int iSynthViewIdx=0; iSynthViewIdx < m_iNumberOfOutputViews; iSynthViewIdx++ )
-    {
-      Int  iLeftBaseViewIdx  = -1;
-      Int  iRightBaseViewIdx = -1;
-
-      Bool bIsBaseView = false;
-
-      Int iRelDistToLeft;
-      Bool bHasLRView = m_cCameraData.getLeftRightBaseView( iSynthViewIdx, iLeftBaseViewIdx, iRightBaseViewIdx, iRelDistToLeft, bIsBaseView );
-      Bool bHasLView = ( iLeftBaseViewIdx != -1 );
-      Bool bHasRView = ( iRightBaseViewIdx != -1 );
-      Bool bRender   = true;
-
-      Int  iBlendMode = m_iBlendMode;
-      Int  iSimEnhBaseView = 0;
-
-      switch( m_iRenderDirection )
-      {
-      /// INTERPOLATION
-      case 0:
-        AOF( bHasLRView || bIsBaseView );
-
-        if ( !bHasLRView && bIsBaseView && m_iBlendMode == 0 )
-        {
-          bRender = false;
-        }
-        else
-        {
-          if ( bIsBaseView )
-          {
-            AOF( iLeftBaseViewIdx == iRightBaseViewIdx );
-            Int iSortedBaseViewIdx = m_cCameraData.getBaseId2SortedId() [iLeftBaseViewIdx];
-
-            if ( m_iBlendMode == 1 )
-            {
-              if ( iSortedBaseViewIdx - 1 >= 0 )
-              {
-                iLeftBaseViewIdx = m_cCameraData.getBaseSortedId2Id()[ iSortedBaseViewIdx - 1];
-                bRender = true;
-              }
-              else
-              {
-                bRender = false;
-              }
-            }
-            else if ( m_iBlendMode == 2 )
-            {
-              if ( iSortedBaseViewIdx + 1 < m_iNumberOfInputViews )
-              {
-                iRightBaseViewIdx = m_cCameraData.getBaseSortedId2Id()[ iSortedBaseViewIdx + 1];
-                bRender = true;
-              }
-              else
-              {
-                bRender = false;
-              }
-            }
-          }
-
-          if ( m_iBlendMode == 3 )
-          {
-            if ( bIsBaseView && (iLeftBaseViewIdx == 0) )
-            {
-              bRender = false;
-            }
-            else
-            {
-              Int iDistLeft  = abs( m_cCameraData.getBaseId2SortedId()[0] - m_cCameraData.getBaseId2SortedId() [iLeftBaseViewIdx ]  );
-              Int iDistRight = abs( m_cCameraData.getBaseId2SortedId()[0] - m_cCameraData.getBaseId2SortedId() [iRightBaseViewIdx]  );
-
-              Int iFillViewIdx = iDistLeft > iDistRight ? iLeftBaseViewIdx : iRightBaseViewIdx;
-
-              if( m_cCameraData.getBaseId2SortedId()[0] < m_cCameraData.getBaseId2SortedId() [iFillViewIdx] )
-              {
-                iBlendMode        = 1;
-                iLeftBaseViewIdx  = 0;
-                iRightBaseViewIdx = iFillViewIdx;
-              }
-              else
-              {
-                iBlendMode        = 2;
-                iLeftBaseViewIdx  = iFillViewIdx;
-                iRightBaseViewIdx = 0;
-              }
-
-            }
-          }
-          else
-          {
-            iBlendMode = m_iBlendMode;
-          }
-        }
-
-        if ( m_bSimEnhance )
-        {
-          if ( m_iNumberOfInputViews == 3 && m_cCameraData.getRelSynthViewNumbers()[ iSynthViewIdx ] < VIEW_NUM_PREC  )
-          {
-            iSimEnhBaseView = 2; // Take middle view
-          }
-          else
-          {
-            iSimEnhBaseView = 1; // Take left view
-          }
-        }
-
-          if ( bRender )
-          {
-          std::cout << "Rendering Frame "    << iFrame
-                    << " of View "           << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx    ] / VIEW_NUM_PREC
-                    << "   Left BaseView: "  << (Double) m_cCameraData.getBaseViewNumbers() [iLeftBaseViewIdx ] / VIEW_NUM_PREC
-                    << "   Right BaseView: " << (Double) m_cCameraData.getBaseViewNumbers() [iRightBaseViewIdx] / VIEW_NUM_PREC
-                    << "   BlendMode: "      << iBlendMode
-                    << std::endl;
-
-          m_pcRenTop->setShiftLUTs(
-            m_cCameraData.getSynthViewShiftLUTD()[iLeftBaseViewIdx ][iSynthViewIdx],
-            m_cCameraData.getSynthViewShiftLUTI()[iLeftBaseViewIdx ][iSynthViewIdx],
-            m_cCameraData.getBaseViewShiftLUTI ()[iLeftBaseViewIdx ][iRightBaseViewIdx],
-            m_cCameraData.getSynthViewShiftLUTD()[iRightBaseViewIdx][iSynthViewIdx],
-            m_cCameraData.getSynthViewShiftLUTI()[iRightBaseViewIdx][iSynthViewIdx],
-            m_cCameraData.getBaseViewShiftLUTI ()[iRightBaseViewIdx][iLeftBaseViewIdx ],
-
-            iRelDistToLeft
-          );
-
-          m_pcRenTop->interpolateView(
-            apcPicYuvBaseVideo[iLeftBaseViewIdx ],
-            apcPicYuvBaseDepth[iLeftBaseViewIdx ],
-            apcPicYuvBaseVideo[iRightBaseViewIdx],
-            apcPicYuvBaseDepth[iRightBaseViewIdx],
-            pcPicYuvSynthOut,
-            iBlendMode,
-            iSimEnhBaseView
-            );
-        }
-        else
-        {
-          AOT(iLeftBaseViewIdx != iRightBaseViewIdx );
-          apcPicYuvBaseVideo[iLeftBaseViewIdx]->copyToPic( pcPicYuvSynthOut );
-          std::cout << "Copied    Frame " << iFrame
-                    << " of View "        << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC
-                    << "   (BaseView)  "    << std::endl;
-        }
-
-        break;
-      /// EXTRAPOLATION FROM LEFT
-      case 1:
-        if ( !bHasLView ) // View to render is BaseView
-        {
-          bRender = false;
-        }
-
-          if (  bIsBaseView )
-          {
-          AOF( iLeftBaseViewIdx == iRightBaseViewIdx );
-          Int iSortedBaseViewIdx = m_cCameraData.getBaseId2SortedId() [iLeftBaseViewIdx];
-          if ( iSortedBaseViewIdx - 1 >= 0 )
-          {
-            iLeftBaseViewIdx = m_cCameraData.getBaseSortedId2Id()[ iSortedBaseViewIdx - 1];
-          }
-          else
-          {
-            std::cout << "Copied    Frame " << iFrame << " of BaseView " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-            apcPicYuvBaseVideo[iLeftBaseViewIdx]->copyToPic( pcPicYuvSynthOut ); // Copy Original
-            bRender = false;
-          }
-        }
-
-
-        if (bRender)
-        {
-          std::cout << "Rendering Frame " << iFrame << " of View " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          m_pcRenTop->setShiftLUTs( m_cCameraData.getSynthViewShiftLUTD()[iLeftBaseViewIdx ][iSynthViewIdx],
-            m_cCameraData.getSynthViewShiftLUTI()[iLeftBaseViewIdx ][iSynthViewIdx], NULL, NULL, NULL, NULL, -1 );
-          m_pcRenTop->extrapolateView( apcPicYuvBaseVideo[iLeftBaseViewIdx ], apcPicYuvBaseDepth[iLeftBaseViewIdx ], pcPicYuvSynthOut, true );
-        }
-        break;
-      /// EXTRAPOLATION FROM RIGHT
-      case 2:            // extrapolation from right
-        if ( !bHasRView ) // View to render is BaseView
-        {
-          bRender = false;
-        }
-
-          if (  bIsBaseView )
-          {
-
-          AOF( iLeftBaseViewIdx == iRightBaseViewIdx );
-          Int iSortedBaseViewIdx = m_cCameraData.getBaseId2SortedId() [iLeftBaseViewIdx];
-          if ( iSortedBaseViewIdx + 1 < m_iNumberOfInputViews )
-          {
-            iRightBaseViewIdx = m_cCameraData.getBaseSortedId2Id()[ iSortedBaseViewIdx + 1];
-          }
-          else
-          {
-            std::cout << "Copied    Frame " << iFrame << " of BaseView " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-            apcPicYuvBaseVideo[iLeftBaseViewIdx]->copyToPic( pcPicYuvSynthOut ); // Copy Original
-            bRender = false;
-          }
-        }
-
-        if ( bRender )
-        {
-          std::cout << "Rendering Frame " << iFrame << " of View " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          m_pcRenTop->setShiftLUTs( NULL, NULL,NULL, m_cCameraData.getSynthViewShiftLUTD()[iRightBaseViewIdx ][iSynthViewIdx],
-            m_cCameraData.getSynthViewShiftLUTI()[iRightBaseViewIdx ][iSynthViewIdx],NULL, iRelDistToLeft);
-          m_pcRenTop->extrapolateView( apcPicYuvBaseVideo[iRightBaseViewIdx ], apcPicYuvBaseDepth[iRightBaseViewIdx ], pcPicYuvSynthOut, false);
-        }
-        break;
-      }
-
-      // Write Output
-
-      m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED, 0, 0, 0, 0, CHROMA_420 );
-    }
-    iFrame++;
-    iNumOfRenderedFrames++;
-  }
-
-  // Delete Buffers
-  pcNewOrg->destroy(); 
-  delete pcNewOrg; 
-
-  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-  {
-    apcPicYuvBaseVideo[uiBaseView]->destroy();
-    delete apcPicYuvBaseVideo[uiBaseView];
-
-    apcPicYuvBaseDepth[uiBaseView]->destroy();
-    delete apcPicYuvBaseDepth[uiBaseView];
-
-    // Temporal Filter
-    if ( m_bTempDepthFilter )
-    {
-      apcPicYuvLastBaseVideo[uiBaseView]->destroy();
-      delete apcPicYuvLastBaseVideo[uiBaseView];
-
-      apcPicYuvLastBaseDepth[uiBaseView]->destroy();
-      delete apcPicYuvLastBaseDepth[uiBaseView];
-    }
-  }
-
-  pcPicYuvSynthOut->destroy();
-  delete pcPicYuvSynthOut;
-
-  xDestroyLib();
-
-}
-
-Void TAppRendererTop::go()
-{
-  switch ( m_iRenderMode )
-  {
-  case 0:
-    render();
-    break;
-#if NH_3D_VSO
-  case 1:
-    renderModel();
-    break;
-#endif
-  case 10:
-    renderUsedPelsMap( );
-      break;
-  default:
-    AOT(true);
-  }
-
-#if H_3D_REN_MAX_DEV_OUT
-  Double dMaxDispDiff = m_cCameraData.getMaxShiftDeviation(); 
-
-  if ( !(dMaxDispDiff < 0) )
-  {  
-    printf("\n Max. possible shift error: %12.3f samples.\n", dMaxDispDiff );
-  }
-#endif
-}
-
-#if NH_3D_VSO
-Void TAppRendererTop::renderModel()
-{
-  if ( m_bUseSetupString )
-  {
-    xRenderModelFromString();
-  }
-  else
-  {
-    xRenderModelFromNums();
-  }
-}
-
-
-
-Void TAppRendererTop::xRenderModelFromString()
-{
-    xCreateLib();
-    xInitLib();
-
-    // Create Buffers Input Views;
-    std::vector<TComPicYuv*> apcPicYuvBaseVideo;
-    std::vector<TComPicYuv*> apcPicYuvBaseDepth;
-
-
-    for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-    {
-      TComPicYuv* pcNewVideoPic = new TComPicYuv;
-      TComPicYuv* pcNewDepthPic = new TComPicYuv;
-
-      pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-      apcPicYuvBaseVideo.push_back(pcNewVideoPic);
-
-      pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-      apcPicYuvBaseDepth.push_back(pcNewDepthPic);
-    }
-
-    Int aiPad[2] = { 0, 0 };
-    TComPicYuv* pcNewOrg = new TComPicYuv;
-    pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-
-    // Init Model
-    TRenModel cCurModel;
-
-    AOT( m_iLog2SamplingFactor != 0 );
-#if H_3D_VSO_EARLY_SKIP
-    cCurModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false );
-#else
-    cCurModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin );
-#endif
-
-    cCurModel.setupPart( 0, m_iSourceHeight  ); 
-
-    for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfInputViews; iViewIdx++ )
-    {
-      Int iNumOfModels   = m_cRenModStrParser.getNumOfModelsForView(iViewIdx, 1);
-
-      for (Int iCurModel = 0; iCurModel < iNumOfModels; iCurModel++ )
-      {
-        Int iModelNum; Int iLeftViewNum; Int iRightViewNum; Int iDump; Int iOrgRefNum; Int iBlendMode;
-        m_cRenModStrParser.getSingleModelData  ( iViewIdx, 1, iCurModel, iModelNum, iBlendMode, iLeftViewNum, iRightViewNum, iOrgRefNum, iDump ) ;
-        cCurModel         .createSingleModel   ( iViewIdx, 1, iModelNum, iLeftViewNum, iRightViewNum, false, iBlendMode );
-      }
-    }
-
-    // Create Buffer for synthesized View
-    TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
-    pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-
-    Bool bAnyEOS = false;
-
-    Int iNumOfRenderedFrames = 0;
-    Int iFrame = 0;
-
-    while ( ( ( iNumOfRenderedFrames < m_iFramesToBeRendered ) || ( m_iFramesToBeRendered == 0 ) ) && !bAnyEOS )
-    {
-
-      if ( iFrame >= m_iFrameSkip )
-      {      
-        // read in depth and video
-        for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
-        {
-          m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
-          bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
-
-          m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
-          bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
-        }
-      }
-      else
-      {
-        iFrame++;
-        continue;
-      }
-
-
-      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
-      {
-        TComPicYuv* pcPicYuvVideo = apcPicYuvBaseVideo[iBaseViewIdx];
-        TComPicYuv* pcPicYuvDepth = apcPicYuvBaseDepth[iBaseViewIdx];
-        Int iBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iBaseViewIdx ];
-        cCurModel.setBaseView( iBaseViewSIdx, pcPicYuvVideo, pcPicYuvDepth, NULL, NULL );
-      }
-
-      m_cCameraData.update( (UInt) ( iFrame - m_iFrameSkip ));
-
-      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
-      {
-        // setup virtual views
-        Int iBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iBaseViewIdx];
-
-        cCurModel.setErrorMode( iBaseViewSIdx, 1, 0 );
-        Int iNumOfSV  = m_cRenModStrParser.getNumOfModelsForView( iBaseViewSIdx, 1);
-        for (Int iCurView = 0; iCurView < iNumOfSV; iCurView++ )
-        {
-          Int iOrgRefBaseViewSIdx;
-          Int iLeftBaseViewSIdx;
-          Int iRightBaseViewSIdx;
-          Int iSynthViewRelNum;
-          Int iModelNum;
-          Int iBlendMode;
-
-          m_cRenModStrParser.getSingleModelData(iBaseViewSIdx, 1, iCurView, iModelNum, iBlendMode, iLeftBaseViewSIdx, iRightBaseViewSIdx, iOrgRefBaseViewSIdx, iSynthViewRelNum );
-
-          Int iLeftBaseViewIdx    = -1;
-          Int iRightBaseViewIdx   = -1;
-
-          TComPicYuv* pcPicYuvOrgRef  = NULL;
-          Int**      ppiShiftLUTLeft  = NULL;
-          Int**      ppiShiftLUTRight = NULL;
-          Int**      ppiBaseShiftLUTLeft  = NULL;
-          Int**      ppiBaseShiftLUTRight = NULL;
-
-
-          Int        iDistToLeft      = -1;
-
-          Int iSynthViewIdx = m_cCameraData.synthRelNum2Idx( iSynthViewRelNum );
-
-          if ( iLeftBaseViewSIdx != -1 )
-          {
-            iLeftBaseViewIdx   = m_cCameraData.getBaseSortedId2Id()   [ iLeftBaseViewSIdx ];
-            ppiShiftLUTLeft    = m_cCameraData.getSynthViewShiftLUTI()[ iLeftBaseViewIdx  ][ iSynthViewIdx  ];
-          }
-
-          if ( iRightBaseViewSIdx != -1 )
-          {
-            iRightBaseViewIdx  = m_cCameraData.getBaseSortedId2Id()   [iRightBaseViewSIdx ];
-            ppiShiftLUTRight   = m_cCameraData.getSynthViewShiftLUTI()[ iRightBaseViewIdx ][ iSynthViewIdx ];
-          }
-
-          if ( iRightBaseViewSIdx != -1 && iLeftBaseViewSIdx != -1 )
-          {
-
-            ppiBaseShiftLUTLeft  = m_cCameraData.getBaseViewShiftLUTI() [ iLeftBaseViewIdx  ][ iRightBaseViewIdx ];
-            ppiBaseShiftLUTRight = m_cCameraData.getBaseViewShiftLUTI() [ iRightBaseViewIdx ][ iLeftBaseViewIdx  ];
-            iDistToLeft    = m_cCameraData.getRelDistLeft(  iSynthViewIdx , iLeftBaseViewIdx, iRightBaseViewIdx);
-          }
-
-          std::cout << "Rendering Frame " << iFrame << " of View " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-
-          cCurModel.setSingleModel( iModelNum, ppiShiftLUTLeft, ppiBaseShiftLUTLeft, ppiShiftLUTRight, ppiBaseShiftLUTRight, iDistToLeft, pcPicYuvOrgRef );
-
-          Int iViewPos;
-          if (iLeftBaseViewSIdx != -1 && iRightBaseViewSIdx != -1)
-          {
-            iViewPos = VIEWPOS_MERGED;
-          }
-          else if ( iLeftBaseViewSIdx != -1 )
-          {
-            iViewPos = VIEWPOS_LEFT;
-          }
-          else if ( iRightBaseViewSIdx != -1 )
-          {
-            iViewPos = VIEWPOS_RIGHT;
-          }
-          else
-          {
-            AOT(true);
-          }
-
-          cCurModel.getSynthVideo ( iModelNum, iViewPos, pcPicYuvSynthOut );
-
-          // Write Output
-          m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iModelNum]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED,  0 ,0 ,0, 0, CHROMA_420 );
-        }
-      }
-      iFrame++;
-      iNumOfRenderedFrames++;
-  }
-
-    // Delete Buffers
-    for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-    {
-      apcPicYuvBaseVideo[uiBaseView]->destroy();
-      delete apcPicYuvBaseVideo[uiBaseView];
-
-      apcPicYuvBaseDepth[uiBaseView]->destroy();
-      delete apcPicYuvBaseDepth[uiBaseView];
-}
-    pcPicYuvSynthOut->destroy();
-    delete pcPicYuvSynthOut;
-
-    xDestroyLib();
-}
-
-
-Void TAppRendererTop::xRenderModelFromNums()
-{
-  xCreateLib();
-  xInitLib();
-
-  // Create Buffers Input Views;
-  std::vector<TComPicYuv*> apcPicYuvBaseVideo;
-  std::vector<TComPicYuv*> apcPicYuvBaseDepth;
-
-
-  Int aiPad[2] = { 0, 0 };
-  TComPicYuv* pcNewOrg = new TComPicYuv;
-  pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-
-
-  // Init Model
-  TRenModel cCurModel;
-
-  AOT( m_iLog2SamplingFactor != 0 );
-
-#if H_3D_VSO_EARLY_SKIP
-  cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false );
-#else
-  cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin );
-#endif
-  cCurModel.setupPart( 0, m_iSourceHeight  ); 
-
-  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-  {
-    TComPicYuv* pcNewVideoPic = new TComPicYuv;
-    TComPicYuv* pcNewDepthPic = new TComPicYuv;
-
-    pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-    apcPicYuvBaseVideo.push_back(pcNewVideoPic);
-
-    pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-    apcPicYuvBaseDepth.push_back(pcNewDepthPic);
-  }
-
-  for(Int iSynthViewIdx=0; iSynthViewIdx < m_iNumberOfOutputViews; iSynthViewIdx++ )
-  {
-    Int  iLeftBaseViewIdx  = -1;
-    Int  iRightBaseViewIdx = -1;
-    Bool bIsBaseView = false;
-
-    Int iRelDistToLeft;
-    m_cCameraData.getLeftRightBaseView( iSynthViewIdx, iLeftBaseViewIdx, iRightBaseViewIdx, iRelDistToLeft,  bIsBaseView );
-
-    if (m_iRenderDirection == 1 )
-    {
-      iRightBaseViewIdx = -1;
-      AOT( iLeftBaseViewIdx == -1);
-    }
-
-    if (m_iRenderDirection == 2 )
-    {
-      iLeftBaseViewIdx = -1;
-      AOT( iRightBaseViewIdx == -1);
-    }
-
-    Int iLeftBaseViewSIdx  = -1;
-    Int iRightBaseViewSIdx = -1;
-
-    if (iLeftBaseViewIdx != -1 )
-    {
-      iLeftBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iLeftBaseViewIdx];
-    }
-
-    if (iRightBaseViewIdx != -1 )
-    {
-      iRightBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iRightBaseViewIdx];
-    }
-    cCurModel.createSingleModel(-1, -1, iSynthViewIdx, iLeftBaseViewSIdx, iRightBaseViewSIdx, false, m_iBlendMode );
-  }
-
-  // Create Buffer for synthesized View
-  TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
-  pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-
-  Bool bAnyEOS = false;
-
-  Int iNumOfRenderedFrames = 0;
-  Int iFrame = 0;
-
-  while ( ( ( iNumOfRenderedFrames < m_iFramesToBeRendered ) || ( m_iFramesToBeRendered == 0 ) ) && !bAnyEOS )
-  {
-
-    if ( iFrame >= m_iFrameSkip )
-    {      
-      // read in depth and video
-      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
-      {
-        m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
-        bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
-
-        m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED, aiPad, CHROMA_420  ) ;
-        bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
-
-        if ( iFrame >= m_iFrameSkip )
-        {
-          Int iBaseViewSIdx = m_cCameraData.getBaseId2SortedId()[iBaseViewIdx];
-          cCurModel.setBaseView( iBaseViewSIdx, apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], NULL, NULL );
-        }
-      }
-    }
-    else
-    {
-      iFrame++;
-      continue;
-    }
-    m_cCameraData.update( (UInt) (iFrame - m_iFrameSkip ));
-    for(Int iSynthViewIdx=0; iSynthViewIdx < m_iNumberOfOutputViews; iSynthViewIdx++ )
-    {
-
-      Int  iLeftBaseViewIdx  = -1;
-      Int  iRightBaseViewIdx = -1;
-
-      Bool bIsBaseView = false;
-
-      Int iRelDistToLeft;
-      Bool bHasLRView = m_cCameraData.getLeftRightBaseView( iSynthViewIdx, iLeftBaseViewIdx, iRightBaseViewIdx, iRelDistToLeft, bIsBaseView );
-      Bool bHasLView = ( iLeftBaseViewIdx != -1 );
-      Bool bHasRView = ( iRightBaseViewIdx != -1 );
-
-      switch( m_iRenderDirection )
-      {
-        /// INTERPOLATION
-      case 0:
-        assert( bHasLRView || bIsBaseView );
-
-        if ( !bHasLRView && bIsBaseView ) // View to render is BaseView
-        {
-          std::cout << "Copied    Frame " << iFrame << " of BaseView " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          apcPicYuvBaseVideo[iLeftBaseViewIdx]->copyToPic( pcPicYuvSynthOut ); // Copy Original
-        }
-        else  // Render
-        {
-          std::cout << "Rendering Frame " << iFrame << " of View " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          cCurModel.setSingleModel( iSynthViewIdx,
-                                    m_cCameraData.getSynthViewShiftLUTI()[iLeftBaseViewIdx ][iSynthViewIdx]    ,
-                                    m_cCameraData.getBaseViewShiftLUTI ()[iLeftBaseViewIdx ][iRightBaseViewIdx],
-                                    m_cCameraData.getSynthViewShiftLUTI()[iRightBaseViewIdx][iSynthViewIdx]    ,
-                                    m_cCameraData.getBaseViewShiftLUTI ()[iRightBaseViewIdx][iLeftBaseViewIdx] ,
-                                    iRelDistToLeft,
-                                    NULL );
-          cCurModel.getSynthVideo ( iSynthViewIdx, VIEWPOS_MERGED, pcPicYuvSynthOut );
-        }
-        break;
-        /// EXTRAPOLATION FROM LEFT
-      case 1:
-
-        if ( !bHasLView ) // View to render is BaseView
-        {
-          std::cout << "Copied    Frame " << iFrame << " of BaseView " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          apcPicYuvBaseVideo[iLeftBaseViewIdx]->copyToPic( pcPicYuvSynthOut ); // Copy Original
-        }
-        else  // Render
-        {
-          std::cout << "Rendering Frame " << iFrame << " of View " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          cCurModel.setSingleModel( iSynthViewIdx, m_cCameraData.getSynthViewShiftLUTI()[iLeftBaseViewIdx ][iSynthViewIdx], NULL, NULL, NULL, -1,  NULL);
-          cCurModel.getSynthVideo ( iSynthViewIdx, VIEWPOS_LEFT, pcPicYuvSynthOut );
-        }
-        break;
-        /// EXTRAPOLATION FROM RIGHT
-      case 2:            // extrapolation from right
-        if ( !bHasRView ) // View to render is BaseView
-        {
-          std::cout << "Copied    Frame " << iFrame << " of BaseView " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          apcPicYuvBaseVideo[iRightBaseViewIdx]->copyToPic( pcPicYuvSynthOut ); // Copy Original
-        }
-        else  // Render
-        {
-          std::cout << "Rendering Frame " << iFrame << " of View " << (Double) m_cCameraData.getSynthViewNumbers()[iSynthViewIdx] / VIEW_NUM_PREC  << std::endl;
-          cCurModel.setSingleModel( iSynthViewIdx, NULL , NULL, m_cCameraData.getSynthViewShiftLUTI()[iRightBaseViewIdx ][iSynthViewIdx], NULL, -1, NULL);
-          cCurModel.getSynthVideo ( iSynthViewIdx, VIEWPOS_RIGHT, pcPicYuvSynthOut );
-        }
-        break;
-      }
-
-      // Write Output
-      m_apcTVideoIOYuvSynthOutput[m_bSweep ? 0 : iSynthViewIdx]->write( pcPicYuvSynthOut, IPCOLOURSPACE_UNCHANGED,  0 ,0 ,0, 0, CHROMA_420 );
-    }
-    iFrame++;
-    iNumOfRenderedFrames++;
-  }
-
-  // Delete Buffers
-  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-  {
-    apcPicYuvBaseVideo[uiBaseView]->destroy();
-    delete apcPicYuvBaseVideo[uiBaseView];
-
-    apcPicYuvBaseDepth[uiBaseView]->destroy();
-    delete apcPicYuvBaseDepth[uiBaseView];
-  }
-  pcPicYuvSynthOut->destroy();
-  delete pcPicYuvSynthOut;
-
-  xDestroyLib();
-
-}
-#endif
-
-Void TAppRendererTop::renderUsedPelsMap( )
-{
-  xCreateLib();
-  xInitLib();
-
-  // Create Buffers Input Views;
-  std::vector<TComPicYuv*> apcPicYuvBaseVideo;
-  std::vector<TComPicYuv*> apcPicYuvBaseDepth;
-
-  // TemporalImprovement Filter
-  std::vector<TComPicYuv*> apcPicYuvLastBaseVideo;
-  std::vector<TComPicYuv*> apcPicYuvLastBaseDepth;
-
-  Int aiPad[2] = { 0, 0 };
-
-  TComPicYuv* pcNewOrg = new TComPicYuv;
-  pcNewOrg->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-
-  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-  {
-    TComPicYuv* pcNewVideoPic = new TComPicYuv;
-    TComPicYuv* pcNewDepthPic = new TComPicYuv;
-
-    pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight,CHROMA_420, 1, 1, 1, true );
-    apcPicYuvBaseVideo.push_back(pcNewVideoPic);
-
-    pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1, true );
-    apcPicYuvBaseDepth.push_back(pcNewDepthPic);
-
-
-    //Temporal improvement Filter
-    if ( m_bTempDepthFilter )
-    {
-      pcNewVideoPic = new TComPicYuv;
-      pcNewDepthPic = new TComPicYuv;
-
-      pcNewVideoPic->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1, 1 , true);
-      apcPicYuvLastBaseVideo.push_back(pcNewVideoPic);
-
-      pcNewDepthPic->create( m_iSourceWidth, m_iSourceHeight,CHROMA_420, 1, 1, 1 , true);
-      apcPicYuvLastBaseDepth.push_back(pcNewDepthPic);
-    }
-  }
-
-  // Create Buffer for synthesized View
-  TComPicYuv* pcPicYuvSynthOut = new TComPicYuv;
-  pcPicYuvSynthOut->create( m_iSourceWidth, m_iSourceHeight, CHROMA_420, 1, 1 ,1, true);
-
-  Bool bAnyEOS = false;
-
-  Int iNumOfRenderedFrames = 0;
-  Int iFrame = 0;
-
-  while ( ( ( iNumOfRenderedFrames < m_iFramesToBeRendered ) || ( m_iFramesToBeRendered == 0 ) ) && !bAnyEOS )
-  {
-    if ( iFrame >= m_iFrameSkip )
-    {      
-      // read in depth and video
-      for(Int iBaseViewIdx=0; iBaseViewIdx < m_iNumberOfInputViews; iBaseViewIdx++ )
-      {
-        m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->read( apcPicYuvBaseVideo[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED,  aiPad, CHROMA_420  ) ;
-        apcPicYuvBaseVideo[iBaseViewIdx]->extendPicBorder();
-        bAnyEOS |= m_apcTVideoIOYuvVideoInput[iBaseViewIdx]->isEof();
-
-        m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->read( apcPicYuvBaseDepth[iBaseViewIdx], pcNewOrg, IPCOLOURSPACE_UNCHANGED,  aiPad, CHROMA_420  ) ;
-        apcPicYuvBaseDepth[iBaseViewIdx]->extendPicBorder();
-        bAnyEOS |= m_apcTVideoIOYuvDepthInput[iBaseViewIdx]->isEof();
-
-        if ( m_bTempDepthFilter && (iFrame >= m_iFrameSkip) )
-        {
-          m_pcRenTop->temporalFilterVSRS( apcPicYuvBaseVideo[iBaseViewIdx], apcPicYuvBaseDepth[iBaseViewIdx], apcPicYuvLastBaseVideo[iBaseViewIdx], apcPicYuvLastBaseDepth[iBaseViewIdx], ( iFrame == m_iFrameSkip) );
-        }
-      }
-    }
-    else
-    {
-      std::cout << "Skipping Frame " << iFrame << std::endl;
-
-      iFrame++;
-      continue;
-    }
-    m_cCameraData.update( (UInt) ( iFrame - m_iFrameSkip ) );
-
-    for(Int iViewIdx=1; iViewIdx < m_iNumberOfInputViews; iViewIdx++ )
-    {
-      std::cout << "Rendering UsedPelsMap for Frame " << iFrame << " of View " << (Double) m_cCameraData.getBaseViewNumbers()[iViewIdx] << std::endl;
-
-      Int iViewSIdx      = m_cCameraData.getBaseId2SortedId()[iViewIdx];
-      Int iFirstViewSIdx = m_cCameraData.getBaseId2SortedId()[0];
-
-      AOT( iViewSIdx == iFirstViewSIdx );
-
-      Bool bFirstIsLeft = (iFirstViewSIdx < iViewSIdx);
-
-      m_pcRenTop->setShiftLUTs(
-        m_cCameraData.getBaseViewShiftLUTD()[0][iViewIdx],
-        m_cCameraData.getBaseViewShiftLUTI()[0][iViewIdx],
-        m_cCameraData.getBaseViewShiftLUTI()[0][iViewIdx],
-        m_cCameraData.getBaseViewShiftLUTD()[0][iViewIdx],
-        m_cCameraData.getBaseViewShiftLUTI()[0][iViewIdx],
-        m_cCameraData.getBaseViewShiftLUTI()[0][iViewIdx],
-        -1
-        );
-
-      m_pcRenTop->getUsedSamplesMap( apcPicYuvBaseDepth[0], pcPicYuvSynthOut, bFirstIsLeft );
-
-      // Write Output
-      m_apcTVideoIOYuvSynthOutput[iViewIdx-1]->write( pcPicYuvSynthOut,  IPCOLOURSPACE_UNCHANGED, 0, 0, 0, 0, CHROMA_420 );
-
-    }
-    iFrame++;
-    iNumOfRenderedFrames++;
-  }
-
-  // Delete Buffers
-
-  pcNewOrg->destroy(); 
-  delete pcNewOrg; 
-
-  for ( UInt uiBaseView = 0; uiBaseView < m_iNumberOfInputViews; uiBaseView++ )
-  {
-    apcPicYuvBaseVideo[uiBaseView]->destroy();
-    delete apcPicYuvBaseVideo[uiBaseView];
-
-    apcPicYuvBaseDepth[uiBaseView]->destroy();
-    delete apcPicYuvBaseDepth[uiBaseView];
-
-    // Temporal Filter
-    if ( m_bTempDepthFilter )
-    {
-      apcPicYuvLastBaseVideo[uiBaseView]->destroy();
-      delete apcPicYuvLastBaseVideo[uiBaseView];
-
-      apcPicYuvLastBaseDepth[uiBaseView]->destroy();
-      delete apcPicYuvLastBaseDepth[uiBaseView];
-    }
-  }
-  pcPicYuvSynthOut->destroy();
-  delete pcPicYuvSynthOut;
-
-  xDestroyLib();
-
-}
-#endif
Index: branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererTop.h
===================================================================
--- branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererTop.h	(revision 1324)
+++ branches/HTM-15.1-MV-draft-4/source/App/TAppRenderer/TAppRendererTop.h	(revision 1325)
@@ -40,51 +40,3 @@
 #define __TAppRendererTOP__
 #include "../../Lib/TLibCommon/CommonDef.h"
-#if NH_3D
-#include "../../Lib/TLibRenderer/TRenTop.h"
-#include "../../Lib/TLibVideoIO/TVideoIOYuv.h"
-#include "TAppRendererCfg.h"
-#include "TAppRendererTop.h"
-#include "../../Lib/TLibRenderer/TRenModel.h"
-
-// ====================================================================================================================
-// Class definition
-// ====================================================================================================================
-
-/// encoder application class
-class TAppRendererTop : public TAppRendererCfg
-{
-private:
-  // class interface
-  std::vector<TVideoIOYuv*>     m_apcTVideoIOYuvVideoInput;
-  std::vector<TVideoIOYuv*>    m_apcTVideoIOYuvDepthInput;
-  std::vector<TVideoIOYuv*>     m_apcTVideoIOYuvSynthOutput;
-
-  // RendererInterface
-  TRenTop*                     m_pcRenTop;
-
-protected:
-  // initialization
-  Void  xCreateLib        ();                               ///< create renderer class and video io
-  Void  xInitLib          ();                               ///< initialize renderer class
-  Void  xDestroyLib       ();                               ///< destroy renderer class and video io
-#if NH_3D_VSO
-  Void  xRenderModelFromString();                           ///< render using model using setup string
-  Void  xRenderModelFromNums();                             ///< render using model using synth view numbers
-#endif
-
-public:
-  TAppRendererTop();
-  virtual ~TAppRendererTop();
-
-  Void  render      ();                               ///< main encoding function
-#if NH_3D_VSO
-  Void  renderModel ();
-#endif
-  Void  go          ();
-  Void  renderUsedPelsMap();
-
-};// END CLASS DEFINITION TAppRendererTop
-
-
-#endif // NH_3D
 #endif // __TAppRendererTOP__
