Index: /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 1302)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.cpp	(revision 1303)
@@ -1303,5 +1303,5 @@
 
   // iAdd is different from the iAdd used in normal quantization
-  const Int iAdd   = (compID == COMPONENT_Y ? 171 : 256) << (iQBits-9);  
+  const Int iAdd   = (compID == COMPONENT_Y ? 171 : 256) << (iQBits-9);
 
   for( Int uiBlockPos = 0; uiBlockPos < uiWidth*uiHeight; uiBlockPos++ )
@@ -2320,5 +2320,5 @@
           uiLevel              = xGetCodedLevel( pdCostCoeff[ iScanPos ], pdCostCoeff0[ iScanPos ], pdCostSig[ iScanPos ],
                                                   lLevelDouble, uiMaxAbsLevel, significanceMapContextOffset, uiOneCtx, uiAbsCtx, uiGoRiceParam,
-                                                  c1Idx, c2Idx, iQBits, errorScale, 1, extendedPrecision, channelType
+                                                  c1Idx, c2Idx, iQBits, errorScale, 1, extendedPrecision, maxLog2TrDynamicRange
                                                   );
         }
@@ -2329,5 +2329,5 @@
           uiLevel              = xGetCodedLevel( pdCostCoeff[ iScanPos ], pdCostCoeff0[ iScanPos ], pdCostSig[ iScanPos ],
                                                   lLevelDouble, uiMaxAbsLevel, uiCtxSig, uiOneCtx, uiAbsCtx, uiGoRiceParam,
-                                                  c1Idx, c2Idx, iQBits, errorScale, 0, extendedPrecision, channelType
+                                                  c1Idx, c2Idx, iQBits, errorScale, 0, extendedPrecision, maxLog2TrDynamicRange
                                                   );
 
@@ -2339,7 +2339,7 @@
         if( uiLevel > 0 )
         {
-          Int rateNow = xGetICRate( uiLevel, uiOneCtx, uiAbsCtx, uiGoRiceParam, c1Idx, c2Idx, extendedPrecision, channelType );
-          rateIncUp   [ uiBlkPos ] = xGetICRate( uiLevel+1, uiOneCtx, uiAbsCtx, uiGoRiceParam, c1Idx, c2Idx, extendedPrecision, channelType ) - rateNow;
-          rateIncDown [ uiBlkPos ] = xGetICRate( uiLevel-1, uiOneCtx, uiAbsCtx, uiGoRiceParam, c1Idx, c2Idx, extendedPrecision, channelType ) - rateNow;
+          Int rateNow = xGetICRate( uiLevel, uiOneCtx, uiAbsCtx, uiGoRiceParam, c1Idx, c2Idx, extendedPrecision, maxLog2TrDynamicRange );
+          rateIncUp   [ uiBlkPos ] = xGetICRate( uiLevel+1, uiOneCtx, uiAbsCtx, uiGoRiceParam, c1Idx, c2Idx, extendedPrecision, maxLog2TrDynamicRange ) - rateNow;
+          rateIncDown [ uiBlkPos ] = xGetICRate( uiLevel-1, uiOneCtx, uiAbsCtx, uiGoRiceParam, c1Idx, c2Idx, extendedPrecision, maxLog2TrDynamicRange ) - rateNow;
         }
         else // uiLevel == 0
@@ -2879,5 +2879,5 @@
                                             Bool             bLast,
                                             Bool             useLimitedPrefixLength,
-                                            ChannelType      channelType
+                                            const Int        maxLog2TrDynamicRange
                                             ) const
 {
@@ -2908,5 +2908,5 @@
   {
     Double dErr         = Double( lLevelDouble  - ( Intermediate_Int(uiAbsLevel) << iQBits ) );
-    Double dCurrCost    = dErr * dErr * errorScale + xGetICost( xGetICRate( uiAbsLevel, ui16CtxNumOne, ui16CtxNumAbs, ui16AbsGoRice, c1Idx, c2Idx, useLimitedPrefixLength, channelType ) );
+    Double dCurrCost    = dErr * dErr * errorScale + xGetICost( xGetICRate( uiAbsLevel, ui16CtxNumOne, ui16CtxNumAbs, ui16AbsGoRice, c1Idx, c2Idx, useLimitedPrefixLength, maxLog2TrDynamicRange ) );
     dCurrCost          += dCurrCostSig;
 
Index: /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.h
===================================================================
--- /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.h	(revision 1302)
+++ /branches/SHM-dev/source/Lib/TLibCommon/TComTrQuant.h	(revision 1303)
@@ -288,5 +288,5 @@
                                              Bool             bLast,
                                              Bool             useLimitedPrefixLength,
-                                             ChannelType      channelType
+                                             const Int        maxLog2TrDynamicRange
                                              ) const;
 
Index: /branches/SHM-dev/source/Lib/TLibEncoder/SEIEncoder.cpp
===================================================================
--- /branches/SHM-dev/source/Lib/TLibEncoder/SEIEncoder.cpp	(revision 1302)
+++ /branches/SHM-dev/source/Lib/TLibEncoder/SEIEncoder.cpp	(revision 1303)
@@ -710,10 +710,7 @@
   seiScalableNesting->m_nestingNumLayersMinus1        = 1 - 1;  //nesting_num_layers_minus1
   seiScalableNesting->m_nestingLayerId[0]             = 0;
-  seiScalableNesting->m_callerOwnsSEIs                = true;
 
   // Bitstream partition nesting SEI
-
   seiBspNesting->m_bspIdx = 0;
-  seiBspNesting->m_callerOwnsSEIs = true;
 
   // Buffering period SEI
