Index: trunk/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 77)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 100)
@@ -74,4 +74,7 @@
 {
   m_aidQP = NULL;
+#if FIXES
+  m_aidQPdepth = NULL;
+#endif
 }
 
@@ -82,4 +85,12 @@
     delete[] m_aidQP; m_aidQP = NULL;
   }
+
+#if FIXES
+  if ( m_aidQPdepth )
+  {
+    delete[] m_aidQPdepth; m_aidQPdepth = NULL;
+  }
+#endif
+
   for(Int i = 0; i< m_pchInputFileList.size(); i++ )
   {
@@ -306,15 +317,21 @@
 #if HHI_VSO
   ("VSOConfig",                       m_pchVSOConfig            , (Char *) 0    , "VSO configuration")
-    ("VSO",                             m_bUseVSO                 , false         , "Use VSO" )
-    // GT: For development, will be removed later
+  ("VSO",                             m_bUseVSO                 , false         , "Use VSO" )    
   ("VSOMode",                         m_uiVSOMode               , (UInt)   4    , "VSO Mode")
+  ("LambdaScaleVSO",                  m_dLambdaScaleVSO         , (Double) 1    , "Lambda Scaling for VSO")
+
 #if HHI_VSO_LS_TABLE
-  ("LambdaScaleVSO",                  m_dLambdaScaleVSO         , (Double) 1  , "Lambda Scaling for VSO")
-#else
-  ("LambdaScaleVSO",                  m_dLambdaScaleVSO         , (Double) 0.5  , "Lambda Scaling for VSO")
-#endif
-    ("ForceLambdaScaleVSO",             m_bForceLambdaScaleVSO    , false         , "Force using Lambda Scale VSO also in non-VSO-Mode")
+  ("VSOLSTable",                      m_bVSOLSTable             , true          , "Depth QP dependent video/depth rate allocation by Lagrange multiplier" )    
+#endif
+
+#if SAIT_VSO_EST_A0033
+  ("UseEstimatedVSD",                 m_bUseEstimatedVSD        , true          , "Model based VSD estimation instead of rendering based for some encoder decisions" )      
+#endif
+#if LGE_VSO_EARLY_SKIP_A0093
+  ("VSOEarlySkip",                    m_bVSOEarlySkip           , true          , "Early skip of VSO computation if synthesis error assumed to be zero" )      
+#endif
+  ("ForceLambdaScaleVSO",             m_bForceLambdaScaleVSO    , false         , "Force using Lambda Scale VSO also in non-VSO-Mode")
 #if HHI_VSO_DIST_INT
-  ("AllowNegDist",                    m_bAllowNegDist           , true         , "Allow negative Distortion in VSO")
+  ("AllowNegDist",                    m_bAllowNegDist           , true          , "Allow negative Distortion in VSO")
 #endif
 
@@ -667,6 +684,9 @@
      0.753550, 0.800000  
   }; 
-  AOT( (m_aiQP[1] < 0) || (m_aiQP[1] > 51));
-  m_dLambdaScaleVSO *= adLambdaScaleTable[m_aiQP[1]]; 
+  if ( m_bVSOLSTable )
+  {
+    AOT( (m_aiQP[1] < 0) || (m_aiQP[1] > 51));
+    m_dLambdaScaleVSO *= adLambdaScaleTable[m_aiQP[1]]; 
+  }
 #endif
 #endif
@@ -1562,4 +1582,14 @@
     printf("VSO Negative Distortion      : %d\n",    m_bAllowNegDist ? 1 : 0);
 #endif
+#if HHI_VSO_LS_TABLE
+    printf("VSO LS Table                 : %d\n",    m_bVSOLSTable ? 1 : 0);    
+#endif
+#if SAIT_VSO_EST_A0033
+    printf("VSO Estimated VSD            : %d\n",    m_bUseEstimatedVSD ? 1 : 0);        
+#endif
+#if LGE_VSO_EARLY_SKIP_A0093
+    printf("VSO Early Skip               : %d\n",    m_bVSOEarlySkip ? 1 : 0);    
+#endif
+   
   }
 #endif
@@ -1658,5 +1688,5 @@
 #if HHI_VSO
   printf("VSO:%d ", m_bUseVSO             );
-#endif
+#endif  
 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
   printf("DMM:%d ", m_bUseDMM );
Index: trunk/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 77)
+++ trunk/source/App/TAppEncoder/TAppEncCfg.h	(revision 100)
@@ -216,20 +216,20 @@
 #endif
 #if HHI_INTER_VIEW_RESIDUAL_PRED
-  UInt      m_uiMultiviewResPredMode;                         ///< using multiview residual prediction
+  UInt      m_uiMultiviewResPredMode;          ///< using multiview residual prediction
 #endif
 
 #if FAST_DECISION_FOR_MRG_RD_COST
-  Bool      m_useFastDecisionForMerge;                        ///< flag for using Fast Decision Merge RD-Cost 
-#endif
-  Bool      m_bUseCbfFastMode;                              ///< flag for using Cbf Fast PU Mode Decision
-  Int       m_iSliceMode;           ///< 0: Disable all Recon slice limits, 1 : Maximum number of largest coding units per slice, 2: Maximum number of bytes in a slice
-  Int       m_iSliceArgument;       ///< If m_iSliceMode==1, m_iSliceArgument=max. # of largest coding units. If m_iSliceMode==2, m_iSliceArgument=max. # of bytes.
-  Int       m_iEntropySliceMode;    ///< 0: Disable all entropy slice limits, 1 : Maximum number of largest coding units per slice, 2: Constraint based entropy slice
-  Int       m_iEntropySliceArgument;///< If m_iEntropySliceMode==1, m_iEntropySliceArgument=max. # of largest coding units. If m_iEntropySliceMode==2, m_iEntropySliceArgument=max. # of bins.
-
-  Int       m_iSliceGranularity;///< 0: Slices always end at LCU borders. 1-3: slices may end at a depth of 1-3 below LCU level.
-  Bool m_bLFCrossSliceBoundaryFlag;  ///< 0: Cross-slice-boundary in-loop filtering 1: non-cross-slice-boundary in-loop filtering
-  Int  m_iTileBehaviorControlPresentFlag; //!< 1: tile behavior control parameters are in PPS 0: tile behavior control parameters are not in PPS
-  Bool m_bLFCrossTileBoundaryFlag;  //!< 1: Cross-tile-boundary in-loop filtering 0: non-cross-tile-boundary in-loop filtering
+  Bool      m_useFastDecisionForMerge;         ///< flag for using Fast Decision Merge RD-Cost 
+#endif
+  Bool      m_bUseCbfFastMode;                 ///< flag for using Cbf Fast PU Mode Decision
+  Int       m_iSliceMode;                      ///< 0: Disable all Recon slice limits, 1 : Maximum number of largest coding units per slice, 2: Maximum number of bytes in a slice
+  Int       m_iSliceArgument;                  ///< If m_iSliceMode==1, m_iSliceArgument=max. # of largest coding units. If m_iSliceMode==2, m_iSliceArgument=max. # of bytes.
+  Int       m_iEntropySliceMode;               ///< 0: Disable all entropy slice limits, 1 : Maximum number of largest coding units per slice, 2: Constraint based entropy slice
+  Int       m_iEntropySliceArgument;           ///< If m_iEntropySliceMode==1, m_iEntropySliceArgument=max. # of largest coding units. If m_iEntropySliceMode==2, m_iEntropySliceArgument=max. # of bins.
+
+  Int       m_iSliceGranularity;               ///< 0: Slices always end at LCU borders. 1-3: slices may end at a depth of 1-3 below LCU level.
+  Bool      m_bLFCrossSliceBoundaryFlag;       ///< 0: Cross-slice-boundary in-loop filtering 1: non-cross-slice-boundary in-loop filtering
+  Int       m_iTileBehaviorControlPresentFlag; //!< 1: tile behavior control parameters are in PPS 0: tile behavior control parameters are not in PPS
+  Bool      m_bLFCrossTileBoundaryFlag;        //!< 1: Cross-tile-boundary in-loop filtering 0: non-cross-tile-boundary in-loop filtering
   Int       m_iColumnRowInfoPresent;
   Int       m_iUniformSpacingIdr;
@@ -280,5 +280,10 @@
   Char*     m_pchVSOConfig;
   Bool      m_bUseVSO;                                    ///< flag for using View Synthesis Optimization
-
+#if HHI_VSO_LS_TABLE
+  Bool      m_bVSOLSTable;                                ///< Depth QP dependent Lagrange parameter optimization (m23714)
+#endif
+#if LGE_VSO_EARLY_SKIP_A0093
+  Bool      m_bVSOEarlySkip;                              ///< Early skip of VSO computation (JCT3V-A0093 modification 4)
+#endif
   //// Used for development by GT, might be removed later
   Double    m_dLambdaScaleVSO;                            ///< Scaling factor for Lambda in VSO mode
@@ -289,4 +294,8 @@
   UInt      m_uiVSOMode;                                  ///< Number of VSO Mode, 1 = , 2 = simple, org vs. ren, 3 = simple, ren vs. ren, 4 = full  
 #endif
+#if 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)
+  Double    m_dDispCoeff;
+#endif
 
   // coding tools (depth intra modes)
Index: trunk/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 77)
+++ trunk/source/App/TAppEncoder/TAppEncTop.cpp	(revision 100)
@@ -203,5 +203,8 @@
     m_acTEncTopList[iViewIdx]->setLambdaScaleVSO               ( 1     );
     m_acTEncTopList[iViewIdx]->setVSOMode                      ( 0     );
-    m_acTEncTopList[iViewIdx]->setUseVSO                       ( false ); //GT: might be enabled later for VSO Mode 4
+    m_acTEncTopList[iViewIdx]->setUseVSO                       ( false ); 
+#if SAIT_VSO_EST_A0033
+    m_acTEncTopList[iViewIdx]->setUseEstimatedVSD              ( false );
+#endif
 #endif
 
@@ -517,4 +520,8 @@
 #endif
       m_acTEncDepthTopList[iViewIdx]->setVSOMode                      ( m_uiVSOMode );
+
+#if SAIT_VSO_EST_A0033
+      m_acTEncDepthTopList[iViewIdx]->setUseEstimatedVSD              ( m_bUseEstimatedVSD );
+#endif
 #endif
 
@@ -648,5 +655,13 @@
     if ( m_uiVSOMode == 4 )
     {
+#if HHI_VSO_SPEEDUP_A033
+#if LGE_VSO_EARLY_SKIP_A0093
+      m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0, m_bVSOEarlySkip );
+#else
+      m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, g_uiMaxCUHeight , LOG2_DISP_PREC_LUT, 0 );
+#endif
+#else
       m_cRendererModel.create( m_cRenModStrParser.getNumOfBaseViews(), m_cRenModStrParser.getNumOfModels(), m_iSourceWidth, m_iSourceHeight, LOG2_DISP_PREC_LUT, 0 );
+#endif
 
       for ( Int iViewNum = 0; iViewNum < m_iNumberOfViews; iViewNum++ )
@@ -1141,4 +1156,29 @@
 };
 
+#if SAIT_VSO_EST_A0033
+TComPicYuv* TAppEncTop::xGetPicYuvFromViewTemp( Int iViewIdx, Int iPoc, Bool bDepth, Bool bRecon )
+{
+  TComPic*    pcPic = xGetPicFromView( iViewIdx, iPoc, bDepth);
+  TComPicYuv* pcPicYuv = NULL;
+
+  if (pcPic != NULL)
+  {
+    if( bRecon )
+    {
+      if ( pcPic->getReconMark() )
+      {
+        pcPicYuv = pcPic->getPicYuvRec();
+      }
+    }
+    else
+    {
+      pcPicYuv = pcPic->getPicYuvOrg();
+    }
+  };
+
+  return pcPicYuv;
+};
+#endif
+
 /**
  *
@@ -1209,6 +1249,12 @@
 #endif
 #if HHI_VSO
+#if HHI_VSO_SPEEDUP_A033
+Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset )
+{
+  m_cRendererModel.setHorOffset( iHorOffset ); 
+#else
 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent )
 {
+#endif
   Int iEncViewSIdx = m_cCameraData.getBaseId2SortedId()[ iEncViewIdx ];
 
Index: trunk/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 77)
+++ trunk/source/App/TAppEncoder/TAppEncTop.h	(revision 100)
@@ -63,9 +63,9 @@
 private:
   // class interface
-  std::vector<TEncTop*>				  m_acTEncTopList ;
-  std::vector<TEncTop*>				  m_acTEncDepthTopList ;
-  std::vector<TVideoIOYuv*>		m_acTVideoIOYuvInputFileList;  ///< input YUV file
+  std::vector<TEncTop*>      m_acTEncTopList ;
+  std::vector<TEncTop*>      m_acTEncDepthTopList ;
+  std::vector<TVideoIOYuv*>  m_acTVideoIOYuvInputFileList;  ///< input YUV file
   std::vector<TVideoIOYuv*>  m_acTVideoIOYuvDepthInputFileList;
-  std::vector<TVideoIOYuv*>		m_acTVideoIOYuvReconFileList;  ///< output reconstruction file
+  std::vector<TVideoIOYuv*>  m_acTVideoIOYuvReconFileList;  ///< output reconstruction file
   std::vector<TVideoIOYuv*>  m_acTVideoIOYuvDepthReconFileList;
 
@@ -73,6 +73,6 @@
   std::vector< TComList<TComPicYuv*>* >  m_picYuvDepthRec;         
 
-  std::vector<Int>          	m_frameRcvd;                  ///< number of received frames
-  std::vector<Int>          	m_depthFrameRcvd;   
+  std::vector<Int>           m_frameRcvd;                  ///< number of received frames
+  std::vector<Int>           m_depthFrameRcvd;   
 
   unsigned                   m_essentialBytes;
@@ -124,4 +124,8 @@
   virtual ~TAppEncTop();
   
+#if SAIT_VSO_EST_A0033
+  TComPicYuv* xGetPicYuvFromViewTemp( Int iViewIdx, Int iPoc, Bool bDepth, Bool bRecon );
+#endif
+
   Void        encode      ();                               ///< main encoding function
   TEncTop*    getTEncTop( Int viewId, Bool isDepth );   
@@ -135,5 +139,9 @@
 #endif
 #if HHI_VSO
+#if HHI_VSO_SPEEDUP_A033
+  Void                  setupRenModel    ( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset );
+#else
   Void                  setupRenModel    ( Int iPoc, Int iEncViewIdx, Int iEncContent );
+#endif
 #endif
   
