Index: branches/HTM-10.0rc1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-10.0rc1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 839)
@@ -1097,4 +1097,5 @@
     }
   }
+#endif
 }
   
@@ -1855,4 +1856,3 @@
 }
 #endif
-
 //! \}
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibCommon/TComTrQuant.h
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibCommon/TComTrQuant.h	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibCommon/TComTrQuant.h	(revision 839)
@@ -151,5 +151,4 @@
 #if RDOQ_CHROMA_LAMBDA 
   Void setLambdas ( const Double lambdas[3] ) { for (Int component = 0; component < 3; component++) m_lambdas[component] = lambdas[component]; }
-  Void setLambda(Double dLambdaLuma, Double dLambdaChroma) { m_dLambdaLuma = dLambdaLuma; m_dLambdaChroma = dLambdaChroma; }
   Void selectLambda(TextType eTType) { m_dLambda = (eTType == TEXT_LUMA) ? m_lambdas[0] : ((eTType == TEXT_CHROMA_U) ? m_lambdas[1] : m_lambdas[2]); }
 #else
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 839)
@@ -55,5 +55,5 @@
 
 #ifndef HEVC_EXT
-#define HEVC_EXT                    2
+#define HEVC_EXT                    0
 #endif
 
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecSbac.h
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecSbac.h	(revision 839)
@@ -94,4 +94,6 @@
   Void  parseSaoTypeIdx           ( UInt&  ruiVal  );
   Void  parseSaoUflc              ( UInt uiLength, UInt& ruiVal     );
+  Void parseSAOBlkParam (SAOBlkParam& saoBlkParam, Bool* sliceEnabled, Bool leftMergeAvail, Bool aboveMergeAvail);
+  Void parseSaoSign(UInt& val);
 private:
   Void  xReadUnarySymbol    ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset );
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecSlice.cpp
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecSlice.cpp	(revision 839)
@@ -336,4 +336,5 @@
         if(ry > 0)
         {
+          aboveMergeAvail = rpcPic->getSAOMergeAvailability(iCUAddr, iCUAddr-uiWidthInLCUs);
       }
 
@@ -342,4 +343,7 @@
       else 
         {
+        saoblkParam[SAO_Y ].modeIdc = SAO_MODE_OFF;
+        saoblkParam[SAO_Cb].modeIdc = SAO_MODE_OFF;
+        saoblkParam[SAO_Cr].modeIdc = SAO_MODE_OFF;
       }
     }
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 839)
@@ -679,4 +679,5 @@
     m_uiSliceIdx     = 0;
   }
+  else
   {
     m_apcSlicePilot->copySliceInfo( pcPic->getPicSym()->getSlice(m_uiSliceIdx-1) );
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 839)
@@ -300,16 +300,4 @@
 #if KWU_RC_VIEWRC_E0227
   Bool      m_bViewWiseRateCtrl;
-#endif
-#else
-  Bool      m_enableRateCtrl;                                ///< Flag for using rate control algorithm
-  Int       m_targetBitrate;                                 ///< target bitrate
-  Int       m_numLCUInUnit;                                  ///< Total number of LCUs in a frame should be divided by the NumLCUInUnit
-
-#if KWU_RC_MADPRED_E0227
-  UInt       m_depthMADPred;
-#endif
-#if KWU_RC_VIEWRC_E0227
-  Bool      m_bViewWiseRateCtrl;
-#endif
 #endif
   Bool      m_TransquantBypassEnableFlag;                     ///< transquant_bypass_enable_flag setting in PPS.
@@ -830,21 +818,4 @@
   Void      setUseViewWiseRateCtrl    (Bool b)          { m_bViewWiseRateCtrl    = b;        }
 #endif
-#else
-  Bool      getUseRateCtrl    ()                { return m_enableRateCtrl;    }
-  Void      setUseRateCtrl    (Bool flag)       { m_enableRateCtrl = flag;    }
-  Int       getTargetBitrate  ()                { return m_targetBitrate;     }
-  Void      setTargetBitrate  (Int target)      { m_targetBitrate  = target;  }
-  Int       getNumLCUInUnit   ()                { return m_numLCUInUnit;      }
-  Void      setNumLCUInUnit   (Int numLCUs)     { m_numLCUInUnit   = numLCUs; }
-
-#if KWU_RC_MADPRED_E0227
-  UInt      getUseDepthMADPred    ()                { return m_depthMADPred;        }
-  Void      setUseDepthMADPred    (UInt b)          { m_depthMADPred    = b;        }
-#endif
-#if KWU_RC_VIEWRC_E0227
-  Bool      getUseViewWiseRateCtrl    ()                { return m_bViewWiseRateCtrl;        }
-  Void      setUseViewWiseRateCtrl    (Bool b)          { m_bViewWiseRateCtrl    = b;        }
-#endif
-#endif
   Bool      getTransquantBypassEnableFlag()           { return m_TransquantBypassEnableFlag; }
   Void      setTransquantBypassEnableFlag(Bool flag)  { m_TransquantBypassEnableFlag = flag; }
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncCu.cpp
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncCu.cpp	(revision 839)
@@ -2238,4 +2238,5 @@
   else
 #endif
+
   rpcTempCU->getTotalCost()  = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );
 #if H_3D_INTER_SDC
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncSearch.cpp	(revision 839)
@@ -3950,7 +3950,7 @@
         pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
         pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
-      }
+
 #if NTT_STORE_SPDV_VSP_G0148
-}
+      }
 #endif
 #if H_3D_VSP && !NTT_STORE_SPDV_VSP_G0148
Index: branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncTop.cpp
===================================================================
--- branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 838)
+++ branches/HTM-10.0rc1-dev0/source/Lib/TLibEncoder/TEncTop.cpp	(revision 839)
@@ -601,5 +601,5 @@
   m_uiNumAllPicCoded += iNumEncoded;
 }
-
+#endif
 // ====================================================================================================================
 // Protected member functions
