Index: branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.cpp
===================================================================
--- branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.cpp	(revision 1333)
+++ branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.cpp	(revision 1334)
@@ -233,6 +233,6 @@
 #endif
   case SEI::SUB_BITSTREAM_PROPERTY                :               return new SEISubBitstreamProperty;
+  case SEI::ALPHA_CHANNEL_INFO                    :               return new SEIAlphaChannelInfo;
 #if NH_MV_SEI_TBD
-  case SEI::ALPHA_CHANNEL_INFO                    :               return new SEIAlphaChannelInfo;
   case SEI::OVERLAY_INFO                          :               return new SEIOverlayInfo;
 #endif
@@ -682,24 +682,4 @@
 }
 
-#if NH_MV_SEI_TBD
-
-Void SEIAlphaChannelInfo::setupFromSlice  ( const TComSlice* slice )
-{
-  sei.m_alphaChannelCancelFlag =  TBD ;
-  if( !sei.m_alphaChannelCancelFlag )
-  {
-    sei.m_alphaChannelUseIdc =  TBD ;
-    sei.m_alphaChannelBitDepthMinus8 =  TBD ;
-    sei.m_alphaTransparentValue =  TBD ;
-    sei.m_alphaOpaqueValue =  TBD ;
-    sei.m_alphaChannelIncrFlag =  TBD ;
-    sei.m_alphaChannelClipFlag =  TBD ;
-    if( sei.m_alphaChannelClipFlag )
-    {
-      sei.m_alphaChannelClipTypeFlag =  TBD ;
-    }
-  }
-};
-
 Void SEIAlphaChannelInfo::setupFromCfgFile(const Char* cfgFile)
 { 
@@ -708,12 +688,12 @@
 
   // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 
-  defAppLayerIds    .push_back( TBD );
-  defAppPocs        .push_back( TBD );
-  defAppTids        .push_back( TBD );
-  defAppVclNaluTypes.push_back( TBD );
+  defAppLayerIds    .push_back( 0 );
+  defAppPocs        .push_back( 0 );
+  defAppTids        .push_back( 0 );
+  defAppVclNaluTypes.push_back( 0 );
 
   Int      defSeiNaluId                  = 0; 
   Int      defPositionInSeiNalu          = 0; 
-  Bool     defModifyByEncoder            = TBD; 
+  Bool     defModifyByEncoder            = false;
 
   // Setup config file options
@@ -726,5 +706,5 @@
     ("AlphaChannelBitDepthMinus8"     , m_alphaChannelBitDepthMinus8       , 0                              , "AlphaChannelBitDepthMinus8"       )
     ("AlphaTransparentValue"          , m_alphaTransparentValue            , 0                              , "AlphaTransparentValue"            )
-    ("AlphaOpaqueValue"               , m_alphaOpaqueValue                 , 0                              , "AlphaOpaqueValue"                 )
+    ("AlphaOpaqueValue"               , m_alphaOpaqueValue                 , 255                            , "AlphaOpaqueValue"                 )
     ("AlphaChannelIncrFlag"           , m_alphaChannelIncrFlag             , false                          , "AlphaChannelIncrFlag"             )
     ("AlphaChannelClipFlag"           , m_alphaChannelClipFlag             , false                          , "AlphaChannelClipFlag"             )
@@ -745,22 +725,18 @@
   Bool wrongConfig = false; 
 
-  // TBD: Add constraints on presence of SEI here. 
-  xCheckCfg     ( wrongConfig, TBD , "TBD" );
-  xCheckCfg     ( wrongConfig, TBD , "TBD" );
-
-  // TBD: Modify constraints according to the SEI semantics.   
-  xCheckCfgRange( wrongConfig, m_alphaChannelCancelFlag         , MINVAL , MAXVAL, "alpha_channel_cancel_flag"        );
-  xCheckCfgRange( wrongConfig, m_alphaChannelUseIdc             , MINVAL , MAXVAL, "alpha_channel_use_idc");
-  xCheckCfgRange( wrongConfig, m_alphaChannelBitDepthMinus8     , MINVAL , MAXVAL, "alpha_channel_bit_depth_minus8"   );
-  xCheckCfgRange( wrongConfig, m_alphaTransparentValue          , MINVAL , MAXVAL, "alpha_transparent_value"          );
-  xCheckCfgRange( wrongConfig, m_alphaOpaqueValue               , MINVAL , MAXVAL, "alpha_opaque_value"   );
-  xCheckCfgRange( wrongConfig, m_alphaChannelIncrFlag           , MINVAL , MAXVAL, "alpha_channel_incr_flag"          );
-  xCheckCfgRange( wrongConfig, m_alphaChannelClipFlag           , MINVAL , MAXVAL, "alpha_channel_clip_flag"          );
-  xCheckCfgRange( wrongConfig, m_alphaChannelClipTypeFlag       , MINVAL , MAXVAL, "alpha_channel_clip_type_flag"     );
+  int maxInterpretationValue = (1 << (m_alphaChannelBitDepthMinus8+9)) - 1;
+  xCheckCfgRange( wrongConfig, m_alphaChannelCancelFlag         , 0 , 1, "alpha_channel_cancel_flag"        );
+  xCheckCfgRange( wrongConfig, m_alphaChannelUseIdc             , 0 , 7, "alpha_channel_use_idc");
+  xCheckCfgRange( wrongConfig, m_alphaChannelBitDepthMinus8     , 0 , 7, "alpha_channel_bit_depth_minus8"   );
+  xCheckCfgRange( wrongConfig, m_alphaTransparentValue          , 0 , maxInterpretationValue, "alpha_transparent_value"          );
+  xCheckCfgRange( wrongConfig, m_alphaOpaqueValue               , 0 , maxInterpretationValue, "alpha_opaque_value"   );
+  xCheckCfgRange( wrongConfig, m_alphaChannelIncrFlag           , 0 , 1, "alpha_channel_incr_flag"          );
+  xCheckCfgRange( wrongConfig, m_alphaChannelClipFlag           , 0 , 1, "alpha_channel_clip_flag"          );
+  xCheckCfgRange( wrongConfig, m_alphaChannelClipTypeFlag       , 0 , 1, "alpha_channel_clip_type_flag"     );
 
   return wrongConfig; 
 
 };
-
+#if NH_MV_SEI_TBD
 Void SEIOverlayInfo::setupFromSlice  ( const TComSlice* slice )
 {
Index: branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.h
===================================================================
--- branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.h	(revision 1333)
+++ branches/HTM-15.1-dev0-BBC/source/Lib/TLibCommon/SEI.h	(revision 1334)
@@ -782,5 +782,4 @@
 };
 
-#if NH_MV_SEI_TBD
 class SEIAlphaChannelInfo : public SEI
 {
@@ -792,5 +791,4 @@
 
   Void setupFromCfgFile( const Char*      cfgFile );
-  Void setupFromSlice  ( const TComSlice* slice   );
   Bool checkCfg        ( const TComSlice* slice   );
 
@@ -805,4 +803,5 @@
 };
 
+#if NH_MV_SEI_TBD
 class SEIOverlayInfo : public SEI
 {
Index: branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.cpp
===================================================================
--- branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.cpp	(revision 1333)
+++ branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.cpp	(revision 1334)
@@ -336,9 +336,9 @@
       xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei, payloadSize, pDecodedMessageOutputStream );
       break;
-#if NH_MV_SEI_TBD
     case SEI::ALPHA_CHANNEL_INFO:
       sei = new SEIAlphaChannelInfo;
       xParseSEIAlphaChannelInfo((SEIAlphaChannelInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
       break;
+#if NH_MV_SEI_TBD
     case SEI::OVERLAY_INFO:
       sei = new SEIOverlayInfo;
@@ -1334,5 +1334,4 @@
 };
 
-#if NH_MV_SEI_TBD
 Void SEIReader::xParseSEIAlphaChannelInfo(SEIAlphaChannelInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
 {
@@ -1345,6 +1344,6 @@
     sei_read_code( pDecodedMessageOutputStream, 3, code, "alpha_channel_use_idc" ); sei.m_alphaChannelUseIdc = code;
     sei_read_code( pDecodedMessageOutputStream, 3, code, "alpha_channel_bit_depth_minus8" ); sei.m_alphaChannelBitDepthMinus8 = code;
-    sei_read_code( pDecodedMessageOutputStream, getAlphaTransparentValueLen ), code, "alpha_transparent_value" ); sei.m_alphaTransparentValue = code;
-    sei_read_code( pDecodedMessageOutputStream, getAlphaOpaqueValueLen ), code, "alpha_opaque_value" ); sei.m_alphaOpaqueValue = code;
+    sei_read_code( pDecodedMessageOutputStream, sei.m_alphaChannelBitDepthMinus8+9, code, "alpha_transparent_value" ); sei.m_alphaTransparentValue = code;
+    sei_read_code( pDecodedMessageOutputStream, sei.m_alphaChannelBitDepthMinus8+9, code, "alpha_opaque_value" ); sei.m_alphaOpaqueValue = code;
     sei_read_flag( pDecodedMessageOutputStream, code, "alpha_channel_incr_flag" ); sei.m_alphaChannelIncrFlag = (code == 1);
     sei_read_flag( pDecodedMessageOutputStream, code, "alpha_channel_clip_flag" ); sei.m_alphaChannelClipFlag = (code == 1);
@@ -1356,4 +1355,5 @@
 };
 
+#if NH_MV_SEI_TBD
 Void SEIReader::xParseSEIOverlayInfo(SEIOverlayInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
 {
Index: branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.h
===================================================================
--- branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.h	(revision 1333)
+++ branches/HTM-15.1-dev0-BBC/source/Lib/TLibDecoder/SEIread.h	(revision 1334)
@@ -111,6 +111,6 @@
 #endif
   Void xParseSEISubBitstreamProperty          (SEISubBitstreamProperty& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+  Void xParseSEIAlphaChannelInfo              (SEIAlphaChannelInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
 #if NH_MV_SEI_TBD
-  Void xParseSEIAlphaChannelInfo              (SEIAlphaChannelInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
   Void xParseSEIOverlayInfo                   (SEIOverlayInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
 #endif
Index: branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.cpp
===================================================================
--- branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1333)
+++ branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1334)
@@ -148,8 +148,8 @@
      xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
      break; 
-#if NH_MV_SEI_TBD
    case SEI::ALPHA_CHANNEL_INFO:
      xWriteSEIAlphaChannelInfo(*static_cast<const SEIAlphaChannelInfo*>(&sei));
-     break; 
+     break;
+#if NH_MV_SEI_TBD
    case SEI::OVERLAY_INFO:
      xWriteSEIOverlayInfo(*static_cast<const SEIOverlayInfo*>(&sei));
@@ -977,5 +977,5 @@
   }
 };
-#if NH_MV_SEI_TBD
+
 Void SEIWriter::xWriteSEIAlphaChannelInfo( const SEIAlphaChannelInfo& sei)
 {
@@ -985,6 +985,6 @@
     WRITE_CODE( sei.m_alphaChannelUseIdc, 3, "alpha_channel_use_idc" );
     WRITE_CODE( sei.m_alphaChannelBitDepthMinus8, 3, "alpha_channel_bit_depth_minus8" );
-    WRITE_CODE( sei.m_alphaTransparentValue, getAlphaTransparentValueLen ), "alpha_transparent_value" );
-    WRITE_CODE( sei.m_alphaOpaqueValue, getAlphaOpaqueValueLen ), "alpha_opaque_value" );
+    WRITE_CODE( sei.m_alphaTransparentValue, sei.m_alphaChannelBitDepthMinus8+9, "alpha_transparent_value" );
+    WRITE_CODE( sei.m_alphaOpaqueValue, sei.m_alphaChannelBitDepthMinus8+9, "alpha_opaque_value" );
     WRITE_FLAG( ( sei.m_alphaChannelIncrFlag ? 1 : 0 ), "alpha_channel_incr_flag" );
     WRITE_FLAG( ( sei.m_alphaChannelClipFlag ? 1 : 0 ), "alpha_channel_clip_flag" );
@@ -996,4 +996,5 @@
 };
 
+#if NH_MV_SEI_TBD
 Void SEIWriter::xWriteSEIOverlayInfo( const SEIOverlayInfo& sei)
 {
Index: branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.h
===================================================================
--- branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.h	(revision 1333)
+++ branches/HTM-15.1-dev0-BBC/source/Lib/TLibEncoder/SEIwrite.h	(revision 1334)
@@ -93,6 +93,6 @@
 #endif
   Void xWriteSEISubBitstreamProperty          ( const SEISubBitstreamProperty& sei);
+  Void xWriteSEIAlphaChannelInfo              ( const SEIAlphaChannelInfo& sei);
 #if NH_MV_SEI_TBD
-  Void xWriteSEIAlphaChannelInfo              ( const SEIAlphaChannelInfo& sei);
   Void xWriteSEIOverlayInfo                   ( const SEIOverlayInfo& sei);
 #endif
