Index: branches/HTM-4.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/App/TAppDecoder/TAppDecTop.cpp	(revision 188)
@@ -436,8 +436,6 @@
     m_useDepth = true;
 
-#if FIX_DECODING_WO_WRITING
   if ( m_pchReconFile )
   { 
-#endif
     while( m_tVideoIOYuvReconFile.size() < newNumberOfViewDepth)
     {
@@ -473,7 +471,5 @@
       free ( nextFilename );
     }
-#if FIX_DECODING_WO_WRITING
-  }
-#endif
+  }
 
   while( m_pocLastDisplay.size() < newNumberOfViewDepth )
Index: branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 188)
@@ -74,7 +74,5 @@
 {
   m_aidQP = NULL;
-#if FIXES
   m_aidQPdepth = NULL;
-#endif
 }
 
@@ -86,10 +84,8 @@
   }
 
-#if FIXES
   if ( m_aidQPdepth )
   {
     delete[] m_aidQPdepth; m_aidQPdepth = NULL;
   }
-#endif
 
   for(Int i = 0; i< m_pchInputFileList.size(); i++ )
@@ -120,5 +116,4 @@
 #endif
 
-#if FIX_MEM_LEAKS
  if ( m_pchCameraParameterFile != NULL )
    free ( m_pchCameraParameterFile ); 
@@ -139,5 +134,4 @@
    free ( m_scalingListFile );
 
-#endif   
 
 }
@@ -330,9 +324,5 @@
 #endif
 #if DBL_CONTROL
-#if FIX_DBL_CONTROL_DEFAULT
   ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, true)
-#else
-  ("DeblockingFilterControlPresent", m_DeblockingFilterControlPresent, false)
-#endif
 #endif
 
Index: branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 188)
@@ -689,12 +689,8 @@
     if ( m_uiVSOMode == 4 )
     {
-#if HHI_VSO_SPEEDUP_A0033
 #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
 
@@ -1027,5 +1023,4 @@
   pcDepthPicYuvOrg = NULL;
   
-#if FIX_MEM_LEAKS
   if ( pcPdmDepthOrg != NULL )
   {
@@ -1034,5 +1029,4 @@
     pcPdmDepthOrg = NULL; 
   };
-#endif
 
   
@@ -1293,16 +1287,7 @@
 #endif
 #if HHI_VSO
-#if HHI_VSO_SPEEDUP_A0033
 Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset )
 {
-#if FIX_VSO_SETUP
   m_cRendererModel.setupPart( iHorOffset, Min( g_uiMaxCUHeight, m_iSourceHeight - iHorOffset ) ); 
-#else
-  m_cRendererModel.setHorOffset( iHorOffset ); 
-#endif
-#else
-Void TAppEncTop::setupRenModel( Int iPoc, Int iEncViewIdx, Int iEncContent )
-{
-#endif
   Int iEncViewSIdx = m_cCameraData.getBaseId2SortedId()[ iEncViewIdx ];
 
Index: branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncTop.h
===================================================================
--- branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncTop.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/App/TAppEncoder/TAppEncTop.h	(revision 188)
@@ -136,9 +136,5 @@
 #endif
 #if HHI_VSO
-#if HHI_VSO_SPEEDUP_A0033
   Void                  setupRenModel    ( Int iPoc, Int iEncViewIdx, Int iEncContent, Int iHorOffset );
-#else
-  Void                  setupRenModel    ( Int iPoc, Int iEncViewIdx, Int iEncContent );
-#endif
 #endif
   
Index: branches/HTM-4.1-dev0/source/App/TAppRenderer/TAppRendererTop.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/App/TAppRenderer/TAppRendererTop.cpp	(revision 188)
@@ -532,11 +532,5 @@
 #endif
 
-#if HHI_VSO_SPEEDUP_A0033
-#if FIX_VSO_SETUP
     cCurModel.setupPart( 0, m_iSourceHeight  ); 
-#else
-    cCurModel.setHorOffset( 0 );
-#endif
-#endif
 
     for ( Int iViewIdx = 0; iViewIdx < m_iNumberOfInputViews; iViewIdx++ )
@@ -713,11 +707,5 @@
 
   AOT( m_iLog2SamplingFactor != 0 );
-#if HHI_VSO_SPEEDUP_A0033
-#if FIX_VSO_SETUP
   cCurModel.setupPart( 0, m_iSourceHeight  ); 
-#else
-  cCurModel.setHorOffset( 0 );
-#endif
-#endif
 #if LGE_VSO_EARLY_SKIP_A0093
   cCurModel.create( m_iNumberOfInputViews, m_iNumberOfOutputViews, m_iSourceWidth, m_iSourceHeight, m_iShiftPrecision, m_iBlendHoleMargin, false );
Index: branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.cpp	(revision 188)
@@ -93,10 +93,8 @@
   m_pcTrCoeffCr        = NULL;
 #if ADAPTIVE_QP_SELECTION  
-#if FIX_MEM_LEAKS
   m_ArlCoeffIsAliasedAllocation = false;
   m_pcArlCoeffY        = NULL;
   m_pcArlCoeffCb       = NULL;
   m_pcArlCoeffCr       = NULL;
-#endif
 #endif
   
@@ -255,7 +253,5 @@
       m_pcArlCoeffCb       = m_pcGlbArlCoeffCb;
       m_pcArlCoeffCr       = m_pcGlbArlCoeffCr;
-#if FIX_MEM_LEAKS
       m_ArlCoeffIsAliasedAllocation = true;
-#endif
     }
     else
@@ -381,5 +377,4 @@
     if ( m_pcTrCoeffCr        ) { xFree(m_pcTrCoeffCr);         m_pcTrCoeffCr       = NULL; }
 #if ADAPTIVE_QP_SELECTION
-#if FIX_MEM_LEAKS
     if (!m_ArlCoeffIsAliasedAllocation)
     {
@@ -388,5 +383,4 @@
       xFree(m_pcArlCoeffCr); m_pcArlCoeffCr = 0;
     }
-#endif
     if ( m_pcGlbArlCoeffY     ) { xFree(m_pcGlbArlCoeffY);      m_pcGlbArlCoeffY    = NULL; }
     if ( m_pcGlbArlCoeffCb    ) { xFree(m_pcGlbArlCoeffCb);     m_pcGlbArlCoeffCb   = NULL; }
@@ -2397,8 +2391,6 @@
 #if H0204_QP_PREDICTION
   UInt        lPartIdx, aPartIdx;
-#if FIX_COMP_WARNING_INIT
   lPartIdx = 0; 
   aPartIdx = 0;
-#endif
   TComDataCU* cULeft  = getQpMinCuLeft ( lPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU );
   TComDataCU* cUAbove = getQpMinCuAbove( aPartIdx, m_uiAbsIdxInLCU + uiCurrAbsIdxInLCU );
Index: branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComDataCU.h	(revision 188)
@@ -159,7 +159,5 @@
   Int*          m_pcArlCoeffCb;       ///< ARL coefficient buffer (Cb)
   Int*          m_pcArlCoeffCr;       ///< ARL coefficient buffer (Cr)
-#if FIX_MEM_LEAKS
   Bool          m_ArlCoeffIsAliasedAllocation; ///< ARL coefficient buffer is an alias of the global buffer and must not be free()'d
-#endif 
 
   static Int*   m_pcGlbArlCoeffY;     ///< ARL coefficient buffer (Y)
Index: branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComPicSym.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComPicSym.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComPicSym.cpp	(revision 188)
@@ -123,10 +123,8 @@
 
 
-#if FIX_MEM_LEAKS
   for( i=0; i<(m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1); i++ )
   {
     if ( m_apcTComTile[i] )  delete m_apcTComTile[i];
   }
-#endif
 
   delete [] m_apcTComTile;
Index: branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComSlice.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComSlice.cpp	(revision 188)
@@ -1704,5 +1704,5 @@
 , m_cabacInitPresentFlag        (false)
 , m_encCABACTableIdx            (0)
-#if POZNAN_CABAC_INIT_FLAG_FIX
+#if FIX_POZNAN_CABAC_INIT_FLAG
 , m_encPrevPOC            (0)
 #endif
Index: branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComSlice.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComSlice.h	(revision 188)
@@ -883,5 +883,5 @@
   Bool     m_cabacInitPresentFlag;
   UInt     m_encCABACTableIdx;           // Used to transmit table selection across slices
-#if POZNAN_CABAC_INIT_FLAG_FIX
+#if FIX_POZNAN_CABAC_INIT_FLAG
   UInt     m_encPrevPOC;
 #endif
@@ -1018,5 +1018,5 @@
   Bool     getCabacInitPresentFlag()                { return m_cabacInitPresentFlag;    }
   UInt     getEncCABACTableIdx()                    { return m_encCABACTableIdx;        }
-#if POZNAN_CABAC_INIT_FLAG_FIX
+#if FIX_POZNAN_CABAC_INIT_FLAG
   Void     setEncPrevPOC(UInt uiPOC)                { m_encPrevPOC = uiPOC;             }
   UInt     getEncPrevPOC()                          { return m_encPrevPOC;              }
Index: branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComYuv.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComYuv.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibCommon/TComYuv.cpp	(revision 188)
@@ -409,5 +409,5 @@
 
 #if LG_RESTRICTEDRESPRED_M24766
-void
+Void
 TComYuv::getPUXYOffset(PartSize uhPartitionSize, Int iWidth, Int iHeight, Int &iXOffset, Int &iYOffset)
 {
Index: branches/HTM-4.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 188)
@@ -44,16 +44,6 @@
 ///// ***** FIXES *********
 // A
-#define FIXES                             1
-#define POZNAN_CABAC_INIT_FLAG_FIX        1
-#define FIX_DECODING_WO_WRITING           1
-#define FIX_INIT_ROM                      1
-#define FIX_VIRT_DESTRUCTOR               1
-#define FIX_MEM_LEAKS                     1
-#define FIX_VSO_SETUP                     1
-#define FIX_COMP_WARNING_INIT             1
-#define FIX_RDO_MACRO                     1
+#define FIX_POZNAN_CABAC_INIT_FLAG        1
 #define FIX_LG_RESTRICTEDRESPRED_M24766   1
-#define FIX_REMOVE_TILE_DEPENDENCE        1
-#define FIX_DBL_CONTROL_DEFAULT           1
 
 // B
@@ -70,5 +60,5 @@
 #define HHI_DMM_WEDGE_INTRA               1   // depth model modes independent on texture (explicit and intra-predicted Wedgelet prediction)
 #define HHI_DMM_PRED_TEX                  1   // depth model modes dependent on texture (inter-component Wedgelet and Contour prediction )
-#define LGE_EDGE_INTRA_A0070              1   // JCT2-A0070
+#define LGE_EDGE_INTRA_A0070              1   // JCT3V-A0070
 #define RWTH_SDC_DLT_B0036                1   // JCT3V-B0036: Simplified Depth Coding + Depth Lookup Table
 #define HHIQC_DMMFASTSEARCH_B0039         1   // JCT3V-B0039: fast Wedgelet search for DMM modes 1 and 3
@@ -79,7 +69,7 @@
 #define QC_MRG_CANS_B0048                 1   // JCT3V-B0048, B0086, B0069
 #if     QC_MRG_CANS_B0048
-#define OL_DISMV_POS_B0069                1   // different pos for dispairty MV candidate, B0069
-#endif
-#define MTK_INTERVIEW_MERGE_A0049         1   // JCT2-A0049 second part
+#define OL_DISMV_POS_B0069                1   // different pos for disparity MV candidate, B0069
+#endif
+#define MTK_INTERVIEW_MERGE_A0049         1   // JCT3V-A0049 second part
 #if HHI_INTER_VIEW_MOTION_PRED         
 #define SAIT_IMPROV_MOTION_PRED_M24829    1   // improved inter-view motion vector prediction
@@ -116,13 +106,10 @@
 #define HHI_VSO_LS_TABLE_M23714           1   // m23714, enable table base Lagrange multiplier optimization 
 #define HHI_VSO_DIST_INT                  1   // Allow negative synthesized view distortion change
+#define HHI_VSO_COLOR_PLANES              1   // Compute VSO distortion on color planes 
+#define HHI_VSO_RM_ASSERTIONS             0   // Output VSO assertions
 #define HHI_VSO_SYNTH_DIST_OUT            0   // Output of synthesized view distortion instead of depth distortion in encoder output
-#define HHI_VSO_COLOR_PLANES              1   // Compute VSO distortion on color planes 
-#define HHI_VSO_RM_ASSERTIONS             0   // output VSO assertions
-#define HHI_VSO_SPEEDUP_A0033             1   // JCT2-A0033 modification 1 (changes in classes directly related the renderer model 
-                                              // to are not covered by this define, since nearly the entire class has been changed)
-#define HHI_VSO_SET_OPTIM                 1   // remove unnecessary updates (works only with HHI_VSO_FIX 1 properly)
-#define SAIT_VSO_EST_A0033                1   // JCT2-A0033 modification 3
-#define LGE_VSO_EARLY_SKIP_A0093          1   // JCT2-A0093 modification 4
-#define LGE_WVSO_A0119                    1   // JCT2-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term
+#define SAIT_VSO_EST_A0033                1   // JCT3V-A0033 modification 3
+#define LGE_VSO_EARLY_SKIP_A0093          1   // JCT3V-A0093 modification 4
+#define LGE_WVSO_A0119                    1   // JCT3V-A0119 & JCT3V-B0131 Depth Metric with a weighted depth fidelity term
 
 
@@ -408,5 +395,5 @@
                             // This is here just to perform timing tests -- OL_FLUSH_ALIGN should be 0 for WPP.
 
-#define RVM_VCEGAM10_M 4
+#define RVM_VCEGAM10_M         4
 
 #define PLANAR_IDX             0
@@ -775,5 +762,4 @@
 };
 
-#if HHI_VSO_SPEEDUP_A0033
 
 enum BlenMod
@@ -785,5 +771,4 @@
     BLEND_GEN   =  3
 };
-#endif
 
 /// supported prediction type
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 188)
@@ -279,8 +279,4 @@
   Int       m_iColumnRowInfoPresent;
   Int       m_iUniformSpacingIdr;
-#if FIX_REMOVE_TILE_DEPENDENCE
-#else
-  Int       m_iTileBoundaryIndependenceIdr;
-#endif
   Int       m_iNumColumnsMinus1;
   UInt*     m_puiColumnWidth;
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 188)
@@ -1348,15 +1348,4 @@
 
 #if HHI_VSO
-#if HHI_VSO_SET_OPTIM 
-#else 
-          if( m_pcRdCost->getUseRenModel() ) // necessary ??
-          {
-            UInt  uiWidth     = m_ppcRecoYuvBest[uhNextDepth]->getWidth   (  );
-            UInt  uiHeight    = m_ppcRecoYuvBest[uhNextDepth]->getHeight  (   );
-            Pel*  piSrc       = m_ppcRecoYuvBest[uhNextDepth]->getLumaAddr( 0 );
-            UInt  uiSrcStride = m_ppcRecoYuvBest[uhNextDepth]->getStride  (   );
-            m_pcRdCost->setRenModelData( pcSubBestPartCU, 0, piSrc, uiSrcStride, uiWidth, uiHeight );
-          }
-#endif
 #endif
         }
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 188)
@@ -449,15 +449,4 @@
 #endif
 
-#if HHI_VSO_SPEEDUP_A0033
-#else
-    if ( iVSOMode == 4 )
-    {
-      m_pcEncTop->getEncTop()->setupRenModel( pcSlice->getPOC(), pcSlice->getViewId(), m_pcEncTop->isDepthCoder() ? 1 : 0 );
-    }
-    else
-    {
-      AOT(true); 
-    }
-#endif
 
 #if SAIT_VSO_EST_A0033
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncGOP.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncGOP.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncGOP.h	(revision 188)
@@ -137,7 +137,5 @@
   
   Void  preLoopFilterPicAll  ( TComPic* pcPic, UInt64& ruiDist, UInt64& ruiBits );
-#if HHI_VSO_SPEEDUP_A0033
   TEncTop* getEncTop() { return m_pcEncTop; }
-#endif
   
   TEncSlice*  getSliceEncoder()   { return m_pcSliceEncoder; }
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSbac.cpp	(revision 188)
@@ -307,5 +307,5 @@
   }  
 
-  #if CABAC_INIT_FLAG && POZNAN_CABAC_INIT_FLAG_FIX
+  #if CABAC_INIT_FLAG && FIX_POZNAN_CABAC_INIT_FLAG
     m_pcSlice->getPPS()->setEncPrevPOC( m_pcSlice->getPOC() );
   #endif
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 188)
@@ -6513,5 +6513,4 @@
         
         Dist uiActDist = RDO_DIST_MAX;
-#if FIX_RDO_MACRO
 #if SAIT_VSO_EST_A0033
         if ( m_pcRdCost->getUseEstimatedVSD() )
@@ -6544,37 +6543,4 @@
 #endif // LGE_WVSO_A0119
         }
-#else // FIX_RDO_MACRO
-#if SAIT_VSO_EST_A0033
-        if ( m_pcRdCost->getUseEstimatedVSD() )
-        {          
-          TComPicYuv* pcVirRec = m_pcRdCost->getVideoRecPicYuv();
-          TComPicYuv* pcVirOrg = m_pcRdCost->getDepthPicYuv();
-          uiActDist = m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, pcVirRec->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirOrg->getLumaAddr(pcCU->getAddr(),pcCU->getZorderIdxInCU()), pcVirRec->getStride(), uiWidth, uiHeight );
-#if LGE_WVSO_A0119
-          if ( m_pcRdCost->getUseWVSO() )
-          {    
-            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
-            Int iVSDWeight = m_pcRdCost->getVSDWeight() * m_pcRdCost->getVSDWeight();
-            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
-            uiActDist = (iDWeight * iD + iVSDWeight * (Dist) uiActDist) / ( iDWeight + iVSDWeight);
-          }
-#endif // LGE_WVSO_A0119
-        }
-        else       
-#else  // SAIT_VSO_EST_A0033 <-- wrong #else statement should be #endif
-        {        
-          uiActDist = m_pcRdCost->getDistVS( pcCU, 0, piPredic, uiStride,  piOrig, uiStride, uiWidth, uiHeight, false, 0 );
-#if LGE_WVSO_A0119
-          if ( m_pcRdCost->getUseWVSO() )
-          {    
-            Int iDWeight = m_pcRdCost->getDWeight() * m_pcRdCost->getDWeight();
-            Int iVSOWeight = m_pcRdCost->getVSOWeight() * m_pcRdCost->getVSOWeight();
-            Dist iD = (Dist) m_pcRdCost->getDistPart( piPredic, uiStride, piOrig, uiStride, uiWidth, uiHeight, false, DF_SAD );
-            uiActDist = (iDWeight * iD + iVSOWeight * (Dist) uiActDist) / ( iDWeight + iVSOWeight);
-          }
-#endif // LGE_WVSO_A0119
-        }
-#endif // SAIT_VSO_EST_A0033 <-- wrong #endif should be removed
-#endif // FIX_RDO_MACRO
 
         if( uiActDist < uiBestDist || uiBestDist == RDO_DIST_MAX )
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncSlice.cpp	(revision 188)
@@ -38,7 +38,5 @@
 #include "TEncTop.h"
 #include "TEncSlice.h"
-#if HHI_VSO_SPEEDUP_A0033
 #include "../../App/TAppEncoder/TAppEncTop.h"
-#endif
 #include <math.h>
 
@@ -659,5 +657,5 @@
   m_uiPicDist       = 0;
   
-#if CABAC_INIT_FLAG && POZNAN_CABAC_INIT_FLAG_FIX
+#if CABAC_INIT_FLAG && FIX_POZNAN_CABAC_INIT_FLAG
   Bool bReset =(pcSlice->getPOC() == 0) || 
     (pcSlice->getPOC() % m_pcCfg->getIntraPeriod() == 0) ||
@@ -823,7 +821,5 @@
   UInt uiTileLCUX     = 0;
 
-#if HHI_VSO_SPEEDUP_A0033
   Int iLastPosY = -1;
-#endif
 
   // for every CU in slice
@@ -838,5 +834,4 @@
     pcCU->initCU( rpcPic, uiCUAddr );
 
-#if HHI_VSO_SPEEDUP_A0033
     if ( m_pcRdCost->getUseRenModel() )
     {
@@ -852,5 +847,4 @@
       }
     }    
-#endif
 
     // inherit from TR if necessary, select substream to use.
Index: branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 188)
@@ -91,12 +91,8 @@
 {
   // initialize global variables
-#if FIX_INIT_ROM
   if( m_viewId == 0 && m_isDepth == false )
   {
-#endif
     initROM();
-#if FIX_INIT_ROM
-  }
-#endif
+  }
 
 
@@ -605,7 +601,5 @@
   // mark it should be extended
   rpcPic->getPicYuvRec()->setBorderExtension(false);
-#if FIXES
   rpcPic->getPicYuvOrg()->setBorderExtension(false); 
-#endif
 }
 
@@ -1106,9 +1100,5 @@
 
     // # substreams is "per tile" when tiles are independent.
-#if FIX_REMOVE_TILE_DEPENDENCE
     if ( m_iWaveFrontSynchro )
-#else
-    if (m_iTileBoundaryIndependenceIdr && m_iWaveFrontSynchro)
-#endif
     {
       m_cPPS.setNumSubstreams(m_iWaveFrontSubstreams * (m_iNumColumnsMinus1+1)*(m_iNumRowsMinus1+1));
Index: branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenImage.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenImage.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenImage.cpp	(revision 188)
@@ -106,5 +106,4 @@
 }
 
-#if HHI_VSO_SPEEDUP_A0033
 template<typename T>
 Void TRenImage<T>::getDataAndStrides( T** pptData, Int* piStrides )
@@ -127,5 +126,4 @@
   }
 }
-#endif
 
 template<typename T>
Index: branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenImage.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenImage.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenImage.h	(revision 188)
@@ -69,8 +69,6 @@
   TRenImagePlane<T>** getPlanes() const;
 
-#if HHI_VSO_SPEEDUP_A0033
   Void getDataAndStrides( T**    pptData, Int*  piStrides );
   Void getWidthAndHeight( Int*  piWidths, Int*  piHeights );
-#endif
 
   UInt getNumberOfPlanes()  const;
Index: branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenModel.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenModel.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenModel.cpp	(revision 188)
@@ -42,7 +42,5 @@
   m_iWidth             = -1;
   m_iHeight            = -1;
-#if FIX_VSO_SETUP
   m_iUsedHeight        = -1; 
-#endif
   m_iNumOfBaseViews    = -1;
   m_iSampledWidth      = -1;
@@ -437,25 +435,13 @@
 {
   AOT( iViewNum < 0 || iViewNum > m_iNumOfBaseViews );
-#if FIX_VSO_SETUP
   AOF( pcPicYuvVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvVideoData->getWidth() == m_iWidth );
   AOF( pcPicYuvDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvDepthData->getWidth() == m_iWidth );
-#else
-  AOF( pcPicYuvVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvVideoData->getWidth() == m_iWidth );
-  AOF( pcPicYuvDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvDepthData->getWidth() == m_iWidth );
-#endif
 
   pcPicYuvVideoData->extendPicBorder();
 
-#if FIX_VSO_SETUP
   TRenFilter::sampleHorUp   ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() +  m_uiHorOff        * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth,      m_iUsedHeight,      m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] );
   TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] );
   TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] );
   TRenFilter::copy          (               pcPicYuvDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(),  m_iWidth,      m_iUsedHeight,      m_apiCurDepthPel [ iViewNum],     m_aiCurDepthStrides [iViewNum]    );
-#else
-  TRenFilter::sampleHorUp   ( m_iShiftPrec, pcPicYuvVideoData->getLumaAddr() +  m_uiHorOff        * pcPicYuvVideoData->getStride () , pcPicYuvVideoData->getStride() , m_iWidth,      m_iHeight,      m_aapiCurVideoPel[ iViewNum ][0], m_aaiCurVideoStrides[iViewNum][0] );
-  TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][1], m_aaiCurVideoStrides[iViewNum][1] );
-  TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvVideoData->getCStride() , pcPicYuvVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiCurVideoPel[ iViewNum ][2], m_aaiCurVideoStrides[iViewNum][2] );
-  TRenFilter::copy          (               pcPicYuvDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvDepthData->getStride () , pcPicYuvDepthData->getStride(),  m_iWidth,      m_iHeight,      m_apiCurDepthPel [ iViewNum],     m_aiCurDepthStrides [iViewNum]    );
-#endif
 
   // Used for rendering reference pic from original video data
@@ -465,5 +451,4 @@
   if ( m_abSetupVideoFromOrgForView[iViewNum] )
   {
-#if FIX_VSO_SETUP
     AOF( pcPicYuvOrgVideoData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgVideoData->getWidth() == m_iWidth );
     pcPicYuvOrgVideoData->extendPicBorder();
@@ -471,22 +456,10 @@
     TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] );
     TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] );
-#else
-    AOF( pcPicYuvOrgVideoData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgVideoData->getWidth() == m_iWidth );
-    pcPicYuvOrgVideoData->extendPicBorder();
-    TRenFilter::sampleHorUp   ( m_iShiftPrec, pcPicYuvOrgVideoData->getLumaAddr() +  m_uiHorOff        * pcPicYuvOrgVideoData->getStride() , pcPicYuvOrgVideoData->getStride() , m_iWidth,      m_iHeight,      m_aapiOrgVideoPel[ iViewNum ][0], m_aaiOrgVideoStrides[iViewNum][0] );
-    TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCbAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][1], m_aaiOrgVideoStrides[iViewNum][1] );
-    TRenFilter::sampleCUpHorUp( m_iShiftPrec, pcPicYuvOrgVideoData->getCrAddr()   + (m_uiHorOff >> 1 ) * pcPicYuvOrgVideoData->getCStride(), pcPicYuvOrgVideoData->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiOrgVideoPel[ iViewNum ][2], m_aaiOrgVideoStrides[iViewNum][2] );
-#endif
   }
 
   if ( m_abSetupDepthFromOrgForView[iViewNum] )
   {
-#if FIX_VSO_SETUP
     AOF( pcPicYuvOrgDepthData->getHeight() >= m_iUsedHeight + m_uiHorOff && pcPicYuvOrgDepthData->getWidth() == m_iWidth );
     TRenFilter::copy          (               pcPicYuvOrgDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(),  m_iWidth,     m_iUsedHeight,      m_apiOrgDepthPel [ iViewNum],     m_aiOrgDepthStrides [iViewNum]    );
-#else
-    AOF( pcPicYuvOrgDepthData->getHeight() <= m_iHeight + m_uiHorOff || pcPicYuvOrgDepthData->getWidth() == m_iWidth );
-    TRenFilter::copy          (               pcPicYuvOrgDepthData->getLumaAddr() +  m_uiHorOff        * pcPicYuvOrgDepthData->getStride() , pcPicYuvOrgDepthData->getStride(),  m_iWidth,     m_iHeight,      m_apiOrgDepthPel [ iViewNum],     m_aiOrgDepthStrides [iViewNum]    );
-#endif
   }
 }
@@ -497,7 +470,5 @@
   AOT( iModelNum < 0 || iModelNum > m_iNumOfRenModels );
 
-#if FIX_VSO_SETUP
   m_apcRenModels[iModelNum]->setupPart( m_uiHorOff, m_iUsedHeight );
-#endif
 
   // Switch model  to original data for setup if given to render reference
@@ -520,9 +491,5 @@
   }
 
-#if FIX_VSO_SETUP
   m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false );
-#else
-  m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, false, m_uiHorOff );
-#endif
 
   // Setup to Org
@@ -545,9 +512,5 @@
 
     // setup keeping reference rendered from original data
-#if FIX_VSO_SETUP
     m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true );
-#else
-    m_apcRenModels[iModelNum]->setup     ( pcPicYuvRefView, ppiShiftLutLeft, ppiBaseShiftLutLeft, ppiShiftLutRight, ppiBaseShiftLutRight, iDistToLeft, true, m_uiHorOff);
-#endif
   }
 }
@@ -579,5 +542,4 @@
 
 
-#if FIX_VSO_SETUP
 Void
 TRenModel::setupPart ( UInt uiHorOff, Int iUsedHeight )
@@ -587,11 +549,4 @@
   m_iUsedHeight = iUsedHeight; 
 }
-#else
-Void
-TRenModel::setHorOffset     ( UInt uiHorOff )
-{
-  m_uiHorOff = uiHorOff; 
-}
-#endif
 
 #if LGE_VSO_EARLY_SKIP_A0093
@@ -606,9 +561,5 @@
 
   AOT( iWidth  + iStartPosX > m_iWidth  );
-#if FIX_VSO_SETUP
   AOT( iHeight + iStartPosY > m_iUsedHeight );
-#else
-  AOT( iHeight + iStartPosY > m_iHeight );
-#endif
 
   AOT( iStartPosX < 0);
@@ -644,9 +595,5 @@
 
   iWidth  = min(iWidth , m_iWidth  - iStartPosX );
-#if FIX_VSO_SETUP
   iHeight = min(iHeight, m_iUsedHeight - iStartPosY );
-#else
-  iHeight = min(iHeight, m_iHeight - iStartPosY );
-#endif
 
   AOT( iStartPosX < 0);
@@ -684,9 +631,5 @@
 TRenModel::getSynthVideo( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv )
 {
-#if FIX_VSO_SETUP
   m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv );
-#else
-  m_apcRenModels[iModelNum]->getSynthVideo(iViewNum, pcPicYuv, m_uiHorOff );
-#endif
 }
 
@@ -694,9 +637,5 @@
 TRenModel::getSynthDepth( Int iModelNum, Int iViewNum, TComPicYuv* pcPicYuv )
 {
-#if HHI_VSO_SPEEDUP_A0033 && !FIX_VSO_SETUP
-  m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv, m_uiHorOff );
-#else
   m_apcRenModels[iModelNum]->getSynthDepth(iViewNum, pcPicYuv );
-#endif
 }
 
@@ -705,16 +644,8 @@
 {
   TComPicYuv cPicYuvSynth;
-#if FIX_VSO_SETUP
   cPicYuvSynth.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
-#else
-  cPicYuvSynth.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth );
-#endif
 
   TComPicYuv cPicYuvTempRef;
-#if FIX_VSO_SETUP
   cPicYuvTempRef.create( m_iWidth, m_iUsedHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
-#else
-  cPicYuvTempRef.create( m_iWidth, m_iHeight, g_uiMaxCUWidth, g_uiMaxCUHeight, g_uiMaxCUDepth);
-#endif
 
   Int64 iSSEY = 0;
@@ -724,5 +655,4 @@
   for (Int iCurModel = 0; iCurModel < m_iNumOfCurRenModels; iCurModel++)
   {
-#if FIX_VSO_SETUP
     m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth );    
     m_apcCurRenModels[iCurModel]->getRefVideo  ( m_aiCurPosInModels[iCurModel], &cPicYuvTempRef   );
@@ -731,13 +661,4 @@
     iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCbAddr()  , cPicYuvTempRef.getCStride());
     iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, cPicYuvTempRef.getCrAddr()  , cPicYuvTempRef.getCStride());
-#else
-    m_apcCurRenModels[iCurModel]->getSynthVideo( m_aiCurPosInModels[iCurModel], &cPicYuvSynth, 0 );
-    TComPicYuv* pcPicYuvRef = &cPicYuvTempRef;
-    m_apcCurRenModels[iCurModel]->getRefVideo  ( m_aiCurPosInModels[iCurModel], pcPicYuvRef  , 0 );
-
-    iSSEY += TRenFilter::SSE( cPicYuvSynth.getLumaAddr(), cPicYuvSynth.getStride(),  m_iWidth,      m_iHeight     , pcPicYuvRef->getLumaAddr(), pcPicYuvRef->getStride() );
-    iSSEU += TRenFilter::SSE( cPicYuvSynth.getCbAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCbAddr()  , pcPicYuvRef->getCStride());
-    iSSEV += TRenFilter::SSE( cPicYuvSynth.getCrAddr()  , cPicYuvSynth.getCStride(), m_iWidth >> 1, m_iHeight >> 1, pcPicYuvRef->getCrAddr()  , pcPicYuvRef->getCStride());
-#endif
   }
 
Index: branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenModel.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenModel.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenModel.h	(revision 188)
@@ -62,9 +62,5 @@
 
   // Set horizontal offset
-#if FIX_VSO_SETUP
   Void  setupPart        ( UInt uiHorOff, Int iUsedHeight );
-#else
-  Void  setHorOffset     ( UInt uiHorOff );
-#endif
 
   // Set Mode
@@ -104,15 +100,11 @@
   Int m_iSampledWidth;
   Int m_iPad;
-#if FIX_VSO_SETUP
   Int m_iUsedHeight;   // height currently used in buffer, whereas m_iHeight is the total height of the buffer
-#endif
 
 
   Int m_iNumOfBaseViews;
 
-#if HHI_VSO_SPEEDUP_A0033                 
   // Horizontal Offset in input data
   UInt m_uiHorOff;          
-#endif
 
   /// Current Error Type ///
Index: branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenSingleModel.cpp
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenSingleModel.cpp	(revision 188)
@@ -44,8 +44,6 @@
   m_iHeight = -1;
   m_iStride = -1;
-#if FIX_VSO_SETUP
   m_iUsedHeight = -1; 
   m_iHorOffset  = -1; 
-#endif
   m_iMode   = -1;
   m_iPad    = PICYUV_PAD;
@@ -104,11 +102,6 @@
   if ( m_pcInputSamples [1] ) delete[] m_pcInputSamples [1];
 
-#if FIX_MEM_LEAKS
   if ( m_pcOutputSamples    ) delete[] m_pcOutputSamples   ;
-#else
-  if ( m_pcOutputSamples    ) delete   m_pcOutputSamples   ;
-#endif
-
-#if FIX_MEM_LEAKS
+
   if ( m_piInvZLUTLeft  ) delete[] m_piInvZLUTLeft ;
   if ( m_piInvZLUTRight ) delete[] m_piInvZLUTRight;
@@ -117,5 +110,4 @@
   if ( m_aapiRefVideoPel[1] ) delete[] ( m_aapiRefVideoPel[1] - ( m_aiRefVideoStrides[1] * m_iPad + m_iPad ) );
   if ( m_aapiRefVideoPel[2] ) delete[] ( m_aapiRefVideoPel[2] - ( m_aiRefVideoStrides[2] * m_iPad + m_iPad ) );
-#endif
 }
 
@@ -197,9 +189,5 @@
   Int iOffsetX = ( iViewPos == VIEWPOS_RIGHT ) ? 1 : 0;
 
-#if FIX_VSO_SETUP
   for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ )
-#else
-  for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )
-#endif
   {
     if ( iViewPos == VIEWPOS_RIGHT )
@@ -245,5 +233,4 @@
 
 }
-#if FIX_VSO_SETUP
 template <BlenMod iBM, Bool bBitInc> Void
 TRenSingleModelC<iBM,bBitInc>::setupPart ( UInt uiHorOffset,       Int iUsedHeight )
@@ -254,12 +241,7 @@
   m_iHorOffset  = (Int) uiHorOffset;
 }
-#endif
 
 template <BlenMod iBM, Bool bBitInc> Void
-#if FIX_VSO_SETUP
 TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight,  Int** ppiBaseShiftLutRight,  Int iDistToLeft, Bool bKeepReference )
-#else
-TRenSingleModelC<iBM,bBitInc>::setup( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight,  Int** ppiBaseShiftLutRight,  Int iDistToLeft, Bool bKeepReference, UInt uiHorOff )
-#endif
 {
   AOT( !m_bUseOrgRef && pcOrgVideo );
@@ -275,13 +257,7 @@
   if ( pcOrgVideo && !bKeepReference )
   {
-#if FIX_VSO_SETUP
     TRenFilter::copy(             pcOrgVideo->getLumaAddr() +  m_iHorOffset       * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth,      m_iUsedHeight,      m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]);
     TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr()   + (m_iHorOffset >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]);
     TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr()   + (m_iHorOffset >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iUsedHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]);    
-#else
-    TRenFilter::copy(             pcOrgVideo->getLumaAddr() +  uiHorOff       * pcOrgVideo->getStride() , pcOrgVideo->getStride() , m_iWidth,      m_iHeight,      m_aapiRefVideoPel[0], m_aiRefVideoStrides[0]);
-    TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCbAddr()   + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[1], m_aiRefVideoStrides[1]);
-    TRenFilter::sampleCUpHorUp(0, pcOrgVideo->getCrAddr()   + (uiHorOff >> 1) * pcOrgVideo->getCStride(), pcOrgVideo->getCStride(), m_iWidth >> 1, m_iHeight >> 1, m_aapiRefVideoPel[2], m_aiRefVideoStrides[2]);    
-#endif
     xSetStructRefView();
   }
@@ -290,5 +266,4 @@
   xResetStructError();
   xInitSampleStructs();
-#if FIX_VSO_SETUP
   switch ( m_iMode )
   {  
@@ -320,35 +295,4 @@
     AOT(true);
   }
-#else
-  switch ( m_iMode )
-  {  
-  case 0:   
-#if LGE_VSO_EARLY_SKIP_A0093
-    xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false );
-#else
-    xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] );
-#endif   
-    break;
-  case 1:    
-#ifdef LGE_VSO_EARLY_SKIP_A0093
-    xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false);
-#else
-    xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] );
-#endif
-    break;
-  case 2:
-    TRenFilter::setupZLUT( true, 30, iDistToLeft, ppiBaseShiftLutLeft, ppiBaseShiftLutRight, m_iBlendZThres, m_iBlendDistWeight, m_piInvZLUTLeft, m_piInvZLUTRight );
-#ifdef LGE_VSO_EARLY_SKIP_A0093
-    xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0],false);
-    xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1],false);
-#else      
-    xRenderL<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[0], m_apiBaseDepthPel[0] );
-    xRenderR<true>( 0, 0, m_iWidth, m_iHeight, m_aiBaseDepthStrides[1], m_apiBaseDepthPel[1] );
-#endif
-    break;
-  default:
-    AOT(true);
-  }
-#endif
 
   // Get Rendered View as Reference
@@ -413,9 +357,5 @@
 #endif  
 
-#if FIX_VSO_SETUP
   for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ )
-#else
-  for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )
-#endif
   {
     for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ )
@@ -470,9 +410,5 @@
 #endif
 
-#if FIX_VSO_SETUP
   for ( Int iPosY = 0; iPosY < m_iUsedHeight; iPosY++ )
-#else
-  for ( Int iPosY = 0; iPosY < m_iHeight; iPosY++ )
-#endif
   {
     for ( Int iPosX = 0; iPosX < m_iWidth; iPosX++ )
@@ -617,5 +553,4 @@
 }
 
-#if FIX_VSO_SETUP
 template <BlenMod iBM, Bool bBitInc> Void
 TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv )
@@ -648,38 +583,5 @@
 #endif  
 }
-#else
-template <BlenMod iBM, Bool bBitInc> Void
-TRenSingleModelC<iBM,bBitInc>::getSynthVideo( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset )
-{  
-  AOT( pcPicYuv->getWidth() != m_iWidth );
-  AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOffset );
-
-#if HHI_VSO_COLOR_PLANES
-  Pel RenModelOutPels::* piText[3] = { NULL, NULL, NULL };
-  xGetSampleStrTextPtrs(iViewPos, piText[0], piText[1], piText[2]); 
-
-  // Temp image for chroma down sampling
-  PelImage cTempImage( m_iWidth, m_iHeight, 3, 0);
-
-  Int  aiStrides[3]; 
-  Pel* apiData  [3]; 
-
-  cTempImage.getDataAndStrides( apiData, aiStrides ); 
-
-  for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ )
-  {
-    xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight);
-  }  
-  xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset );
-#else
-  Pel RenModelOutPels::* piY;
-  xGetSampleStrTextPtrs(iViewPos, piY); 
-  xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piY, pcPicYuv->getLumaAddr() + uiHorOffset * pcPicYuv->getStride(), pcPicYuv->getStride(), m_iWidth, m_iHeight );
-  pcPicYuv->setChromaTo( 128 << g_uiBitIncrement );   
-#endif  
-}
-#endif
-
-#if FIX_VSO_SETUP
+
 template <BlenMod iBM, Bool bBitInc> Void
 TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv )
@@ -695,20 +597,5 @@
 }
 
-#else
-template <BlenMod iBM, Bool bBitInc> Void
-TRenSingleModelC<iBM,bBitInc>::getSynthDepth( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOff )
-{  
-  AOT( iViewPos != 0 && iViewPos != 1); 
-  AOT( pcPicYuv->getWidth()  != m_iWidth  );
-  AOT( pcPicYuv->getHeight() > m_iHeight + uiHorOff );
-
-  Pel RenModelOutPels::* piD = 0;
-  xGetSampleStrDepthPtrs(iViewPos, piD); 
-  xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piD, pcPicYuv->getLumaAddr() + pcPicYuv->getStride() * uiHorOff, pcPicYuv->getStride(), m_iWidth, m_iHeight );
-  pcPicYuv->setChromaTo( 128 << g_uiBitIncrement );   
-}
-#endif
-
-#if FIX_VSO_SETUP
+
 template <BlenMod iBM, Bool bBitInc> Void
 TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv )
@@ -742,37 +629,4 @@
 #endif  
 }
-#else
-template <BlenMod iBM, Bool bBitInc> Void
-TRenSingleModelC<iBM,bBitInc>::getRefVideo ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset )
-{  
-  AOT( pcPicYuv->getWidth()  != m_iWidth  );
-  AOT( pcPicYuv->getHeight() >  m_iHeight + uiHorOffset);
-
-#if HHI_VSO_COLOR_PLANES
-  Pel RenModelOutPels::* piText[3];
-  piText[0] = &RenModelOutPels::iYRef;
-  piText[1] = &RenModelOutPels::iURef;
-  piText[2] = &RenModelOutPels::iVRef;
-
-  // Temp image for chroma down sampling
-
-  PelImage cTempImage( m_iWidth, m_iHeight, 3, 0);
-  Int  aiStrides[3]; 
-  Pel* apiData  [3]; 
-
-  cTempImage.getDataAndStrides( apiData, aiStrides ); 
-
-  for (UInt uiCurPlane = 0; uiCurPlane < 3; uiCurPlane++ )
-  {
-    xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, piText[uiCurPlane], apiData[uiCurPlane], aiStrides[uiCurPlane] , m_iWidth, m_iHeight);
-  } 
-
-  xCopy2PicYuv( apiData, aiStrides, pcPicYuv, uiHorOffset );
-#else
-  xCopyFromSampleStruct( m_pcOutputSamples, m_iOutputSamplesStride, &RenModelOutPels::iYRef, pcPicYuv->getLumaAddr() *  pcPicYuv->getStride() + uiHorOffset, pcPicYuv->getStride(), m_iWidth, m_iHeight );
-  pcPicYuv->setChromaTo( 128 << g_uiBitIncrement );   
-#endif  
-}
-#endif
 
 template <BlenMod iBM, Bool bBitInc> RMDist
@@ -2018,5 +1872,4 @@
 }
 
-#if FIX_VSO_SETUP
 template <BlenMod iBM, Bool bBitInc> Void
 TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget )
@@ -2026,13 +1879,4 @@
   TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iUsedHeight, rpcPicYuvTarget->getCrAddr  () + (m_iHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() );
 }
-#else
-template <BlenMod iBM, Bool bBitInc> Void
-TRenSingleModelC<iBM,bBitInc>::xCopy2PicYuv( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset )
-{
-  TRenFilter::copy            ( ppiSrcVideoPel[0], piStrides[0], m_iWidth, m_iHeight, rpcPicYuvTarget->getLumaAddr() +  uiHorOffset       * rpcPicYuvTarget->getStride() , rpcPicYuvTarget->getStride () );
-  TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[1], piStrides[1], m_iWidth, m_iHeight, rpcPicYuvTarget->getCbAddr  () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() );
-  TRenFilter::sampleDown2Tap13( ppiSrcVideoPel[2], piStrides[2], m_iWidth, m_iHeight, rpcPicYuvTarget->getCrAddr  () + (uiHorOffset >> 1) * rpcPicYuvTarget->getCStride(), rpcPicYuvTarget->getCStride() );
-}
-#endif
 
 template class TRenSingleModelC<BLEND_NONE ,true>;
Index: branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenSingleModel.h
===================================================================
--- branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenSingleModel.h	(revision 187)
+++ branches/HTM-4.1-dev0/source/Lib/TLibRenderer/TRenSingleModel.h	(revision 188)
@@ -69,7 +69,5 @@
 public: 
 
-#if FIX_VIRT_DESTRUCTOR
   virtual ~TRenSingleModel() { }  
-#endif
 #if LGE_VSO_EARLY_SKIP_A0093
   virtual Void   create    ( Int iMode, Int iWidth, Int iHeight, Int iShiftPrec, Int*** aaaiSubPelShiftTable, Int iHoleMargin, Bool bUseOrgRef, Int iBlendMode, Bool bEarlySkip ) = 0;
@@ -80,10 +78,6 @@
   // Set Frame dependent data
   virtual Void   setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride ) = 0;
-#if FIX_VSO_SETUP
   virtual Void   setupPart ( UInt uiHorOffset,       Int iUsedHeight ) = 0;
   virtual Void   setup     ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight,  Int** ppiBaseShiftLutRight,  Int iDistToLeft, Bool bKeepReference ) = 0;
-#else
-  virtual Void   setup     ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight,  Int** ppiBaseShiftLutRight,  Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset ) = 0;
-#endif
 
   // Set Data
@@ -103,13 +97,7 @@
   virtual RMDist getDistVideo  ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData ) = 0;
 
-#if FIX_VSO_SETUP
   virtual Void   getSynthVideo  ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0;  
   virtual Void   getSynthDepth  ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0;
   virtual Void   getRefVideo    ( Int iViewPos, TComPicYuv* pcPicYuv ) = 0;
-#else
-  virtual Void   getSynthVideo  ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset  ) = 0;  
-  virtual Void   getSynthDepth  ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset  ) = 0;
-  virtual Void   getRefVideo    ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset  ) = 0;
-#endif
 };
 
@@ -181,10 +169,6 @@
   // Set Frame dependent data
   Void   setLRView ( Int iViewPos, Pel** apiCurVideoPel, Int* aiCurVideoStride, Pel* piCurDepthPel, Int iCurDepthStride );
-#if FIX_VSO_SETUP
   Void   setupPart ( UInt uiHorOffset,       Int uiUsedHeight );
   Void   setup     ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight,  Int** ppiBaseShiftLutRight,  Int iDistToLeft, Bool bKeepReference );
-#else
-  Void   setup     ( TComPicYuv* pcOrgVideo, Int** ppiShiftLutLeft, Int** ppiBaseShiftLutLeft, Int** ppiShiftLutRight,  Int** ppiBaseShiftLutRight,  Int iDistToLeft, Bool bKeepReference, UInt uiHorOffset );
-#endif
 
 #if LGE_VSO_EARLY_SKIP_A0093
@@ -203,13 +187,7 @@
   RMDist getDistVideo  ( Int iViewPos, Int iPlane, Int iStartPosX, Int iStartPosY, Int iWidth, Int iHeight, Int iStride, Pel* piNewData );
 
-#if FIX_VSO_SETUP
   Void   getSynthVideo  ( Int iViewPos, TComPicYuv* pcPicYuv );  
   Void   getSynthDepth  ( Int iViewPos, TComPicYuv* pcPicYuv );
   Void   getRefVideo    ( Int iViewPos, TComPicYuv* pcPicYuv );
-#else
-  Void   getSynthVideo  ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset );  
-  Void   getSynthDepth  ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset  );
-  Void   getRefVideo    ( Int iViewPos, TComPicYuv* pcPicYuv, UInt uiHorOffset  );
-#endif
 
 private:
@@ -293,19 +271,11 @@
   Void            xInitSampleStructs           ();
   Void            xSetStructSynthViewAsRefView ();
-#if FIX_VSO_SETUP
   Void            xCopy2PicYuv                ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget );
-#else
-  Void            xCopy2PicYuv                ( Pel** ppiSrcVideoPel, Int* piStrides, TComPicYuv* rpcPicYuvTarget, UInt uiHorOffset );
-#endif
 
   template< typename S, typename T> 
   Void   xCopyFromSampleStruct ( S* ptSource , Int iSourceStride, T S::* ptSourceElement, T* ptTarget, Int iTargetStride, Int iWidth, Int iHeight )
   {
-#if FIX_VSO_SETUP
     AOT( iWidth != m_iWidth ); 
     for (Int iPosY = 0; iPosY < iHeight; iPosY++)
-#else
-    for (Int iPosY = 0; iPosY < m_iHeight; iPosY++)
-#endif
     {
       for (Int iPosX = 0; iPosX < m_iWidth; iPosX++)
@@ -321,10 +291,6 @@
   Void   xCopyToSampleStruct ( T* ptSource , Int iSourceStride, S* ptTarget, Int iTargetStride, T S::* ptSourceElement, Int iWidth, Int iHeight )
   {
-#if FIX_VSO_SETUP
     AOT( iWidth != m_iWidth ); 
     for (Int iPosY = 0; iPosY < iHeight; iPosY++)
-#else
-    for (Int iPosY = 0; iPosY < m_iHeight; iPosY++)
-#endif
     {
       for (Int iPosX = 0; iPosX < m_iWidth; iPosX++)
@@ -344,14 +310,8 @@
   Int   m_iStride;
   Int   m_iPad;
-#if FIX_VSO_SETUP
   Int   m_iUsedHeight;
   Int   m_iHorOffset; 
-#endif
 
   Int   m_iSampledWidth;
-#if FIX_VSO_SETUP
-#else
-  Int   m_iSampledHeight;
-#endif
   Int   m_iSampledStride;
 
