Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TAppCommon/program_options_lite.h
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TAppCommon/program_options_lite.h	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TAppCommon/program_options_lite.h	(revision 1339)
@@ -405,4 +405,44 @@
       xParseVec ( arg, opt_storage[ idcs[0] ][ idcs[1] ] );
     };
+#if SEI_DRI_F0169
+    template<>
+    inline void
+    Option< std::vector<std::vector<double>> >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter&)
+    {
+        // xParseVec ( arg, opt_storage[ idcs[0] ] );
+        char* pcNextStart = (char*) arg.data();
+        char* pcEnd = pcNextStart + arg.length();
+
+        char* pcOldStart = 0; 
+
+        size_t iIdx = 0; 
+
+        while (pcNextStart < pcEnd)
+        {
+            errno = 0; 
+
+            if ( iIdx < opt_storage[idcs[0]].size() )
+            {
+                opt_storage[idcs[0]][iIdx] = strtod(pcNextStart, &pcNextStart);
+            }
+            else
+            {
+                opt_storage[idcs[0]].push_back( strtod(pcNextStart, &pcNextStart)) ;
+            }
+            iIdx++; 
+
+            if ( errno == ERANGE || (pcNextStart == pcOldStart) )
+            {
+                std::cerr << "Error Parsing Doubles: `" << arg << "'" << std::endl;
+                exit(EXIT_FAILURE);    
+            };   
+            while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++;  
+            pcOldStart = pcNextStart; 
+
+        }       
+
+
+    }
+#endif
 #else
     template<>
Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/SEI.cpp
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/SEI.cpp	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/SEI.cpp	(revision 1339)
@@ -242,7 +242,7 @@
 #endif
   case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO:            return new SEIThreeDimensionalReferenceDisplaysInfo;
-#if NH_MV_SEI_TBD
-  case SEI::DEPTH_REPRESENTATION_INFO             :               return new SEIDepthRepresentationInfo;  
-#endif
+#if SEI_DRI_F0169
+  case SEI::DEPTH_REPRESENTATION_INFO             :               return new SEIDepthRepresentationInfo; 
+#endif 
   case SEI::MULTIVIEW_SCENE_INFO                  :               return new SEIMultiviewSceneInfo;
   case SEI::MULTIVIEW_ACQUISITION_INFO            :               return new SEIMultiviewAcquisitionInfo;
@@ -1076,157 +1076,172 @@
 };
 
-#if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
 Void SEIDepthRepresentationInfo::setupFromSlice  ( const TComSlice* slice )
 {
-  sei.m_zNearFlag =  TBD ;
-  sei.m_zFarFlag =  TBD ;
-  sei.m_dMinFlag =  TBD ;
-  sei.m_dMaxFlag =  TBD ;
-  sei.m_depthRepresentationType =  TBD ;
-  if( sei.m_dMinFlag  | |  sei.m_dMaxFlag )
-  {
-    sei.m_disparityRefViewId =  TBD ;
-  }
-  if( sei.m_zNearFlag )
-  {
-    DepthRepInfoElement(() ZNearSign, ZNearExp, ZNearMantissa, ZNearManLen );
-  }
-  if( sei.m_zFarFlag )
-  {
-    DepthRepInfoElement(() ZFarSign, ZFarExp, ZFarMantissa, ZFarManLen );
-  }
-  if( sei.m_dMinFlag )
-  {
-    DepthRepInfoElement(() DMinSign, DMinExp, DMinMantissa, DMinManLen );
-  }
-  if( sei.m_dMaxFlag )
-  {
-    DepthRepInfoElement(() DMaxSign, DMaxExp, DMaxMantissa, DMaxManLen );
-  }
-  if( sei.m_depthRepresentationType  = =  3 )
-  {
-    sei.m_depthNonlinearRepresentationNumMinus1 =  TBD ;
-    for( Int i = 1; i  <=  sei.m_depthNonlinearRepresentationNumMinus1 + 1; i++ )
+
+    m_currLayerID=slice->getLayerIdInVps();
+};
+
+Void SEIDepthRepresentationInfo::setupFromCfgFile(const Char* cfgFile)
+{ 
+    // Set default values
+    IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 
+
+    // TBD: Add default values for which layers, POCS, Tids or Nalu types the SEI should be send. 
+    //defAppLayerIds    .push_back( TBD );
+    defAppPocs        .push_back( 0 );
+    //defAppTids        .push_back( TBD );
+    //defAppVclNaluTypes.push_back( TBD );
+
+    Int      defSeiNaluId                  = 0; 
+    Int      defPositionInSeiNalu          = 0; 
+    Bool     defModifyByEncoder            = true; 
+
+    // Setup config file options
+    po::Options opts;  
+
+    xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
+
+    opts.addOptions()
+        ("ZNear_%d"                      , m_zNear               , std::vector<double>(0,0)       , MAX_NUM_LAYERS , "ZNear"           )
+        ("ZFar_%d"                       , m_zFar                , std::vector<double>(0,0)       , MAX_NUM_LAYERS , "ZFar"            )
+        ("DMin_%d"                       , m_dMin                , std::vector<double>(0,0)       , MAX_NUM_LAYERS , "DMin"            )
+        ("DMax_%d"                       , m_dMax                , std::vector<double>(0,0)       , MAX_NUM_LAYERS , "DMax"            )
+        ("DepthRepresentationInfoSeiPresentFlag_%d",  m_depthRepresentationInfoSeiPresentFlag, BoolAry1d(1,0), MAX_NUM_LAYERS, "DepthRepresentationInfoSeiPresentFlag")
+        ("DepthRepresentationType_%d"        , m_depthRepresentationType          , IntAry1d(0,0), MAX_NUM_LAYERS,  "DepthRepresentationType"        )
+        ("DisparityRefViewId_%d"             , m_disparityRefViewId               ,  IntAry1d(0,0), MAX_NUM_LAYERS,  "DisparityRefViewId"             )
+        ("DepthNonlinearRepresentationNumMinus1_%d", m_depthNonlinearRepresentationNumMinus1, IntAry1d(0,0), MAX_NUM_LAYERS, "DepthNonlinearRepresentationNumMinus1")
+        ("DepthNonlinearRepresentationModel_%d"    , m_depth_nonlinear_representation_model ,   IntAry1d(0,0), MAX_NUM_LAYERS, "DepthNonlinearRepresentationModel") ;
+
+
+    po::setDefaults(opts);
+
+    // Parse the cfg file
+    po::ErrorReporter err;
+    po::parseConfigFile( opts, cfgFile, err );
+
+    Bool wrongConfig = false; 
+
+    for(int i=0;i<MAX_NUM_LAYERS;i++)
     {
-      DepthNonlinearRepresentationModel( i );
+        if (m_zNear[i].size()>0)
+            m_zNearFlag.push_back(true);
+        else
+            m_zNearFlag.push_back(false);
+
+        if (m_zFar[i].size()>0)
+            m_zFarFlag.push_back(true);
+        else
+            m_zFarFlag.push_back(false);
+
+        if (m_dMin[i].size()>0)
+            m_dMinFlag.push_back(true);
+        else
+            m_dMinFlag.push_back(false);
+
+        if (m_dMax[i].size()>0)
+            m_dMaxFlag.push_back(true);
+        else
+            m_dMaxFlag.push_back(false);
+
+
+        if (m_depthRepresentationInfoSeiPresentFlag[i][0])
+        {
+            if ( m_depthRepresentationType[i].size()<=0 )
+            {
+                printf("DepthRepresentationType_%d must be present for layer %d\n",i,i );
+                return;
+            }
+
+            if (  m_depthRepresentationType[i][0]<0 )
+            {
+                printf("DepthRepresentationType_%d must be equal to or greater than 0\n",i );
+                return;
+            }
+
+            if (m_dMinFlag[i] || m_dMaxFlag[i])
+            {
+                if (m_disparityRefViewId[i].size()<=0)
+                {
+                    printf("DisparityRefViewId_%d must be present for layer %d\n",i,i );
+                    assert(false);
+                    return;
+                }
+                if (m_disparityRefViewId[i][0]<0)
+                {
+                    printf("DisparityRefViewId_%d must be equal to or greater than 0\n",i );
+                    assert(false);
+                    return;
+                }
+            }
+
+            if (m_depthRepresentationType[i][0]==3)
+            {
+                if (m_depthNonlinearRepresentationNumMinus1[i].size()<=0)
+                {
+                    printf("DepthNonlinearRepresentationNumMinus1_%d must be present for layer %d\n",i,i );
+                    assert(false);
+                    return;
+                }
+                if (m_depthNonlinearRepresentationNumMinus1[i][0]<0)
+                {
+                    printf("DepthNonlinearRepresentationNumMinus1_%d must be equal to or greater than 0\n",i );
+                    assert(false);
+                    return;
+                }
+
+                if (m_depth_nonlinear_representation_model[i].size() != m_depthNonlinearRepresentationNumMinus1[i][0]+1)
+                {
+                    printf("the number of values in Depth_nonlinear_representation_model must be equal to DepthNonlinearRepresentationNumMinus1+1 in layer %d\n",i );
+                    assert(false);
+                    return;
+                }
+
+
+            }
+
+
+        }
+
+
+   }
+
+    assert(m_zNearFlag.size()==MAX_NUM_LAYERS);
+    assert(m_zFarFlag.size()==MAX_NUM_LAYERS);
+    assert(m_dMinFlag.size()==MAX_NUM_LAYERS);
+    assert(m_dMaxFlag.size()==MAX_NUM_LAYERS);
+}
+
+Bool SEIDepthRepresentationInfo::checkCfg( const TComSlice* slice )
+{ 
+    // Check config values
+    Bool wrongConfig = false; 
+    assert(m_currLayerID>=0);
+
+    if (m_depthRepresentationInfoSeiPresentFlag[m_currLayerID][0]==false)
+    {
+        printf("DepthRepresentationInfoSeiPresentFlag_%d should be equal to 1 when  ApplicableLayerIds is empty or ApplicableLayerIds contains  %d\n",m_currLayerID,slice->getLayerId());
+        assert(false);
     }
-  }
-};
-
-Void SEIDepthRepresentationInfo::setupFromCfgFile(const Char* cfgFile)
-{ 
-  // Set default values
-  IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 
-
-  // 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 );
-
-  Int      defSeiNaluId                  = 0; 
-  Int      defPositionInSeiNalu          = 0; 
-  Bool     defModifyByEncoder            = TBD; 
-
-  // Setup config file options
-  po::Options opts;     
-  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
-
-  opts.addOptions()
-    ("ZNearFlag"                      , m_zNearFlag                        , false                          , "ZNearFlag"                        )
-    ("ZFarFlag"                       , m_zFarFlag                         , false                          , "ZFarFlag"                         )
-    ("DMinFlag"                       , m_dMinFlag                         , false                          , "DMinFlag"                         )
-    ("DMaxFlag"                       , m_dMaxFlag                         , false                          , "DMaxFlag"                         )
-    ("DepthRepresentationType"        , m_depthRepresentationType          , 0                              , "DepthRepresentationType"          )
-    ("DisparityRefViewId"             , m_disparityRefViewId               , 0                              , "DisparityRefViewId"               )
-    ("DepthNonlinearRepresentationNumMinus1", m_depthNonlinearRepresentationNumMinus1, 0                              , "DepthNonlinearRepresentationNumMinus1")
-    ;
-
-  po::setDefaults(opts);
-
-  // Parse the cfg file
-  po::ErrorReporter err;
-  po::parseConfigFile( opts, cfgFile, err );
-};
-
-Bool SEIDepthRepresentationInfo::checkCfg( const TComSlice* slice )
-{ 
-  // Check config values
-  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_zNearFlag                      , MINVAL , MAXVAL, "z_near_flag"                      );
-  xCheckCfgRange( wrongConfig, m_zFarFlag                       , MINVAL , MAXVAL, "z_far_flag"                       );
-  xCheckCfgRange( wrongConfig, m_dMinFlag                       , MINVAL , MAXVAL, "d_min_flag"                       );
-  xCheckCfgRange( wrongConfig, m_dMaxFlag                       , MINVAL , MAXVAL, "d_max_flag"                       );
-  xCheckCfgRange( wrongConfig, m_depthRepresentationType        , MINVAL , MAXVAL, "depth_representation_type"        );
-  xCheckCfgRange( wrongConfig, m_disparityRefViewId             , MINVAL , MAXVAL, "disparity_ref_view_id"            );
-  xCheckCfgRange( wrongConfig, m_depthNonlinearRepresentationNumMinus1, MINVAL , MAXVAL, "depth_nonlinear_representation_num_minus1");
-
-  return wrongConfig; 
-};
-
-Void SEIDepthRepInfoElement::setupFromSlice  ( const TComSlice* slice )
-{
-  sei.m_daSignFlag =  TBD ;
-  sei.m_daExponent =  TBD ;
-  sei.m_daMantissaLenMinus1 =  TBD ;
-  sei.m_daMantissa =  TBD ;
-};
-
-Void SEIDepthRepInfoElement::setupFromCfgFile(const Char* cfgFile)
-{ 
-  // Set default values
-  IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 
-
-  // 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 );
-
-  Int      defSeiNaluId                  = 0; 
-  Int      defPositionInSeiNalu          = 0; 
-  Bool     defModifyByEncoder            = TBD; 
-
-  // Setup config file options
-  po::Options opts;     
-  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
-
-  opts.addOptions()
-    ("DaSignFlag"                     , m_daSignFlag                       , false                          , "DaSignFlag"                       )
-    ("DaExponent"                     , m_daExponent                       , 0                              , "DaExponent"                       )
-    ("DaMantissaLenMinus1"            , m_daMantissaLenMinus1              , 0                              , "DaMantissaLenMinus1"              )
-    ("DaMantissa"                     , m_daMantissa                       , 0                              , "DaMantissa"                       )
-    ;
-
-  po::setDefaults(opts);
-
-  // Parse the cfg file
-  po::ErrorReporter err;
-  po::parseConfigFile( opts, cfgFile, err );
-};
-
-Bool SEIDepthRepInfoElement::checkCfg( const TComSlice* slice )
-{ 
-  // Check config values
-  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_daSignFlag                     , MINVAL , MAXVAL, "da_sign_flag"                     );
-  xCheckCfgRange( wrongConfig, m_daExponent                     , MINVAL , MAXVAL, "da_exponent"                      );
-  xCheckCfgRange( wrongConfig, m_daMantissaLenMinus1            , MINVAL , MAXVAL, "da_mantissa_len_minus1"           );
-  xCheckCfgRange( wrongConfig, m_daMantissa                     , MINVAL , MAXVAL, "da_mantissa"                      );
-
-  return wrongConfig; 
-};
+    // TBD: Add constraints on presence of SEI here. 
+    xCheckCfg     ( wrongConfig, m_depthRepresentationType[m_currLayerID][0] >=0 , "depth_representation_type must be equal to or greater than 0" );
+    if ( m_dMaxFlag[m_currLayerID] || m_dMinFlag[m_currLayerID])
+    {
+        xCheckCfg( wrongConfig , m_disparityRefViewId[m_currLayerID][0]>=0, "disparity_ref_view_id must be equal to or greater than 0 when d_min or d_max are present"); 
+    }
+
+    if (m_depthRepresentationType[m_currLayerID][0]==3)          
+    {
+        xCheckCfg(wrongConfig , m_depthNonlinearRepresentationNumMinus1[m_currLayerID][0]>=0, "depth_nonlinear_representation_num_minus1 must be greater than or equal to 0");
+
+        if (m_depthNonlinearRepresentationNumMinus1[m_currLayerID][0]>=0)
+        {
+            xCheckCfg( wrongConfig , m_depthNonlinearRepresentationNumMinus1[m_currLayerID][0]+1 == m_depth_nonlinear_representation_model[m_currLayerID].size() ,"the number of values in depth_nonlinear_representation_model must be equal to depth_nonlinear_representation_num_minus1+1");
+        }
+
+    }
+
+    return wrongConfig; 
+}
 #endif
 
Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/SEI.h
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/SEI.h	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/SEI.h	(revision 1339)
@@ -925,42 +925,72 @@
 };
 
-#if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
 class SEIDepthRepresentationInfo : public SEI
 {
-public:
-  PayloadType payloadType( ) const { return DEPTH_REPRESENTATION_INFO; }
-  SEIDepthRepresentationInfo ( ) { };
-  ~SEIDepthRepresentationInfo( ) { };
-  SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; 
-
-  Void setupFromCfgFile( const Char*      cfgFile );
-  Void setupFromSlice  ( const TComSlice* slice   );
-  Bool checkCfg        ( const TComSlice* slice   );
-
-  Bool      m_zNearFlag;
-  Bool      m_zFarFlag;
-  Bool      m_dMinFlag;
-  Bool      m_dMaxFlag;
-  Int       m_depthRepresentationType;
-  Int       m_disparityRefViewId;
-  Int       m_depthNonlinearRepresentationNumMinus1;
-};
-
-class SEIDepthRepInfoElement : public SEI
-{
-public:
-  PayloadType payloadType( ) const { return DEPTH_REP_INFO_ELEMENT; }
-  SEIDepthRepInfoElement ( ) { };
-  ~SEIDepthRepInfoElement( ) { };
-  SEI* getCopy( ) const { return new SEIDepthRepInfoElement(*this); }; 
-
-  Void setupFromCfgFile( const Char*      cfgFile );
-  Void setupFromSlice  ( const TComSlice* slice   );
-  Bool checkCfg        ( const TComSlice* slice   );
-
-  Bool      m_daSignFlag;
-  Int       m_daExponent;
-  Int       m_daMantissaLenMinus1;
-  Int       m_daMantissa;
+    public:
+        PayloadType payloadType( ) const { return DEPTH_REPRESENTATION_INFO; }
+        SEIDepthRepresentationInfo ( ) 
+        {
+            m_currLayerID=-1;
+        };
+        ~SEIDepthRepresentationInfo( ) { };
+        SEI* getCopy( ) const { return new SEIDepthRepresentationInfo(*this); }; 
+
+        Void setupFromCfgFile( const Char*      cfgFile );
+        Void setupFromSlice  ( const TComSlice* slice   );
+        Bool checkCfg        ( const TComSlice* slice   );
+        Void clear()
+        {
+            int i;
+            m_zNearFlag.clear();
+            m_zFarFlag.clear();
+            m_dMinFlag.clear();
+            m_dMaxFlag.clear();
+
+            for(i=0;i<m_zNear.size();i++)
+                m_zNear[i].clear();
+            m_zNear.clear();
+
+            for(i=0;i<m_zFar.size();i++)
+                m_zFar[i].clear();
+            m_zFar.clear();
+
+            for(i=0;i<m_dMin.size();i++)
+                m_dMin[i].clear();
+            m_dMin.clear();
+
+            for(i=0;i<m_dMax.size();i++)
+                m_dMax[i].clear();
+            m_dMax.clear();
+
+            for(i=0;i<m_depthRepresentationType.size();i++)
+                m_depthRepresentationType[i].clear();
+            m_depthRepresentationType.clear();
+
+            for(i=0;i<m_disparityRefViewId.size();i++)
+                m_disparityRefViewId[i].clear();
+            m_disparityRefViewId.clear();
+
+            for(i=0;i<m_depthNonlinearRepresentationNumMinus1.size();i++)
+                m_depthNonlinearRepresentationNumMinus1[i].clear();
+            m_depthNonlinearRepresentationNumMinus1.clear();
+
+            for(i=0;i<m_depth_nonlinear_representation_model.size();i++)
+                m_depth_nonlinear_representation_model[i].clear();
+            m_depth_nonlinear_representation_model.clear();            
+
+        }
+        int m_currLayerID;
+        BoolAry1d      m_zNearFlag;
+        BoolAry1d      m_zFarFlag;
+        BoolAry1d      m_dMinFlag;
+        BoolAry1d      m_dMaxFlag;
+        BoolAry2d      m_depthRepresentationInfoSeiPresentFlag;
+        std::vector<std::vector<Double>> m_zNear,m_zFar,m_dMin,m_dMax;
+
+        IntAry2d       m_depthRepresentationType;
+        IntAry2d       m_disparityRefViewId;
+        IntAry2d       m_depthNonlinearRepresentationNumMinus1;
+        IntAry2d m_depth_nonlinear_representation_model;
 };
 #endif
Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/TypeDef.h	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibCommon/TypeDef.h	(revision 1339)
@@ -71,4 +71,7 @@
 #define NH_MV_FIX_NUM_POC_TOTAL_CUR               1 // Derivation of NumPocTotalCur for IDR pictures. !!SPEC!!
 #define NH_MV_LAYERS_NOT_PRESENT_SEI              1 // Layers not present SEI message JCTMV-M0043
+#if NH_MV_SEI
+#define SEI_DRI_F0169 1
+#endif
 #endif
 #if NH_3D
Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibDecoder/SEIread.cpp
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibDecoder/SEIread.cpp	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibDecoder/SEIread.cpp	(revision 1339)
@@ -360,9 +360,9 @@
       xParseSEIThreeDimensionalReferenceDisplaysInfo((SEIThreeDimensionalReferenceDisplaysInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
       break;
-#if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
     case SEI::DEPTH_REPRESENTATION_INFO:
-      sei = new SEIDepthRepresentationInfo;
-      xParseSEIDepthRepresentationInfo((SEIDepthRepresentationInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
-      break;
+        sei = new SEIDepthRepresentationInfo;
+        xParseSEIDepthRepresentationInfo((SEIDepthRepresentationInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+        break;
 #endif
     case SEI::MULTIVIEW_SCENE_INFO:
@@ -1474,55 +1474,107 @@
 };
 
-#if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
+Void SEIReader::xParseSEIDepthRepInfoElement(double& f,std::ostream *pDecodedMessageOutputStream)
+{
+    UInt val;
+    UInt x_sign,x_mantissa_len,x_mantissa;
+    Int x_exp;
+
+    sei_read_flag(pDecodedMessageOutputStream,     val,"da_sign_flag");  x_sign = val ? 1 : 0 ;
+    sei_read_code(pDecodedMessageOutputStream,  7, val, "da_exponent" );         x_exp = val-31;
+    sei_read_code(pDecodedMessageOutputStream,  5, val, "da_mantissa_len_minus1" );         x_mantissa_len = val+1;
+    sei_read_code(pDecodedMessageOutputStream,  x_mantissa_len, val, "da_mantissa" );         x_mantissa = val;
+    if (x_mantissa_len>=16)
+    {
+        f =1.0 +  (x_mantissa*1.0)/(1u<<(x_mantissa_len-16))/(256.0*256.0 );
+    }else
+    {
+        f =1.0 +  (x_mantissa*1.0)/(1u<<x_mantissa_len);
+    }
+    double m=1.0;
+    int i;
+    if (x_exp<0)
+    {
+        for(i=0;i<-x_exp;i++)
+            m = m * 2;
+
+        f = f/m;
+    }
+    else
+    {
+        for(i=0;i<x_exp;i++)
+            m = m * 2;
+
+        f= f * m;
+    }
+    if (x_sign==1)
+    {
+        f= -f;
+    }
+};
+
 Void SEIReader::xParseSEIDepthRepresentationInfo(SEIDepthRepresentationInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
 {
-  UInt code;
-  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
-
-  sei_read_flag( pDecodedMessageOutputStream, code, "z_near_flag" ); sei.m_zNearFlag = (code == 1);
-  sei_read_flag( pDecodedMessageOutputStream, code, "z_far_flag" ); sei.m_zFarFlag = (code == 1);
-  sei_read_flag( pDecodedMessageOutputStream, code, "d_min_flag" ); sei.m_dMinFlag = (code == 1);
-  sei_read_flag( pDecodedMessageOutputStream, code, "d_max_flag" ); sei.m_dMaxFlag = (code == 1);
-  sei_read_uvlc( pDecodedMessageOutputStream, code, "depth_representation_type" ); sei.m_depthRepresentationType = code;
-  if( sei.m_dMinFlag  | |  sei.m_dMaxFlag )
-  {
-    sei_read_uvlc( pDecodedMessageOutputStream, code, "disparity_ref_view_id" ); sei.m_disparityRefViewId = code;
-  }
-  if( sei.m_zNearFlag )
-  {
-    DepthRepInfoElement(() ZNearSign, ZNearExp, ZNearMantissa, ZNearManLen );
-  }
-  if( sei.m_zFarFlag )
-  {
-    DepthRepInfoElement(() ZFarSign, ZFarExp, ZFarMantissa, ZFarManLen );
-  }
-  if( sei.m_dMinFlag )
-  {
-    DepthRepInfoElement(() DMinSign, DMinExp, DMinMantissa, DMinManLen );
-  }
-  if( sei.m_dMaxFlag )
-  {
-    DepthRepInfoElement(() DMaxSign, DMaxExp, DMaxMantissa, DMaxManLen );
-  }
-  if( sei.m_depthRepresentationType  ==  3 )
-  {
-    sei_read_uvlc( pDecodedMessageOutputStream, code, "depth_nonlinear_representation_num_minus1" ); sei.m_depthNonlinearRepresentationNumMinus1 = code;
-    for( Int i = 1; i  <=  sei.m_depthNonlinearRepresentationNumMinus1 + 1; i++ )
-    {
-      DepthNonlinearRepresentationModel( i );
-    }
-  }
-};
-
-Void SEIReader::xParseSEIDepthRepInfoElement(SEIDepthRepInfoElement& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
-{
-  UInt code;
-  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
-
-  sei_read_flag( pDecodedMessageOutputStream, code, "da_sign_flag" ); sei.m_daSignFlag = (code == 1);
-  sei_read_code( pDecodedMessageOutputStream, 7, code, "da_exponent" ); sei.m_daExponent = code;
-  sei_read_code( pDecodedMessageOutputStream, 5, code, "da_mantissa_len_minus1" ); sei.m_daMantissaLenMinus1 = code;
-  sei_read_code( pDecodedMessageOutputStream, getDaMantissaLen ), code, "da_mantissa" ); sei.m_daMantissa = code;
-};
+    UInt code;
+    double zNear,zFar,dMin,dMax;
+    bool zNearFlag,zFarFlag,dMinFlag,dMaxFlag;
+    int depth_representation_type,disparityRefViewId,depthNonlinearRepresentationNumMinus1;
+    std::vector<int> DepthNonlinearRepresentationModel;
+
+    sei.clear();
+
+    output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+    sei_read_flag( pDecodedMessageOutputStream, code, "z_near_flag" );    zNearFlag  = (code == 1);
+    sei_read_flag( pDecodedMessageOutputStream, code, "z_far_flag" );     zFarFlag = (code == 1);
+    sei_read_flag( pDecodedMessageOutputStream, code, "d_min_flag" );     dMinFlag = (code == 1);
+    sei_read_flag( pDecodedMessageOutputStream, code, "d_max_flag" );     dMaxFlag = (code == 1);
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "depth_representation_type" ); depth_representation_type = code;
+
+    sei.m_zNearFlag.push_back(zNearFlag);
+    sei.m_zFarFlag.push_back(zFarFlag);
+    sei.m_dMinFlag.push_back(dMinFlag);
+    sei.m_dMaxFlag.push_back(dMaxFlag);
+
+    sei.m_depthRepresentationType.push_back(IntAry1d(1,depth_representation_type));
+
+    if( dMinFlag  ||  dMaxFlag )
+    {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "disparity_ref_view_id" ); disparityRefViewId = code;
+        sei.m_disparityRefViewId.push_back(IntAry1d(1,disparityRefViewId));
+    }
+    if( zNearFlag )
+    {
+        xParseSEIDepthRepInfoElement(zNear , pDecodedMessageOutputStream);
+        sei.m_zNear.push_back(std::vector<double>(1,zNear));
+    }
+    if( zFarFlag )
+    {
+        xParseSEIDepthRepInfoElement(zFar , pDecodedMessageOutputStream);
+        sei.m_zFar.push_back(std::vector<double>(1,zFar));
+    }
+    if( dMinFlag )
+    {
+        xParseSEIDepthRepInfoElement(dMin , pDecodedMessageOutputStream);
+        sei.m_dMin.push_back(std::vector<double>(1,dMin));
+    }
+    if( dMaxFlag )
+    {
+        xParseSEIDepthRepInfoElement(dMax , pDecodedMessageOutputStream);
+        sei.m_dMax.push_back(std::vector<double>(1,dMax));
+    }
+    if( depth_representation_type  ==  3 )
+    {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "depth_nonlinear_representation_num_minus1" ); depthNonlinearRepresentationNumMinus1 = code;
+        sei.m_depthNonlinearRepresentationNumMinus1.push_back(IntAry1d(1,depthNonlinearRepresentationNumMinus1));
+        for( Int i = 1; i  <=  depthNonlinearRepresentationNumMinus1 + 1; i++ )
+        {
+            sei_read_uvlc(pDecodedMessageOutputStream,code,"DepthNonlinearRepresentationModel" ) ;
+            DepthNonlinearRepresentationModel.push_back(code);
+        }
+
+        sei.m_depth_nonlinear_representation_model.push_back(DepthNonlinearRepresentationModel);
+    }
+}
 #endif
 Void SEIReader::xParseSEIMultiviewSceneInfo(SEIMultiviewSceneInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibDecoder/SEIread.h
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibDecoder/SEIread.h	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibDecoder/SEIread.h	(revision 1339)
@@ -120,8 +120,7 @@
 #endif
   Void xParseSEIThreeDimensionalReferenceDisplaysInfo (SEIThreeDimensionalReferenceDisplaysInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
-#if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
+  Void xParseSEIDepthRepInfoElement           (double &f,std::ostream *pDecodedMessageOutputStream);
   Void xParseSEIDepthRepresentationInfo       (SEIDepthRepresentationInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
-
-  Void xParseSEIDepthRepInfoElement           (SEIDepthRepInfoElement& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
 #endif
   Void xParseSEIMultiviewSceneInfo            (SEIMultiviewSceneInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibEncoder/SEIwrite.cpp
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1339)
@@ -167,9 +167,9 @@
      xWriteSEIThreeDimensionalReferenceDisplaysInfo(*static_cast<const SEIThreeDimensionalReferenceDisplaysInfo*>(&sei));
      break; 
- #if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
    case SEI::DEPTH_REPRESENTATION_INFO:
-     xWriteSEIDepthRepresentationInfo(*static_cast<const SEIDepthRepresentationInfo*>(&sei));
-     break; 
-#endif
+       xWriteSEIDepthRepresentationInfo(*static_cast<const SEIDepthRepresentationInfo*>(&sei));
+       break;
+#endif 
    case SEI::MULTIVIEW_SCENE_INFO:
      xWriteSEIMultiviewSceneInfo(*static_cast<const SEIMultiviewSceneInfo*>(&sei));
@@ -1102,51 +1102,130 @@
 };
 
-#if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
 Void SEIWriter::xWriteSEIDepthRepresentationInfo( const SEIDepthRepresentationInfo& sei)
 {
-  WRITE_FLAG( ( sei.m_zNearFlag ? 1 : 0 ), "z_near_flag" );
-  WRITE_FLAG( ( sei.m_zFarFlag ? 1 : 0 ), "z_far_flag" );
-  WRITE_FLAG( ( sei.m_dMinFlag ? 1 : 0 ), "d_min_flag" );
-  WRITE_FLAG( ( sei.m_dMaxFlag ? 1 : 0 ), "d_max_flag" );
-  WRITE_UVLC( sei.m_depthRepresentationType, "depth_representation_type" );
-  if( sei.m_dMinFlag  | |  sei.m_dMaxFlag )
-  {
-    WRITE_UVLC( sei.m_disparityRefViewId, "disparity_ref_view_id" );
-  }
-  if( sei.m_zNearFlag )
-  {
-    DepthRepInfoElement(() ZNearSign, ZNearExp, ZNearMantissa, ZNearManLen );
-  }
-  if( sei.m_zFarFlag )
-  {
-    DepthRepInfoElement(() ZFarSign, ZFarExp, ZFarMantissa, ZFarManLen );
-  }
-  if( sei.m_dMinFlag )
-  {
-    DepthRepInfoElement(() DMinSign, DMinExp, DMinMantissa, DMinManLen );
-  }
-  if( sei.m_dMaxFlag )
-  {
-    DepthRepInfoElement(() DMaxSign, DMaxExp, DMaxMantissa, DMaxManLen );
-  }
-  if( sei.m_depthRepresentationType  ==  3 )
-  {
-    WRITE_UVLC( sei.m_depthNonlinearRepresentationNumMinus1, "depth_nonlinear_representation_num_minus1" );
-    for( Int i = 1; i  <=  sei.m_depthNonlinearRepresentationNumMinus1 + 1; i++ )
-    {
-      DepthNonlinearRepresentationModel( i );
-    }
-  }
+
+    assert(sei.m_currLayerID>=0);
+
+    WRITE_FLAG( ( sei.m_zNearFlag[sei.m_currLayerID] ? 1 : 0 ), "z_near_flag" );
+    WRITE_FLAG( ( sei.m_zFarFlag[sei.m_currLayerID] ? 1 : 0 ), "z_far_flag" );
+    WRITE_FLAG( ( sei.m_dMinFlag[sei.m_currLayerID] ? 1 : 0 ), "d_min_flag" );
+    WRITE_FLAG( ( sei.m_dMaxFlag[sei.m_currLayerID] ? 1 : 0 ), "d_max_flag" );
+    WRITE_UVLC( sei.m_depthRepresentationType[sei.m_currLayerID][0], "depth_representation_type" );
+    if( sei.m_dMinFlag[sei.m_currLayerID]  ||  sei.m_dMaxFlag[sei.m_currLayerID] )
+    {
+        WRITE_UVLC( sei.m_disparityRefViewId[sei.m_currLayerID][0], "disparity_ref_view_id" );
+    }
+    if( sei.m_zNearFlag[sei.m_currLayerID] )
+    {
+        xWriteSEIDepthRepInfoElement(sei.m_zNear[sei.m_currLayerID][0]);
+    }
+    if( sei.m_zFarFlag[sei.m_currLayerID] )
+    {
+        xWriteSEIDepthRepInfoElement(sei.m_zFar[sei.m_currLayerID][0]);
+    }
+    if( sei.m_dMinFlag[sei.m_currLayerID] )
+    {
+        xWriteSEIDepthRepInfoElement(sei.m_dMin[sei.m_currLayerID][0]);
+    }
+    if( sei.m_dMaxFlag[sei.m_currLayerID] )
+    {
+        xWriteSEIDepthRepInfoElement(sei.m_dMax[sei.m_currLayerID][0]);
+    }
+
+    if (sei.m_depthRepresentationType[sei.m_currLayerID][0] == 3)
+    {
+        WRITE_UVLC( sei.m_depthNonlinearRepresentationNumMinus1[sei.m_currLayerID][0], "depth_nonlinear_representation_num_minus1" );
+        for( Int i = 1; i  <=  sei.m_depthNonlinearRepresentationNumMinus1[sei.m_currLayerID][0] + 1; i++ )
+        {
+            WRITE_UVLC(sei.m_depth_nonlinear_representation_model[sei.m_currLayerID][i-1],"depth_nonlinear_representation_model[ i ]");
+        }
+    }
+}
+
+Void SEIWriter::xWriteSEIDepthRepInfoElement( double f)
+{
+    UInt x_sign, x_exp, x_mantissa,x_mantissa_len;
+    if (f < 0) 
+    {
+        f = f * (-1);
+        x_sign = 1;
+    }
+    else
+    {
+        x_sign = 0;
+    }
+    int exponent=0;
+    if(f >= 1)
+    {
+        while(f>=2)
+        {
+            exponent++;
+            f = f/2;
+        }
+    }
+    else
+    {
+        while (f<1)
+        {
+            exponent++;
+            f = f*2;
+        }
+        exponent=-exponent;
+    }
+
+    int i;
+    f = f -1;
+    double s = 1;
+    char s_mantissa[32];
+    double thr=1.0/(4.0*(1<<30));
+
+    if (f>=thr)
+    {
+        for(i=0;i<32;i++)
+        {
+            s /= 2;
+            if(f>=s)
+            {
+                f = f-s;
+                s_mantissa[i]=1;
+
+                if (f<thr)
+                    break;
+            }else
+            {
+                s_mantissa[i]=0;
+            }
+        }
+
+        if (i<32)
+            x_mantissa_len=i+1;
+        else
+            x_mantissa_len=32;
+
+        x_mantissa=0;
+
+        for(i=0;i<x_mantissa_len;i++)
+        {
+            if (s_mantissa[i]==1)
+                x_mantissa += (1u)<<(x_mantissa_len-1-i) ;
+        }
+
+    }else
+    {
+        x_mantissa=0;
+        x_mantissa_len=1;
+    }
+
+    assert(exponent>=-31 && exponent<= (1<<7)-32);
+    x_exp=exponent+31;
+
+    WRITE_FLAG(  x_sign,                         "da_sign_flag" );
+    WRITE_CODE(  x_exp, 7 ,                      "da_exponent" );
+    WRITE_CODE( x_mantissa_len-1, 5 ,            "da_mantissa_len_minus1" );
+    WRITE_CODE( x_mantissa, x_mantissa_len ,     "da_mantissa" );
+
 };
-
-Void SEIWriter::xWriteSEIDepthRepInfoElement( const SEIDepthRepInfoElement& sei)
-{
-  WRITE_FLAG( ( sei.m_daSignFlag ? 1 : 0 ), "da_sign_flag" );
-  WRITE_CODE( sei.m_daExponent, 7, "da_exponent" );
-  WRITE_CODE( sei.m_daMantissaLenMinus1, 5, "da_mantissa_len_minus1" );
-  WRITE_CODE( sei.m_daMantissa, getDaMantissaLen ), "da_mantissa" );
-};
-
-#endif 
+#endif
 Void SEIWriter::xWriteSEIMultiviewSceneInfo( const SEIMultiviewSceneInfo& sei)
 {
Index: /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibEncoder/SEIwrite.h
===================================================================
--- /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibEncoder/SEIwrite.h	(revision 1338)
+++ /branches/HTM-15.1-dev0-Nokia/source/Lib/TLibEncoder/SEIwrite.h	(revision 1339)
@@ -102,7 +102,7 @@
 #endif
   Void xWriteSEIThreeDimensionalReferenceDisplaysInfo ( const SEIThreeDimensionalReferenceDisplaysInfo& sei);
-#if NH_MV_SEI_TBD
+#if SEI_DRI_F0169
+  Void xWriteSEIDepthRepInfoElement           ( double f);
   Void xWriteSEIDepthRepresentationInfo       ( const SEIDepthRepresentationInfo& sei);
-  Void xWriteSEIDepthRepInfoElement           ( const SEIDepthRepInfoElement& sei);
 #endif
   Void xWriteSEIMultiviewSceneInfo            ( const SEIMultiviewSceneInfo& sei);
