Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 866)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 868)
@@ -2076,5 +2076,5 @@
 #if !SVC_EXTENSION
   // reading external Colour Remapping Information SEI message parameters from file
-  if( m_colourRemapSEIFile.length() )
+  if( m_colourRemapSEIFile.size() > 0 )
   {
     FILE* fic;
@@ -2091,15 +2091,15 @@
     {
       retval = fscanf( fic, "%d", &m_colourRemapSEIPersistenceFlag );
-      retval = fscanf( fic, "%d", &m_colourRemapSEIVideoSignalTypePresentFlag);
-      if( m_colourRemapSEIVideoSignalTypePresentFlag )
-      {
-        retval = fscanf( fic, "%d", &m_colourRemapSEIVideoFullRangeFlag  );
+      retval = fscanf( fic, "%d", &m_colourRemapSEIVideoSignalInfoPresentFlag);
+      if( m_colourRemapSEIVideoSignalInfoPresentFlag )
+      {
+        retval = fscanf( fic, "%d", &m_colourRemapSEIFullRangeFlag  );
         retval = fscanf( fic, "%d", &m_colourRemapSEIPrimaries );
-        retval = fscanf( fic, "%d", &m_colourRemapSEITransferCharacteristics );
-        retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoeffs );
-      }
-
-      retval = fscanf( fic, "%d", &m_colourRemapSEICodedDataBitDepth );
-      retval = fscanf( fic, "%d", &m_colourRemapSEITargetBitDepth );
+        retval = fscanf( fic, "%d", &m_colourRemapSEITransferFunction );
+        retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoefficients );
+      }
+
+      retval = fscanf( fic, "%d", &m_colourRemapSEIInputBitDepth );
+      retval = fscanf( fic, "%d", &m_colourRemapSEIBitDepth );
   
       for( Int c=0 ; c<3 ; c++ )
@@ -2170,15 +2170,15 @@
       {
         retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag = tempCode ? 1 : 0;
-        retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoSignalTypePresentFlag = tempCode ? 1 : 0;
-        if( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalTypePresentFlag )
-        {
-          retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoFullRangeFlag = tempCode ? 1 : 0;
+        retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag = tempCode ? 1 : 0;
+        if( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag )
+        {
+          retval = fscanf( fic, "%d", &tempCode ); m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag = tempCode ? 1 : 0;
           retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIPrimaries );
-          retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITransferCharacteristics );
-          retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIMatrixCoeffs );
-        }
-
-        retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEICodedDataBitDepth );
-        retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITargetBitDepth );
+          retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEITransferFunction );
+          retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients );
+        }
+
+        retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth );
+        retval = fscanf( fic, "%d", &m_acLayerCfg[layer].m_colourRemapSEIBitDepth );
   
         for( Int c=0 ; c<3 ; c++ )
@@ -3324,8 +3324,8 @@
 #if Q0074_COLOUR_REMAPPING_SEI
 #if !SVC_EXTENSION
-  if ( m_colourRemapSEIFile.c_str() && !m_colourRemapSEICancelFlag )
-  {
-    xConfirmPara( m_colourRemapSEICodedDataBitDepth < 8 || m_colourRemapSEICodedDataBitDepth > 16 , "colour_remap_coded_data_bit_depth shall be in the range of 8 to 16, inclusive");
-    xConfirmPara( m_colourRemapSEITargetBitDepth < 8 || (m_colourRemapSEITargetBitDepth > 16 && m_colourRemapSEITargetBitDepth < 255) , "colour_remap_target_bit_depth shall be in the range of 8 to 16, inclusive");
+  if ( ( m_colourRemapSEIFile.size() > 0 ) && !m_colourRemapSEICancelFlag )
+  {
+    xConfirmPara( m_colourRemapSEIInputBitDepth < 8 || m_colourRemapSEIInputBitDepth > 16 , "colour_remap_input_bit_depth shall be in the range of 8 to 16, inclusive");
+    xConfirmPara( m_colourRemapSEIBitDepth < 8 || m_colourRemapSEIBitDepth > 16, "colour_remap_bit_depth shall be in the range of 8 to 16, inclusive");
     for( Int c=0 ; c<3 ; c++)
     {
@@ -3334,6 +3334,6 @@
         for( Int i=0 ; i<=m_colourRemapSEIPreLutNumValMinus1[c] ; i++)
         {
-          xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEICodedDataBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");
-          xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
+          xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEIInputBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_input_bit_depth)-1, inclusive");
+          xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
         }
       xConfirmPara( m_colourRemapSEIPostLutNumValMinus1[c] < 0 || m_colourRemapSEIPostLutNumValMinus1[c] > 32, "post_lut_num_val_minus1[c] shall be in the range of 0 to 32, inclusive");
@@ -3341,6 +3341,6 @@
         for( Int i=0 ; i<=m_colourRemapSEIPostLutNumValMinus1[c] ; i++)
         {
-          xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
-          xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
+          xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
+          xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
         }
     }
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 866)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncCfg.h	(revision 868)
@@ -381,11 +381,11 @@
   Bool      m_colourRemapSEICancelFlag;
   Bool      m_colourRemapSEIPersistenceFlag;
-  Bool      m_colourRemapSEIVideoSignalTypePresentFlag;
-  Bool      m_colourRemapSEIVideoFullRangeFlag;
+  Bool      m_colourRemapSEIVideoSignalInfoPresentFlag;
+  Bool      m_colourRemapSEIFullRangeFlag;
   Int       m_colourRemapSEIPrimaries;
-  Int       m_colourRemapSEITransferCharacteristics;
-  Int       m_colourRemapSEIMatrixCoeffs;
-  Int       m_colourRemapSEICodedDataBitDepth;
-  Int       m_colourRemapSEITargetBitDepth;
+  Int       m_colourRemapSEITransferFunction;
+  Int       m_colourRemapSEIMatrixCoefficients;
+  Int       m_colourRemapSEIInputBitDepth;
+  Int       m_colourRemapSEIBitDepth;
   Int       m_colourRemapSEIPreLutNumValMinus1[3];
   Int*      m_colourRemapSEIPreLutCodedValue[3];
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 866)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.cpp	(revision 868)
@@ -218,5 +218,5 @@
 
 #if Q0074_COLOUR_REMAPPING_SEI
-  if( m_colourRemapSEIFile.c_str() )
+  if( m_colourRemapSEIFile.size() > 0 )
   {
     FILE* fic;
@@ -234,15 +234,15 @@
     {
       retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIPersistenceFlag = tempCode ? 1 : 0; 
-      retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoSignalTypePresentFlag = tempCode ? 1 : 0; 
-      if( m_colourRemapSEIVideoSignalTypePresentFlag )
-      {
-        retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoFullRangeFlag = tempCode ? 1 : 0; 
+      retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIVideoSignalInfoPresentFlag = tempCode ? 1 : 0; 
+      if( m_colourRemapSEIVideoSignalInfoPresentFlag )
+      {
+        retval = fscanf( fic, "%d", &tempCode );m_colourRemapSEIFullRangeFlag = tempCode ? 1 : 0; 
         retval = fscanf( fic, "%d", &m_colourRemapSEIPrimaries );
-        retval = fscanf( fic, "%d", &m_colourRemapSEITransferCharacteristics );
-        retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoeffs );
-      }
-
-      retval = fscanf( fic, "%d", &m_colourRemapSEICodedDataBitDepth );
-      retval = fscanf( fic, "%d", &m_colourRemapSEITargetBitDepth );
+        retval = fscanf( fic, "%d", &m_colourRemapSEITransferFunction );
+        retval = fscanf( fic, "%d", &m_colourRemapSEIMatrixCoefficients );
+      }
+
+      retval = fscanf( fic, "%d", &m_colourRemapSEIInputBitDepth );
+      retval = fscanf( fic, "%d", &m_colourRemapSEIBitDepth );
   
       for( Int c=0 ; c<3 ; c++ )
@@ -518,8 +518,8 @@
 #endif
 #if Q0074_COLOUR_REMAPPING_SEI
-  if ( m_colourRemapSEIFile.length() && !m_colourRemapSEICancelFlag )
-  {
-    xConfirmPara( m_colourRemapSEICodedDataBitDepth < 8 || m_colourRemapSEICodedDataBitDepth > 16 , "colour_remap_coded_data_bit_depth shall be in the range of 8 to 16, inclusive");
-    xConfirmPara( m_colourRemapSEITargetBitDepth < 8 || (m_colourRemapSEITargetBitDepth > 16 && m_colourRemapSEITargetBitDepth < 255) , "colour_remap_target_bit_depth shall be in the range of 8 to 16, inclusive");
+  if ( ( m_colourRemapSEIFile.size() > 0 ) && !m_colourRemapSEICancelFlag )
+  {
+    xConfirmPara( m_colourRemapSEIInputBitDepth < 8 || m_colourRemapSEIInputBitDepth > 16 , "colour_remap_input_bit_depth shall be in the range of 8 to 16, inclusive");
+    xConfirmPara( m_colourRemapSEIBitDepth < 8 || m_colourRemapSEIBitDepth > 16, "colour_remap_bit_depth shall be in the range of 8 to 16, inclusive");
     for( Int c=0 ; c<3 ; c++)
     {
@@ -528,16 +528,13 @@
         for( Int i=0 ; i<=m_colourRemapSEIPreLutNumValMinus1[c] ; i++)
         {
-          xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEICodedDataBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");
-          xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
+          xConfirmPara( m_colourRemapSEIPreLutCodedValue[c][i] < 0 || m_colourRemapSEIPreLutCodedValue[c][i] > ((1<<m_colourRemapSEIInputBitDepth)-1), "pre_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_input_bit_depth)-1, inclusive");
+          xConfirmPara( m_colourRemapSEIPreLutTargetValue[c][i] < 0 || m_colourRemapSEIPreLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "pre_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
         }
       xConfirmPara( m_colourRemapSEIPostLutNumValMinus1[c] < 0 || m_colourRemapSEIPostLutNumValMinus1[c] > 32, "post_lut_num_val_minus1[c] shall be in the range of 0 to 32, inclusive");
       if( m_colourRemapSEIPostLutNumValMinus1[c]>0 )
         for( Int i=0 ; i<=m_colourRemapSEIPostLutNumValMinus1[c] ; i++)
-        {
-          if( m_colourRemapSEIPreLutNumValMinus1[c]>0 || m_colourRemapSEIMatrixPresentFlag )
-            xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
-          else
-            xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEICodedDataBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_coded_data_bit_depth)-1, inclusive");
-          xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEITargetBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_target_bit_depth)-1, inclusive");
+        { 
+          xConfirmPara( m_colourRemapSEIPostLutCodedValue[c][i] < 0 || m_colourRemapSEIPostLutCodedValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_coded_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
+          xConfirmPara( m_colourRemapSEIPostLutTargetValue[c][i] < 0 || m_colourRemapSEIPostLutTargetValue[c][i] > ((1<<m_colourRemapSEIBitDepth)-1), "post_lut_target_value[c][i] shall be in the range of 0 to (1<<colour_remap_bit_depth)-1, inclusive");
         }
     }
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 866)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncLayerCfg.h	(revision 868)
@@ -130,11 +130,11 @@
   Bool      m_colourRemapSEICancelFlag;
   Bool      m_colourRemapSEIPersistenceFlag;
-  Bool      m_colourRemapSEIVideoSignalTypePresentFlag;
-  Bool      m_colourRemapSEIVideoFullRangeFlag;
+  Bool      m_colourRemapSEIVideoSignalInfoPresentFlag;
+  Bool      m_colourRemapSEIFullRangeFlag;
   Int       m_colourRemapSEIPrimaries;
-  Int       m_colourRemapSEITransferCharacteristics;
-  Int       m_colourRemapSEIMatrixCoeffs;
-  Int       m_colourRemapSEICodedDataBitDepth;
-  Int       m_colourRemapSEITargetBitDepth;
+  Int       m_colourRemapSEITransferFunction;
+  Int       m_colourRemapSEIMatrixCoefficients;
+  Int       m_colourRemapSEIInputBitDepth;
+  Int       m_colourRemapSEIBitDepth;
   Int       m_colourRemapSEIPreLutNumValMinus1[3];
   Int*      m_colourRemapSEIPreLutCodedValue[3];
Index: branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 866)
+++ branches/SHM-dev/source/App/TAppEncoder/TAppEncTop.cpp	(revision 868)
@@ -539,11 +539,11 @@
     m_acTEncTop[layer].setCRISEICancelFlag                          ( m_acLayerCfg[layer].m_colourRemapSEICancelFlag );
     m_acTEncTop[layer].setCRISEIPersistenceFlag                     ( m_acLayerCfg[layer].m_colourRemapSEIPersistenceFlag );
-    m_acTEncTop[layer].setCRISEIVideoSignalTypePresentFlag          ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalTypePresentFlag );
-    m_acTEncTop[layer].setCRISEIVideoFullRangeFlag                  ( m_acLayerCfg[layer].m_colourRemapSEIVideoFullRangeFlag );
+    m_acTEncTop[layer].setCRISEIVideoSignalInfoPresentFlag          ( m_acLayerCfg[layer].m_colourRemapSEIVideoSignalInfoPresentFlag );
+    m_acTEncTop[layer].setCRISEIFullRangeFlag                       ( m_acLayerCfg[layer].m_colourRemapSEIFullRangeFlag );
     m_acTEncTop[layer].setCRISEIPrimaries                           ( m_acLayerCfg[layer].m_colourRemapSEIPrimaries );
-    m_acTEncTop[layer].setCRISEITransferCharacteristics             ( m_acLayerCfg[layer].m_colourRemapSEITransferCharacteristics );
-    m_acTEncTop[layer].setCRISEIMatrixCoeffs                        ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoeffs );
-    m_acTEncTop[layer].setCRISEICodedDataBitDepth                   ( m_acLayerCfg[layer].m_colourRemapSEICodedDataBitDepth );
-    m_acTEncTop[layer].setCRISEITargetBitDepth                      ( m_acLayerCfg[layer].m_colourRemapSEITargetBitDepth );
+    m_acTEncTop[layer].setCRISEITransferFunction                    ( m_acLayerCfg[layer].m_colourRemapSEITransferFunction );
+    m_acTEncTop[layer].setCRISEIMatrixCoefficients                  ( m_acLayerCfg[layer].m_colourRemapSEIMatrixCoefficients );
+    m_acTEncTop[layer].setCRISEIInputBitDepth                       ( m_acLayerCfg[layer].m_colourRemapSEIInputBitDepth );
+    m_acTEncTop[layer].setCRISEIBitDepth                            ( m_acLayerCfg[layer].m_colourRemapSEIBitDepth );
     m_acTEncTop[layer].setCRISEIPreLutNumValMinus1                  ( m_acLayerCfg[layer].m_colourRemapSEIPreLutNumValMinus1 );
     m_acTEncTop[layer].setCRISEIPreLutCodedValue                    ( m_acLayerCfg[layer].m_colourRemapSEIPreLutCodedValue );
@@ -924,11 +924,11 @@
   m_cTEncTop.setCRISEICancelFlag                 ( m_colourRemapSEICancelFlag );
   m_cTEncTop.setCRISEIPersistenceFlag            ( m_colourRemapSEIPersistenceFlag );
-  m_cTEncTop.setCRISEIVideoSignalTypePresentFlag ( m_colourRemapSEIVideoSignalTypePresentFlag );
-  m_cTEncTop.setCRISEIVideoFullRangeFlag         ( m_colourRemapSEIVideoFullRangeFlag );
+  m_cTEncTop.setCRISEIVideoSignalInfoPresentFlag ( m_colourRemapSEIVideoSignalInfoPresentFlag );
+  m_cTEncTop.setCRISEIFullRangeFlag              ( m_colourRemapSEIFullRangeFlag );
   m_cTEncTop.setCRISEIPrimaries                  ( m_colourRemapSEIPrimaries );
-  m_cTEncTop.setCRISEITransferCharacteristics    ( m_colourRemapSEITransferCharacteristics );
-  m_cTEncTop.setCRISEIMatrixCoeffs               ( m_colourRemapSEIMatrixCoeffs );
-  m_cTEncTop.setCRISEICodedDataBitDepth          ( m_colourRemapSEICodedDataBitDepth );
-  m_cTEncTop.setCRISEITargetBitDepth             ( m_colourRemapSEITargetBitDepth );
+  m_cTEncTop.setCRISEITransferFunction           ( m_colourRemapSEITransferFunction );
+  m_cTEncTop.setCRISEIMatrixCoefficients         ( m_colourRemapSEIMatrixCoefficients );
+  m_cTEncTop.setCRISEIInputBitDepth              ( m_colourRemapSEIInputBitDepth );
+  m_cTEncTop.setCRISEIBitDepth                   ( m_colourRemapSEIBitDepth );
   m_cTEncTop.setCRISEIPreLutNumValMinus1         ( m_colourRemapSEIPreLutNumValMinus1 );
   m_cTEncTop.setCRISEIPreLutCodedValue           ( m_colourRemapSEIPreLutCodedValue );
