Index: branches/HTM-15.1-dev0/cfg/MV-HEVC/NonCTC/deltaCfg_sei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/MV-HEVC/NonCTC/deltaCfg_sei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/MV-HEVC/NonCTC/deltaCfg_sei.cfg	(revision 1328)
@@ -0,0 +1,12 @@
+#============== SEI ================================
+SeiCfgFileName_0                    : 
+SeiCfgFileName_1                    :
+SeiCfgFileName_2                    :
+SeiCfgFileName_3                    :
+SeiCfgFileName_4                    :
+SeiCfgFileName_5                    :
+SeiCfgFileName_6                    :
+SeiCfgFileName_7                    :
+SeiCfgFileName_8                    :
+SeiCfgFileName_9                    :
+SeiCfgFileName_10                   :
Index: branches/HTM-15.1-dev0/cfg/MV-HEVC/fullCfg.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/MV-HEVC/fullCfg.cfg	(revision 1327)
+++ branches/HTM-15.1-dev0/cfg/MV-HEVC/fullCfg.cfg	(revision 1328)
@@ -307,4 +307,18 @@
 RCForceIntraQP                      : 0                # Rate control: force intra QP to be equal to initial QP
 
+
+#============== SEI ================================
+SeiCfgFileName_0                    :                  
+SeiCfgFileName_1                    :                 
+SeiCfgFileName_2                    :                 
+SeiCfgFileName_3                    :                 
+SeiCfgFileName_4                    :                 
+SeiCfgFileName_5                    :                 
+SeiCfgFileName_6                    :                 
+SeiCfgFileName_7                    :                 
+SeiCfgFileName_8                    :                 
+SeiCfgFileName_9                    :                 
+SeiCfgFileName_10                   :
+
 ### DO NOT ADD ANYTHING BELOW THIS LINE ###
 ### DO NOT DELETE THE EMPTY LINE BELOW ###
Index: branches/HTM-15.1-dev0/cfg/SEI/alphaChannelInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/alphaChannelInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/alphaChannelInfoSei.cfg	(revision 1328)
@@ -0,0 +1,25 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+AlphaChannelCancelFlag          : 0
+AlphaChannelUseIdc              : 0
+AlphaChannelBitDepthMinus8      : 0
+AlphaTransparentValue           : 0
+AlphaOpaqueValue                : 0
+AlphaChannelIncrFlag            : 0
+AlphaChannelClipFlag            : 0
+AlphaChannelClipTypeFlag        : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/alternativeDepthInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/alternativeDepthInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/alternativeDepthInfoSei.cfg	(revision 1328)
@@ -0,0 +1,67 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+AlternativeDepthInfoCancelFlag  : 0
+DepthType                       : 0
+NumConstituentViewsGvdMinus1    : 0
+DepthPresentGvdFlag             : 0
+ZGvdFlag                        : 0
+IntrinsicParamGvdFlag           : 0
+RotationGvdFlag                 : 0
+TranslationGvdFlag              : 0
+SignGvdZNearFlag                : 0
+ExpGvdZNear                     : 0
+ManLenGvdZNearMinus1            : 0
+ManGvdZNear                     : 0
+SignGvdZFarFlag                 : 0
+ExpGvdZFar                      : 0
+ManLenGvdZFarMinus1             : 0
+ManGvdZFar                      : 0
+PrecGvdFocalLength              : 0
+PrecGvdPrincipalPoint           : 0
+PrecGvdRotationParam            : 0
+PrecGvdTranslationParam         : 0
+SignGvdFocalLengthX             : 0
+ExpGvdFocalLengthX              : 0
+ManGvdFocalLengthX              : 0
+SignGvdFocalLengthY             : 0
+ExpGvdFocalLengthY              : 0
+ManGvdFocalLengthY              : 0
+SignGvdPrincipalPointX          : 0
+ExpGvdPrincipalPointX           : 0
+ManGvdPrincipalPointX           : 0
+SignGvdPrincipalPointY          : 0
+ExpGvdPrincipalPointY           : 0
+ManGvdPrincipalPointY           : 0
+SignGvdR_0_0                    : 0
+ExpGvdR_0_0                     : 0
+ManGvdR_0_0                     : 0
+SignGvdTX                       : 0
+ExpGvdTX                        : 0
+ManGvdTX                        : 0
+MinOffsetXInt                   : 0
+MinOffsetXFrac                  : 0
+MaxOffsetXInt                   : 0
+MaxOffsetXFrac                  : 0
+OffsetYPresentFlag              : 0
+MinOffsetYInt                   : 0
+MinOffsetYFrac                  : 0
+MaxOffsetYInt                   : 0
+MaxOffsetYFrac                  : 0
+WarpMapSizePresentFlag          : 0
+WarpMapWidthMinus2              : 0
+WarpMapHeightMinus2             : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/bspInitialArrivalTimeSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/bspInitialArrivalTimeSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/bspInitialArrivalTimeSei.cfg	(revision 1328)
@@ -0,0 +1,19 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+NalInitialArrivalDelay          : 0
+VclInitialArrivalDelay          : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/bspNestingSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/bspNestingSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/bspNestingSei.cfg	(revision 1328)
@@ -0,0 +1,22 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+SeiOlsIdx                       : 0
+SeiPartitioningSchemeIdx        : 0
+BspIdx                          : 0
+BspNestingZeroBit               : 0
+NumSeisInBspMinus1              : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/depthRepInfoElementSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/depthRepInfoElementSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/depthRepInfoElementSei.cfg	(revision 1328)
@@ -0,0 +1,21 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+DaSignFlag                      : 0
+DaExponent                      : 0
+DaMantissaLenMinus1             : 0
+DaMantissa                      : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/depthRepresentationInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/depthRepresentationInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/depthRepresentationInfoSei.cfg	(revision 1328)
@@ -0,0 +1,24 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+ZNearFlag                       : 0
+ZFarFlag                        : 0
+DMinFlag                        : 0
+DMaxFlag                        : 0
+DepthRepresentationType         : 0
+DisparityRefViewId              : 0
+DepthNonlinearRepresentationNumMinus1: 0
Index: branches/HTM-15.1-dev0/cfg/SEI/frameFieldInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/frameFieldInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/frameFieldInfoSei.cfg	(revision 1328)
@@ -0,0 +1,20 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+FfinfoPicStruct                 : 0
+FfinfoSourceScanType            : 0
+FfinfoDuplicateFlag             : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/interLayerConstrainedTileSetsSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/interLayerConstrainedTileSetsSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/interLayerConstrainedTileSetsSei.cfg	(revision 1328)
@@ -0,0 +1,34 @@
+
+PayloadType                     : 161
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              :                                # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : 0                              # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  :                                # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          :                                # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : 0                              #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+IlAllTilesExactSampleValueMatchFlag: 0
+IlOneTilePerTileSetFlag         : 0
+IlNumSetsInMessageMinus1        : 3
+SkippedTileSetPresentFlag       : 0
+IlctsId                         : 0 1 2 2
+IlNumTileRectsInSetMinus1       : 1 2 3 3
+IlTopLeftTileIndex_0            : 0 0
+IlTopLeftTileIndex_1            : 0 0 0
+IlTopLeftTileIndex_2            : 0 1 2 0
+IlTopLeftTileIndex_3            : 0 2 2 0
+IlBottomRightTileIndex_0        : 5 1
+IlBottomRightTileIndex_1        : 0 1 1 
+IlBottomRightTileIndex_2        : 5 6 8 1
+IlBottomRightTileIndex_3        : 0 4 3 1
+IlcIdc                          : 0 0 0 0
+IlExactSampleValueMatchFlag     : 0 0 0 0 
+AllTilesIlcIdc                  : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/layersNotPresentSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/layersNotPresentSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/layersNotPresentSei.cfg	(revision 1328)
@@ -0,0 +1,19 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+LnpSeiActiveVpsId               : 0
+LayerNotPresentFlag             : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/multiviewAcquisitionInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/multiviewAcquisitionInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/multiviewAcquisitionInfoSei.cfg	(revision 1328)
@@ -0,0 +1,55 @@
+PayloadType                     : 179
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              :                                # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : 0                              # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : 0                              # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : 19 20                          # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : 0                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+IntrinsicParamFlag              : 1
+ExtrinsicParamFlag              : 1
+IntrinsicParamsEqualFlag        : 1
+PrecFocalLength                 : 31
+PrecPrincipalPoint              : 31
+PrecSkewFactor                  : 31
+SignFocalLengthX                : 0
+ExponentFocalLengthX            : 0
+MantissaFocalLengthX            : 0
+SignFocalLengthY                : 0
+ExponentFocalLengthY            : 0
+MantissaFocalLengthY            : 0
+SignPrincipalPointX             : 0
+ExponentPrincipalPointX         : 0
+MantissaPrincipalPointX         : 0
+SignPrincipalPointY             : 0
+ExponentPrincipalPointY         : 0
+MantissaPrincipalPointY         : 0
+SignSkewFactor                  : 0
+ExponentSkewFactor              : 0
+MantissaSkewFactor              : 0
+PrecRotationParam               : 31
+PrecTranslationParam            : 31
+
+SignR_0_0                       : 0 1 0
+SignR_0_1                       : 1 0 0
+SignR_0_2                       : 0 1 1
+
+ExponentR_0_0                   : 10 20 11
+ExponentR_0_1                   : 10 5 11
+ExponentR_0_2                   :  2 20 11
+
+MantissaR_0_0                   : 4  9  1
+MantissaR_0_1                   : 0  3  4
+MantissaR_0_2                   : 3  3  7
+
+SignT_0                         : 0  1  0
+ExponentT_0                     : 0 10  5
+MantissaT_0                     : 1  8  9
Index: branches/HTM-15.1-dev0/cfg/SEI/multiviewSceneInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/multiviewSceneInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/multiviewSceneInfoSei.cfg	(revision 1328)
@@ -0,0 +1,19 @@
+
+PayloadType                     : 178
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              :                                # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  :                                # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  :                                # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : 16 17 18 19 20 21              # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : 0                              #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+MinDisparity                    : -333
+MaxDisparityRange               : 2047
Index: branches/HTM-15.1-dev0/cfg/SEI/multiviewViewPositionSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/multiviewViewPositionSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/multiviewViewPositionSei.cfg	(revision 1328)
@@ -0,0 +1,19 @@
+
+PayloadType                     : 180
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : 0                              # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : 0                              # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : 0                              # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : 19 20                          # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : 1                              #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+NumViewsMinus1                  : 2            
+ViewPosition                    : 2 0 1        
Index: branches/HTM-15.1-dev0/cfg/SEI/overlayInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/overlayInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/overlayInfoSei.cfg	(revision 1328)
@@ -0,0 +1,38 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+OverlayInfoCancelFlag           : 0
+OverlayContentAuxIdMinus128     : 0
+OverlayLabelAuxIdMinus128       : 0
+OverlayAlphaAuxIdMinus128       : 0
+OverlayElementLabelValueLengthMinus8: 0
+NumOverlaysMinus1               : 0
+OverlayIdx                      : 0
+LanguageOverlayPresentFlag      : 0
+OverlayContentLayerId           : 0
+OverlayLabelPresentFlag         : 0
+OverlayLabelLayerId             : 0
+OverlayAlphaPresentFlag         : 0
+OverlayAlphaLayerId             : 0
+NumOverlayElementsMinus1        : 0
+OverlayElementLabelMin_0        : 0
+OverlayElementLabelMax_0        : 0
+OverlayZeroBit                  : 0
+OverlayLanguage                 : 0
+OverlayName                     : 0
+OverlayElementName_0            : 0
+OverlayInfoPersistenceFlag      : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/subBitstreamPropertySei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/subBitstreamPropertySei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/subBitstreamPropertySei.cfg	(revision 1328)
@@ -0,0 +1,24 @@
+
+PayloadType                     : 164
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : 0                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : 0                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : 0                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : 19 20                       # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : 0                              #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+SbPropertyActiveVpsId           : 0
+NumAdditionalSubStreamsMinus1   : 0
+SubBitstreamMode                : 0
+OlsIdxToVps                     : 0
+HighestSublayerId               : 0
+AvgSbPropertyBitRate            : 0
+MaxSbPropertyBitRate            : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/temporalMvPredictionConstraintsSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/temporalMvPredictionConstraintsSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/temporalMvPredictionConstraintsSei.cfg	(revision 1328)
@@ -0,0 +1,19 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+PrevPicsNotUsedFlag             : 0
+NoIntraLayerColPicFlag          : 0
Index: branches/HTM-15.1-dev0/cfg/SEI/threeDimensionalReferenceDisplaysInfoSei.cfg
===================================================================
--- branches/HTM-15.1-dev0/cfg/SEI/threeDimensionalReferenceDisplaysInfoSei.cfg	(revision 1328)
+++ branches/HTM-15.1-dev0/cfg/SEI/threeDimensionalReferenceDisplaysInfoSei.cfg	(revision 1328)
@@ -0,0 +1,30 @@
+
+PayloadType                     : TBD
+
+#======== Applicability  ==========    ( SEI is only send for pictures in intersection )
+ApplicableLayerIds              : TBD                            # LayerIds      of layers   to which the SEI is added. (all when empty)
+ApplicablePocs                  : TBD                            # POCs          of pictures to which the SEI is added. (all when empty)
+ApplicableTids                  : TBD                            # Tids          of pictures to which the SEI is added. (all when empty)
+ApplicableVclNaluTypes          : TBD                            # NaluUnitTypes of picture  to which the SEI is added. (all when empty)
+
+#======== Position in bit stream  ============
+SeiNaluId                       : 0                              # Identifies to which NAL unit  the SEI is added. 
+PositionInSeiNalu               : 0                              # Identifies the position within the NAL unit
+
+#======== Payload modification =============
+ModifyByEncoder                 : TBD                            #  0: Use payload as specified in cfg file   1: Modify SEI by encoder.
+
+#======== Payload specification =============
+PrecRefDisplayWidth             : 0
+RefViewingDistanceFlag          : 0
+PrecRefViewingDist              : 0
+NumRefDisplaysMinus1            : 0
+LeftViewId                      : 0
+RightViewId                     : 0
+ExponentRefDisplayWidth         : 0
+MantissaRefDisplayWidth         : 0
+ExponentRefViewingDistance      : 0
+MantissaRefViewingDistance      : 0
+AdditionalShiftPresentFlag      : 0
+NumSampleShiftPlus512           : 0
+ThreeDimensionalReferenceDisplaysExtensionFlag: 0
Index: branches/HTM-15.1-dev0/source/App/TAppDecoder/TAppDecCfg.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/App/TAppDecoder/TAppDecCfg.cpp	(revision 1328)
@@ -109,5 +109,9 @@
   ("ForceDecodeBitDepth",       m_forceDecodeBitDepth,                 0U,         "Force the decoder to operate at a particular bit-depth (best effort decoding)")
 #endif
+#if NH_MV_SEI
+  ("OutputDecodedSEIMessagesFilename,m",  m_outputDecodedSEIMessagesFilename,    string(""), "When non empty, output decoded SEI messages to the indicated file. If file is '-', then output to stdout\n")
+#else
   ("OutputDecodedSEIMessagesFilename",  m_outputDecodedSEIMessagesFilename,    string(""), "When non empty, output decoded SEI messages to the indicated file. If file is '-', then output to stdout\n")
+#endif
   ("ClipOutputVideoToRec709Range",      m_bClipOutputVideoToRec709Range,  false, "If true then clip output video to the Rec. 709 Range on saving")
   ;
Index: branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.cpp	(revision 1328)
@@ -223,4 +223,32 @@
 }
 
+
+#if NH_MV_SEI
+Void TAppEncCfg::xParseSeiCfg()
+{
+  for (Int i = 0; i < MAX_NUM_SEIS; i++)
+  {
+    if ( m_seiCfgFileNames[i] != NULL )
+    {
+      Int payloadType; 
+      po::Options opts;     
+      
+      opts.addOptions()("PayloadType", payloadType,-1, "Payload Type");
+      po::setDefaults(opts);      
+
+      po::ErrorReporter err;
+      err.output_on_unknow_parameter = false; 
+      po::parseConfigFile( opts, m_seiCfgFileNames[i], err );
+      SEI* sei = SEI::getNewSEIMessage( (SEI::PayloadType) payloadType ); 
+      assert( sei != NULL );
+
+      sei->setupFromCfgFile( m_seiCfgFileNames[i] ); 
+
+      m_seiMessages.push_back( sei );
+    }
+  }
+}
+#endif
+
 std::istringstream &operator>>(std::istringstream &in, GOPEntry &entry)     //input
 {
@@ -854,30 +882,29 @@
 #endif  
   ("DimensionIdLen",        m_dimensionIdLen     , cfg_dimensionLength  , "Number of bits used to store dimensions Id")
-  ("ViewOrderIndex",        m_viewOrderIndex     , std::vector<Int>(1,0), "View Order Index per layer")
-  ("ViewId",                m_viewId             , std::vector<Int>(1,0), "View Id per View Order Index")
-  ("AuxId",                 m_auxId              , std::vector<Int>(1,0), "AuxId per layer")
+  ("ViewOrderIndex",                 m_viewOrderIndex              , IntAry1d(1,0),                                 "View Order Index per layer")
+  ("ViewId",                         m_viewId                      , IntAry1d(1,0),                                 "View Id per View Order Index")
+  ("AuxId",                          m_auxId                       , IntAry1d(1,0),                                 "AuxId per layer")
 #if NH_3D
-  ("DepthFlag",             m_depthFlag          , std::vector<Int>(1,0), "Depth Flag")
-#endif
-  ("TargetEncLayerIdList",  m_targetEncLayerIdList, std::vector<Int>(0,0), "LayerIds in Nuh to be encoded")  
-  ("LayerIdInNuh",          m_layerIdInNuh        , std::vector<Int>(1,0), "LayerId in Nuh")  
+  ("DepthFlag",                      m_depthFlag                   , IntAry1d(1,0),                                 "Depth Flag")
+#endif
+  ("TargetEncLayerIdList",           m_targetEncLayerIdList        , IntAry1d(0,0),                                 "LayerIds in Nuh to be encoded")  
+  ("LayerIdInNuh",                   m_layerIdInNuh                , IntAry1d(1,0),                                 "LayerId in Nuh")  
   ("SplittingFlag",         m_splittingFlag       , false                , "Splitting Flag")    
 
   // Layer Sets + Output Layer Sets + Profile Tier Level
   ("VpsNumLayerSets",       m_vpsNumLayerSets    , 1                    , "Number of layer sets")    
-  ("LayerIdsInSet_%d",      m_layerIdsInSets     , std::vector<Int>(1,0), MAX_VPS_OP_SETS_PLUS1 ,"LayerIds of Layer set")  
+  ("LayerIdsInSet_%d"              , m_layerIdsInSets              , IntAry1d(1,0) , MAX_VPS_OP_SETS_PLUS1      ,   "LayerIds of Layer set")  
   ("NumAddLayerSets"     , m_numAddLayerSets     , 0                                              , "NumAddLayerSets     ")
-  ("HighestLayerIdxPlus1_%d", m_highestLayerIdxPlus1, std::vector< Int  >(0,0)  ,MAX_VPS_NUM_ADD_LAYER_SETS, "HighestLayerIdxPlus1")
+  ("HighestLayerIdxPlus1_%d"       , m_highestLayerIdxPlus1        , IntAry1d(0,0) , MAX_VPS_NUM_ADD_LAYER_SETS ,   "HighestLayerIdxPlus1")
   ("DefaultTargetOutputLayerIdc"     , m_defaultOutputLayerIdc     , 0, "Specifies output layers of layer sets, 0: output all layers, 1: output highest layer, 2: specified by LayerIdsInDefOutputLayerSet")
-  ("OutputLayerSetIdx",     m_outputLayerSetIdx  , std::vector<Int>(0,0), "Indices of layer sets used as additional output layer sets")  
-
-  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set")  
-  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet      , std::vector<Int>(0,0), MAX_VPS_OP_SETS_PLUS1, "Indices in VPS of output layers in layer set")  
-  ("AltOutputLayerFlag",    m_altOutputLayerFlag , std::vector<Bool>(1,0), "Alt output layer flag")
+  ("OutputLayerSetIdx"             , m_outputLayerSetIdx           , IntAry1d(0,0)                              ,   "Indices of layer sets used as additional output layer sets")
+  ("LayerIdsInAddOutputLayerSet_%d", m_layerIdsInAddOutputLayerSet , IntAry1d(0,0) , MAX_VPS_ADD_OUTPUT_LAYER_SETS, "Indices in VPS of output layers in additional output layer set")  
+  ("LayerIdsInDefOutputLayerSet_%d", m_layerIdsInDefOutputLayerSet , IntAry1d(0,0) , MAX_VPS_OP_SETS_PLUS1,         "Indices in VPS of output layers in layer set")  
+  ("AltOutputLayerFlag"            , m_altOutputLayerFlag          , BoolAry1d(1,0),                                "Alt output layer flag")
   
-  ("ProfileTierLevelIdx_%d",  m_profileTierLevelIdx, std::vector<Int>(0), MAX_NUM_LAYERS, "Indices to profile level tier for ols")
+  ("ProfileTierLevelIdx_%d"        , m_profileTierLevelIdx         , IntAry1d(0)  , MAX_NUM_LAYERS,                  "Indices to profile level tier for ols")
   // Layer dependencies
-  ("DirectRefLayers_%d",    m_directRefLayers    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "LayerIdx in VPS of direct reference layers")
-  ("DependencyTypes_%d",    m_dependencyTypes    , std::vector<Int>(0,0), MAX_NUM_LAYERS, "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
+  ("DirectRefLayers_%d"            , m_directRefLayers             , IntAry1d(0,0), MAX_NUM_LAYERS,                  "LayerIdx in VPS of direct reference layers")
+  ("DependencyTypes_%d"            , m_dependencyTypes             , IntAry1d(0,0), MAX_NUM_LAYERS,                  "Dependency types of direct reference layers, 0: Sample 1: Motion 2: Sample+Motion")
 #endif
   ("SourceWidth,-wdt",                                m_iSourceWidth,                                       0, "Source picture width")
@@ -1143,8 +1170,8 @@
   ("BitRatePresentFlag"          , m_bitRatePresentFlag          , BoolAry1d(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "BitRatePresentFlag per sub layer for the N-th layer set")
   ("PicRatePresentFlag"          , m_picRatePresentFlag          , BoolAry1d(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "PicRatePresentFlag per sub layer for the N-th layer set")
-  ("AvgBitRate"                  , m_avgBitRate                  , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "AvgBitRate         per sub layer for the N-th layer set")
-  ("MaxBitRate"                  , m_maxBitRate                  , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "MaxBitRate         per sub layer for the N-th layer set")
-  ("ConstantPicRateIdc"          , m_constantPicRateIdc          , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")
-  ("AvgPicRate"                  , m_avgPicRate                  , std::vector< Int  >(1,0)  ,MAX_VPS_OP_SETS_PLUS1, "AvgPicRate         per sub layer for the N-th layer set")
+  ("AvgBitRate"                  , m_avgBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgBitRate         per sub layer for the N-th layer set")
+  ("MaxBitRate"                  , m_maxBitRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "MaxBitRate         per sub layer for the N-th layer set")
+  ("ConstantPicRateIdc"          , m_constantPicRateIdc           , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "ConstantPicRateIdc per sub layer for the N-th layer set")
+  ("AvgPicRate"                  , m_avgPicRate                   , IntAry1d (1,0), MAX_VPS_OP_SETS_PLUS1, "AvgPicRate         per sub layer for the N-th layer set")
   ("TilesNotInUseFlag"            , m_tilesNotInUseFlag            , true                                          , "TilesNotInUseFlag            ")
   ("TilesInUseFlag"               , m_tilesInUseFlag               , BoolAry1d(1,false)                   , "TilesInUseFlag               ")
@@ -1154,7 +1181,7 @@
   ("TileBoundariesAlignedFlag"   , m_tileBoundariesAlignedFlag   , BoolAry1d(1,0)  ,MAX_NUM_LAYERS       , "TileBoundariesAlignedFlag    per direct reference for the N-th layer")
   ("IlpRestrictedRefLayersFlag"  , m_ilpRestrictedRefLayersFlag  , false                                           , "IlpRestrictedRefLayersFlag")
-  ("MinSpatialSegmentOffsetPlus1", m_minSpatialSegmentOffsetPlus1, std::vector< Int  >(1,0)  ,MAX_NUM_LAYERS       , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")
+  ("MinSpatialSegmentOffsetPlus1", m_minSpatialSegmentOffsetPlus1 , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinSpatialSegmentOffsetPlus1 per direct reference for the N-th layer")
   ("CtuBasedOffsetEnabledFlag"   , m_ctuBasedOffsetEnabledFlag   , BoolAry1d(1,0)  ,MAX_NUM_LAYERS       , "CtuBasedOffsetEnabledFlag    per direct reference for the N-th layer")
-  ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1 , std::vector< Int  >(1,0)  ,MAX_NUM_LAYERS       , "MinHorizontalCtuOffsetPlus1  per direct reference for the N-th layer")
+  ("MinHorizontalCtuOffsetPlus1" , m_minHorizontalCtuOffsetPlus1  , IntAry1d (1,0), MAX_NUM_LAYERS       , "MinHorizontalCtuOffsetPlus1  per direct reference for the N-th layer")
   ("SingleLayerForNonIrapFlag", m_singleLayerForNonIrapFlag, false                                          , "SingleLayerForNonIrapFlag")
   ("HigherLayerIrapSkipFlag"  , m_higherLayerIrapSkipFlag  , false                                          , "HigherLayerIrapSkipFlag  ")
@@ -1305,12 +1332,15 @@
   ("SEIMasteringDisplayWhitePoint",                   cfg_DisplayWhitePointCode,     cfg_DisplayWhitePointCode, "Mastering display white point CIE xy coordinates in normalised increments of 1/50000 (e.g. 0.333 = 16667)")
 #if NH_MV
+#if !NH_MV_SEI
   ("SubBitstreamPropSEIEnabled",                      m_subBistreamPropSEIEnabled,    false                     ,"Enable signaling of sub-bitstream property SEI message")
   ("SEISubBitstreamNumAdditionalSubStreams",          m_sbPropNumAdditionalSubStreams,0                         ,"Number of substreams for which additional information is signalled")
-  ("SEISubBitstreamSubBitstreamMode",                 m_sbPropSubBitstreamMode,       std::vector< Int  >(1,0)  ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)")
-  ("SEISubBitstreamOutputLayerSetIdxToVps",           m_sbPropOutputLayerSetIdxToVps, std::vector< Int  >(1,0)  ,"Specifies output layer set index of the i-th sub-bitstream ")
-  ("SEISubBitstreamHighestSublayerId",                m_sbPropHighestSublayerId,      std::vector< Int  >(1,0)  ,"Specifies highest TemporalId of the i-th sub-bitstream")
-  ("SEISubBitstreamAvgBitRate",                       m_sbPropAvgBitRate,             std::vector< Int  >(1,0)  ,"Specifies average bit rate of the i-th sub-bitstream")
-  ("SEISubBitstreamMaxBitRate",                       m_sbPropMaxBitRate,             std::vector< Int  >(1,0)  ,"Specifies maximum bit rate of the i-th sub-bitstream")
-
+  ("SEISubBitstreamSubBitstreamMode",                 m_sbPropSubBitstreamMode,       IntAry1d (1,0)            ,"Specifies mode of generation of the i-th sub-bitstream (0 or 1)")
+  ("SEISubBitstreamOutputLayerSetIdxToVps",           m_sbPropOutputLayerSetIdxToVps, IntAry1d (1,0)            ,"Specifies output layer set index of the i-th sub-bitstream ")
+  ("SEISubBitstreamHighestSublayerId",                m_sbPropHighestSublayerId,      IntAry1d (1,0)            ,"Specifies highest TemporalId of the i-th sub-bitstream")
+  ("SEISubBitstreamAvgBitRate",                       m_sbPropAvgBitRate,             IntAry1d (1,0)            ,"Specifies average bit rate of the i-th sub-bitstream")
+  ("SEISubBitstreamMaxBitRate",                       m_sbPropMaxBitRate,             IntAry1d (1,0)            ,"Specifies maximum bit rate of the i-th sub-bitstream")
+#else
+  ("SeiCfgFileName_%d",                               m_seiCfgFileNames,             (Char *) 0 , MAX_NUM_SEIS , "SEI cfg file name %d")
+#endif
   ("OutputVpsInfo",                                   m_outputVpsInfo,                false                     ,"Output information about the layer dependencies and layer sets")
 #endif
@@ -1923,4 +1953,7 @@
   }
 
+#if NH_MV_SEI
+  xParseSeiCfg(); 
+#endif
   if( m_masteringDisplay.colourVolumeSEIEnabled )
   {
@@ -3295,4 +3328,5 @@
   }
   }
+#if !NH_MV_SEI
   // Check input parameters for Sub-bitstream property SEI message
   if( m_subBistreamPropSEIEnabled )
@@ -3312,4 +3346,5 @@
     }
   }
+#endif
 #endif
 
Index: branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.h
===================================================================
--- branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncCfg.h	(revision 1328)
@@ -77,15 +77,15 @@
 // VPS specification
   IntAry2d m_dimIds;                   ///< dimension ids ( pointers to m_viewId and m_depthFlag 
-  std::vector<Int>       m_viewId;                            ///< view id
-  std::vector<Int>       m_viewOrderIndex;                    ///< view order index  
-  std::vector<Int>       m_auxId;                             ///< auxiliary id
+  IntAry1d               m_viewId;                            ///< view id
+  IntAry1d               m_viewOrderIndex;                    ///< view order index  
+  IntAry1d               m_auxId;                             ///< auxiliary id
 #if NH_3D
-  std::vector<Int>       m_depthFlag;                         ///< depth flag
-#endif
-  std::vector<Int>       m_targetEncLayerIdList;              ///< layer Ids in Nuh to be encoded
-  std::vector<Int>       m_layerIdInNuh;                      ///< layer Id in Nuh for each layer 
+  IntAry1d               m_depthFlag;                         ///< depth flag
+#endif
+  IntAry1d               m_targetEncLayerIdList;              ///< layer Ids in Nuh to be encoded
+  IntAry1d               m_layerIdInNuh;                      ///< layer Id in Nuh for each layer 
   Bool                   m_splittingFlag;                     ///< Splitting Flag
   Int                    m_scalabilityMask;                   ///< Mask indicating scalabilities, 1: texture; 3: texture + depth                                                                
-  std::vector<Int>       m_dimensionIdLen;                    ///< Length of scalability dimension s 
+  IntAry1d               m_dimensionIdLen;                    ///< Length of scalability dimension s 
   
 // layer sets   
@@ -95,9 +95,9 @@
   IntAry2d m_highestLayerIdxPlus1;      ///< HighestLayerIdxPlus1 for each additional layer set and each independent layer (value with index 0 will be ignored)
   Int                    m_defaultOutputLayerIdc;             ///< Specifies output layers of layer sets, 0: output all layers, 1: output highest layers, 2: specified by LayerIdsInDefOuputLayerSet
-  std::vector<Int>       m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets  
+  IntAry1d               m_outputLayerSetIdx;                 ///< Indices of layer sets used as additional output layer sets  
   IntAry2d m_layerIdsInAddOutputLayerSet; ///< LayerIds in vps of additional output layers
   IntAry2d m_layerIdsInDefOutputLayerSet; ///< Indices in vps of output layers in layer sets
   IntAry2d               m_profileTierLevelIdx;      ///< Indices of of profile, per layer in layer set
-  std::vector<Bool>      m_altOutputLayerFlag;                ///< Alt output layer flag
+  BoolAry1d              m_altOutputLayerFlag;                ///< Alt output layer flag
 
   // Dependencies
@@ -112,10 +112,10 @@
   Bool m_bitRatePresentVpsFlag;
   Bool m_picRatePresentVpsFlag;
-  std::vector< std::vector<Bool > > m_bitRatePresentFlag;
-  std::vector< std::vector<Bool > > m_picRatePresentFlag;
-  std::vector< std::vector<Int  > > m_avgBitRate;
-  std::vector< std::vector<Int  > > m_maxBitRate;
-  std::vector< std::vector<Int  > > m_constantPicRateIdc;
-  std::vector< std::vector<Int  > > m_avgPicRate;
+  BoolAry2d              m_bitRatePresentFlag;
+  BoolAry2d              m_picRatePresentFlag;
+  IntAry2d               m_avgBitRate;
+  IntAry2d               m_maxBitRate;
+  IntAry2d               m_constantPicRateIdc;
+  IntAry2d               m_avgPicRate;
   Bool                              m_tilesNotInUseFlag; 
   BoolAry1d               m_tilesInUseFlag;
@@ -124,9 +124,9 @@
   BoolAry1d               m_wppInUseFlag;
 
-  std::vector< std::vector<Bool > > m_tileBoundariesAlignedFlag;  
+  BoolAry2d              m_tileBoundariesAlignedFlag;  
   Bool m_ilpRestrictedRefLayersFlag;
-  std::vector< std::vector<Int  > > m_minSpatialSegmentOffsetPlus1;
-  std::vector< std::vector<Bool > > m_ctuBasedOffsetEnabledFlag;
-  std::vector< std::vector<Int  > > m_minHorizontalCtuOffsetPlus1;
+  IntAry2d               m_minSpatialSegmentOffsetPlus1;
+  BoolAry2d              m_ctuBasedOffsetEnabledFlag;
+  IntAry2d               m_minHorizontalCtuOffsetPlus1;
   Bool m_singleLayerForNonIrapFlag;
   Bool m_higherLayerIrapSkipFlag;
@@ -195,5 +195,5 @@
   // coding structure
 #if NH_MV
-  std::vector<Int> m_iIntraPeriod;                            ///< period of I-slice (random access period)
+  IntAry1d  m_iIntraPeriod;                            ///< period of I-slice (random access period)
 #else
   Int       m_iIntraPeriod;                                   ///< period of I-slice (random access period)
@@ -256,4 +256,8 @@
 #endif
   TComSEIMasteringDisplay m_masteringDisplay;
+#if NH_MV_SEI
+  std::vector<char*>     m_seiCfgFileNames;               ///< SEI message files.
+  SEIMessages            m_seiMessages;                       ///< Buffer for SEI messages. 
+#endif
 
   Bool      m_bUseAdaptiveQP;                                 ///< Flag for enabling QP adaptation based on a psycho-visual model
@@ -509,11 +513,13 @@
   UInt        m_summaryVerboseness;                           ///< Specifies the level of the verboseness of the text output.
 #if NH_MV
+#if !NH_MV_SEI
   Bool              m_subBistreamPropSEIEnabled;
   Int               m_sbPropNumAdditionalSubStreams;
-  std::vector<Int>  m_sbPropSubBitstreamMode;
-  std::vector<Int>  m_sbPropOutputLayerSetIdxToVps;
-  std::vector<Int>  m_sbPropHighestSublayerId;
-  std::vector<Int>  m_sbPropAvgBitRate;
-  std::vector<Int>  m_sbPropMaxBitRate;
+  IntAry1d          m_sbPropSubBitstreamMode;
+  IntAry1d          m_sbPropOutputLayerSetIdxToVps;
+  IntAry1d          m_sbPropHighestSublayerId;
+  IntAry1d          m_sbPropAvgBitRate;
+  IntAry1d          m_sbPropMaxBitRate;
+#endif
   Bool              m_outputVpsInfo;
 #endif
@@ -654,4 +660,7 @@
   Void xPrintVectorElem( Double elem ) { printf(" %5.2f", elem            );};  
   Void xPrintVectorElem( Bool   elem ) { printf(" %d"   , ( elem ? 1 : 0 ));};
+#if NH_MV_SEI
+  Void xParseSeiCfg();
+#endif
 #endif
 #if NH_MV
Index: branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/App/TAppEncoder/TAppEncTop.cpp	(revision 1328)
@@ -591,4 +591,5 @@
   m_cTEncTop.setScalableNestingSEIEnabled                         ( m_scalableNestingSEIEnabled );
 #if NH_MV
+#if !NH_MV_SEI
   m_cTEncTop.setSubBitstreamPropSEIEnabled                        ( m_subBistreamPropSEIEnabled );
   if( m_subBistreamPropSEIEnabled )                               
@@ -601,4 +602,5 @@
     m_cTEncTop.setMaxBitRate                                      ( m_sbPropMaxBitRate );
   }
+#endif
 #endif
 
@@ -622,4 +624,8 @@
   m_cTEncTop.setKneeSEIOutputKneePoint                            ( m_kneeSEIOutputKneePoint );
   m_cTEncTop.setMasteringDisplaySEI                               ( m_masteringDisplay );
+
+#if NH_MV_SEI
+  m_cTEncTop.setSeiMessages                                       ( &m_seiMessages ); 
+#endif
 
   m_cTEncTop.setTileUniformSpacingFlag                            ( m_tileUniformSpacingFlag );
Index: branches/HTM-15.1-dev0/source/Lib/TAppCommon/program_options_lite.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TAppCommon/program_options_lite.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TAppCommon/program_options_lite.cpp	(revision 1328)
@@ -111,5 +111,9 @@
     }
 
+#if NH_MV_SEI
+    static void setOptions(Options::NamesPtrList& opt_list, const std::vector<int> idcs, const string& value, ErrorReporter& error_reporter)
+#else
     static void setOptions(Options::NamesPtrList& opt_list, const string& value, ErrorReporter& error_reporter)
+#endif
     {
       /* multiple options may be registered for the same name:
@@ -117,5 +121,14 @@
       for (Options::NamesPtrList::iterator it = opt_list.begin(); it != opt_list.end(); ++it)
       {
+        #if NH_MV_SEI
+          Bool doParsing = (*it)->opt->checkDim( idcs, error_reporter ); 
+          if ( doParsing )
+          {
+            (*it)->opt->parse(value, idcs, error_reporter);
+          }
+          
+        #else
         (*it)->opt->parse(value, error_reporter);
+        #endif
       }
     }
@@ -277,4 +290,29 @@
     bool OptionWriter::storePair(bool allow_long, bool allow_short, const string& name, const string& value)
     {
+#if NH_MV_SEI
+      std::vector<int> idcs;             
+      
+      std::size_t pos_underscore            = name.find("_" );         
+      std::size_t pos_last_underscore_plus1 = pos_underscore+1;       
+      std::size_t pos_first_underscore      = pos_underscore; 
+
+      while ( pos_underscore != string::npos )
+      {        
+        pos_underscore   = name.find("_", pos_last_underscore_plus1  );         
+        size_t subStrlen = ( pos_underscore == string::npos ) ? string::npos : ( pos_underscore - pos_last_underscore_plus1 );
+        string idx_str   = name.substr( pos_last_underscore_plus1, subStrlen ); 
+        idcs.push_back( atoi( idx_str.c_str()));
+        pos_last_underscore_plus1 = pos_underscore + 1;         
+      } 
+
+      string name_idcs = name.substr(0, pos_first_underscore  );
+      for (size_t i = 0; i < idcs.size(); i++ )
+      {
+        name_idcs += "_%d";
+      }      
+
+      bool found_idcs = false; 
+      Options::NamesMap::iterator opt_it_idcs;
+#endif
       bool found = false;
       Options::NamesMap::iterator opt_it;
@@ -286,4 +324,17 @@
           found = true;
         }
+#if NH_MV_SEI
+        if ( idcs.size() > 0 )
+        {
+          opt_it_idcs = opts.opt_long_map.find(name_idcs);
+          if (opt_it_idcs != opts.opt_long_map.end() )
+          {
+            assert( !found );
+            found = true;
+            found_idcs = true; 
+            opt_it = opt_it_idcs;  
+          }
+        }
+#endif
       }
 
@@ -296,14 +347,45 @@
           found = true;
         }
-      }
-
+#if NH_MV_SEI
+        if ( idcs.size() > 0 )
+        {
+          opt_it = opts.opt_short_map.find(name);
+          if (opt_it != opts.opt_short_map.end())
+          {
+            assert( !found );
+            found = true;
+            found_idcs = true; 
+            opt_it = opt_it_idcs;  
+          }
+        }
+#endif
+      }
+
+#if NH_MV_SEI
+    if ( !found_idcs )
+    {
+      idcs.clear(); 
+    }
+#endif
       if (!found)
       {
+#if NH_MV_SEI
+        if (error_reporter.output_on_unknow_parameter )
+        {       
+#endif
+
         error_reporter.error(where())
           << "Unknown option `" << name << "' (value:`" << value << "')\n";
+#if NH_MV_SEI
+        }
+#endif
         return false;
       }
 
+#if NH_MV_SEI
+      setOptions((*opt_it).second, idcs, value, error_reporter);
+#else
       setOptions((*opt_it).second, value, error_reporter);
+#endif
       return true;
     }
Index: branches/HTM-15.1-dev0/source/Lib/TAppCommon/program_options_lite.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TAppCommon/program_options_lite.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TAppCommon/program_options_lite.h	(revision 1328)
@@ -78,9 +78,16 @@
     struct ErrorReporter
     {
+#if NH_MV_SEI
+      ErrorReporter() : is_errored(0), output_on_unknow_parameter(true)  {}
+#else
       ErrorReporter() : is_errored(0) {}
+#endif
       virtual ~ErrorReporter() {}
       virtual std::ostream& error(const std::string& where);
       virtual std::ostream& warn(const std::string& where);
       bool is_errored;
+#if NH_MV_SEI
+      bool output_on_unknow_parameter;
+#endif
     };
 
@@ -98,6 +105,11 @@
     {
 #if NH_MV      
+#if NH_MV_SEI      
+      OptionBase(const std::string& name, const std::string& desc, bool duplicate = false, std::vector< int > maxdim = std::vector< int >(0) )
+        : opt_string(name), opt_desc(desc), opt_duplicate(duplicate), max_dim( maxdim )
+#else
       OptionBase(const std::string& name, const std::string& desc, bool duplicate = false)
         : opt_string(name), opt_desc(desc), opt_duplicate(duplicate)
+#endif
 #else
       OptionBase(const std::string& name, const std::string& desc)
@@ -109,5 +121,97 @@
 
       /* parse argument arg, to obtain a value for the option */
+#if NH_MV_SEI
+      virtual void parse(const std::string& arg, const std::vector<int>& idcs,  ErrorReporter&) = 0;
+      
+      bool   checkDim( std::vector< int > dims, ErrorReporter& err )
+      {     
+        bool doParsing = true; 
+        if ( dims.size() != max_dim.size() )
+        {
+            err.error(" ") << "Number of indices of `" <<  opt_string << "' not matching. Should be " << max_dim.size() << std::endl; 
+            doParsing = false; 
+        }
+
+        for (size_t i = 0 ; i < dims.size(); i++ )
+        {
+          if ( dims[i] >= max_dim[i] )
+          {
+            if (err.output_on_unknow_parameter )
+            {       
+              err.warn(" ") << "Index " << i  << " of  " <<  opt_string << " should be less than " << max_dim[i] << std::endl;             
+              doParsing = false; 
+            }
+          }
+        }
+        return doParsing; 
+      }
+
+      void   xParseVec( const std::string& arg, BoolAry1d& storage )
+      {        
+        char* pcNextStart = (char*) arg.data();
+        char* pcEnd = pcNextStart + arg.length();
+
+        char* pcOldStart = 0; 
+
+        size_t iIdx = 0; 
+
+        while (pcNextStart < pcEnd)
+        {
+          if ( iIdx < storage.size() )
+          {
+            storage[iIdx] = (strtol(pcNextStart, &pcNextStart,10) != 0);
+          }
+          else
+          {
+            storage.push_back(strtol(pcNextStart, &pcNextStart,10) != 0) ;
+          }
+          iIdx++; 
+
+          if ( errno == ERANGE || (pcNextStart == pcOldStart) )
+          {
+            std::cerr << "Error Parsing Bools: `" << arg << "'" << std::endl;
+            exit(EXIT_FAILURE);
+          };   
+          while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++;  
+          pcOldStart = pcNextStart;
+        }
+      }
+
+      void   xParseVec( const std::string& arg, IntAry1d& storage )
+      {        
+        storage.clear();
+
+        char* pcNextStart = (char*) arg.data();
+        char* pcEnd = pcNextStart + arg.length();
+
+        char* pcOldStart = 0; 
+
+        size_t iIdx = 0; 
+
+
+        while (pcNextStart < pcEnd)
+        {
+
+          if ( iIdx < storage.size() )
+          {
+            storage[iIdx] = (int) strtol(pcNextStart, &pcNextStart,10);
+          }
+          else
+          {
+            storage.push_back( (int) strtol(pcNextStart, &pcNextStart,10)) ;
+          }
+          iIdx++; 
+          if ( errno == ERANGE || (pcNextStart == pcOldStart) )
+          {
+            std::cerr << "Error Parsing Integers: `" << arg << "'" << std::endl;
+            exit(EXIT_FAILURE);
+          };   
+          while( (pcNextStart < pcEnd) && ( *pcNextStart == ' ' || *pcNextStart == '\t' || *pcNextStart == '\r' ) ) pcNextStart++;  
+          pcOldStart = pcNextStart;
+        }      
+      }
+#else
       virtual void parse(const std::string& arg, ErrorReporter&) = 0;
+#endif
       /* set the argument to the default value */
       virtual void setDefault() = 0;
@@ -117,4 +221,7 @@
 #if NH_MV
       bool        opt_duplicate; 
+#if NH_MV_SEI
+      std::vector<int> max_dim;
+#endif
 #endif
     };
@@ -125,6 +232,11 @@
     {
 #if NH_MV
+#if NH_MV_SEI
+      Option(const std::string& name, T& storage, T default_val, const std::string& desc, bool duplicate = false, std::vector< int > maxdim = std::vector< int >(0) )
+        : OptionBase(name, desc, duplicate, maxdim), opt_storage(storage), opt_default_val(default_val)
+#else
       Option(const std::string& name, T& storage, T default_val, const std::string& desc, bool duplicate = false)
         : OptionBase(name, desc, duplicate), opt_storage(storage), opt_default_val(default_val)
+#endif
 #else
       Option(const std::string& name, T& storage, T default_val, const std::string& desc)
@@ -133,5 +245,9 @@
       {}
 
+#if NH_MV_SEI
+      void parse(const std::string& arg, const std::vector<int>& idcs, ErrorReporter&);
+#else
       void parse(const std::string& arg, ErrorReporter&);
+#endif
 
       void setDefault()
@@ -147,6 +263,14 @@
     template<typename T>
     inline void
+#if NH_MV_SEI
+    Option<T>::parse(const std::string& arg, const std::vector<int>& idcs, ErrorReporter&)
+#else
     Option<T>::parse(const std::string& arg, ErrorReporter&)
-    {
+#endif
+    {
+#if NH_MV_SEI
+      assert( idcs.size() == 0 ); 
+#endif
+      
       std::istringstream arg_ss (arg,std::istringstream::in);
       arg_ss.exceptions(std::ios::failbit);
@@ -165,6 +289,13 @@
     template<>
     inline void
+#if NH_MV_SEI
+    Option<std::string>::parse(const std::string& arg, const std::vector<int>& idcs, ErrorReporter&)
+#else
     Option<std::string>::parse(const std::string& arg, ErrorReporter&)
-    {
+#endif
+    {
+#if NH_MV_SEI
+      assert( idcs.size() == 0 ); 
+#endif
       opt_storage = arg;
     }
@@ -173,8 +304,17 @@
     template<>
     inline void
+#if NH_MV_SEI
+      Option<char*>::parse(const std::string& arg, const std::vector<int>& idcs, ErrorReporter&)
+#else
       Option<char*>::parse(const std::string& arg, ErrorReporter&)
-    {
+#endif
+    {
+#if NH_MV_SEI
+      assert( idcs.size() == 0 ); 
+#endif
       opt_storage = arg.empty() ? NULL : strdup(arg.c_str()) ;
     }
+
+#if !NH_MV_SEI
 
     template<>
@@ -198,10 +338,17 @@
       }      
     }
-
+#endif
 
     template<>    
     inline void
+#if NH_MV_SEI
+      Option< std::vector<double> >::parse(const std::string& arg, const std::vector< int > & idcs, ErrorReporter&)
+#else
       Option< std::vector<double> >::parse(const std::string& arg, ErrorReporter&)
-    {
+#endif
+    {
+#if NH_MV_SEI
+      assert( idcs.size() == 0 ); 
+#endif
       char* pcNextStart = (char*) arg.data();
       char* pcEnd = pcNextStart + arg.length();
@@ -236,4 +383,27 @@
     }
 
+
+#if NH_MV_SEI
+    template<>
+    inline void
+      Option< IntAry1d >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter& err)
+    {
+      xParseVec( arg, opt_storage );
+    };
+
+    template<>
+    inline void
+      Option< IntAry2d >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter&)
+    {
+      xParseVec( arg, opt_storage[ idcs[0] ] );
+    };
+
+    template<>
+    inline void
+      Option< IntAry3d >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter&)
+    {
+      xParseVec ( arg, opt_storage[ idcs[0] ][ idcs[1] ] );
+    };
+#else
     template<>
     inline void
@@ -272,6 +442,37 @@
       }
     }
-
-
+#endif
+
+#if NH_MV_SEI
+
+    template<>
+    inline void
+      Option< std::vector< char*>  >::parse(const std::string& arg, const std::vector<int>& idcs, ErrorReporter& err )
+    {
+      
+      opt_storage[ idcs[ 0 ] ] = arg.empty() ? NULL : strdup(arg.c_str()) ;
+    };
+
+    template<>
+    inline void
+      Option< BoolAry1d >::parse(const std::string& arg, const std::vector<int>& idcs, ErrorReporter& err)
+    {      
+      xParseVec( arg, opt_storage );
+    };
+
+    template<>
+    inline void
+      Option< BoolAry2d >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter& err)
+    {     
+      xParseVec( arg, opt_storage[ idcs[0] ] );
+    };
+
+    template<>
+    inline void
+      Option< BoolAry3d >::parse(const std::string& arg, const IntAry1d& idcs, ErrorReporter& err )
+    {     
+      xParseVec( arg, opt_storage[idcs[0]][idcs[1]] );
+    };
+#else
     template<>
     inline void
@@ -307,4 +508,5 @@
     }
 #endif
+#endif
     /** Option class for argument handling using a user provided function */
     struct OptionFunc : public OptionBase
@@ -316,5 +518,9 @@
       {}
 
+#if NH_MV_SEI
+      void parse(const std::string& arg, const std::vector<int>& idcs, ErrorReporter& error_reporter)
+#else
       void parse(const std::string& arg, ErrorReporter& error_reporter)
+#endif
       {
         func(parent, arg, error_reporter);
@@ -388,4 +594,32 @@
         operator()(const std::string& name, std::vector<T>& storage, T default_val, unsigned uiMaxNum, const std::string& desc = "" )
       {
+#if NH_MV_SEI
+        std::vector<T> defVal;
+        defVal.resize( uiMaxNum, default_val ); 
+        std::vector< int > maxSize; 
+        maxSize.push_back( uiMaxNum ); 
+        parent.addOption(new Option< std::vector<T> >( name, storage, defVal, desc, false, maxSize ));
+
+        return *this;
+      }
+      template<typename T>
+      OptionSpecific&
+        operator()(const std::string& name, std::vector< std::vector<T> >& storage, T default_val, unsigned uiMaxNumDim1, unsigned uiMaxNumDim2, const std::string& desc = "" )
+      {
+        std::vector< std::vector<T> > defVal;
+        defVal.resize(uiMaxNumDim1);
+        for ( unsigned int idxDim1 = 0; idxDim1 < uiMaxNumDim1; idxDim1++ )
+        {
+          defVal[ idxDim1 ].resize(uiMaxNumDim2, default_val );          
+        }
+
+        std::vector< int > maxSize; 
+        maxSize.push_back( uiMaxNumDim1 ); 
+        maxSize.push_back( uiMaxNumDim2 ); 
+
+        parent.addOption(new Option< std::vector< std::vector<T> > >( name, storage, defVal, desc, false, maxSize ));
+        return *this;
+      }
+#else
         std::string cNameBuffer;
         std::string cDescBuffer;
@@ -415,4 +649,5 @@
         return *this;
       }
+#endif
 #endif
       /**
Index: branches/HTM-15.1-dev0/source/Lib/TLibCommon/CommonDef.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibCommon/CommonDef.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibCommon/CommonDef.h	(revision 1328)
@@ -173,4 +173,7 @@
 #if NH_MV
 static const Int MAX_NUM_LAYER_IDS =                               63;
+#if NH_MV_SEI
+static const Int MAX_NUM_SEIS      =                               1000;
+#endif
 #else
 static const Int MAX_NUM_LAYER_IDS =                               64;
@@ -280,4 +283,10 @@
 static const Int  MAX_NUM_PICS_RPS          =                     16 ; 
 static const Int  MAX_NUM_REF_LAYERS        =                     63 ;  
+#if NH_MV_SEI
+static IntAry1d getRangeVec( Int rngStart, Int rngEnd ) { IntAry1d rng; for (Int i = rngStart; i<=rngEnd; i++) rng.push_back(i);  return rng; };
+static const IntAry1d IDR_NAL_UNIT_TYPES   = getRangeVec( NAL_UNIT_CODED_SLICE_IDR_W_RADL, NAL_UNIT_CODED_SLICE_IDR_N_LP ); 
+static const IntAry1d IRAP_NAL_UNIT_TYPES  = getRangeVec( NAL_UNIT_CODED_SLICE_BLA_W_LP  , NAL_UNIT_CODED_SLICE_CRA      ); 
+
+#endif
 #endif
 
Index: branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.cpp	(revision 1328)
@@ -32,5 +32,5 @@
  */
 
-/** \file     SEI.cpp
+/** \file     #SEI.cpp
     \brief    helper functions for SEI handling
 */
@@ -38,4 +38,7 @@
 #include "CommonDef.h"
 #include "SEI.h"
+#if NH_MV_SEI
+#include "TComSlice.h"
+#endif
 
 SEIMessages getSeisByType(SEIMessages &seiList, SEI::PayloadType seiType)
@@ -150,7 +153,1606 @@
     case SEI::CHROMA_SAMPLING_FILTER_HINT:          return "Chroma sampling filter hint";
 #if NH_MV
-    case SEI::SUB_BITSTREAM_PROPERTY:               return "Sub-bitstream property SEI message";      
+    case SEI::COLOUR_REMAPPING_INFO:                     return "Colour remapping information";
+    case SEI::DEINTERLACED_FIELD_IDENTIFICATION:         return "Deinterlaced field identification";
+    case SEI::LAYERS_NOT_PRESENT:                        return "Layers not present";
+    case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:         return "Inter-layer constrained tile sets";
+    case SEI::BSP_NESTING:                               return "Bitstream partition nesting";
+    case SEI::BSP_INITIAL_ARRIVAL_TIME:                  return "Bitstream partition initial arrival time";
+    case SEI::SUB_BITSTREAM_PROPERTY:                    return "Sub-bitstream property";
+    case SEI::ALPHA_CHANNEL_INFO:                        return "Alpha channel information";
+    case SEI::OVERLAY_INFO:                              return "Overlay information"  ;
+    case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS:        return "Temporal motion vector prediction constraints";
+    case SEI::FRAME_FIELD_INFO:                          return "Frame-field information";
+    case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO: return "3D reference displays information";
+    case SEI::DEPTH_REPRESENTATION_INFO:                 return "Depth representation information";
+    case SEI::MULTIVIEW_SCENE_INFO:                      return "Multiview scene information";
+    case SEI::MULTIVIEW_ACQUISITION_INFO:                return "Multiview acquisition information";
+    case SEI::MULTIVIEW_VIEW_POSITION:                   return "Multiview view position";
+#if NH_3D
+    case SEI::ALTERNATIVE_DEPTH_INFO:                    return "Alternative depth information";
+#endif
 #endif
     default:                                        return "Unknown";
   }
 }
+
+#if NH_MV_SEI
+SEI::SEI()
+{
+  m_scalNestSeiContThisSei = NULL;
+}
+
+SEI* SEI::getNewSEIMessage(SEI::PayloadType payloadType)
+{
+  switch (payloadType)
+  {
+#if NH_MV_SEI_TBD
+    //////////////////////////////////////////////////////////////////////////
+    // TBD: Modify version 1 SEIs to use the same interfaces as Annex GFI SEI messages. 
+    //////////////////////////////////////////////////////////////////////////
+
+    case SEI::BUFFERING_PERIOD:                     return new SEIBufferingPeriod; 
+    case SEI::PICTURE_TIMING:                       return new SEIPictureTiming;
+    case SEI::PAN_SCAN_RECT:                        return new SEIPanScanRectangle;                    // not currently decoded
+    case SEI::FILLER_PAYLOAD:                       return new SEIFillerPaylod;                       // not currently decoded
+    case SEI::USER_DATA_REGISTERED_ITU_T_T35:       return new SEIUserDataRegistered;                 // not currently decoded
+    case SEI::USER_DATA_UNREGISTERED:               return new SEIuserDataUnregistered; 
+    case SEI::RECOVERY_POINT:                       return new SEIRecoveryPoint;
+    case SEI::SCENE_INFO:                           return new SEISceneInformation;                    // not currently decoded
+    case SEI::FULL_FRAME_SNAPSHOT:                  return new SEIPictureSnapshot;                     // not currently decoded
+    case SEI::PROGRESSIVE_REFINEMENT_SEGMENT_START: return new SEIProgressiveRefinementSegmentStart;   // not currently decoded
+    case SEI::PROGRESSIVE_REFINEMENT_SEGMENT_END:   return new SEIProgressiveRefinementSegmentEnd;     // not currently decoded
+    case SEI::FILM_GRAIN_CHARACTERISTICS:           return new SEIFilmGrainCharacteristics;            // not currently decoded
+    case SEI::POST_FILTER_HINT:                     return new SEIPostFilterHint;                      // not currently decoded
+    case SEI::TONE_MAPPING_INFO:                    return new SEIToneMappingInfo;
+    case SEI::KNEE_FUNCTION_INFO:                   return new SEIKneeFunctionInfo;
+    case SEI::FRAME_PACKING:                        return new SEIFramePacking;
+    case SEI::DISPLAY_ORIENTATION:                  return new SEIDisplayOrientation;
+    case SEI::SOP_DESCRIPTION:                      return new SEISOPDescription;
+    case SEI::ACTIVE_PARAMETER_SETS:                return new SEIActiveParameterSets;
+    case SEI::DECODING_UNIT_INFO:                   return new SEIDecodingUnitInfo;
+    case SEI::TEMPORAL_LEVEL0_INDEX:                return new SEITemporalLevel0Index
+    case SEI::DECODED_PICTURE_HASH:                 return new SEIDecodedPictureHash;
+    case SEI::SCALABLE_NESTING:                     return new SEIScalableNesting;
+    case SEI::REGION_REFRESH_INFO:                  return new SEIRegionRefreshInfo; 
+    case SEI::NO_DISPLAY:                           return new SEINoDisplay;
+    case SEI::TIME_CODE:                            return new SEITimeCode;
+    case SEI::MASTERING_DISPLAY_COLOUR_VOLUME:      return new SEIMasteringDisplayColourVolume;
+    case SEI::SEGM_RECT_FRAME_PACKING:              return new SEISegmentedRectFramePacking;
+    case SEI::TEMP_MOTION_CONSTRAINED_TILE_SETS:    return new SEITempMotionConstrainedTileSets; 
+    case SEI::CHROMA_SAMPLING_FILTER_HINT:          return new SEIChromaSamplingFilterHint
+#endif
+#if NH_MV_SEI
+#if NH_MV_SEI_TBD
+  case SEI::LAYERS_NOT_PRESENT                    :               return new SEILayersNotPresent;
+#endif
+  case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS     :               return new SEIInterLayerConstrainedTileSets;
+#if NH_MV_SEI_TBD
+  case SEI::BSP_NESTING                           :               return new SEIBspNesting;
+  case SEI::BSP_INITIAL_ARRIVAL_TIME              :               return new SEIBspInitialArrivalTime;
+#endif
+  case SEI::SUB_BITSTREAM_PROPERTY                :               return new SEISubBitstreamProperty;
+#if NH_MV_SEI_TBD
+  case SEI::ALPHA_CHANNEL_INFO                    :               return new SEIAlphaChannelInfo;
+  case SEI::OVERLAY_INFO                          :               return new SEIOverlayInfo;
+#endif
+  case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS    :               return new SEITemporalMvPredictionConstraints;
+#if NH_MV_SEI_TBD
+  case SEI::FRAME_FIELD_INFO                      :               return new SEIFrameFieldInfo;
+  case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO:            return new SEIThreeDimensionalReferenceDisplaysInfo;
+  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;
+  case SEI::MULTIVIEW_VIEW_POSITION               :               return new SEIMultiviewViewPosition;
+#if NH_MV_SEI_TBD
+#if NH_3D
+  case SEI::ALTERNATIVE_DEPTH_INFO                :               return new SEIAlternativeDepthInfo;
+#endif
+#endif
+#endif
+  default:                                        assert( false ); return NULL;
+  }
+}
+
+Void SEI::setupFromSlice  ( const TComSlice* slice )
+{
+  xPrintCfgErrorIntro();
+  std::cout << getSEIMessageString( payloadType() ) << "Setup by the encoder is currently not possible. Using the default SEI cfg-file." << std::endl;
+}
+
+SEI* SEI::getCopy() const
+{
+  assert( 0 ); 
+  return NULL;
+}
+
+Void SEI::setupFromCfgFile( const Char* cfgFile )
+{
+  assert( false );
+}
+
+Bool SEI::insertSei( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const
+{
+  Bool insertSeiHere = true;     
+  if( !m_applicableLayerIds.empty() )
+  {
+    insertSeiHere = insertSeiHere && ( std::find( m_applicableLayerIds.begin(), m_applicableLayerIds.end(), curLayerId) != m_applicableLayerIds.end() ) ;
+  }
+  if( !m_applicablePocs     .empty() )
+  {
+    insertSeiHere = insertSeiHere && ( std::find( m_applicablePocs    .begin(), m_applicablePocs    .end(), curPoc    ) != m_applicablePocs    .end() ) ;
+  }
+  if( !m_applicableTids     .empty() )
+  {
+    insertSeiHere = insertSeiHere && ( std::find( m_applicableTids    .begin(), m_applicableTids    .end(), curTid    ) != m_applicableTids    .end() ) ;
+  }
+  if( !m_applicableVclNaluTypes.empty() )
+  {
+    insertSeiHere = insertSeiHere && ( std::find( m_applicableVclNaluTypes.begin(), m_applicableVclNaluTypes.end(), curNaluType) != m_applicableVclNaluTypes.end() ) ;
+  }
+  return insertSeiHere;
+}
+
+Bool SEI::checkCfg( const TComSlice* slice )
+{
+  assert( false ); 
+  return true;
+}
+
+Void SEI::xPrintCfgErrorIntro()
+{
+  std::cout << "Error in configuration of " << getSEIMessageString( payloadType() ) << " SEI: ";
+}
+
+Void SEI::xCheckCfgRange( Bool& wrongConfig, Int val, Int minVal, Int maxVal, const Char* seName )
+{
+  if ( val < minVal || val > maxVal  )
+  {
+    xPrintCfgErrorIntro();
+    std::cout << "The value of " << seName << "shall be in the range of " << minVal << " to " << maxVal << ", inclusive." << std::endl;       
+    wrongConfig = true;       
+  }
+}
+
+Void SEI::xAddGeneralOpts(po::Options &opts, IntAry1d defAppLayerIds, IntAry1d deftApplicablePocs, 
+                                            IntAry1d defAppTids,     IntAry1d defAppVclNaluTypes, 
+                                            Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder)
+{
+  opts.addOptions()
+    ("PayloadType"            , m_payloadType            , -1                    , "Payload Type"                                                         )
+    ("ApplicableLayerIds"     , m_applicableLayerIds     , defAppLayerIds        , "LayerIds      of layers   to which the SEI is added. (all when empty)")
+    ("ApplicablePocs"         , m_applicablePocs         , deftApplicablePocs    , "POCs          of pictures to which the SEI is added. (all when empty)")
+    ("ApplicableTids"         , m_applicableTids         , defAppTids            , "TIds          of pictures to which the SEI is added. (all when empty)")
+    ("ApplicableVclNaluTypes" , m_applicableVclNaluTypes , defAppVclNaluTypes    , "NaluUnitTypes of picture  to which the SEI is added. (all when empty)")
+    ("SeiNaluId"              , m_seiNaluId              , defSeiNaluId          , "Identifies to which NAL unit  the SEI is added." )
+    ("PositionInSeiNalu"      , m_positionInSeiNalu      , defPositionInSeiNalu  , "Identifies the position within the NAL unit.")
+    ("ModifyByEncoder"        , m_modifyByEncoder        , defModifyByEncoder    , "0: Use payload as specified in cfg file   1: Modify SEI by encoder");
+}
+
+Void SEI::xCheckCfg( Bool& wrongConfig, Bool cond, const Char* errStr )
+{
+  if ( !cond  )
+  {
+    xPrintCfgErrorIntro();
+    std::cout << errStr << std::endl;       
+    wrongConfig = true;       
+  }
+}
+
+
+#if NH_MV_SEI_TBD
+Void SEILayersNotPresent::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()
+    ("LnpSeiActiveVpsId"              , m_lnpSeiActiveVpsId                , 0                              , "LnpSeiActiveVpsId"                )
+    ("LayerNotPresentFlag"            , m_layerNotPresentFlag              , BoolAry1d(1,0)                 , "LayerNotPresentFlag"              )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEILayersNotPresent::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_lnpSeiActiveVpsId              , MINVAL , MAXVAL, "lnp_sei_active_vps_id"            );
+  xCheckCfgRange( wrongConfig, m_layerNotPresentFlag[i]         , MINVAL , MAXVAL, "layer_not_present_flag"           );
+
+  return wrongConfig; 
+};
+
+Void SEILayersNotPresent::setupFromSlice  ( const TComSlice* slice )
+{
+  sei.m_lnpSeiActiveVpsId =  TBD ;
+  for( Int i = 0; i  <=  MaxLayersMinus1; i++ )
+  {
+    sei.m_layerNotPresentFlag[i] =  TBD ;
+  }
+};
+#endif
+
+
+Void SEIInterLayerConstrainedTileSets::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    .empty( ); 
+  defAppPocs        .push_back( 0 ); 
+  defAppTids        .empty( ); 
+  defAppVclNaluTypes.empty( ); 
+
+  Int      defSeiNaluId                  = 0; 
+  Int      defPositionInSeiNalu          = 0; 
+  Bool     defModifyByEncoder            = false; 
+
+  // Setup config file options
+  po::Options opts;     
+  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
+
+  const Int maxNumTileInSet = 100; 
+
+  opts.addOptions()
+    ("IlAllTilesExactSampleValueMatchFlag", m_ilAllTilesExactSampleValueMatchFlag, false                    , "IlAllTilesExactSampleValueMatchFlag")
+    ("IlOneTilePerTileSetFlag"        , m_ilOneTilePerTileSetFlag          , false                          , "IlOneTilePerTileSetFlag"          )
+    ("IlNumSetsInMessageMinus1"       , m_ilNumSetsInMessageMinus1         , 0                              , "IlNumSetsInMessageMinus1"         )
+    ("SkippedTileSetPresentFlag"      , m_skippedTileSetPresentFlag        , false                          , "SkippedTileSetPresentFlag"        )
+    ("IlctsId"                        , m_ilctsId                          , IntAry1d (256,0)               , "IlctsId"                          )
+    ("IlNumTileRectsInSetMinus1"      , m_ilNumTileRectsInSetMinus1        , IntAry1d (256,0)               , "IlNumTileRectsInSetMinus1"        )
+    ("IlTopLeftTileIndex_%d"          , m_ilTopLeftTileIndex               , IntAry1d (maxNumTileInSet,0), 256, "IlTopLeftTileIndex"               )
+    ("IlBottomRightTileIndex_%d"      , m_ilBottomRightTileIndex           , IntAry1d (maxNumTileInSet,0), 256, "IlBottomRightTileIndex"           )
+    ("IlcIdc"                         , m_ilcIdc                           , IntAry1d (256,0)               , "IlcIdc"                           )
+    ("IlExactSampleValueMatchFlag"    , m_ilExactSampleValueMatchFlag      , BoolAry1d(256,0)               , "IlExactSampleValueMatchFlag"      )
+    ("AllTilesIlcIdc"                 , m_allTilesIlcIdc                   , 0                              , "AllTilesIlcIdc"                   )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEIInterLayerConstrainedTileSets::checkCfg( const TComSlice* slice )
+{ 
+  // Check config values
+  Bool wrongConfig = false; 
+  const TComPPS* pps = slice->getPPS(); 
+
+  // Currently only the active PPS checked. 
+  xCheckCfg     ( wrongConfig, pps->getTilesEnabledFlag() , "The inter-layer constrained tile sets SEI message shall not be present for the layer with nuh_layer_id equal to targetLayerId when tiles_enabled_flag is equal to 0 for any PPS that is active for the pictures of the CLVS of the layer with nuh_layer_id equal to targetLayerId." );
+    
+  if ( m_ilOneTilePerTileSetFlag )
+  {
+    xCheckCfg( wrongConfig, ( pps->getNumTileColumnsMinus1() + 1 ) *  ( pps->getNumTileRowsMinus1() + 1 ) <= 256, "It is a requirement of bitstream conformance that when il_one_tile_per_tile_set_flag is equal to 1, the value of ( num_tile_columns_minus1 + 1 ) * ( num_tile_rows_minus1 + 1 ) shall be less than or equal to 256."    );
+  }
+  Int numSignificantSets = m_ilNumSetsInMessageMinus1 - m_skippedTileSetPresentFlag + 1; 
+
+  for (Int i = 0 ; i < numSignificantSets; i++)
+  {
+    xCheckCfgRange( wrongConfig, m_ilctsId[i]                         , 0 , (1 << 30) - 1, "ilcts_id"                         );
+  }  
+  
+  return wrongConfig; 
+};
+#if NH_MV_SEI_TBD
+
+Void SEIBspNesting::setupFromSlice  ( const TComSlice* slice )
+{
+  sei.m_seiOlsIdx =  TBD ;
+  sei.m_seiPartitioningSchemeIdx =  TBD ;
+  sei.m_bspIdx =  TBD ;
+  while( !ByteaLigned(() ) );
+  {
+    sei.m_bspNestingZeroBit =  TBD ;
+  }
+  sei.m_numSeisInBspMinus1 =  TBD ;
+  for( Int i = 0; i  <=  NumSeisInBspMinus1( ); i++ )
+  {
+    SeiMessage(() );
+  }
+};
+
+Void SEIBspNesting::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()
+    ("SeiOlsIdx"                      , m_seiOlsIdx                        , 0                              , "SeiOlsIdx"                        )
+    ("SeiPartitioningSchemeIdx"       , m_seiPartitioningSchemeIdx         , 0                              , "SeiPartitioningSchemeIdx"         )
+    ("BspIdx"                         , m_bspIdx                           , 0                              , "BspIdx"                           )
+    ("BspNestingZeroBit"              , m_bspNestingZeroBit                , 0                              , "BspNestingZeroBit"                )
+    ("NumSeisInBspMinus1"             , m_numSeisInBspMinus1               , 0                              , "NumSeisInBspMinus1"               )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEIBspNesting::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_seiOlsIdx                      , MINVAL , MAXVAL, "sei_ols_idx"          );
+  xCheckCfgRange( wrongConfig, m_seiPartitioningSchemeIdx       , MINVAL , MAXVAL, "sei_partitioning_scheme_idx"       );
+  xCheckCfgRange( wrongConfig, m_bspIdx                         , MINVAL , MAXVAL, "bsp_idx"              );
+  xCheckCfgRange( wrongConfig, m_bspNestingZeroBit              , MINVAL , MAXVAL, "bsp_nesting_zero_bit ");
+  xCheckCfgRange( wrongConfig, m_numSeisInBspMinus1             , MINVAL , MAXVAL, "num_seis_in_bsp_minus1"           );
+
+  return wrongConfig; 
+
+};
+
+Void SEIBspInitialArrivalTime::setupFromSlice  ( const TComSlice* slice )
+{
+  psIdx = SeiPartitioningSchemeIdx();
+  if( nalInitialArrivalDelayPresent )
+  {
+    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
+    {
+      sei.m_nalInitialArrivalDelay[i] =  TBD ;
+    }
+  }
+  if( vclInitialArrivalDelayPresent )
+  {
+    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
+    {
+      sei.m_vclInitialArrivalDelay[i] =  TBD ;
+    }
+  }
+};
+
+Void SEIBspInitialArrivalTime::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()
+    ("NalInitialArrivalDelay"         , m_nalInitialArrivalDelay           , IntAry1d (1,0)                 , "NalInitialArrivalDelay"           )
+    ("VclInitialArrivalDelay"         , m_vclInitialArrivalDelay           , IntAry1d (1,0)                 , "VclInitialArrivalDelay"           )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEIBspInitialArrivalTime::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_nalInitialArrivalDelay[i]      , MINVAL , MAXVAL, "nal_initial_arrival_delay"        );
+  xCheckCfgRange( wrongConfig, m_vclInitialArrivalDelay[i]      , MINVAL , MAXVAL, "vcl_initial_arrival_delay"        );
+
+  return wrongConfig; 
+
+};
+#endif
+
+Void SEISubBitstreamProperty::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( 0 );
+  defAppPocs        .push_back( 0 );
+  defAppTids        .push_back( 0 );
+  defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES;
+
+  Int      defSeiNaluId                  = 0; 
+  Int      defPositionInSeiNalu          = 0; 
+  Bool     defModifyByEncoder            = false; 
+
+  // Setup config file options
+  po::Options opts;     
+  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
+
+  opts.addOptions()
+    ("SbPropertyActiveVpsId"          , m_sbPropertyActiveVpsId            , 0                              , "SbPropertyActiveVpsId"            )
+    ("NumAdditionalSubStreamsMinus1"  , m_numAdditionalSubStreamsMinus1    , 0                              , "NumAdditionalSubStreamsMinus1"    )
+    ("SubBitstreamMode"               , m_subBitstreamMode                 , IntAry1d (1,0)                 , "SubBitstreamMode"                 )
+    ("OlsIdxToVps"                    , m_olsIdxToVps                      , IntAry1d (1,0)                 , "OlsIdxToVps"                      )
+    ("HighestSublayerId"              , m_highestSublayerId                , IntAry1d (1,0)                 , "HighestSublayerId"                )
+    ("AvgSbPropertyBitRate"           , m_avgSbPropertyBitRate             , IntAry1d (1,0)                 , "AvgSbPropertyBitRate"             )
+    ("MaxSbPropertyBitRate"           , m_maxSbPropertyBitRate             , IntAry1d (1,0)                 , "MaxSbPropertyBitRate"             )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEISubBitstreamProperty::checkCfg( const TComSlice* slice )
+{ 
+  // Check config values
+  Bool wrongConfig = false;
+
+  // For the current encoder, the initial IRAP access unit has always POC zero.   
+  xCheckCfg     ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0), "When present, the sub-bitstream property SEI message shall be associated with an initial IRAP access unit and the information provided by the SEI messages applies to the bitstream corresponding to the CVS containing the associated initial IRAP access unit.");
+
+  Bool sizeNotCorrect = 
+    (    ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_subBitstreamMode    .size() )
+    || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_olsIdxToVps         .size() )
+    || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_highestSublayerId   .size() )
+    || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_avgSbPropertyBitRate.size() )
+    || ( ( m_numAdditionalSubStreamsMinus1 + 1 ) != m_maxSbPropertyBitRate.size() );
+
+  xCheckCfg( wrongConfig, !sizeNotCorrect, "Some parameters of some sub-bitstream not provided." );
+  xCheckCfg( wrongConfig, slice->getVPS()->getVPSId() == m_sbPropertyActiveVpsId, "The value of sb_property_active_vps_id shall be equal to the value of vps_video_parameter_set_id of the active VPS referred to by the VCL NAL units of the associated access unit." );
+
+  xCheckCfgRange( wrongConfig, m_numAdditionalSubStreamsMinus1  , 0 , (1 << 10) - 1 , "num_additional_sub_streams_minus1");
+  
+  if ( !sizeNotCorrect )
+  {
+    for (Int i = 0; i <= m_numAdditionalSubStreamsMinus1; i++ )
+    {
+      xCheckCfgRange( wrongConfig, m_subBitstreamMode[i]    , 0 , 1                                          , "sub_bitstream_mode" );
+      xCheckCfgRange( wrongConfig, m_olsIdxToVps[i]         , 0 , slice->getVPS()->getNumOutputLayerSets()-1 , "ols_idx_to_vps"     );
+    }
+  }
+  return wrongConfig; 
+};
+
+Void SEISubBitstreamProperty::resizeArrays( )
+{
+  m_subBitstreamMode    .resize( m_numAdditionalSubStreamsMinus1 + 1); 
+  m_olsIdxToVps         .resize( m_numAdditionalSubStreamsMinus1 + 1); 
+  m_highestSublayerId   .resize( m_numAdditionalSubStreamsMinus1 + 1); 
+  m_avgSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 
+  m_maxSbPropertyBitRate.resize( m_numAdditionalSubStreamsMinus1 + 1); 
+}
+
+#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)
+{ 
+  // 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()
+    ("AlphaChannelCancelFlag"         , m_alphaChannelCancelFlag           , false                          , "AlphaChannelCancelFlag"           )
+    ("AlphaChannelUseIdc"             , m_alphaChannelUseIdc               , 0                              , "AlphaChannelUseIdc"               )
+    ("AlphaChannelBitDepthMinus8"     , m_alphaChannelBitDepthMinus8       , 0                              , "AlphaChannelBitDepthMinus8"       )
+    ("AlphaTransparentValue"          , m_alphaTransparentValue            , 0                              , "AlphaTransparentValue"            )
+    ("AlphaOpaqueValue"               , m_alphaOpaqueValue                 , 0                              , "AlphaOpaqueValue"                 )
+    ("AlphaChannelIncrFlag"           , m_alphaChannelIncrFlag             , false                          , "AlphaChannelIncrFlag"             )
+    ("AlphaChannelClipFlag"           , m_alphaChannelClipFlag             , false                          , "AlphaChannelClipFlag"             )
+    ("AlphaChannelClipTypeFlag"       , m_alphaChannelClipTypeFlag         , false                          , "AlphaChannelClipTypeFlag"         )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+
+};
+
+Bool SEIAlphaChannelInfo::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_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"     );
+
+  return wrongConfig; 
+
+};
+
+Void SEIOverlayInfo::setupFromSlice  ( const TComSlice* slice )
+{
+  sei.m_overlayInfoCancelFlag =  TBD ;
+  if( !sei.m_overlayInfoCancelFlag )
+  {
+    sei.m_overlayContentAuxIdMinus128 =  TBD ;
+    sei.m_overlayLabelAuxIdMinus128 =  TBD ;
+    sei.m_overlayAlphaAuxIdMinus128 =  TBD ;
+    sei.m_overlayElementLabelValueLengthMinus8 =  TBD ;
+    sei.m_numOverlaysMinus1 =  TBD ;
+    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
+    {
+      sei.m_overlayIdx[i] =  TBD ;
+      sei.m_languageOverlayPresentFlag[i] =  TBD ;
+      sei.m_overlayContentLayerId[i] =  TBD ;
+      sei.m_overlayLabelPresentFlag[i] =  TBD ;
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        sei.m_overlayLabelLayerId[i] =  TBD ;
+      }
+      sei.m_overlayAlphaPresentFlag[i] =  TBD ;
+      if( sei.m_overlayAlphaPresentFlag( i ) )
+      {
+        sei.m_overlayAlphaLayerId[i] =  TBD ;
+      }
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        sei.m_numOverlayElementsMinus1[i] =  TBD ;
+        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
+        {
+          sei.m_overlayElementLabelMin[i][j] =  TBD ;
+          sei.m_overlayElementLabelMax[i][j] =  TBD ;
+        }
+      }
+    }
+    while( !ByteaLigned(() ) );
+    {
+      sei.m_overlayZeroBit =  TBD ;
+    }
+    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
+    {
+      if( sei.m_languageOverlayPresentFlag( i ) )
+      {
+        sei.m_overlayLanguage[i] =  TBD ;
+      }
+      sei.m_overlayName[i] =  TBD ;
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
+        {
+          sei.m_overlayElementName[i][j] =  TBD ;
+        }
+      }
+    }
+    sei.m_overlayInfoPersistenceFlag =  TBD ;
+  }
+};
+
+Void SEIOverlayInfo::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()
+    ("OverlayInfoCancelFlag"          , m_overlayInfoCancelFlag            , false                          , "OverlayInfoCancelFlag"            )
+    ("OverlayContentAuxIdMinus128"    , m_overlayContentAuxIdMinus128      , 0                              , "OverlayContentAuxIdMinus128"      )
+    ("OverlayLabelAuxIdMinus128"      , m_overlayLabelAuxIdMinus128        , 0                              , "OverlayLabelAuxIdMinus128"        )
+    ("OverlayAlphaAuxIdMinus128"      , m_overlayAlphaAuxIdMinus128        , 0                              , "OverlayAlphaAuxIdMinus128"        )
+    ("OverlayElementLabelValueLengthMinus8", m_overlayElementLabelValueLengthMinus8, 0                              , "OverlayElementLabelValueLengthMinus8")
+    ("NumOverlaysMinus1"              , m_numOverlaysMinus1                , 0                              , "NumOverlaysMinus1"                )
+    ("OverlayIdx"                     , m_overlayIdx                       , IntAry1d (1,0)                 , "OverlayIdx"                       )
+    ("LanguageOverlayPresentFlag"     , m_languageOverlayPresentFlag       , BoolAry1d(1,0)                 , "LanguageOverlayPresentFlag"       )
+    ("OverlayContentLayerId"          , m_overlayContentLayerId            , IntAry1d (1,0)                 , "OverlayContentLayerId"            )
+    ("OverlayLabelPresentFlag"        , m_overlayLabelPresentFlag          , BoolAry1d(1,0)                 , "OverlayLabelPresentFlag"          )
+    ("OverlayLabelLayerId"            , m_overlayLabelLayerId              , IntAry1d (1,0)                 , "OverlayLabelLayerId"              )
+    ("OverlayAlphaPresentFlag"        , m_overlayAlphaPresentFlag          , BoolAry1d(1,0)                 , "OverlayAlphaPresentFlag"          )
+    ("OverlayAlphaLayerId"            , m_overlayAlphaLayerId              , IntAry1d (1,0)                 , "OverlayAlphaLayerId"              )
+    ("NumOverlayElementsMinus1"       , m_numOverlayElementsMinus1         , IntAry1d (1,0)                 , "NumOverlayElementsMinus1"         )
+    ("OverlayElementLabelMin_%d"      , m_overlayElementLabelMin           , IntAry1d (1,0) ,ADDNUM         , "OverlayElementLabelMin"           )
+    ("OverlayElementLabelMax_%d"      , m_overlayElementLabelMax           , IntAry1d (1,0) ,ADDNUM         , "OverlayElementLabelMax"           )
+    ("OverlayZeroBit"                 , m_overlayZeroBit                   , 0                              , "OverlayZeroBit"                   )
+    ("OverlayLanguage"                , m_overlayLanguage                  , IntAry1d (1,0)                 , "OverlayLanguage"                  )
+    ("OverlayName"                    , m_overlayName                      , IntAry1d (1,0)                 , "OverlayName"                      )
+    ("OverlayElementName_%d"          , m_overlayElementName               , IntAry1d (1,0) ,ADDNUM         , "OverlayElementName"               )
+    ("OverlayInfoPersistenceFlag"     , m_overlayInfoPersistenceFlag       , false                          , "OverlayInfoPersistenceFlag"       )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEIOverlayInfo::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_overlayInfoCancelFlag          , MINVAL , MAXVAL, "overlay_info_cancel_flag"         );
+  xCheckCfgRange( wrongConfig, m_overlayContentAuxIdMinus128    , MINVAL , MAXVAL, "overlay_content_aux_id_minus128"  );
+  xCheckCfgRange( wrongConfig, m_overlayLabelAuxIdMinus128      , MINVAL , MAXVAL, "overlay_label_aux_id_minus128"    );
+  xCheckCfgRange( wrongConfig, m_overlayAlphaAuxIdMinus128      , MINVAL , MAXVAL, "overlay_alpha_aux_id_minus128"    );
+  xCheckCfgRange( wrongConfig, m_overlayElementLabelValueLengthMinus8, MINVAL , MAXVAL, "overlay_element_label_value_length_minus8");
+  xCheckCfgRange( wrongConfig, m_numOverlaysMinus1              , MINVAL , MAXVAL, "num_overlays_minus1"  );
+  xCheckCfgRange( wrongConfig, m_overlayIdx[i]                  , MINVAL , MAXVAL, "overlay_idx"          );
+  xCheckCfgRange( wrongConfig, m_languageOverlayPresentFlag[i]  , MINVAL , MAXVAL, "language_overlay_present_flag"    );
+  xCheckCfgRange( wrongConfig, m_overlayContentLayerId[i]       , MINVAL , MAXVAL, "overlay_content_layer_id"         );
+  xCheckCfgRange( wrongConfig, m_overlayLabelPresentFlag[i]     , MINVAL , MAXVAL, "overlay_label_present_flag"       );
+  xCheckCfgRange( wrongConfig, m_overlayLabelLayerId[i]         , MINVAL , MAXVAL, "overlay_label_layer_id"           );
+  xCheckCfgRange( wrongConfig, m_overlayAlphaPresentFlag[i]     , MINVAL , MAXVAL, "overlay_alpha_present_flag"       );
+  xCheckCfgRange( wrongConfig, m_overlayAlphaLayerId[i]         , MINVAL , MAXVAL, "overlay_alpha_layer_id"           );
+  xCheckCfgRange( wrongConfig, m_numOverlayElementsMinus1[i]    , MINVAL , MAXVAL, "num_overlay_elements_minus1"       );
+  xCheckCfgRange( wrongConfig, m_overlayElementLabelMin[i][j]   , MINVAL , MAXVAL, "overlay_element_label_min"        );
+  xCheckCfgRange( wrongConfig, m_overlayElementLabelMax[i][j]   , MINVAL , MAXVAL, "overlay_element_label_max"        );
+  xCheckCfgRange( wrongConfig, m_overlayZeroBit                 , MINVAL , MAXVAL, "overlay_zero_bit"                 );
+  xCheckCfgRange( wrongConfig, m_overlayLanguage[i]             , MINVAL , MAXVAL, "overlay_language"                 );
+  xCheckCfgRange( wrongConfig, m_overlayName[i]                 , MINVAL , MAXVAL, "overlay_name"                     );
+  xCheckCfgRange( wrongConfig, m_overlayElementName[i][j]       , MINVAL , MAXVAL, "overlay_element_name"             );
+  xCheckCfgRange( wrongConfig, m_overlayInfoPersistenceFlag     , MINVAL , MAXVAL, "overlay_info_persistence_flag"    );
+
+  return wrongConfig; 
+
+};
+#endif
+
+Void SEITemporalMvPredictionConstraints::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    .clear    (   ); 
+  defAppPocs        .push_back( 0 );
+  defAppTids        .push_back( 0 );
+  defAppVclNaluTypes.clear    (   );
+
+  Int      defSeiNaluId                  = 0; 
+  Int      defPositionInSeiNalu          = 0; 
+  Bool     defModifyByEncoder            = false; 
+
+  // Setup config file options
+  po::Options opts;     
+  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
+
+  opts.addOptions()
+    ("PrevPicsNotUsedFlag"   , m_prevPicsNotUsedFlag   , false, "PrevPicsNotUsedFlag"    )
+    ("NoIntraLayerColPicFlag", m_noIntraLayerColPicFlag, false, "NoIntraLayerColPicFlag" )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEITemporalMvPredictionConstraints::checkCfg( const TComSlice* slice )
+{ 
+  // Check config values
+  Bool wrongConfig = false; 
+
+  xCheckCfg     ( wrongConfig, slice->getTemporalId() == 0 , "The temporal motion vector prediction constraints SEI message may be present in an access unit with TemporalId equal to 0 and shall not be present in an access unit with TemporalId greater than 0." );
+
+  return wrongConfig; 
+};
+
+#if NH_MV_SEI_TBD
+Void SEIFrameFieldInfo::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            = false;
+
+  // Setup config file options
+  po::Options opts;     
+  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
+
+  opts.addOptions()
+    ("FfinfoPicStruct"     , m_ffinfoPicStruct     , 0     , "FfinfoPicStruct"     )
+    ("FfinfoSourceScanType", m_ffinfoSourceScanType, 0     , "FfinfoSourceScanType")
+    ("FfinfoDuplicateFlag" , m_ffinfoDuplicateFlag , false , "FfinfoDuplicateFlag" )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+
+Bool SEIFrameFieldInfo::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_ffinfoPicStruct                , MINVAL , MAXVAL, "ffinfo_pic_struct"                );
+  xCheckCfgRange( wrongConfig, m_ffinfoSourceScanType           , MINVAL , MAXVAL, "ffinfo_source_scan_type"          );
+  xCheckCfgRange( wrongConfig, m_ffinfoDuplicateFlag            , MINVAL , MAXVAL, "ffinfo_duplicate_flag"            );
+
+  return wrongConfig; 
+
+};
+
+Void SEIThreeDimensionalReferenceDisplaysInfo::setupFromSlice  ( const TComSlice* slice )
+{
+  sei.m_precRefDisplayWidth =  TBD ;
+  sei.m_refViewingDistanceFlag =  TBD ;
+  if( sei.m_refViewingDistanceFlag )
+  {
+    sei.m_precRefViewingDist =  TBD ;
+  }
+  sei.m_numRefDisplaysMinus1 =  TBD ;
+  for( Int i = 0; i  <=  NumRefDisplaysMinus1( ); i++ )
+  {
+    sei.m_leftViewId[i] =  TBD ;
+    sei.m_rightViewId[i] =  TBD ;
+    sei.m_exponentRefDisplayWidth[i] =  TBD ;
+    sei.m_mantissaRefDisplayWidth[i] =  TBD ;
+    if( sei.m_refViewingDistanceFlag )
+    {
+      sei.m_exponentRefViewingDistance[i] =  TBD ;
+      sei.m_mantissaRefViewingDistance[i] =  TBD ;
+    }
+    sei.m_additionalShiftPresentFlag[i] =  TBD ;
+    if( sei.m_additionalShiftPresentFlag( i ) )
+    {
+      sei.m_numSampleShiftPlus512[i] =  TBD ;
+    }
+  }
+  sei.m_threeDimensionalReferenceDisplaysExtensionFlag =  TBD ;
+};
+
+Void SEIThreeDimensionalReferenceDisplaysInfo::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()
+    ("PrecRefDisplayWidth"            , m_precRefDisplayWidth              , 0                              , "PrecRefDisplayWidth"              )
+    ("RefViewingDistanceFlag"         , m_refViewingDistanceFlag           , false                          , "RefViewingDistanceFlag"           )
+    ("PrecRefViewingDist"             , m_precRefViewingDist               , 0                              , "PrecRefViewingDist"               )
+    ("NumRefDisplaysMinus1"           , m_numRefDisplaysMinus1             , 0                              , "NumRefDisplaysMinus1"             )
+    ("LeftViewId"                     , m_leftViewId                       , IntAry1d (1,0)                 , "LeftViewId"                       )
+    ("RightViewId"                    , m_rightViewId                      , IntAry1d (1,0)                 , "RightViewId"                      )
+    ("ExponentRefDisplayWidth"        , m_exponentRefDisplayWidth          , IntAry1d (1,0)                 , "ExponentRefDisplayWidth"          )
+    ("MantissaRefDisplayWidth"        , m_mantissaRefDisplayWidth          , IntAry1d (1,0)                 , "MantissaRefDisplayWidth"          )
+    ("ExponentRefViewingDistance"     , m_exponentRefViewingDistance       , IntAry1d (1,0)                 , "ExponentRefViewingDistance"       )
+    ("MantissaRefViewingDistance"     , m_mantissaRefViewingDistance       , IntAry1d (1,0)                 , "MantissaRefViewingDistance"       )
+    ("AdditionalShiftPresentFlag"     , m_additionalShiftPresentFlag       , BoolAry1d(1,0)                 , "AdditionalShiftPresentFlag"       )
+    ("NumSampleShiftPlus512"          , m_numSampleShiftPlus512            , IntAry1d (1,0)                 , "NumSampleShiftPlus512"            )
+    ("ThreeDimensionalReferenceDisplaysExtensionFlag", m_threeDimensionalReferenceDisplaysExtensionFlag, false                          , "ThreeDimensionalReferenceDisplaysExtensionFlag")
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEIThreeDimensionalReferenceDisplaysInfo::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_precRefDisplayWidth            , MINVAL , MAXVAL, "prec_ref_display_width"           );
+  xCheckCfgRange( wrongConfig, m_refViewingDistanceFlag         , MINVAL , MAXVAL, "ref_viewing_distance_flag"        );
+  xCheckCfgRange( wrongConfig, m_precRefViewingDist             , MINVAL , MAXVAL, "prec_ref_viewing_dist"            );
+  xCheckCfgRange( wrongConfig, m_numRefDisplaysMinus1           , MINVAL , MAXVAL, "num_ref_displays_minus1"          );
+  xCheckCfgRange( wrongConfig, m_leftViewId[i]                  , MINVAL , MAXVAL, "left_view_id"                     );
+  xCheckCfgRange( wrongConfig, m_rightViewId[i]                 , MINVAL , MAXVAL, "right_view_id"                    );
+  xCheckCfgRange( wrongConfig, m_exponentRefDisplayWidth[i]     , MINVAL , MAXVAL, "exponent_ref_display_width"       );
+  xCheckCfgRange( wrongConfig, m_mantissaRefDisplayWidth[i]     , MINVAL , MAXVAL, "mantissa_ref_display_width"       );
+  xCheckCfgRange( wrongConfig, m_exponentRefViewingDistance[i]  , MINVAL , MAXVAL, "exponent_ref_viewing_distance"    );
+  xCheckCfgRange( wrongConfig, m_mantissaRefViewingDistance[i]  , MINVAL , MAXVAL, "mantissa_ref_viewing_distance"    );
+  xCheckCfgRange( wrongConfig, m_additionalShiftPresentFlag[i]  , MINVAL , MAXVAL, "additional_shift_present_flag"    );
+  xCheckCfgRange( wrongConfig, m_numSampleShiftPlus512[i]       , MINVAL , MAXVAL, "num_sample_shift_plus512"         );
+  xCheckCfgRange( wrongConfig, m_threeDimensionalReferenceDisplaysExtensionFlag, MINVAL , MAXVAL, "three_dimensional_reference_displays_extension_flag");
+
+  return wrongConfig; 
+
+};
+
+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++ )
+    {
+      DepthNonlinearRepresentationModel( i );
+    }
+  }
+};
+
+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; 
+};
+#endif
+
+Void SEIMultiviewSceneInfo::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      .clear(); 
+  defAppPocs          .clear(); 
+  defAppTids          .push_back( 0 );
+  defAppVclNaluTypes = IRAP_NAL_UNIT_TYPES;
+
+  Int      defSeiNaluId                  = 0; 
+  Int      defPositionInSeiNalu          = 0; 
+  Bool     defModifyByEncoder            = false; 
+
+  // Setup config file options
+  po::Options opts;     
+  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
+
+  opts.addOptions()
+    ("MinDisparity"                   , m_minDisparity                     , 0                              , "MinDisparity"                     )
+    ("MaxDisparityRange"              , m_maxDisparityRange                , 0                              , "MaxDisparityRange"                )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );  
+};
+
+
+Bool SEIMultiviewSceneInfo::checkCfg( const TComSlice* slice )
+{ 
+  // Check config values
+  Bool wrongConfig = false; 
+   
+  xCheckCfg     ( wrongConfig, slice->isIRAP(), "When present, the multiview scene information SEI message shall be associated with an IRAP access unit." );
+      
+  xCheckCfgRange( wrongConfig, m_minDisparity              , -1024 , 1023, "min_disparity"                    );
+  xCheckCfgRange( wrongConfig, m_maxDisparityRange         ,     0 , 2047, "max_disparity_range"              );
+
+  return wrongConfig; 
+
+};
+
+Void SEIMultiviewAcquisitionInfo::setupFromCfgFile(const Char* cfgFile)
+{ 
+  // Set default values
+  IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 
+
+  defAppLayerIds    .clear(); 
+  defAppPocs        .push_back( 0 );
+  defAppTids        .push_back( 0 );
+  defAppVclNaluTypes = IDR_NAL_UNIT_TYPES;
+  
+
+  Int      defSeiNaluId                  = 0; 
+  Int      defPositionInSeiNalu          = 0; 
+  Bool     defModifyByEncoder            = false; 
+
+  // Setup config file options
+  po::Options opts;     
+  xAddGeneralOpts( opts , defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes, defSeiNaluId, defPositionInSeiNalu, defModifyByEncoder ); 
+
+  opts.addOptions()
+    ("IntrinsicParamFlag"               , m_intrinsicParamFlag               , false                              , "IntrinsicParamFlag"               )
+    ("ExtrinsicParamFlag"               , m_extrinsicParamFlag               , false                              , "ExtrinsicParamFlag"               )
+    ("IntrinsicParamsEqualFlag"         , m_intrinsicParamsEqualFlag         , false                              , "IntrinsicParamsEqualFlag"         )
+    ("PrecFocalLength"                  , m_precFocalLength                  , 0                                  , "PrecFocalLength"                  )
+    ("PrecPrincipalPoint"               , m_precPrincipalPoint               , 0                                  , "PrecPrincipalPoint"               )
+    ("PrecSkewFactor"                   , m_precSkewFactor                   , 0                                  , "PrecSkewFactor"                   )
+    ("SignFocalLengthX"                 , m_signFocalLengthX                 , BoolAry1d(1,0)                     , "SignFocalLengthX"                 )
+    ("ExponentFocalLengthX"             , m_exponentFocalLengthX             , IntAry1d (1,0)                     , "ExponentFocalLengthX"             )
+    ("MantissaFocalLengthX"             , m_mantissaFocalLengthX             , IntAry1d (1,0)                     , "MantissaFocalLengthX"             )
+    ("SignFocalLengthY"                 , m_signFocalLengthY                 , BoolAry1d(1,0)                     , "SignFocalLengthY"                 )
+    ("ExponentFocalLengthY"             , m_exponentFocalLengthY             , IntAry1d (1,0)                     , "ExponentFocalLengthY"             )
+    ("MantissaFocalLengthY"             , m_mantissaFocalLengthY             , IntAry1d (1,0)                     , "MantissaFocalLengthY"             )
+    ("SignPrincipalPointX"              , m_signPrincipalPointX              , BoolAry1d(1,0)                     , "SignPrincipalPointX"              )
+    ("ExponentPrincipalPointX"          , m_exponentPrincipalPointX          , IntAry1d (1,0)                     , "ExponentPrincipalPointX"          )
+    ("MantissaPrincipalPointX"          , m_mantissaPrincipalPointX          , IntAry1d (1,0)                     , "MantissaPrincipalPointX"          )
+    ("SignPrincipalPointY"              , m_signPrincipalPointY              , BoolAry1d(1,0)                     , "SignPrincipalPointY"              )
+    ("ExponentPrincipalPointY"          , m_exponentPrincipalPointY          , IntAry1d (1,0)                     , "ExponentPrincipalPointY"          )
+    ("MantissaPrincipalPointY"          , m_mantissaPrincipalPointY          , IntAry1d (1,0)                     , "MantissaPrincipalPointY"          )
+    ("SignSkewFactor"                   , m_signSkewFactor                   , BoolAry1d(1,0)                     , "SignSkewFactor"                   )
+    ("ExponentSkewFactor"               , m_exponentSkewFactor               , IntAry1d (1,0)                     , "ExponentSkewFactor"               )
+    ("MantissaSkewFactor"               , m_mantissaSkewFactor               , IntAry1d (1,0)                     , "MantissaSkewFactor"               )
+    ("PrecRotationParam"                , m_precRotationParam                , 0                                  , "PrecRotationParam"                )
+    ("PrecTranslationParam"             , m_precTranslationParam             , 0                                  , "PrecTranslationParam"             )
+    ("SignR_%d_%d"                      , m_signR                            , BoolAry1d(3,0) ,MAX_NUM_LAYERS ,3  , "SignR"                            )
+    ("ExponentR_%d_%d"                  , m_exponentR                        , IntAry1d (3,0) ,MAX_NUM_LAYERS ,3  , "ExponentR"                        )
+    ("MantissaR_%d_%d"                  , m_mantissaR                        , IntAry1d (3,0) ,MAX_NUM_LAYERS ,3  , "MantissaR"                        )
+    ("SignT_%d"                         , m_signT                            , BoolAry1d(3,0) ,MAX_NUM_LAYERS     , "SignT"                            )
+    ("ExponentT_%d"                     , m_exponentT                        , IntAry1d (3,0) ,MAX_NUM_LAYERS     , "ExponentT"                        )
+    ("MantissaT_%d"                     , m_mantissaT                        , IntAry1d (3,0) ,MAX_NUM_LAYERS     , "MantissaT"                        )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );  
+};
+
+UInt SEIMultiviewAcquisitionInfo::getMantissaFocalLengthXLen( Int i ) const
+{
+  return xGetSyntaxElementLen( m_exponentFocalLengthX[i], m_precFocalLength, m_mantissaFocalLengthX[ i ] );
+}
+
+Bool SEIMultiviewAcquisitionInfo::checkCfg( const TComSlice* slice )
+{ 
+  // Check config values
+  Bool wrongConfig = false; 
+
+  // Currently the encoder starts with POC 0 for all layers. The condition on POC 0 should be changed, when this changes.   
+  xCheckCfg     ( wrongConfig, slice->isIRAP() && (slice->getPOC() == 0)  , "When present, the multiview acquisition information SEI message that applies to the current layer shall be included in an access unit that contains an IRAP picture that is the first picture of a CLVS of the current layer." );  
+
+  xCheckCfgRange( wrongConfig, m_precFocalLength         , 0, 31, "prec_focal_length"         );
+  xCheckCfgRange( wrongConfig, m_precPrincipalPoint      , 0, 31, "prec_principle_point"      );
+  xCheckCfgRange( wrongConfig, m_precSkewFactor          , 0, 31, "prec_skew_factor"          );
+
+  for (Int i = 0; i <= getNumViewsMinus1(); i++ )
+  {  
+    xCheckCfgRange( wrongConfig, m_exponentFocalLengthX    [ i ], 0, 62, "exponent_focal_length_x"   );
+    xCheckCfgRange( wrongConfig, m_exponentFocalLengthY    [ i ], 0, 62, "exponent_focal_length_y"   );
+    xCheckCfgRange( wrongConfig, m_exponentPrincipalPointX [ i ], 0, 62, "exponent_principal_point_x");
+    xCheckCfgRange( wrongConfig, m_exponentPrincipalPointY [ i ], 0, 62, "exponent_principal_point_y");
+    xCheckCfgRange( wrongConfig, m_exponentSkewFactor      [ i ], 0, 62, "exponent_skew_factor"      );
+  }
+
+  xCheckCfgRange( wrongConfig, m_precRotationParam       , 0, 31, "prec_focal_length"         );
+  xCheckCfgRange( wrongConfig, m_precTranslationParam    , 0, 31, "prec_focal_length"         );
+
+  for (Int i = 0; i <= getNumViewsMinus1(); i++ )
+  {  
+    for (Int j = 0; j <= 2; j++)
+    {
+      xCheckCfgRange( wrongConfig, m_exponentT[i][j]     , 0, 62, "exponent_skew_factor"      );
+      for (Int k = 0; k <= 2; k++ )
+      {        
+        xCheckCfgRange( wrongConfig, m_exponentR[i][j][k], 0, 62, "exponent_principal_point_y");          
+      }
+    }
+  }  
+
+  return wrongConfig; 
+
+};
+
+UInt SEIMultiviewAcquisitionInfo::getMantissaFocalLengthYLen( Int i ) const
+{
+  return xGetSyntaxElementLen( m_exponentFocalLengthY[i], m_precFocalLength, m_mantissaFocalLengthY[ i ]  );
+}
+
+
+UInt SEIMultiviewAcquisitionInfo::getMantissaPrincipalPointXLen( Int i ) const
+{
+  return xGetSyntaxElementLen( m_exponentPrincipalPointX[i], m_precPrincipalPoint, m_mantissaPrincipalPointX[ i ]  );
+}
+
+UInt SEIMultiviewAcquisitionInfo::getMantissaPrincipalPointYLen( Int i ) const
+{
+  return xGetSyntaxElementLen( m_exponentPrincipalPointY[i], m_precPrincipalPoint, m_mantissaPrincipalPointY[ i ] );
+}
+
+UInt SEIMultiviewAcquisitionInfo::getMantissaSkewFactorLen( Int i ) const
+{
+  return xGetSyntaxElementLen( m_exponentSkewFactor[ i ], m_precSkewFactor, m_mantissaSkewFactor[ i ] );
+}
+
+UInt SEIMultiviewAcquisitionInfo::getMantissaRLen( Int i, Int j, Int k ) const
+{
+  return xGetSyntaxElementLen( m_exponentR[ i ][ j ][ k ], m_precRotationParam, m_mantissaR[ i ][ j] [ k ] );
+}
+
+UInt SEIMultiviewAcquisitionInfo::getMantissaTLen( Int i, Int j ) const
+{
+  return xGetSyntaxElementLen( m_exponentT[ i ][ j ], m_precTranslationParam, m_mantissaT[ i ][ j ] );
+}
+UInt SEIMultiviewAcquisitionInfo::xGetSyntaxElementLen( Int expo, Int prec, Int val ) const
+{
+  UInt len; 
+  if( expo == 0 )
+  {
+    len = std::max(0, prec - 30 );
+  }
+  else
+  {
+    len = std::max( 0, expo + prec - 31 );
+  }
+
+  assert( val >= 0 ); 
+  assert( val <= ( ( 1 << len )- 1) );
+  return len; 
+}
+
+Void SEIMultiviewViewPosition::setupFromSlice  ( const TComSlice* slice )
+{
+  const TComVPS* vps = slice->getVPS(); 
+  m_numViewsMinus1 = vps->getNumViews() - 1; 
+  m_viewPosition.resize( m_numViewsMinus1 + 1 ); 
+  for (Int i = 0; i <= m_numViewsMinus1; i++ )
+  {
+    // Assuming that view ids indicate the position 
+    m_viewPosition[i] = vps->getViewIdVal( i );
+  }
+}
+
+Void SEIMultiviewViewPosition::setupFromCfgFile(const Char* cfgFile)
+{ 
+  // Set default values
+  IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 
+
+  defAppLayerIds    .push_back( 0 );
+  defAppPocs        .push_back( 0 );
+  defAppTids        .push_back( 0 );
+  defAppVclNaluTypes = IDR_NAL_UNIT_TYPES; 
+
+  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()
+    ("NumViewsMinus1"         , m_numViewsMinus1                          , 0                       , "NumViewsMinus1")
+    ("ViewPosition"           , m_viewPosition                            , IntAry1d (1,0)          , "ViewPosition"  ); 
+  ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEIMultiviewViewPosition::checkCfg( const TComSlice* slice )
+{ 
+  // Check config values
+  Bool wrongConfig = false; 
+
+  // TBD: Add constraints on presence of SEI here. 
+  xCheckCfg     ( wrongConfig, slice->isIRAP() , "When present, the multiview view position SEI message shall be associated with an IRAP access unit."  );
+
+  // TBD: Modify constraints according to the SEI semantics. 
+  xCheckCfgRange( wrongConfig, m_numViewsMinus1                 , 0 , 62, "num_views_minus1");
+  for(Int i = 0; i <= m_numViewsMinus1; i++)
+  {
+    xCheckCfgRange( wrongConfig, m_viewPosition[i]                , 0 , 62, "view_position");
+  }
+
+  return wrongConfig; 
+
+};
+
+#if NH_MV_SEI_TBD
+Void SEIAlternativeDepthInfo::setupFromSlice  ( const TComSlice* slice )
+{
+  sei.m_alternativeDepthInfoCancelFlag =  TBD ;
+  if( sei.m_alternativeDepthInfoCancelFlag  = =  0 )
+  {
+    sei.m_depthType =  TBD ;
+    if( sei.m_depthType  = =  0 )
+    {
+      sei.m_numConstituentViewsGvdMinus1 =  TBD ;
+      sei.m_depthPresentGvdFlag =  TBD ;
+      sei.m_zGvdFlag =  TBD ;
+      sei.m_intrinsicParamGvdFlag =  TBD ;
+      sei.m_rotationGvdFlag =  TBD ;
+      sei.m_translationGvdFlag =  TBD ;
+      if( sei.m_zGvdFlag )
+      {
+        for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
+        {
+          sei.m_signGvdZNearFlag[i] =  TBD ;
+          sei.m_expGvdZNear[i] =  TBD ;
+          sei.m_manLenGvdZNearMinus1[i] =  TBD ;
+          sei.m_manGvdZNear[i] =  TBD ;
+          sei.m_signGvdZFarFlag[i] =  TBD ;
+          sei.m_expGvdZFar[i] =  TBD ;
+          sei.m_manLenGvdZFarMinus1[i] =  TBD ;
+          sei.m_manGvdZFar[i] =  TBD ;
+        }
+      }
+      if( sei.m_intrinsicParamGvdFlag )
+      {
+        sei.m_precGvdFocalLength =  TBD ;
+        sei.m_precGvdPrincipalPoint =  TBD ;
+      }
+      if( sei.m_rotationGvdFlag )
+      {
+        sei.m_precGvdRotationParam =  TBD ;
+      }
+      if( sei.m_translationGvdFlag )
+      {
+        sei.m_precGvdTranslationParam =  TBD ;
+      }
+      for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
+      {
+        if( sei.m_intrinsicParamGvdFlag )
+        {
+          sei.m_signGvdFocalLengthX[i] =  TBD ;
+          sei.m_expGvdFocalLengthX[i] =  TBD ;
+          sei.m_manGvdFocalLengthX[i] =  TBD ;
+          sei.m_signGvdFocalLengthY[i] =  TBD ;
+          sei.m_expGvdFocalLengthY[i] =  TBD ;
+          sei.m_manGvdFocalLengthY[i] =  TBD ;
+          sei.m_signGvdPrincipalPointX[i] =  TBD ;
+          sei.m_expGvdPrincipalPointX[i] =  TBD ;
+          sei.m_manGvdPrincipalPointX[i] =  TBD ;
+          sei.m_signGvdPrincipalPointY[i] =  TBD ;
+          sei.m_expGvdPrincipalPointY[i] =  TBD ;
+          sei.m_manGvdPrincipalPointY[i] =  TBD ;
+        }
+        if( sei.m_rotationGvdFlag )
+        {
+          for( Int j = 10; j  <=  3; j++ ) /* row */
+          {
+            for( Int k = 10; k  <=  3; k++ )  /* column */
+            {
+              sei.m_signGvdR[i][j][k] =  TBD ;
+              sei.m_expGvdR[i][j][k] =  TBD ;
+              sei.m_manGvdR[i][j][k] =  TBD ;
+            }
+          }
+        }
+        if( sei.m_translationGvdFlag )
+        {
+          sei.m_signGvdTX[i] =  TBD ;
+          sei.m_expGvdTX[i] =  TBD ;
+          sei.m_manGvdTX[i] =  TBD ;
+        }
+      }
+    }
+    if( sei.m_depthType  = =  1 )
+    {
+      sei.m_minOffsetXInt =  TBD ;
+      sei.m_minOffsetXFrac =  TBD ;
+      sei.m_maxOffsetXInt =  TBD ;
+      sei.m_maxOffsetXFrac =  TBD ;
+      sei.m_offsetYPresentFlag =  TBD ;
+      if( sei.m_offsetYPresentFlag )
+      {
+        sei.m_minOffsetYInt =  TBD ;
+        sei.m_minOffsetYFrac =  TBD ;
+        sei.m_maxOffsetYInt =  TBD ;
+        sei.m_maxOffsetYFrac =  TBD ;
+      }
+      sei.m_warpMapSizePresentFlag =  TBD ;
+      if( sei.m_warpMapSizePresentFlag )
+      {
+        sei.m_warpMapWidthMinus2 =  TBD ;
+        sei.m_warpMapHeightMinus2 =  TBD ;
+      }
+    }
+  }
+};
+Void SEIAlternativeDepthInfo::setupFromCfgFile(const Char* cfgFile)
+{ 
+  // Set default values
+  IntAry1d defAppLayerIds, defAppPocs, defAppTids, defAppVclNaluTypes; 
+
+  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()
+    ("AlternativeDepthInfoCancelFlag"   , m_alternativeDepthInfoCancelFlag   , false                            , "AlternativeDepthInfoCancelFlag"   )
+    ("DepthType"                        , m_depthType                        , 0                                , "DepthType"                        )
+    ("NumConstituentViewsGvdMinus1"     , m_numConstituentViewsGvdMinus1     , 0                                , "NumConstituentViewsGvdMinus1"     )
+    ("DepthPresentGvdFlag"              , m_depthPresentGvdFlag              , false                            , "DepthPresentGvdFlag"              )
+    ("ZGvdFlag"                         , m_zGvdFlag                         , false                            , "ZGvdFlag"                         )
+    ("IntrinsicParamGvdFlag"            , m_intrinsicParamGvdFlag            , false                            , "IntrinsicParamGvdFlag"            )
+    ("RotationGvdFlag"                  , m_rotationGvdFlag                  , false                            , "RotationGvdFlag"                  )
+    ("TranslationGvdFlag"               , m_translationGvdFlag               , false                            , "TranslationGvdFlag"               )
+    ("SignGvdZNearFlag"                 , m_signGvdZNearFlag                 , BoolAry1d(1,0)                   , "SignGvdZNearFlag"                 )
+    ("ExpGvdZNear"                      , m_expGvdZNear                      , IntAry1d (1,0)                   , "ExpGvdZNear"                      )
+    ("ManLenGvdZNearMinus1"             , m_manLenGvdZNearMinus1             , IntAry1d (1,0)                   , "ManLenGvdZNearMinus1"             )
+    ("ManGvdZNear"                      , m_manGvdZNear                      , IntAry1d (1,0)                   , "ManGvdZNear"                      )
+    ("SignGvdZFarFlag"                  , m_signGvdZFarFlag                  , BoolAry1d(1,0)                   , "SignGvdZFarFlag"                  )
+    ("ExpGvdZFar"                       , m_expGvdZFar                       , IntAry1d (1,0)                   , "ExpGvdZFar"                       )
+    ("ManLenGvdZFarMinus1"              , m_manLenGvdZFarMinus1              , IntAry1d (1,0)                   , "ManLenGvdZFarMinus1"              )
+    ("ManGvdZFar"                       , m_manGvdZFar                       , IntAry1d (1,0)                   , "ManGvdZFar"                       )
+    ("PrecGvdFocalLength"               , m_precGvdFocalLength               , 0                                , "PrecGvdFocalLength"               )
+    ("PrecGvdPrincipalPoint"            , m_precGvdPrincipalPoint            , 0                                , "PrecGvdPrincipalPoint"            )
+    ("PrecGvdRotationParam"             , m_precGvdRotationParam             , 0                                , "PrecGvdRotationParam"             )
+    ("PrecGvdTranslationParam"          , m_precGvdTranslationParam          , 0                                , "PrecGvdTranslationParam"          )
+    ("SignGvdFocalLengthX"              , m_signGvdFocalLengthX              , BoolAry1d(1,0)                   , "SignGvdFocalLengthX"              )
+    ("ExpGvdFocalLengthX"               , m_expGvdFocalLengthX               , IntAry1d (1,0)                   , "ExpGvdFocalLengthX"               )
+    ("ManGvdFocalLengthX"               , m_manGvdFocalLengthX               , IntAry1d (1,0)                   , "ManGvdFocalLengthX"               )
+    ("SignGvdFocalLengthY"              , m_signGvdFocalLengthY              , BoolAry1d(1,0)                   , "SignGvdFocalLengthY"              )
+    ("ExpGvdFocalLengthY"               , m_expGvdFocalLengthY               , IntAry1d (1,0)                   , "ExpGvdFocalLengthY"               )
+    ("ManGvdFocalLengthY"               , m_manGvdFocalLengthY               , IntAry1d (1,0)                   , "ManGvdFocalLengthY"               )
+    ("SignGvdPrincipalPointX"           , m_signGvdPrincipalPointX           , BoolAry1d(1,0)                   , "SignGvdPrincipalPointX"           )
+    ("ExpGvdPrincipalPointX"            , m_expGvdPrincipalPointX            , IntAry1d (1,0)                   , "ExpGvdPrincipalPointX"            )
+    ("ManGvdPrincipalPointX"            , m_manGvdPrincipalPointX            , IntAry1d (1,0)                   , "ManGvdPrincipalPointX"            )
+    ("SignGvdPrincipalPointY"           , m_signGvdPrincipalPointY           , BoolAry1d(1,0)                   , "SignGvdPrincipalPointY"           )
+    ("ExpGvdPrincipalPointY"            , m_expGvdPrincipalPointY            , IntAry1d (1,0)                   , "ExpGvdPrincipalPointY"            )
+    ("ManGvdPrincipalPointY"            , m_manGvdPrincipalPointY            , IntAry1d (1,0)                   , "ManGvdPrincipalPointY"            )
+    ("SignGvdR"                         , m_signGvdR                         , BoolAry1d(1,0)   ,ADDNUM ,ADDNUM , "SignGvdR"                         )
+    ("ExpGvdR"                          , m_expGvdR                          , IntAry1d (1,0)   ,ADDNUM ,ADDNUM , "ExpGvdR"                          )
+    ("ManGvdR"                          , m_manGvdR                          , IntAry1d (1,0)   ,ADDNUM ,ADDNUM , "ManGvdR"                          )
+    ("SignGvdTX"                        , m_signGvdTX                        , BoolAry1d(1,0)                   , "SignGvdTX"                        )
+    ("ExpGvdTX"                         , m_expGvdTX                         , IntAry1d (1,0)                   , "ExpGvdTX"                         )
+    ("ManGvdTX"                         , m_manGvdTX                         , IntAry1d (1,0)                   , "ManGvdTX"                         )
+    ("MinOffsetXInt"                    , m_minOffsetXInt                    , 0                                , "MinOffsetXInt"                    )
+    ("MinOffsetXFrac"                   , m_minOffsetXFrac                   , 0                                , "MinOffsetXFrac"                   )
+    ("MaxOffsetXInt"                    , m_maxOffsetXInt                    , 0                                , "MaxOffsetXInt"                    )
+    ("MaxOffsetXFrac"                   , m_maxOffsetXFrac                   , 0                                , "MaxOffsetXFrac"                   )
+    ("OffsetYPresentFlag"               , m_offsetYPresentFlag               , false                            , "OffsetYPresentFlag"               )
+    ("MinOffsetYInt"                    , m_minOffsetYInt                    , 0                                , "MinOffsetYInt"                    )
+    ("MinOffsetYFrac"                   , m_minOffsetYFrac                   , 0                                , "MinOffsetYFrac"                   )
+    ("MaxOffsetYInt"                    , m_maxOffsetYInt                    , 0                                , "MaxOffsetYInt"                    )
+    ("MaxOffsetYFrac"                   , m_maxOffsetYFrac                   , 0                                , "MaxOffsetYFrac"                   )
+    ("WarpMapSizePresentFlag"           , m_warpMapSizePresentFlag           , false                            , "WarpMapSizePresentFlag"           )
+    ("WarpMapWidthMinus2"               , m_warpMapWidthMinus2               , 0                                , "WarpMapWidthMinus2"               )
+    ("WarpMapHeightMinus2"              , m_warpMapHeightMinus2              , 0                                , "WarpMapHeightMinus2"              )
+    ;
+
+  po::setDefaults(opts);
+
+  // Parse the cfg file
+  po::ErrorReporter err;
+  po::parseConfigFile( opts, cfgFile, err );
+};
+
+Bool SEIAlternativeDepthInfo::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_alternativeDepthInfoCancelFlag , MINVAL , MAXVAL, "alternative_depth_info_cancel_flag");
+  xCheckCfgRange( wrongConfig, m_depthType                      , MINVAL , MAXVAL, "depth_type"                       );
+  xCheckCfgRange( wrongConfig, m_numConstituentViewsGvdMinus1   , MINVAL , MAXVAL, "num_constituent_views_gvd_minus1 ");
+  xCheckCfgRange( wrongConfig, m_depthPresentGvdFlag            , MINVAL , MAXVAL, "depth_present_gvd_flag"           );
+  xCheckCfgRange( wrongConfig, m_zGvdFlag                       , MINVAL , MAXVAL, "z_gvd_flag"                       );
+  xCheckCfgRange( wrongConfig, m_intrinsicParamGvdFlag          , MINVAL , MAXVAL, "intrinsic_param_gvd_flag"         );
+  xCheckCfgRange( wrongConfig, m_rotationGvdFlag                , MINVAL , MAXVAL, "rotation_gvd_flag"                );
+  xCheckCfgRange( wrongConfig, m_translationGvdFlag             , MINVAL , MAXVAL, "translation_gvd_flag"             );
+  xCheckCfgRange( wrongConfig, m_signGvdZNearFlag[i]            , MINVAL , MAXVAL, "sign_gvd_z_near_flag"             );
+  xCheckCfgRange( wrongConfig, m_expGvdZNear[i]                 , MINVAL , MAXVAL, "exp_gvd_z_near"                   );
+  xCheckCfgRange( wrongConfig, m_manLenGvdZNearMinus1[i]        , MINVAL , MAXVAL, "man_len_gvd_z_near_minus1"        );
+  xCheckCfgRange( wrongConfig, m_manGvdZNear[i]                 , MINVAL , MAXVAL, "man_gvd_z_near"                   );
+  xCheckCfgRange( wrongConfig, m_signGvdZFarFlag[i]             , MINVAL , MAXVAL, "sign_gvd_z_far_flag"              );
+  xCheckCfgRange( wrongConfig, m_expGvdZFar[i]                  , MINVAL , MAXVAL, "exp_gvd_z_far"                    );
+  xCheckCfgRange( wrongConfig, m_manLenGvdZFarMinus1[i]         , MINVAL , MAXVAL, "man_len_gvd_z_far_minus1"         );
+  xCheckCfgRange( wrongConfig, m_manGvdZFar[i]                  , MINVAL , MAXVAL, "man_gvd_z_far"                    );
+  xCheckCfgRange( wrongConfig, m_precGvdFocalLength             , MINVAL , MAXVAL, "prec_gvd_focal_length"            );
+  xCheckCfgRange( wrongConfig, m_precGvdPrincipalPoint          , MINVAL , MAXVAL, "prec_gvd_principal_point"         );
+  xCheckCfgRange( wrongConfig, m_precGvdRotationParam           , MINVAL , MAXVAL, "prec_gvd_rotation_param"          );
+  xCheckCfgRange( wrongConfig, m_precGvdTranslationParam        , MINVAL , MAXVAL, "prec_gvd_translation_param"       );
+  xCheckCfgRange( wrongConfig, m_signGvdFocalLengthX[i]         , MINVAL , MAXVAL, "sign_gvd_focal_length_x"          );
+  xCheckCfgRange( wrongConfig, m_expGvdFocalLengthX[i]          , MINVAL , MAXVAL, "exp_gvd_focal_length_x"           );
+  xCheckCfgRange( wrongConfig, m_manGvdFocalLengthX[i]          , MINVAL , MAXVAL, "man_gvd_focal_length_x"           );
+  xCheckCfgRange( wrongConfig, m_signGvdFocalLengthY[i]         , MINVAL , MAXVAL, "sign_gvd_focal_length_y"          );
+  xCheckCfgRange( wrongConfig, m_expGvdFocalLengthY[i]          , MINVAL , MAXVAL, "exp_gvd_focal_length_y"           );
+  xCheckCfgRange( wrongConfig, m_manGvdFocalLengthY[i]          , MINVAL , MAXVAL, "man_gvd_focal_length_y"           );
+  xCheckCfgRange( wrongConfig, m_signGvdPrincipalPointX[i]      , MINVAL , MAXVAL, "sign_gvd_principal_point_x"       );
+  xCheckCfgRange( wrongConfig, m_expGvdPrincipalPointX[i]       , MINVAL , MAXVAL, "exp_gvd_principal_point_x"        );
+  xCheckCfgRange( wrongConfig, m_manGvdPrincipalPointX[i]       , MINVAL , MAXVAL, "man_gvd_principal_point_x"        );
+  xCheckCfgRange( wrongConfig, m_signGvdPrincipalPointY[i]      , MINVAL , MAXVAL, "sign_gvd_principal_point_y"       );
+  xCheckCfgRange( wrongConfig, m_expGvdPrincipalPointY[i]       , MINVAL , MAXVAL, "exp_gvd_principal_point_y"        );
+  xCheckCfgRange( wrongConfig, m_manGvdPrincipalPointY[i]       , MINVAL , MAXVAL, "man_gvd_principal_point_y"        );
+  xCheckCfgRange( wrongConfig, m_signGvdR[i][j][k]              , MINVAL , MAXVAL, "sign_gvd_r"                       );
+  xCheckCfgRange( wrongConfig, m_expGvdR[i][j][k]               , MINVAL , MAXVAL, "exp_gvd_r"                        );
+  xCheckCfgRange( wrongConfig, m_manGvdR[i][j][k]               , MINVAL , MAXVAL, "man_gvd_r"                        );
+  xCheckCfgRange( wrongConfig, m_signGvdTX[i]                   , MINVAL , MAXVAL, "sign_gvd_t_x"                     );
+  xCheckCfgRange( wrongConfig, m_expGvdTX[i]                    , MINVAL , MAXVAL, "exp_gvd_t_x"                      );
+  xCheckCfgRange( wrongConfig, m_manGvdTX[i]                    , MINVAL , MAXVAL, "man_gvd_t_x"                      );
+  xCheckCfgRange( wrongConfig, m_minOffsetXInt                  , MINVAL , MAXVAL, "min_offset_x_int"                 );
+  xCheckCfgRange( wrongConfig, m_minOffsetXFrac                 , MINVAL , MAXVAL, "min_offset_x_frac"                );
+  xCheckCfgRange( wrongConfig, m_maxOffsetXInt                  , MINVAL , MAXVAL, "max_offset_x_int"                 );
+  xCheckCfgRange( wrongConfig, m_maxOffsetXFrac                 , MINVAL , MAXVAL, "max_offset_x_frac"                );
+  xCheckCfgRange( wrongConfig, m_offsetYPresentFlag             , MINVAL , MAXVAL, "offset_y_present_flag"            );
+  xCheckCfgRange( wrongConfig, m_minOffsetYInt                  , MINVAL , MAXVAL, "min_offset_y_int"                 );
+  xCheckCfgRange( wrongConfig, m_minOffsetYFrac                 , MINVAL , MAXVAL, "min_offset_y_frac"                );
+  xCheckCfgRange( wrongConfig, m_maxOffsetYInt                  , MINVAL , MAXVAL, "max_offset_y_int"                 );
+  xCheckCfgRange( wrongConfig, m_maxOffsetYFrac                 , MINVAL , MAXVAL, "max_offset_y_frac"                );
+  xCheckCfgRange( wrongConfig, m_warpMapSizePresentFlag         , MINVAL , MAXVAL, "warp_map_size_present_flag"       );
+  xCheckCfgRange( wrongConfig, m_warpMapWidthMinus2             , MINVAL , MAXVAL, "warp_map_width_minus2"            );
+  xCheckCfgRange( wrongConfig, m_warpMapHeightMinus2            , MINVAL , MAXVAL, "warp_map_height_minus2"           );
+
+  return wrongConfig; 
+
+};
+#endif
+
+#endif
Index: branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibCommon/SEI.h	(revision 1328)
@@ -42,7 +42,19 @@
 #include "CommonDef.h"
 #include "libmd5/MD5.h"
+ 
+
+#if NH_MV_SEI
+#include "TAppCommon/program_options_lite.h"
+using namespace std;
+namespace po = df::program_options_lite;
+#endif
+
 //! \ingroup TLibCommon
 //! \{
 class TComSPS;
+#if NH_MV_SEI
+class TComSlice; 
+class SEIScalableNesting; 
+#endif
 
 /**
@@ -84,16 +96,63 @@
     CHROMA_SAMPLING_FILTER_HINT          = 140,
     KNEE_FUNCTION_INFO                   = 141
-#if NH_MV
-    ,SUB_BITSTREAM_PROPERTY              = 164
+#if NH_MV_SEI
+    ,COLOUR_REMAPPING_INFO                    = 142,
+    DEINTERLACED_FIELD_IDENTIFICATION         = 143,
+    LAYERS_NOT_PRESENT                        = 160,
+    INTER_LAYER_CONSTRAINED_TILE_SETS         = 161,
+    BSP_NESTING                               = 162,
+    BSP_INITIAL_ARRIVAL_TIME                  = 163,
+    SUB_BITSTREAM_PROPERTY                    = 164,
+    ALPHA_CHANNEL_INFO                        = 165,
+    OVERLAY_INFO                              = 166,
+    TEMPORAL_MV_PREDICTION_CONSTRAINTS        = 167,
+    FRAME_FIELD_INFO                          = 168,
+    THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO = 176,
+    DEPTH_REPRESENTATION_INFO                 = 177,
+    MULTIVIEW_SCENE_INFO                      = 178,
+    MULTIVIEW_ACQUISITION_INFO                = 179,
+    MULTIVIEW_VIEW_POSITION                   = 180
+#if NH_3D
+    ,    ALTERNATIVE_DEPTH_INFO                    = 181
+#endif
 #endif
 
   };
 
-  SEI() {}
+  SEI();
+
   virtual ~SEI() {}
-
-  static const Char *getSEIMessageString(SEI::PayloadType payloadType);
-
+  virtual SEI*       getCopy( ) const;
+  static const Char *getSEIMessageString(SEI::PayloadType payloadType );
   virtual PayloadType payloadType() const = 0;
+
+#if NH_MV_SEI
+  static SEI*        getNewSEIMessage         ( SEI::PayloadType payloadType ); 
+  Bool               insertSei                ( Int curLayerId, Int curPoc, Int curTid, Int curNaluType ) const;  
+
+
+  virtual Void       setupFromSlice           ( const TComSlice* slice );
+  virtual Void       setupFromCfgFile         ( const Char* cfgFile );
+  virtual Bool       checkCfg                 ( const TComSlice* slice   );
+
+  Void               xPrintCfgErrorIntro();
+  Void               xCheckCfgRange           ( Bool& wrongConfig, Int val, Int minVal, Int maxVal, const Char* seName );
+  Void               xCheckCfg                ( Bool& wrongConfig, Bool cond, const Char* errStr );
+  Void               xAddGeneralOpts          ( po::Options &opts, IntAry1d defAppLayerIds, IntAry1d defAppPocs, IntAry1d defAppTids, IntAry1d defAppVclNaluTypes, 
+                                                Int defSeiNaluId, Int defPositionInSeiNalu, Bool defModifyByEncoder );
+    // Filters where to insert SEI in the bitstream. 
+  // When the respected vector is empty, all layersIds, POCs, Tids, and Nalu types are used. 
+  IntAry1d                       m_applicableLayerIds; 
+  IntAry1d                       m_applicablePocs; 
+  IntAry1d                       m_applicableTids; 
+  IntAry1d                       m_applicableVclNaluTypes;     
+
+  Int                            m_payloadType;              // Payload type
+  Int                            m_seiNaluId;                // Identifies to which NAL unit  the SEI is added. 
+  Int                            m_positionInSeiNalu;        // Identifies the order within the NAL unit
+  Bool                           m_modifyByEncoder;          // Don't use the SEI cfg-file, but let let the encoder setup the NALU.   
+
+  SEIScalableNesting*            m_scalNestSeiContThisSei;   // Pointer to scalable nesting SEI containing the SEI. When NULL, the SEI is not nested.
+#endif
 };
 
@@ -473,4 +532,5 @@
 
 #if NH_MV
+#if !NH_MV_SEI
 class SEISubBitstreamProperty : public SEI
 {
@@ -489,4 +549,5 @@
   std::vector<Int>  m_maxBitRate;
 };
+#endif
 #endif
 
@@ -598,5 +659,494 @@
 };
 
-#endif
-
+#if NH_MV_SEI
+#if NH_MV_SEI_TBD
+class SEILayersNotPresent : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return LAYERS_NOT_PRESENT; }
+  SEILayersNotPresent ( ) { };
+  ~SEILayersNotPresent( ) { };
+  SEI* getCopy( ) const { return new SEILayersNotPresent(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Int       m_lnpSeiActiveVpsId;
+  BoolAry1d m_layerNotPresentFlag;
+};
+#endif
+
+class SEIInterLayerConstrainedTileSets : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return INTER_LAYER_CONSTRAINED_TILE_SETS; }
+  SEIInterLayerConstrainedTileSets ( ) { };
+  ~SEIInterLayerConstrainedTileSets( ) { };
+  SEI* getCopy( ) const { return new SEIInterLayerConstrainedTileSets(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Bool      m_ilAllTilesExactSampleValueMatchFlag;
+  Bool      m_ilOneTilePerTileSetFlag;
+  Int       m_ilNumSetsInMessageMinus1;
+  Bool      m_skippedTileSetPresentFlag;
+  IntAry1d  m_ilctsId;
+  IntAry1d  m_ilNumTileRectsInSetMinus1;
+  IntAry2d  m_ilTopLeftTileIndex;
+  IntAry2d  m_ilBottomRightTileIndex;
+  IntAry1d  m_ilcIdc;
+  BoolAry1d m_ilExactSampleValueMatchFlag;
+  Int       m_allTilesIlcIdc;
+
+  Void      resizeDimI( Int sizeDimI )
+  {
+    m_ilctsId                    .resize( sizeDimI );
+    m_ilNumTileRectsInSetMinus1  .resize( sizeDimI );
+    m_ilTopLeftTileIndex         .resize( sizeDimI );
+    m_ilBottomRightTileIndex     .resize( sizeDimI );
+    m_ilcIdc                     .resize( sizeDimI );
+    m_ilExactSampleValueMatchFlag.resize( sizeDimI );
+  }
+
+  Void      resizeDimJ( Int i, Int sizeDimJ )
+  {
+    m_ilTopLeftTileIndex    [i].resize( sizeDimJ );
+    m_ilBottomRightTileIndex[i].resize( sizeDimJ );
+  }
+
+};
+
+#if NH_MV_TBD
+class SEIBspNesting : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return BSP_NESTING; }
+  SEIBspNesting ( ) { };
+  ~SEIBspNesting( ) { };
+  SEI* getCopy( ) const { return new SEIBspNesting(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Int       m_seiOlsIdx;
+  Int       m_seiPartitioningSchemeIdx;
+  Int       m_bspIdx;
+  Int       m_bspNestingZeroBit;
+  Int       m_numSeisInBspMinus1;
+};
+
+class SEIBspInitialArrivalTime : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return BSP_INITIAL_ARRIVAL_TIME; }
+  SEIBspInitialArrivalTime ( ) { };
+  ~SEIBspInitialArrivalTime( ) { };
+  SEI* getCopy( ) const { return new SEIBspInitialArrivalTime(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  IntAry1d  m_nalInitialArrivalDelay;
+  IntAry1d  m_vclInitialArrivalDelay;
+};
+#endif
+
+class SEISubBitstreamProperty : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return SUB_BITSTREAM_PROPERTY; }
+  SEISubBitstreamProperty ( ) { };
+  ~SEISubBitstreamProperty( ) { };
+  SEI* getCopy( ) const { return new SEISubBitstreamProperty(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Bool checkCfg        ( const TComSlice* slice   );
+  Void resizeArrays    ( ); 
+
+  Int       m_sbPropertyActiveVpsId;
+  Int       m_numAdditionalSubStreamsMinus1;
+  IntAry1d  m_subBitstreamMode;
+  IntAry1d  m_olsIdxToVps;
+  IntAry1d  m_highestSublayerId;
+  IntAry1d  m_avgSbPropertyBitRate;
+  IntAry1d  m_maxSbPropertyBitRate;
+};
+
+#if NH_MV_SEI_TBD
+class SEIAlphaChannelInfo : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return ALPHA_CHANNEL_INFO; }
+  SEIAlphaChannelInfo ( ) { };
+  ~SEIAlphaChannelInfo( ) { };
+  SEI* getCopy( ) const { return new SEIAlphaChannelInfo(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Bool      m_alphaChannelCancelFlag;
+  Int       m_alphaChannelUseIdc;
+  Int       m_alphaChannelBitDepthMinus8;
+  Int       m_alphaTransparentValue;
+  Int       m_alphaOpaqueValue;
+  Bool      m_alphaChannelIncrFlag;
+  Bool      m_alphaChannelClipFlag;
+  Bool      m_alphaChannelClipTypeFlag;
+};
+
+class SEIOverlayInfo : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return OVERLAY_INFO; }
+  SEIOverlayInfo ( ) { };
+  ~SEIOverlayInfo( ) { };
+  SEI* getCopy( ) const { return new SEIOverlayInfo(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Bool      m_overlayInfoCancelFlag;
+  Int       m_overlayContentAuxIdMinus128;
+  Int       m_overlayLabelAuxIdMinus128;
+  Int       m_overlayAlphaAuxIdMinus128;
+  Int       m_overlayElementLabelValueLengthMinus8;
+  Int       m_numOverlaysMinus1;
+  IntAry1d  m_overlayIdx;
+  BoolAry1d m_languageOverlayPresentFlag;
+  IntAry1d  m_overlayContentLayerId;
+  BoolAry1d m_overlayLabelPresentFlag;
+  IntAry1d  m_overlayLabelLayerId;
+  BoolAry1d m_overlayAlphaPresentFlag;
+  IntAry1d  m_overlayAlphaLayerId;
+  IntAry1d  m_numOverlayElementsMinus1;
+  IntAry2d  m_overlayElementLabelMin;
+  IntAry2d  m_overlayElementLabelMax;
+  Int       m_overlayZeroBit;
+  IntAry1d  m_overlayLanguage;
+  IntAry1d  m_overlayName;
+  IntAry2d  m_overlayElementName;
+  Bool      m_overlayInfoPersistenceFlag;
+};
+
+#endif
+
+class SEITemporalMvPredictionConstraints : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return TEMPORAL_MV_PREDICTION_CONSTRAINTS; }
+  SEITemporalMvPredictionConstraints ( ) { };
+  ~SEITemporalMvPredictionConstraints( ) { };
+  SEI* getCopy( ) const { return new SEITemporalMvPredictionConstraints(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Bool      m_prevPicsNotUsedFlag;
+  Bool      m_noIntraLayerColPicFlag;
+};
+
+#if NH_MV_SEI_TBD
+class SEIFrameFieldInfo : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return FRAME_FIELD_INFO; }
+  SEIFrameFieldInfo ( ) { };
+  ~SEIFrameFieldInfo( ) { };
+  SEI* getCopy( ) const { return new SEIFrameFieldInfo(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Int       m_ffinfoPicStruct;
+  Int       m_ffinfoSourceScanType;
+  Bool      m_ffinfoDuplicateFlag;
+};
+
+class SEIThreeDimensionalReferenceDisplaysInfo : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO; }
+  SEIThreeDimensionalReferenceDisplaysInfo ( ) { };
+  ~SEIThreeDimensionalReferenceDisplaysInfo( ) { };
+  SEI* getCopy( ) const { return new SEIThreeDimensionalReferenceDisplaysInfo(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Int       m_precRefDisplayWidth;
+  Bool      m_refViewingDistanceFlag;
+  Int       m_precRefViewingDist;
+  Int       m_numRefDisplaysMinus1;
+  IntAry1d  m_leftViewId;
+  IntAry1d  m_rightViewId;
+  IntAry1d  m_exponentRefDisplayWidth;
+  IntAry1d  m_mantissaRefDisplayWidth;
+  IntAry1d  m_exponentRefViewingDistance;
+  IntAry1d  m_mantissaRefViewingDistance;
+  BoolAry1d m_additionalShiftPresentFlag;
+  IntAry1d  m_numSampleShiftPlus512;
+  Bool      m_threeDimensionalReferenceDisplaysExtensionFlag;
+};
+
+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;
+};
+#endif
+
+class SEIMultiviewSceneInfo : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return MULTIVIEW_SCENE_INFO; }
+  SEIMultiviewSceneInfo ( ) { };
+  ~SEIMultiviewSceneInfo( ) { };
+  SEI* getCopy( ) const { return new SEIMultiviewSceneInfo(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Int       m_minDisparity;
+  Int       m_maxDisparityRange;
+};
+
+
+class SEIMultiviewAcquisitionInfo : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return MULTIVIEW_ACQUISITION_INFO; }
+  SEIMultiviewAcquisitionInfo ( ) { };
+  ~SEIMultiviewAcquisitionInfo( ) { };
+  SEI* getCopy( ) const { return new SEIMultiviewAcquisitionInfo(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Int getNumViewsMinus1( ) const
+  {
+    Int numViewsMinus1; 
+    if( m_scalNestSeiContThisSei != NULL )
+    {
+      numViewsMinus1 = m_scalNestSeiContThisSei->m_nestingNumLayersMinus1;
+    }  
+    else
+    {
+      numViewsMinus1 = 0; 
+    }
+    return numViewsMinus1; 
+  }
+  
+  Void resizeArrays( )
+  {
+    Int numViews = getNumViewsMinus1() + 1;      
+    m_signFocalLengthX       .resize( numViews );
+    m_exponentFocalLengthX   .resize( numViews );
+    m_mantissaFocalLengthX   .resize( numViews );
+    m_signFocalLengthY       .resize( numViews );
+    m_exponentFocalLengthY   .resize( numViews );
+    m_mantissaFocalLengthY   .resize( numViews );
+    m_signPrincipalPointX    .resize( numViews );
+    m_exponentPrincipalPointX.resize( numViews );
+    m_mantissaPrincipalPointX.resize( numViews );
+    m_signPrincipalPointY    .resize( numViews );
+    m_exponentPrincipalPointY.resize( numViews );
+    m_mantissaPrincipalPointY.resize( numViews );
+    m_signSkewFactor         .resize( numViews );
+    m_exponentSkewFactor     .resize( numViews );
+    m_mantissaSkewFactor     .resize( numViews );
+
+    m_signR                  .resize( numViews );    
+    m_exponentR              .resize( numViews );
+    m_mantissaR              .resize( numViews );  
+    m_signT                  .resize( numViews );
+    m_exponentT              .resize( numViews );
+    m_mantissaT              .resize( numViews );
+
+    for( Int i = 0; i  < numViews ; i++ )
+    {
+      m_signR    [i].resize( 3 );    
+      m_exponentR[i].resize( 3 );
+      m_mantissaR[i].resize( 3 );  
+      m_signT    [i].resize( 3 );
+      m_exponentT[i].resize( 3 );
+      m_mantissaT[i].resize( 3 );
+
+      for (Int j = 0; j < 3; j++)
+      {
+        m_signR    [i][j].resize( 3 );    
+        m_exponentR[i][j].resize( 3 );
+        m_mantissaR[i][j].resize( 3 );  
+      }
+    }
+  }
+  
+  UInt getMantissaFocalLengthXLen   ( Int i ) const ;
+  UInt getMantissaFocalLengthYLen   ( Int i ) const ;
+  UInt getMantissaPrincipalPointXLen( Int i ) const ;
+  UInt getMantissaPrincipalPointYLen( Int i ) const ;
+  UInt getMantissaSkewFactorLen     ( Int i ) const ;
+  UInt getMantissaRLen              ( Int i, Int j, Int k ) const ;
+  UInt getMantissaTLen              ( Int i, Int j )        const ;
+
+  Bool      m_intrinsicParamFlag;
+  Bool      m_extrinsicParamFlag;
+  Bool      m_intrinsicParamsEqualFlag;
+  Int       m_precFocalLength;
+  Int       m_precPrincipalPoint;
+  Int       m_precSkewFactor;
+  BoolAry1d m_signFocalLengthX;
+  IntAry1d  m_exponentFocalLengthX;
+  IntAry1d  m_mantissaFocalLengthX;
+  BoolAry1d m_signFocalLengthY;
+  IntAry1d  m_exponentFocalLengthY;
+  IntAry1d  m_mantissaFocalLengthY;
+  BoolAry1d m_signPrincipalPointX;
+  IntAry1d  m_exponentPrincipalPointX;
+  IntAry1d  m_mantissaPrincipalPointX;
+  BoolAry1d m_signPrincipalPointY;
+  IntAry1d  m_exponentPrincipalPointY;
+  IntAry1d  m_mantissaPrincipalPointY;
+  BoolAry1d m_signSkewFactor;
+  IntAry1d  m_exponentSkewFactor;
+  IntAry1d  m_mantissaSkewFactor;
+  Int       m_precRotationParam;
+  Int       m_precTranslationParam;
+  BoolAry3d m_signR;
+  IntAry3d  m_exponentR;
+  IntAry3d  m_mantissaR;
+  BoolAry2d m_signT;
+  IntAry2d  m_exponentT;
+  IntAry2d  m_mantissaT;
+private: 
+  UInt xGetSyntaxElementLen( Int expo, Int prec, Int val ) const; 
+};
+
+
+
+class SEIMultiviewViewPosition : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return MULTIVIEW_VIEW_POSITION; }
+  SEIMultiviewViewPosition ( ) { };
+  ~SEIMultiviewViewPosition( ) { };
+  SEI* getCopy( ) const { return new SEIMultiviewViewPosition(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+  
+  Int       m_numViewsMinus1;
+  IntAry1d  m_viewPosition;
+};
+
+#if NH_MV_SEI_TBD
+class SEIAlternativeDepthInfo : public SEI
+{
+public:
+  PayloadType payloadType( ) const { return ALTERNATIVE_DEPTH_INFO; }
+  SEIAlternativeDepthInfo ( ) { };
+  ~SEIAlternativeDepthInfo( ) { };
+  SEI* getCopy( ) const { return new SEIAlternativeDepthInfo(*this); }; 
+
+  Void setupFromCfgFile( const Char*      cfgFile );
+  Void setupFromSlice  ( const TComSlice* slice   );
+  Bool checkCfg        ( const TComSlice* slice   );
+
+  Bool      m_alternativeDepthInfoCancelFlag;
+  Int       m_depthType;
+  Int       m_numConstituentViewsGvdMinus1;
+  Bool      m_depthPresentGvdFlag;
+  Bool      m_zGvdFlag;
+  Bool      m_intrinsicParamGvdFlag;
+  Bool      m_rotationGvdFlag;
+  Bool      m_translationGvdFlag;
+  BoolAry1d m_signGvdZNearFlag;
+  IntAry1d  m_expGvdZNear;
+  IntAry1d  m_manLenGvdZNearMinus1;
+  IntAry1d  m_manGvdZNear;
+  BoolAry1d m_signGvdZFarFlag;
+  IntAry1d  m_expGvdZFar;
+  IntAry1d  m_manLenGvdZFarMinus1;
+  IntAry1d  m_manGvdZFar;
+  Int       m_precGvdFocalLength;
+  Int       m_precGvdPrincipalPoint;
+  Int       m_precGvdRotationParam;
+  Int       m_precGvdTranslationParam;
+  BoolAry1d m_signGvdFocalLengthX;
+  IntAry1d  m_expGvdFocalLengthX;
+  IntAry1d  m_manGvdFocalLengthX;
+  BoolAry1d m_signGvdFocalLengthY;
+  IntAry1d  m_expGvdFocalLengthY;
+  IntAry1d  m_manGvdFocalLengthY;
+  BoolAry1d m_signGvdPrincipalPointX;
+  IntAry1d  m_expGvdPrincipalPointX;
+  IntAry1d  m_manGvdPrincipalPointX;
+  BoolAry1d m_signGvdPrincipalPointY;
+  IntAry1d  m_expGvdPrincipalPointY;
+  IntAry1d  m_manGvdPrincipalPointY;
+  BoolAry3d m_signGvdR;
+  IntAry3d  m_expGvdR;
+  IntAry3d  m_manGvdR;
+  BoolAry1d m_signGvdTX;
+  IntAry1d  m_expGvdTX;
+  IntAry1d  m_manGvdTX;
+  Int       m_minOffsetXInt;
+  Int       m_minOffsetXFrac;
+  Int       m_maxOffsetXInt;
+  Int       m_maxOffsetXFrac;
+  Bool      m_offsetYPresentFlag;
+  Int       m_minOffsetYInt;
+  Int       m_minOffsetYFrac;
+  Int       m_maxOffsetYInt;
+  Int       m_maxOffsetYFrac;
+  Bool      m_warpMapSizePresentFlag;
+  Int       m_warpMapWidthMinus2;
+  Int       m_warpMapHeightMinus2;
+};
+#endif
+
+#endif
+
+#endif
 //! \}
Index: branches/HTM-15.1-dev0/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibCommon/TypeDef.h	(revision 1328)
@@ -61,7 +61,9 @@
 #define NH_3D          ( HEVC_EXT == 2)
 /////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////   FIXES           ///////////////////////////////////  
+///////////////////////////////////   FIXES AND INTEGRATIONS     ////////////////////////
 /////////////////////////////////////////////////////////////////////////////////////////
 #if NH_MV
+#define NH_MV_SEI_TBD                             0
+#define NH_MV_SEI                                 1
 #define NH_MV_FIX_TICKET_106                      1 // Identical motion check. 
 #define NH_MV_FIX_NO_REF_PICS_CHECK               1 // !!SPEC!! 
Index: branches/HTM-15.1-dev0/source/Lib/TLibDecoder/SEIread.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibDecoder/SEIread.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibDecoder/SEIread.cpp	(revision 1328)
@@ -99,5 +99,9 @@
 }
 
+#if NH_MV_SEI
+inline Void SEIReader::output_sei_message_header(SEI &sei, std::ostream *pDecodedMessageOutputStream, UInt payloadSize)
+#else
 static inline Void output_sei_message_header(SEI &sei, std::ostream *pDecodedMessageOutputStream, UInt payloadSize)
+#endif
 {
   if (pDecodedMessageOutputStream)
@@ -105,4 +109,7 @@
     std::string seiMessageHdr(SEI::getSEIMessageString(sei.payloadType())); seiMessageHdr+=" SEI message";
     (*pDecodedMessageOutputStream) << std::setfill('-') << std::setw(seiMessageHdr.size()) << "-" << std::setfill(' ') << "\n" << seiMessageHdr << " (" << payloadSize << " bytes)"<< "\n";
+#if NH_MV_SEI
+    (*pDecodedMessageOutputStream) << std::setfill(' ') << "LayerId: " << m_layerId << std::setw(2) << " Picture: " << m_decOrder << std::setw( 5 ) << std::endl; 
+#endif
   }
 }
@@ -277,9 +284,82 @@
       xParseSEIMasteringDisplayColourVolume((SEIMasteringDisplayColourVolume&) *sei, payloadSize, pDecodedMessageOutputStream);
       break;
-#if NH_MV
+#if !NH_MV_SEI
     case SEI::SUB_BITSTREAM_PROPERTY:
       sei = new SEISubBitstreamProperty;
       xParseSEISubBitstreamProperty((SEISubBitstreamProperty&) *sei, payloadSize, pDecodedMessageOutputStream );
       break;
+#else
+#if NH_MV_TBD
+    case SEI::LAYERS_NOT_PRESENT:
+      sei = new SEILayersNotPresent;
+      xParseSEILayersNotPresent((SEILayersNotPresent&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#endif
+    case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:
+      sei = new SEIInterLayerConstrainedTileSets;
+      xParseSEIInterLayerConstrainedTileSets((SEIInterLayerConstrainedTileSets&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#if NH_MV_TBD
+    case SEI::BSP_NESTING:
+      sei = new SEIBspNesting;
+      xParseSEIBspNesting((SEIBspNesting&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+    case SEI::BSP_INITIAL_ARRIVAL_TIME:
+      sei = new SEIBspInitialArrivalTime;
+      xParseSEIBspInitialArrivalTime((SEIBspInitialArrivalTime&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#endif
+    case SEI::SUB_BITSTREAM_PROPERTY:
+      sei = new SEISubBitstreamProperty;
+      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;
+    case SEI::OVERLAY_INFO:
+      sei = new SEIOverlayInfo;
+      xParseSEIOverlayInfo((SEIOverlayInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#endif
+    case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS:
+      sei = new SEITemporalMvPredictionConstraints;
+      xParseSEITemporalMvPredictionConstraints((SEITemporalMvPredictionConstraints&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#if NH_MV_SEI_TBD
+    case SEI::FRAME_FIELD_INFO:
+      sei = new SEIFrameFieldInfo;
+      xParseSEIFrameFieldInfo((SEIFrameFieldInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+    case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO:
+      sei = new SEIThreeDimensionalReferenceDisplaysInfo;
+      xParseSEIThreeDimensionalReferenceDisplaysInfo((SEIThreeDimensionalReferenceDisplaysInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+    case SEI::DEPTH_REPRESENTATION_INFO:
+      sei = new SEIDepthRepresentationInfo;
+      xParseSEIDepthRepresentationInfo((SEIDepthRepresentationInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#endif
+    case SEI::MULTIVIEW_SCENE_INFO:
+      sei = new SEIMultiviewSceneInfo;
+      xParseSEIMultiviewSceneInfo((SEIMultiviewSceneInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+
+    case SEI::MULTIVIEW_ACQUISITION_INFO:
+      sei = new SEIMultiviewAcquisitionInfo;
+      xParseSEIMultiviewAcquisitionInfo((SEIMultiviewAcquisitionInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+
+    case SEI::MULTIVIEW_VIEW_POSITION:
+      sei = new SEIMultiviewViewPosition;
+      xParseSEIMultiviewViewPosition((SEIMultiviewViewPosition&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#if NH_MV_TBD
+    case SEI::ALTERNATIVE_DEPTH_INFO:
+      sei = new SEIAlternativeDepthInfo;
+      xParseSEIAlternativeDepthInfo((SEIAlternativeDepthInfo&) *sei, payloadSize, pDecodedMessageOutputStream );
+      break;
+#endif
 #endif
     default:
@@ -857,4 +937,5 @@
 
 #if NH_MV
+#if !NH_MV_SEI
 Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty &sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream )
 {
@@ -883,4 +964,5 @@
   sei.m_maxBitRate.resize( sei.m_numAdditionalSubStreams );
 }
+#endif
 #endif
 
@@ -1101,3 +1183,495 @@
 }
 
+#if NH_MV_SEI_TBD
+Void SEIReader::xParseSEILayersNotPresent(SEILayersNotPresent& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_code( pDecodedMessageOutputStream, 4, code, "lnp_sei_active_vps_id" ); sei.m_lnpSeiActiveVpsId = code;
+  for( Int i = 0; i  <=  MaxLayersMinus1; i++ )
+  {
+    sei_read_flag( pDecodedMessageOutputStream, code, "layer_not_present_flag" ); sei.m_layerNotPresentFlag[i] = (code == 1);
+  }
+};
+#endif
+
+Void SEIReader::xParseSEIInterLayerConstrainedTileSets(SEIInterLayerConstrainedTileSets& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_flag( pDecodedMessageOutputStream, code, "il_all_tiles_exact_sample_value_match_flag" ); sei.m_ilAllTilesExactSampleValueMatchFlag = (code == 1);
+  sei_read_flag( pDecodedMessageOutputStream, code, "il_one_tile_per_tile_set_flag"              ); sei.m_ilOneTilePerTileSetFlag             = (code == 1);
+  if( !sei.m_ilOneTilePerTileSetFlag )
+  {
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "il_num_sets_in_message_minus1" ); sei.m_ilNumSetsInMessageMinus1 = code;
+    if( sei.m_ilNumSetsInMessageMinus1 )
+    {
+      sei_read_flag( pDecodedMessageOutputStream, code, "skipped_tile_set_present_flag" ); sei.m_skippedTileSetPresentFlag = (code == 1);
+    }
+    Int numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - sei.m_skippedTileSetPresentFlag + 1;
+    
+    sei.resizeDimI( numSignificantSets );
+    for( Int i = 0; i < numSignificantSets; i++ )
+    {
+      sei_read_uvlc( pDecodedMessageOutputStream, code, "ilcts_id"                        ); sei.m_ilctsId                  [i] = code;
+      sei_read_uvlc( pDecodedMessageOutputStream, code, "il_num_tile_rects_in_set_minus1" ); sei.m_ilNumTileRectsInSetMinus1[i] = code;
+      
+      sei.resizeDimJ( i, sei.m_ilNumTileRectsInSetMinus1[ i ] + 1 );
+      for( Int j = 0; j  <=  sei.m_ilNumTileRectsInSetMinus1[ i ]; j++ )
+      {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "il_top_left_tile_index"     ); sei.m_ilTopLeftTileIndex    [i][j] = code;
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "il_bottom_right_tile_index" ); sei.m_ilBottomRightTileIndex[i][j] = code;
+      }
+      sei_read_code( pDecodedMessageOutputStream, 2, code, "ilc_idc" ); sei.m_ilcIdc[i] = code;
+      if ( !sei.m_ilAllTilesExactSampleValueMatchFlag )
+      {
+        sei_read_flag( pDecodedMessageOutputStream, code, "il_exact_sample_value_match_flag" ); sei.m_ilExactSampleValueMatchFlag[i] = (code == 1);
+      }
+    }
+  }
+  else
+  {
+    sei_read_code( pDecodedMessageOutputStream, 2, code, "all_tiles_ilc_idc" ); sei.m_allTilesIlcIdc = code;
+  }
+};
+
+#if NH_MV_SEI_TBD
+Void SEIReader::xParseSEIBspNesting(SEIBspNesting& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "sei_ols_idx" ); sei.m_seiOlsIdx = code;
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "sei_partitioning_scheme_idx" ); sei.m_seiPartitioningSchemeIdx = code;
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "bsp_idx" ); sei.m_bspIdx = code;
+  while( !ByteaLigned(() ) );
+  {
+    sei_read_code( pDecodedMessageOutputStream, *equalto0*/u1, code, "bsp_nesting_zero_bit" ); sei.m_bspNestingZeroBit = code;
+  }
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_seis_in_bsp_minus1" ); sei.m_numSeisInBspMinus1 = code;
+  for( Int i = 0; i  <=  NumSeisInBspMinus1( ); i++ )
+  {
+    SeiMessage(() );
+  }
+};
+
+Void SEIReader::xParseSEIBspInitialArrivalTime(SEIBspInitialArrivalTime& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  psIdx = SeiPartitioningSchemeIdx();
+  if( nalInitialArrivalDelayPresent )
+  {
+    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
+    {
+      sei_read_code( pDecodedMessageOutputStream, getNalInitialArrivalDelayLen ), code, "nal_initial_arrival_delay" ); sei.m_nalInitialArrivalDelay[i] = code;
+    }
+  }
+  if( vclInitialArrivalDelayPresent )
+  {
+    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
+    {
+      sei_read_code( pDecodedMessageOutputStream, getVclInitialArrivalDelayLen ), code, "vcl_initial_arrival_delay" ); sei.m_vclInitialArrivalDelay[i] = code;
+    }
+  }
+};
+#endif
+
+Void SEIReader::xParseSEISubBitstreamProperty(SEISubBitstreamProperty& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_code( pDecodedMessageOutputStream, 4, code, "sb_property_active_vps_id" ); sei.m_sbPropertyActiveVpsId = code;
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_additional_sub_streams_minus1" ); sei.m_numAdditionalSubStreamsMinus1 = code;
+  sei.resizeArrays( ); 
+  for( Int i = 0; i  <=  sei.m_numAdditionalSubStreamsMinus1; i++ )
+  {
+    sei_read_code( pDecodedMessageOutputStream, 2, code, "sub_bitstream_mode" ); sei.m_subBitstreamMode[i] = code;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "ols_idx_to_vps" ); sei.m_olsIdxToVps[i] = code;
+    sei_read_code( pDecodedMessageOutputStream, 3, code, "highest_sublayer_id" ); sei.m_highestSublayerId[i] = code;
+    sei_read_code( pDecodedMessageOutputStream, 16, code, "avg_sb_property_bit_rate" ); sei.m_avgSbPropertyBitRate[i] = code;
+    sei_read_code( pDecodedMessageOutputStream, 16, code, "max_sb_property_bit_rate" ); sei.m_maxSbPropertyBitRate[i] = code;
+  }
+};
+
+#if NH_MV_SEI_TBD
+Void SEIReader::xParseSEIAlphaChannelInfo(SEIAlphaChannelInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_flag( pDecodedMessageOutputStream, code, "alpha_channel_cancel_flag" ); sei.m_alphaChannelCancelFlag = (code == 1);
+  if( !sei.m_alphaChannelCancelFlag )
+  {
+    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_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);
+    if( sei.m_alphaChannelClipFlag )
+    {
+      sei_read_flag( pDecodedMessageOutputStream, code, "alpha_channel_clip_type_flag" ); sei.m_alphaChannelClipTypeFlag = (code == 1);
+    }
+  }
+};
+
+Void SEIReader::xParseSEIOverlayInfo(SEIOverlayInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_flag( pDecodedMessageOutputStream, code, "overlay_info_cancel_flag" ); sei.m_overlayInfoCancelFlag = (code == 1);
+  if( !sei.m_overlayInfoCancelFlag )
+  {
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "overlay_content_aux_id_minus128" ); sei.m_overlayContentAuxIdMinus128 = code;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "overlay_label_aux_id_minus128" ); sei.m_overlayLabelAuxIdMinus128 = code;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "overlay_alpha_aux_id_minus128" ); sei.m_overlayAlphaAuxIdMinus128 = code;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "overlay_element_label_value_length_minus8" ); sei.m_overlayElementLabelValueLengthMinus8 = code;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "num_overlays_minus1" ); sei.m_numOverlaysMinus1 = code;
+    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
+    {
+      sei_read_uvlc( pDecodedMessageOutputStream, code, "overlay_idx" ); sei.m_overlayIdx[i] = code;
+      sei_read_flag( pDecodedMessageOutputStream, code, "language_overlay_present_flag" ); sei.m_languageOverlayPresentFlag[i] = (code == 1);
+      sei_read_code( pDecodedMessageOutputStream, 6, code, "overlay_content_layer_id" ); sei.m_overlayContentLayerId[i] = code;
+      sei_read_flag( pDecodedMessageOutputStream, code, "overlay_label_present_flag" ); sei.m_overlayLabelPresentFlag[i] = (code == 1);
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        sei_read_code( pDecodedMessageOutputStream, 6, code, "overlay_label_layer_id" ); sei.m_overlayLabelLayerId[i] = code;
+      }
+      sei_read_flag( pDecodedMessageOutputStream, code, "overlay_alpha_present_flag" ); sei.m_overlayAlphaPresentFlag[i] = (code == 1);
+      if( sei.m_overlayAlphaPresentFlag( i ) )
+      {
+        sei_read_code( pDecodedMessageOutputStream, 6, code, "overlay_alpha_layer_id" ); sei.m_overlayAlphaLayerId[i] = code;
+      }
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "num_overlay_elements_minus1" ); sei.m_numOverlayElementsMinus1[i] = code;
+        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
+        {
+          sei_read_code( pDecodedMessageOutputStream, getOverlayElementLabelMinLen ), code, "overlay_element_label_min" ); sei.m_overlayElementLabelMin[i][j] = code;
+          sei_read_code( pDecodedMessageOutputStream, getOverlayElementLabelMaxLen ), code, "overlay_element_label_max" ); sei.m_overlayElementLabelMax[i][j] = code;
+        }
+      }
+    }
+    while( !ByteaLigned(() ) );
+    {
+      sei_read_code( pDecodedMessageOutputStream, *equalto0*/f1, code, "overlay_zero_bit" ); sei.m_overlayZeroBit = code;
+    }
+    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
+    {
+      if( sei.m_languageOverlayPresentFlag( i ) )
+      {
+        sei_read_code( pDecodedMessageOutputStream, tv, code, "overlay_language" ); sei.m_overlayLanguage[i] = code;
+      }
+      sei_read_code( pDecodedMessageOutputStream, tv, code, "overlay_name" ); sei.m_overlayName[i] = code;
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
+        {
+          sei_read_code( pDecodedMessageOutputStream, tv, code, "overlay_element_name" ); sei.m_overlayElementName[i][j] = code;
+        }
+      }
+    }
+    sei_read_flag( pDecodedMessageOutputStream, code, "overlay_info_persistence_flag" ); sei.m_overlayInfoPersistenceFlag = (code == 1);
+  }
+};
+#endif
+
+Void SEIReader::xParseSEITemporalMvPredictionConstraints(SEITemporalMvPredictionConstraints& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_flag( pDecodedMessageOutputStream, code, "prev_pics_not_used_flag"     ); sei.m_prevPicsNotUsedFlag    = (code == 1);
+  sei_read_flag( pDecodedMessageOutputStream, code, "no_intra_layer_col_pic_flag" ); sei.m_noIntraLayerColPicFlag = (code == 1);
+};
+
+#if NH_MV_SEI_TBD
+Void SEIReader::xParseSEIFrameFieldInfo(SEIFrameFieldInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_code( pDecodedMessageOutputStream, 4, code, "ffinfo_pic_struct" ); sei.m_ffinfoPicStruct = code;
+  sei_read_code( pDecodedMessageOutputStream, 2, code, "ffinfo_source_scan_type" ); sei.m_ffinfoSourceScanType = code;
+  sei_read_flag( pDecodedMessageOutputStream, code, "ffinfo_duplicate_flag" ); sei.m_ffinfoDuplicateFlag = (code == 1);
+};
+
+Void SEIReader::xParseSEIThreeDimensionalReferenceDisplaysInfo(SEIThreeDimensionalReferenceDisplaysInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_ref_display_width" ); sei.m_precRefDisplayWidth = code;
+  sei_read_flag( pDecodedMessageOutputStream, code, "ref_viewing_distance_flag" ); sei.m_refViewingDistanceFlag = (code == 1);
+  if( sei.m_refViewingDistanceFlag )
+  {
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_ref_viewing_dist" ); sei.m_precRefViewingDist = code;
+  }
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_ref_displays_minus1" ); sei.m_numRefDisplaysMinus1 = code;
+  for( Int i = 0; i  <=  NumRefDisplaysMinus1( ); i++ )
+  {
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "left_view_id" ); sei.m_leftViewId[i] = code;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "right_view_id" ); sei.m_rightViewId[i] = code;
+    sei_read_code( pDecodedMessageOutputStream, 6, code, "exponent_ref_display_width" ); sei.m_exponentRefDisplayWidth[i] = code;
+    sei_read_code( pDecodedMessageOutputStream, getMantissaRefDisplayWidthLen ), code, "mantissa_ref_display_width" ); sei.m_mantissaRefDisplayWidth[i] = code;
+    if( sei.m_refViewingDistanceFlag )
+    {
+      sei_read_code( pDecodedMessageOutputStream, 6, code, "exponent_ref_viewing_distance" ); sei.m_exponentRefViewingDistance[i] = code;
+      sei_read_code( pDecodedMessageOutputStream, getMantissaRefViewingDistanceLen ), code, "mantissa_ref_viewing_distance" ); sei.m_mantissaRefViewingDistance[i] = code;
+    }
+    sei_read_flag( pDecodedMessageOutputStream, code, "additional_shift_present_flag" ); sei.m_additionalShiftPresentFlag[i] = (code == 1);
+    if( sei.m_additionalShiftPresentFlag( i ) )
+    {
+      sei_read_code( pDecodedMessageOutputStream, 10, code, "num_sample_shift_plus512" ); sei.m_numSampleShiftPlus512[i] = code;
+    }
+  }
+  sei_read_flag( pDecodedMessageOutputStream, code, "three_dimensional_reference_displays_extension_flag" ); sei.m_threeDimensionalReferenceDisplaysExtensionFlag = (code == 1);
+};
+
+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;
+};
+#endif
+Void SEIReader::xParseSEIMultiviewSceneInfo(SEIMultiviewSceneInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt  code;
+  Int  sCode; 
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_svlc( pDecodedMessageOutputStream, sCode, "min_disparity" )      ; sei.m_minDisparity      = sCode;
+  sei_read_uvlc( pDecodedMessageOutputStream, code , "max_disparity_range" ); sei.m_maxDisparityRange = code;
+};
+
+Void SEIReader::xParseSEIMultiviewAcquisitionInfo(SEIMultiviewAcquisitionInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei.resizeArrays( );
+  sei_read_flag( pDecodedMessageOutputStream, code, "intrinsic_param_flag" ); sei.m_intrinsicParamFlag = (code == 1);
+  sei_read_flag( pDecodedMessageOutputStream, code, "extrinsic_param_flag" ); sei.m_extrinsicParamFlag = (code == 1);
+  if( sei.m_intrinsicParamFlag )
+  {
+    sei_read_flag( pDecodedMessageOutputStream, code, "intrinsic_params_equal_flag" ); sei.m_intrinsicParamsEqualFlag = (code == 1);
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_focal_length"           ); sei.m_precFocalLength          =  code      ;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_principal_point"        ); sei.m_precPrincipalPoint       =  code      ;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_skew_factor"            ); sei.m_precSkewFactor           =  code      ;
+
+    for( Int i = 0; i  <=  ( sei.m_intrinsicParamsEqualFlag ? 0 : sei.getNumViewsMinus1() ); i++ )
+    {      
+      sei_read_flag( pDecodedMessageOutputStream,                                         code, "sign_focal_length_x"        ); sei.m_signFocalLengthX       [i] = (code == 1);
+      sei_read_code( pDecodedMessageOutputStream, 6,                                      code, "exponent_focal_length_x"    ); sei.m_exponentFocalLengthX   [i] =  code      ;
+      sei_read_code( pDecodedMessageOutputStream, sei.getMantissaFocalLengthXLen   ( i ), code, "mantissa_focal_length_x"    ); sei.m_mantissaFocalLengthX   [i] =  code      ;
+      sei_read_flag( pDecodedMessageOutputStream,                                         code, "sign_focal_length_y"        ); sei.m_signFocalLengthY       [i] = (code == 1);
+      sei_read_code( pDecodedMessageOutputStream, 6,                                      code, "exponent_focal_length_y"    ); sei.m_exponentFocalLengthY   [i] =  code      ;
+      sei_read_code( pDecodedMessageOutputStream, sei.getMantissaFocalLengthYLen   ( i ), code, "mantissa_focal_length_y"    ); sei.m_mantissaFocalLengthY   [i] =  code      ;
+      sei_read_flag( pDecodedMessageOutputStream,                                         code, "sign_principal_point_x"     ); sei.m_signPrincipalPointX    [i] = (code == 1);
+      sei_read_code( pDecodedMessageOutputStream, 6,                                      code, "exponent_principal_point_x" ); sei.m_exponentPrincipalPointX[i] =  code      ;
+      sei_read_code( pDecodedMessageOutputStream, sei.getMantissaPrincipalPointXLen( i ), code, "mantissa_principal_point_x" ); sei.m_mantissaPrincipalPointX[i] =  code      ;
+      sei_read_flag( pDecodedMessageOutputStream,                                         code, "sign_principal_point_y"     ); sei.m_signPrincipalPointY    [i] = (code == 1);
+      sei_read_code( pDecodedMessageOutputStream, 6,                                      code, "exponent_principal_point_y" ); sei.m_exponentPrincipalPointY[i] =  code      ;
+      sei_read_code( pDecodedMessageOutputStream, sei.getMantissaPrincipalPointYLen( i ), code, "mantissa_principal_point_y" ); sei.m_mantissaPrincipalPointY[i] =  code      ;
+      sei_read_flag( pDecodedMessageOutputStream,                                         code, "sign_skew_factor"           ); sei.m_signSkewFactor         [i] = (code == 1);
+      sei_read_code( pDecodedMessageOutputStream, 6,                                      code, "exponent_skew_factor"       ); sei.m_exponentSkewFactor     [i] =  code      ;
+      sei_read_code( pDecodedMessageOutputStream, sei.getMantissaSkewFactorLen     ( i ), code, "mantissa_skew_factor"       ); sei.m_mantissaSkewFactor     [i] =  code      ;
+    }
+  }
+  if( sei.m_extrinsicParamFlag )
+  {
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_rotation_param"    ); sei.m_precRotationParam    = code;
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_translation_param" ); sei.m_precTranslationParam = code;
+
+    for( Int i = 0; i  <=  sei.getNumViewsMinus1(); i++ )
+    {
+      for( Int j = 0; j  <=  2; j++ )  /* row */
+      {
+        for( Int k = 0; k  <=  2; k++ )  /* column */
+        {
+          sei_read_flag( pDecodedMessageOutputStream,                                 code, "sign_r"     ); sei.m_signR    [i][j][k] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 6,                              code, "exponent_r" ); sei.m_exponentR[i][j][k] =  code      ;
+          sei_read_code( pDecodedMessageOutputStream, sei.getMantissaRLen( i, j, k ), code, "mantissa_r" ); sei.m_mantissaR[i][j][k] =  code      ;
+        }
+        sei_read_flag( pDecodedMessageOutputStream,                              code, "sign_t"     ); sei.m_signT    [i][j] = (code == 1);
+        sei_read_code( pDecodedMessageOutputStream, 6,                           code, "exponent_t" ); sei.m_exponentT[i][j] =  code      ;
+        sei_read_code( pDecodedMessageOutputStream, sei.getMantissaTLen( i, j ), code, "mantissa_t" ); sei.m_mantissaT[i][j] =  code      ;
+      }
+    }
+  }
+};
+
+
+
+Void SEIReader::xParseSEIMultiviewViewPosition(SEIMultiviewViewPosition& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_uvlc( pDecodedMessageOutputStream, code, "num_views_minus1" ); sei.m_numViewsMinus1 = code;
+  sei.m_viewPosition.resize( sei.m_numViewsMinus1 + 1 ); 
+  for( Int i = 0; i  <=  sei.m_numViewsMinus1; i++ )
+  {
+    sei_read_uvlc( pDecodedMessageOutputStream, code, "view_position" ); sei.m_viewPosition[i] = code;
+  }
+};
+
+#if NH_MV_SEI_TBD
+Void SEIReader::xParseSEIAlternativeDepthInfo(SEIAlternativeDepthInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream)
+{
+  UInt code;
+  output_sei_message_header(sei, pDecodedMessageOutputStream, payloadSize);
+
+  sei_read_flag( pDecodedMessageOutputStream, code, "alternative_depth_info_cancel_flag" ); sei.m_alternativeDepthInfoCancelFlag = (code == 1);
+  if( sei.m_alternativeDepthInfoCancelFlag  ==  0 )
+  {
+    sei_read_code( pDecodedMessageOutputStream, 2, code, "depth_type" ); sei.m_depthType = code;
+    if( sei.m_depthType  ==  0 )
+    {
+      sei_read_uvlc( pDecodedMessageOutputStream, code, "num_constituent_views_gvd_minus1" ); sei.m_numConstituentViewsGvdMinus1 = code;
+      sei_read_flag( pDecodedMessageOutputStream, code, "depth_present_gvd_flag" ); sei.m_depthPresentGvdFlag = (code == 1);
+      sei_read_flag( pDecodedMessageOutputStream, code, "z_gvd_flag" ); sei.m_zGvdFlag = (code == 1);
+      sei_read_flag( pDecodedMessageOutputStream, code, "intrinsic_param_gvd_flag" ); sei.m_intrinsicParamGvdFlag = (code == 1);
+      sei_read_flag( pDecodedMessageOutputStream, code, "rotation_gvd_flag" ); sei.m_rotationGvdFlag = (code == 1);
+      sei_read_flag( pDecodedMessageOutputStream, code, "translation_gvd_flag" ); sei.m_translationGvdFlag = (code == 1);
+      if( sei.m_zGvdFlag )
+      {
+        for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
+        {
+          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_z_near_flag" ); sei.m_signGvdZNearFlag[i] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 7, code, "exp_gvd_z_near" ); sei.m_expGvdZNear[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, 5, code, "man_len_gvd_z_near_minus1" ); sei.m_manLenGvdZNearMinus1[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, getManGvdZNearLen ), code, "man_gvd_z_near" ); sei.m_manGvdZNear[i] = code;
+          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_z_far_flag" ); sei.m_signGvdZFarFlag[i] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 7, code, "exp_gvd_z_far" ); sei.m_expGvdZFar[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, 5, code, "man_len_gvd_z_far_minus1" ); sei.m_manLenGvdZFarMinus1[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, getManGvdZFarLen ), code, "man_gvd_z_far" ); sei.m_manGvdZFar[i] = code;
+        }
+      }
+      if( sei.m_intrinsicParamGvdFlag )
+      {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_gvd_focal_length" ); sei.m_precGvdFocalLength = code;
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_gvd_principal_point" ); sei.m_precGvdPrincipalPoint = code;
+      }
+      if( sei.m_rotationGvdFlag )
+      {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_gvd_rotation_param" ); sei.m_precGvdRotationParam = code;
+      }
+      if( sei.m_translationGvdFlag )
+      {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "prec_gvd_translation_param" ); sei.m_precGvdTranslationParam = code;
+      }
+      for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
+      {
+        if( sei.m_intrinsicParamGvdFlag )
+        {
+          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_x" ); sei.m_signGvdFocalLengthX[i] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_x" ); sei.m_expGvdFocalLengthX[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, getManGvdFocalLengthXLen ), code, "man_gvd_focal_length_x" ); sei.m_manGvdFocalLengthX[i] = code;
+          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_focal_length_y" ); sei.m_signGvdFocalLengthY[i] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_focal_length_y" ); sei.m_expGvdFocalLengthY[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, getManGvdFocalLengthYLen ), code, "man_gvd_focal_length_y" ); sei.m_manGvdFocalLengthY[i] = code;
+          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_x" ); sei.m_signGvdPrincipalPointX[i] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_x" ); sei.m_expGvdPrincipalPointX[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, getManGvdPrincipalPointXLen ), code, "man_gvd_principal_point_x" ); sei.m_manGvdPrincipalPointX[i] = code;
+          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_principal_point_y" ); sei.m_signGvdPrincipalPointY[i] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_principal_point_y" ); sei.m_expGvdPrincipalPointY[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, getManGvdPrincipalPointYLen ), code, "man_gvd_principal_point_y" ); sei.m_manGvdPrincipalPointY[i] = code;
+        }
+        if( sei.m_rotationGvdFlag )
+        {
+          for( Int j = 10; j  <=  3; j++ ) /* row */
+          {
+            for( Int k = 10; k  <=  3; k++ )  /* column */
+            {
+              sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_r" ); sei.m_signGvdR[i][j][k] = (code == 1);
+              sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_r" ); sei.m_expGvdR[i][j][k] = code;
+              sei_read_code( pDecodedMessageOutputStream, getManGvdRLen ), code, "man_gvd_r" ); sei.m_manGvdR[i][j][k] = code;
+            }
+          }
+        }
+        if( sei.m_translationGvdFlag )
+        {
+          sei_read_flag( pDecodedMessageOutputStream, code, "sign_gvd_t_x" ); sei.m_signGvdTX[i] = (code == 1);
+          sei_read_code( pDecodedMessageOutputStream, 6, code, "exp_gvd_t_x" ); sei.m_expGvdTX[i] = code;
+          sei_read_code( pDecodedMessageOutputStream, getManGvdTXLen ), code, "man_gvd_t_x" ); sei.m_manGvdTX[i] = code;
+        }
+      }
+    }
+    if( sei.m_depthType  ==  1 )
+    {
+      sei_read_svlc( pDecodedMessageOutputStream, code, "min_offset_x_int" ); sei.m_minOffsetXInt = code;
+      sei_read_code( pDecodedMessageOutputStream, 8, code, "min_offset_x_frac" ); sei.m_minOffsetXFrac = code;
+      sei_read_svlc( pDecodedMessageOutputStream, code, "max_offset_x_int" ); sei.m_maxOffsetXInt = code;
+      sei_read_code( pDecodedMessageOutputStream, 8, code, "max_offset_x_frac" ); sei.m_maxOffsetXFrac = code;
+      sei_read_flag( pDecodedMessageOutputStream, code, "offset_y_present_flag" ); sei.m_offsetYPresentFlag = (code == 1);
+      if( sei.m_offsetYPresentFlag )
+      {
+        sei_read_svlc( pDecodedMessageOutputStream, code, "min_offset_y_int" ); sei.m_minOffsetYInt = code;
+        sei_read_code( pDecodedMessageOutputStream, 8, code, "min_offset_y_frac" ); sei.m_minOffsetYFrac = code;
+        sei_read_svlc( pDecodedMessageOutputStream, code, "max_offset_y_int" ); sei.m_maxOffsetYInt = code;
+        sei_read_code( pDecodedMessageOutputStream, 8, code, "max_offset_y_frac" ); sei.m_maxOffsetYFrac = code;
+      }
+      sei_read_flag( pDecodedMessageOutputStream, code, "warp_map_size_present_flag" ); sei.m_warpMapSizePresentFlag = (code == 1);
+      if( sei.m_warpMapSizePresentFlag )
+      {
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "warp_map_width_minus2" ); sei.m_warpMapWidthMinus2 = code;
+        sei_read_uvlc( pDecodedMessageOutputStream, code, "warp_map_height_minus2" ); sei.m_warpMapHeightMinus2 = code;
+      }
+    }
+  }
+};
+#endif
+
 //! \}
Index: branches/HTM-15.1-dev0/source/Lib/TLibDecoder/SEIread.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibDecoder/SEIread.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibDecoder/SEIread.h	(revision 1328)
@@ -57,4 +57,8 @@
   virtual ~SEIReader() {};
   Void parseSEImessage(TComInputBitstream* bs, SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream);
+#if NH_MV_SEI
+  Void setLayerId                            ( Int   layerId )   { m_layerId  = layerId; }; 
+  Void setDecOrder                           ( Int64 decOrder )  { m_decOrder = decOrder; }; 
+#endif
 protected:
   Void xReadSEImessage                        (SEIMessages& seis, const NalUnitType nalUnitType, const TComSPS *sps, std::ostream *pDecodedMessageOutputStream);
@@ -81,6 +85,39 @@
   Void xParseSEIMasteringDisplayColourVolume  (SEIMasteringDisplayColourVolume& sei,  UInt payloadSize,                     std::ostream *pDecodedMessageOutputStream);
 #if NH_MV
+#if !NH_MV_SEI
   Void  xParseSEISubBitstreamProperty         (SEISubBitstreamProperty &sei        ,  UInt payloadSize,                     std::ostream *pDecodedMessageOutputStream);
   Void  xResizeSubBitstreamPropertySeiArrays  (SEISubBitstreamProperty &sei);
+#endif
+#endif
+#if NH_MV_SEI_TBD
+  Void xParseSEILayersNotPresent              (SEILayersNotPresent& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+#endif
+  Void xParseSEIInterLayerConstrainedTileSets (SEIInterLayerConstrainedTileSets& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+#if NH_MV_SEI_TBD
+  Void xParseSEIBspNesting                    (SEIBspNesting& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+  Void xParseSEIBspInitialArrivalTime         (SEIBspInitialArrivalTime& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+#endif
+  Void xParseSEISubBitstreamProperty          (SEISubBitstreamProperty& 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
+  Void xParseSEITemporalMvPredictionConstraints(SEITemporalMvPredictionConstraints& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+#if NH_MV_SEI_TBD
+  Void xParseSEIFrameFieldInfo                (SEIFrameFieldInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+  Void xParseSEIThreeDimensionalReferenceDisplaysInfo (SEIThreeDimensionalReferenceDisplaysInfo& sei, UInt payloadSize, 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);
+
+  Void xParseSEIMultiviewAcquisitionInfo      (SEIMultiviewAcquisitionInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+
+#if NH_MV_SEI
+  Void xParseSEIMultiviewViewPosition         (SEIMultiviewViewPosition& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
+#endif
+#if NH_MV_SEI_TBD
+  Void xParseSEIAlternativeDepthInfo          (SEIAlternativeDepthInfo& sei, UInt payloadSize, std::ostream *pDecodedMessageOutputStream);
 #endif
 
@@ -89,4 +126,10 @@
   Void sei_read_svlc(std::ostream *pOS,                Int&  ruiCode, const Char *pSymbolName);
   Void sei_read_flag(std::ostream *pOS,                UInt& ruiCode, const Char *pSymbolName);
+#if NH_MV_SEI
+  inline Void output_sei_message_header(SEI &sei, std::ostream *pDecodedMessageOutputStream, UInt payloadSize);
+private: 
+  Int   m_layerId; 
+  Int64 m_decOrder;   
+#endif
 };
 
Index: branches/HTM-15.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibDecoder/TDecTop.cpp	(revision 1328)
@@ -684,4 +684,8 @@
       }
     }
+#if NH_MV_SEI
+    m_seiReader.setLayerId ( newPic->getLayerId      ( ) ); 
+    m_seiReader.setDecOrder( newPic->getDecodingOrder( ) );
+#endif
 #endif
 
Index: branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIEncoder.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIEncoder.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIEncoder.cpp	(revision 1328)
@@ -465,4 +465,5 @@
 
 #if NH_MV
+#if !NH_MV_SEI
 Void SEIEncoder::initSEISubBitstreamProperty(SEISubBitstreamProperty *seiSubBitstreamProperty, const TComSPS *sps)
 {
@@ -476,5 +477,37 @@
   seiSubBitstreamProperty->m_maxBitRate              = m_pcCfg->getMaxBitRate();  
 }
+#else
+Void SEIEncoder::createAnnexFGISeiMessages( SEIMessages& seiMessage, const TComSlice* slice )
+{
+  const SEIMessages* seiMessageCfg = m_pcCfg->getSeiMessages(); 
+
+  for( SEIMessages::const_iterator itS = seiMessageCfg->begin(); itS != seiMessageCfg->end(); itS++ )    
+  {      
+    const SEI* curSei = (*itS); 
+    SEI* newSei; 
+    if ( curSei->insertSei( slice->getLayerId(), slice->getPOC(), slice->getTemporalId(), slice->getNalUnitType() ) )
+    {
+      newSei = curSei->getCopy( ) ;
+
+      if ( curSei->m_modifyByEncoder )
+      {
+        newSei->setupFromSlice  ( slice ); 
+      } 
+
+      if ( newSei   ->checkCfg( slice ) )
+      {
+        std::cout << "--> Omit sending SEI."  <<  std::endl; 
+        delete newSei; 
+      }
+      else
+      {
+        seiMessage.push_back(newSei); 
+      }
+
+    }
+  }
+}
 #endif
+#endif
 
 //! \}
Index: branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIEncoder.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIEncoder.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIEncoder.h	(revision 1328)
@@ -86,5 +86,9 @@
   Void initTemporalLevel0IndexSEI(SEITemporalLevel0Index *sei, TComSlice *slice);
 #if NH_MV
+#if !NH_MV_SEI
   Void initSEISubBitstreamProperty(SEISubBitstreamProperty *seiSubBitstreamProperty, const TComSPS *sps);
+#else
+  Void createAnnexFGISeiMessages( SEIMessages& seiMessage, const TComSlice* slice );;
+#endif
 #endif
 private:
Index: branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIwrite.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 1328)
@@ -122,8 +122,69 @@
     break;
 #if NH_MV
+#if !NH_MV_SEI
    case SEI::SUB_BITSTREAM_PROPERTY:
    xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
    break;
 #endif
+#endif
+#if NH_MV_SEI
+#if NH_MV_SEI_TBD
+   case SEI::LAYERS_NOT_PRESENT:
+     xWriteSEILayersNotPresent(*static_cast<const SEILayersNotPresent*>(&sei));
+     break; 
+#endif
+   case SEI::INTER_LAYER_CONSTRAINED_TILE_SETS:
+     xWriteSEIInterLayerConstrainedTileSets(*static_cast<const SEIInterLayerConstrainedTileSets*>(&sei));
+     break; 
+#if NH_MV_SEI_TBD
+   case SEI::BSP_NESTING:
+     xWriteSEIBspNesting(*static_cast<const SEIBspNesting*>(&sei));
+     break; 
+   case SEI::BSP_INITIAL_ARRIVAL_TIME:
+     xWriteSEIBspInitialArrivalTime(*static_cast<const SEIBspInitialArrivalTime*>(&sei));
+     break; 
+#endif
+   case SEI::SUB_BITSTREAM_PROPERTY:
+     xWriteSEISubBitstreamProperty(*static_cast<const SEISubBitstreamProperty*>(&sei));
+     break; 
+#if NH_MV_SEI_TBD
+   case SEI::ALPHA_CHANNEL_INFO:
+     xWriteSEIAlphaChannelInfo(*static_cast<const SEIAlphaChannelInfo*>(&sei));
+     break; 
+   case SEI::OVERLAY_INFO:
+     xWriteSEIOverlayInfo(*static_cast<const SEIOverlayInfo*>(&sei));
+     break; 
+#endif
+   case SEI::TEMPORAL_MV_PREDICTION_CONSTRAINTS:
+     xWriteSEITemporalMvPredictionConstraints(*static_cast<const SEITemporalMvPredictionConstraints*>(&sei));
+     break; 
+#if NH_MV_SEI_TBD
+   case SEI::FRAME_FIELD_INFO:
+     xWriteSEIFrameFieldInfo(*static_cast<const SEIFrameFieldInfo*>(&sei));
+     break; 
+   case SEI::THREE_DIMENSIONAL_REFERENCE_DISPLAYS_INFO:
+     xWriteSEIThreeDimensionalReferenceDisplaysInfo(*static_cast<const SEIThreeDimensionalReferenceDisplaysInfo*>(&sei));
+     break; 
+   case SEI::DEPTH_REPRESENTATION_INFO:
+     xWriteSEIDepthRepresentationInfo(*static_cast<const SEIDepthRepresentationInfo*>(&sei));
+     break; 
+#endif
+   case SEI::MULTIVIEW_SCENE_INFO:
+     xWriteSEIMultiviewSceneInfo(*static_cast<const SEIMultiviewSceneInfo*>(&sei));
+     break; 
+   case SEI::MULTIVIEW_ACQUISITION_INFO:
+     xWriteSEIMultiviewAcquisitionInfo(*static_cast<const SEIMultiviewAcquisitionInfo*>(&sei));
+     break; 
+
+   case SEI::MULTIVIEW_VIEW_POSITION:
+     xWriteSEIMultiviewViewPosition(*static_cast<const SEIMultiviewViewPosition*>(&sei));
+     break; 
+#if NH_MV_SEI_TBD
+   case SEI::ALTERNATIVE_DEPTH_INFO:
+     xWriteSEIAlternativeDepthInfo(*static_cast<const SEIAlternativeDepthInfo*>(&sei));
+     break; 
+#endif
+#endif
+
 
   default:
@@ -748,4 +809,5 @@
 
 #if NH_MV
+#if !NH_MV_SEI
 Void SEIWriter::xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei)
 {
@@ -764,4 +826,5 @@
   xWriteByteAlign();
 }
+#endif
 #endif
 
@@ -818,3 +881,442 @@
 }
 
+#if NH_MV_SEI_TBD
+Void SEIWriter::xWriteSEILayersNotPresent( const SEILayersNotPresent& sei)
+{
+  WRITE_CODE( sei.m_lnpSeiActiveVpsId, 4, "lnp_sei_active_vps_id" );
+  for( Int i = 0; i  <=  MaxLayersMinus1; i++ )
+  {
+    WRITE_FLAG( ( sei.m_layerNotPresentFlag[i] ? 1 : 0 ), "layer_not_present_flag" );
+  }
+};
+#endif
+
+
+
+Void SEIWriter::xWriteSEIInterLayerConstrainedTileSets( const SEIInterLayerConstrainedTileSets& sei)
+{
+  WRITE_FLAG( ( sei.m_ilAllTilesExactSampleValueMatchFlag ? 1 : 0 ), "il_all_tiles_exact_sample_value_match_flag" );
+  WRITE_FLAG( ( sei.m_ilOneTilePerTileSetFlag ? 1 : 0 ),             "il_one_tile_per_tile_set_flag" );
+  if( !sei.m_ilOneTilePerTileSetFlag )
+  {
+    WRITE_UVLC( sei.m_ilNumSetsInMessageMinus1, "il_num_sets_in_message_minus1" );
+    if( sei.m_ilNumSetsInMessageMinus1 )
+    {
+      WRITE_FLAG( ( sei.m_skippedTileSetPresentFlag ? 1 : 0 ), "skipped_tile_set_present_flag" );
+    }
+    Int numSignificantSets = sei.m_ilNumSetsInMessageMinus1 - sei.m_skippedTileSetPresentFlag + 1;
+    for( Int i = 0; i < numSignificantSets; i++ )
+    {
+      WRITE_UVLC( sei.m_ilctsId[i],                   "ilcts_id" );
+      WRITE_UVLC( sei.m_ilNumTileRectsInSetMinus1[i], "il_num_tile_rects_in_set_minus1" );
+      for( Int j = 0; j  <= sei.m_ilNumTileRectsInSetMinus1[ i ]; j++ )
+      {
+        WRITE_UVLC( sei.m_ilTopLeftTileIndex[i][j],     "il_top_left_tile_index" );
+        WRITE_UVLC( sei.m_ilBottomRightTileIndex[i][j], "il_bottom_right_tile_index" );
+      }
+      WRITE_CODE( sei.m_ilcIdc[i], 2, "ilc_idc" );
+      if ( !sei.m_ilAllTilesExactSampleValueMatchFlag )
+      {
+        WRITE_FLAG( ( sei.m_ilExactSampleValueMatchFlag[i] ? 1 : 0 ), "il_exact_sample_value_match_flag" );
+      }
+    }
+  }
+  else
+  {
+    WRITE_CODE( sei.m_allTilesIlcIdc, 2, "all_tiles_ilc_idc" );
+  }
+};
+
+#if NH_MV_SEI_TBD
+Void SEIWriter::xWriteSEIBspNesting( const SEIBspNesting& sei)
+{
+  WRITE_UVLC( sei.m_seiOlsIdx, "sei_ols_idx" );
+  WRITE_UVLC( sei.m_seiPartitioningSchemeIdx, "sei_partitioning_scheme_idx" );
+  WRITE_UVLC( sei.m_bspIdx, "bsp_idx" );
+  while( !ByteaLigned(() ) );
+  {
+    WRITE_CODE( sei.m_bspNestingZeroBit, *equalto0*/u1, "bsp_nesting_zero_bit" );
+  }
+  WRITE_UVLC( sei.m_numSeisInBspMinus1, "num_seis_in_bsp_minus1" );
+  for( Int i = 0; i  <=  NumSeisInBspMinus1( ); i++ )
+  {
+    SeiMessage(() );
+  }
+};
+
+Void SEIWriter::xWriteSEIBspInitialArrivalTime( const SEIBspInitialArrivalTime& sei)
+{
+  psIdx = SeiPartitioningSchemeIdx();
+  if( nalInitialArrivalDelayPresent )
+  {
+    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
+    {
+      WRITE_CODE( sei.m_nalInitialArrivalDelay[i], getNalInitialArrivalDelayLen ), "nal_initial_arrival_delay" );
+    }
+  }
+  if( vclInitialArrivalDelayPresent )
+  {
+    for( Int i = 0; i < BspSchedCnt( SeiOlsIdx(), psIdx, MaxTemporalId( 0 ) ); i++ )
+    {
+      WRITE_CODE( sei.m_vclInitialArrivalDelay[i], getVclInitialArrivalDelayLen ), "vcl_initial_arrival_delay" );
+    }
+  }
+};
+#endif
+Void SEIWriter::xWriteSEISubBitstreamProperty( const SEISubBitstreamProperty& sei)
+{
+  WRITE_CODE( sei.m_sbPropertyActiveVpsId, 4,      "sb_property_active_vps_id"         );
+  WRITE_UVLC( sei.m_numAdditionalSubStreamsMinus1, "num_additional_sub_streams_minus1" );
+  for( Int i = 0; i  <=  sei.m_numAdditionalSubStreamsMinus1; i++ )
+  {
+    WRITE_CODE( sei.m_subBitstreamMode    [i], 2,  "sub_bitstream_mode"       );
+    WRITE_UVLC( sei.m_olsIdxToVps         [i],     "ols_idx_to_vps"           );
+    WRITE_CODE( sei.m_highestSublayerId   [i], 3,  "highest_sublayer_id"      );
+    WRITE_CODE( sei.m_avgSbPropertyBitRate[i], 16, "avg_sb_property_bit_rate" );
+    WRITE_CODE( sei.m_maxSbPropertyBitRate[i], 16, "max_sb_property_bit_rate" );
+  }
+};
+#if NH_MV_SEI_TBD
+Void SEIWriter::xWriteSEIAlphaChannelInfo( const SEIAlphaChannelInfo& sei)
+{
+  WRITE_FLAG( ( sei.m_alphaChannelCancelFlag ? 1 : 0 ), "alpha_channel_cancel_flag" );
+  if( !sei.m_alphaChannelCancelFlag )
+  {
+    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_FLAG( ( sei.m_alphaChannelIncrFlag ? 1 : 0 ), "alpha_channel_incr_flag" );
+    WRITE_FLAG( ( sei.m_alphaChannelClipFlag ? 1 : 0 ), "alpha_channel_clip_flag" );
+    if( sei.m_alphaChannelClipFlag )
+    {
+      WRITE_FLAG( ( sei.m_alphaChannelClipTypeFlag ? 1 : 0 ), "alpha_channel_clip_type_flag" );
+    }
+  }
+};
+
+Void SEIWriter::xWriteSEIOverlayInfo( const SEIOverlayInfo& sei)
+{
+  WRITE_FLAG( ( sei.m_overlayInfoCancelFlag ? 1 : 0 ), "overlay_info_cancel_flag" );
+  if( !sei.m_overlayInfoCancelFlag )
+  {
+    WRITE_UVLC( sei.m_overlayContentAuxIdMinus128, "overlay_content_aux_id_minus128" );
+    WRITE_UVLC( sei.m_overlayLabelAuxIdMinus128, "overlay_label_aux_id_minus128" );
+    WRITE_UVLC( sei.m_overlayAlphaAuxIdMinus128, "overlay_alpha_aux_id_minus128" );
+    WRITE_UVLC( sei.m_overlayElementLabelValueLengthMinus8, "overlay_element_label_value_length_minus8" );
+    WRITE_UVLC( sei.m_numOverlaysMinus1, "num_overlays_minus1" );
+    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
+    {
+      WRITE_UVLC( sei.m_overlayIdx[i], "overlay_idx" );
+      WRITE_FLAG( ( sei.m_languageOverlayPresentFlag[i] ? 1 : 0 ), "language_overlay_present_flag" );
+      WRITE_CODE( sei.m_overlayContentLayerId[i], 6, "overlay_content_layer_id" );
+      WRITE_FLAG( ( sei.m_overlayLabelPresentFlag[i] ? 1 : 0 ), "overlay_label_present_flag" );
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        WRITE_CODE( sei.m_overlayLabelLayerId[i], 6, "overlay_label_layer_id" );
+      }
+      WRITE_FLAG( ( sei.m_overlayAlphaPresentFlag[i] ? 1 : 0 ), "overlay_alpha_present_flag" );
+      if( sei.m_overlayAlphaPresentFlag( i ) )
+      {
+        WRITE_CODE( sei.m_overlayAlphaLayerId[i], 6, "overlay_alpha_layer_id" );
+      }
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        WRITE_UVLC( sei.m_numOverlayElementsMinus1[i], "num_overlay_elements_minus1" );
+        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
+        {
+          WRITE_CODE( sei.m_overlayElementLabelMin[i][j], getOverlayElementLabelMinLen ), "overlay_element_label_min" );
+          WRITE_CODE( sei.m_overlayElementLabelMax[i][j], getOverlayElementLabelMaxLen ), "overlay_element_label_max" );
+        }
+      }
+    }
+    while( !ByteaLigned(() ) );
+    {
+      WRITE_CODE( sei.m_overlayZeroBit, *equalto0*/f1, "overlay_zero_bit" );
+    }
+    for( Int i = 0; i  <=  NumOverlaysMinus1( ); i++ )
+    {
+      if( sei.m_languageOverlayPresentFlag( i ) )
+      {
+        WRITE_CODE( sei.m_overlayLanguage[i], tv, "overlay_language" );
+      }
+      WRITE_CODE( sei.m_overlayName[i], tv, "overlay_name" );
+      if( sei.m_overlayLabelPresentFlag( i ) )
+      {
+        for( Int j = 0; j  <=  sei.m_numOverlayElementsMinus1( i ); j++ )
+        {
+          WRITE_CODE( sei.m_overlayElementName[i][j], tv, "overlay_element_name" );
+        }
+      }
+    }
+    WRITE_FLAG( ( sei.m_overlayInfoPersistenceFlag ? 1 : 0 ), "overlay_info_persistence_flag" );
+  }
+};
+#endif
+
+Void SEIWriter::xWriteSEITemporalMvPredictionConstraints( const SEITemporalMvPredictionConstraints& sei)
+{
+  WRITE_FLAG( ( sei.m_prevPicsNotUsedFlag    ? 1 : 0 ), "prev_pics_not_used_flag"     );
+  WRITE_FLAG( ( sei.m_noIntraLayerColPicFlag ? 1 : 0 ), "no_intra_layer_col_pic_flag" );
+};
+
+#if NH_MV_SEI_TBD
+Void SEIWriter::xWriteSEIFrameFieldInfo( const SEIFrameFieldInfo& sei)
+{
+  WRITE_CODE( sei.m_ffinfoPicStruct, 4, "ffinfo_pic_struct" );
+  WRITE_CODE( sei.m_ffinfoSourceScanType, 2, "ffinfo_source_scan_type" );
+  WRITE_FLAG( ( sei.m_ffinfoDuplicateFlag ? 1 : 0 ), "ffinfo_duplicate_flag" );
+};
+
+Void SEIWriter::xWriteSEIThreeDimensionalReferenceDisplaysInfo( const SEIThreeDimensionalReferenceDisplaysInfo& sei)
+{
+  WRITE_UVLC( sei.m_precRefDisplayWidth, "prec_ref_display_width" );
+  WRITE_FLAG( ( sei.m_refViewingDistanceFlag ? 1 : 0 ), "ref_viewing_distance_flag" );
+  if( sei.m_refViewingDistanceFlag )
+  {
+    WRITE_UVLC( sei.m_precRefViewingDist, "prec_ref_viewing_dist" );
+  }
+  WRITE_UVLC( sei.m_numRefDisplaysMinus1, "num_ref_displays_minus1" );
+  for( Int i = 0; i  <=  NumRefDisplaysMinus1( ); i++ )
+  {
+    WRITE_UVLC( sei.m_leftViewId[i], "left_view_id" );
+    WRITE_UVLC( sei.m_rightViewId[i], "right_view_id" );
+    WRITE_CODE( sei.m_exponentRefDisplayWidth[i], 6, "exponent_ref_display_width" );
+    WRITE_CODE( sei.m_mantissaRefDisplayWidth[i], getMantissaRefDisplayWidthLen ), "mantissa_ref_display_width" );
+    if( sei.m_refViewingDistanceFlag )
+    {
+      WRITE_CODE( sei.m_exponentRefViewingDistance[i], 6, "exponent_ref_viewing_distance" );
+      WRITE_CODE( sei.m_mantissaRefViewingDistance[i], getMantissaRefViewingDistanceLen ), "mantissa_ref_viewing_distance" );
+    }
+    WRITE_FLAG( ( sei.m_additionalShiftPresentFlag[i] ? 1 : 0 ), "additional_shift_present_flag" );
+    if( sei.m_additionalShiftPresentFlag( i ) )
+    {
+      WRITE_CODE( sei.m_numSampleShiftPlus512[i], 10, "num_sample_shift_plus512" );
+    }
+  }
+  WRITE_FLAG( ( sei.m_threeDimensionalReferenceDisplaysExtensionFlag ? 1 : 0 ), "three_dimensional_reference_displays_extension_flag" );
+};
+
+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 );
+    }
+  }
+};
+
+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 
+Void SEIWriter::xWriteSEIMultiviewSceneInfo( const SEIMultiviewSceneInfo& sei)
+{
+  WRITE_SVLC( sei.m_minDisparity     , "min_disparity"       );
+  WRITE_UVLC( sei.m_maxDisparityRange, "max_disparity_range" );
+};
+
+
+Void SEIWriter::xWriteSEIMultiviewAcquisitionInfo( const SEIMultiviewAcquisitionInfo& sei)
+{
+  WRITE_FLAG( ( sei.m_intrinsicParamFlag ? 1 : 0 ), "intrinsic_param_flag" );
+  WRITE_FLAG( ( sei.m_extrinsicParamFlag ? 1 : 0 ), "extrinsic_param_flag" );
+  if( sei.m_intrinsicParamFlag )
+  {
+    WRITE_FLAG( ( sei.m_intrinsicParamsEqualFlag ? 1 : 0 ), "intrinsic_params_equal_flag" );
+    WRITE_UVLC(   sei.m_precFocalLength                   , "prec_focal_length"           );
+    WRITE_UVLC(   sei.m_precPrincipalPoint                , "prec_principal_point"        );
+    WRITE_UVLC(   sei.m_precSkewFactor                    , "prec_skew_factor"            );
+
+    for( Int i = 0; i  <=  ( sei.m_intrinsicParamsEqualFlag ? 0 : sei.getNumViewsMinus1() ); i++ )
+    {
+      WRITE_FLAG( ( sei.m_signFocalLengthX       [i] ? 1 : 0 ),                                         "sign_focal_length_x"        );
+      WRITE_CODE(   sei.m_exponentFocalLengthX   [i]          , 6                                  ,    "exponent_focal_length_x"    );
+      WRITE_CODE(   sei.m_mantissaFocalLengthX   [i]          , sei.getMantissaFocalLengthXLen( i ),    "mantissa_focal_length_x"    );
+      WRITE_FLAG( ( sei.m_signFocalLengthY       [i] ? 1 : 0 ),                                         "sign_focal_length_y"        );
+      WRITE_CODE(   sei.m_exponentFocalLengthY   [i]          , 6                                  ,    "exponent_focal_length_y"    );
+      WRITE_CODE(   sei.m_mantissaFocalLengthY   [i]          , sei.getMantissaFocalLengthYLen( i ),    "mantissa_focal_length_y"    );
+      WRITE_FLAG( ( sei.m_signPrincipalPointX    [i] ? 1 : 0 ),                                         "sign_principal_point_x"     );
+      WRITE_CODE(   sei.m_exponentPrincipalPointX[i]          , 6,                                      "exponent_principal_point_x" );
+      WRITE_CODE(   sei.m_mantissaPrincipalPointX[i]          , sei.getMantissaPrincipalPointXLen( i ), "mantissa_principal_point_x" );
+      WRITE_FLAG( ( sei.m_signPrincipalPointY    [i] ? 1 : 0 ),                                         "sign_principal_point_y"     );
+      WRITE_CODE(   sei.m_exponentPrincipalPointY[i]          , 6,                                      "exponent_principal_point_y" );
+      WRITE_CODE(   sei.m_mantissaPrincipalPointY[i]          , sei.getMantissaPrincipalPointYLen( i ), "mantissa_principal_point_y" );
+      WRITE_FLAG( ( sei.m_signSkewFactor         [i] ? 1 : 0 ),                                         "sign_skew_factor"           );
+      WRITE_CODE(   sei.m_exponentSkewFactor     [i]          , 6,                                      "exponent_skew_factor"       );
+      WRITE_CODE(   sei.m_mantissaSkewFactor     [i]          , sei.getMantissaSkewFactorLen( i )  ,    "mantissa_skew_factor"       );
+    }
+  }
+  if( sei.m_extrinsicParamFlag )
+  {
+    WRITE_UVLC( sei.m_precRotationParam   , "prec_rotation_param"    );
+    WRITE_UVLC( sei.m_precTranslationParam, "prec_translation_param" );
+    for( Int i = 0; i  <=  sei.getNumViewsMinus1(); i++ )
+    {
+      for( Int j = 0; j  <=  2; j++ )  /* row */
+      {
+        for( Int k = 0; k  <=  2; k++ )  /* column */
+        {
+          WRITE_FLAG( ( sei.m_signR    [i][j][k] ? 1 : 0 ),                                "sign_r"     );
+          WRITE_CODE(   sei.m_exponentR[i][j][k]          , 6,                             "exponent_r" );
+          WRITE_CODE(   sei.m_mantissaR[i][j][k]          , sei.getMantissaRLen( i,j,k ) , "mantissa_r" );
+        }
+        WRITE_FLAG( ( sei.m_signT    [i][j] ? 1 : 0 ),                          "sign_t"     );
+        WRITE_CODE(   sei.m_exponentT[i][j]          , 6,                       "exponent_t" );
+        WRITE_CODE(   sei.m_mantissaT[i][j]          , sei.getMantissaTLen( i,j ),"mantissa_t" );
+      }
+    }
+  }
+};
+
+
+#if NH_MV_SEI
+Void SEIWriter::xWriteSEIMultiviewViewPosition( const SEIMultiviewViewPosition& sei)
+{
+  WRITE_UVLC( sei.m_numViewsMinus1, "num_views_minus1" );
+  for( Int i = 0; i  <=  sei.m_numViewsMinus1; i++ )
+  {
+    WRITE_UVLC( sei.m_viewPosition[i], "view_position" );
+  }
+};
+#endif
+
+#if NH_MV_SEI_TBD
+Void SEIWriter::xWriteSEIAlternativeDepthInfo( const SEIAlternativeDepthInfo& sei)
+{
+  WRITE_FLAG( ( sei.m_alternativeDepthInfoCancelFlag ? 1 : 0 ), "alternative_depth_info_cancel_flag" );
+  if( sei.m_alternativeDepthInfoCancelFlag  ==  0 )
+  {
+    WRITE_CODE( sei.m_depthType, 2, "depth_type" );
+    if( sei.m_depthType  ==  0 )
+    {
+      WRITE_UVLC( sei.m_numConstituentViewsGvdMinus1, "num_constituent_views_gvd_minus1" );
+      WRITE_FLAG( ( sei.m_depthPresentGvdFlag ? 1 : 0 ), "depth_present_gvd_flag" );
+      WRITE_FLAG( ( sei.m_zGvdFlag ? 1 : 0 ), "z_gvd_flag" );
+      WRITE_FLAG( ( sei.m_intrinsicParamGvdFlag ? 1 : 0 ), "intrinsic_param_gvd_flag" );
+      WRITE_FLAG( ( sei.m_rotationGvdFlag ? 1 : 0 ), "rotation_gvd_flag" );
+      WRITE_FLAG( ( sei.m_translationGvdFlag ? 1 : 0 ), "translation_gvd_flag" );
+      if( sei.m_zGvdFlag )
+      {
+        for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
+        {
+          WRITE_FLAG( ( sei.m_signGvdZNearFlag[i] ? 1 : 0 ), "sign_gvd_z_near_flag" );
+          WRITE_CODE( sei.m_expGvdZNear[i], 7, "exp_gvd_z_near" );
+          WRITE_CODE( sei.m_manLenGvdZNearMinus1[i], 5, "man_len_gvd_z_near_minus1" );
+          WRITE_CODE( sei.m_manGvdZNear[i], getManGvdZNearLen ), "man_gvd_z_near" );
+          WRITE_FLAG( ( sei.m_signGvdZFarFlag[i] ? 1 : 0 ), "sign_gvd_z_far_flag" );
+          WRITE_CODE( sei.m_expGvdZFar[i], 7, "exp_gvd_z_far" );
+          WRITE_CODE( sei.m_manLenGvdZFarMinus1[i], 5, "man_len_gvd_z_far_minus1" );
+          WRITE_CODE( sei.m_manGvdZFar[i], getManGvdZFarLen ), "man_gvd_z_far" );
+        }
+      }
+      if( sei.m_intrinsicParamGvdFlag )
+      {
+        WRITE_UVLC( sei.m_precGvdFocalLength, "prec_gvd_focal_length" );
+        WRITE_UVLC( sei.m_precGvdPrincipalPoint, "prec_gvd_principal_point" );
+      }
+      if( sei.m_rotationGvdFlag )
+      {
+        WRITE_UVLC( sei.m_precGvdRotationParam, "prec_gvd_rotation_param" );
+      }
+      if( sei.m_translationGvdFlag )
+      {
+        WRITE_UVLC( sei.m_precGvdTranslationParam, "prec_gvd_translation_param" );
+      }
+      for( Int i = 0; i  <=  sei.m_numConstituentViewsGvdMinus1 + 1; i++ )
+      {
+        if( sei.m_intrinsicParamGvdFlag )
+        {
+          WRITE_FLAG( ( sei.m_signGvdFocalLengthX[i] ? 1 : 0 ), "sign_gvd_focal_length_x" );
+          WRITE_CODE( sei.m_expGvdFocalLengthX[i], 6, "exp_gvd_focal_length_x" );
+          WRITE_CODE( sei.m_manGvdFocalLengthX[i], getManGvdFocalLengthXLen ), "man_gvd_focal_length_x" );
+          WRITE_FLAG( ( sei.m_signGvdFocalLengthY[i] ? 1 : 0 ), "sign_gvd_focal_length_y" );
+          WRITE_CODE( sei.m_expGvdFocalLengthY[i], 6, "exp_gvd_focal_length_y" );
+          WRITE_CODE( sei.m_manGvdFocalLengthY[i], getManGvdFocalLengthYLen ), "man_gvd_focal_length_y" );
+          WRITE_FLAG( ( sei.m_signGvdPrincipalPointX[i] ? 1 : 0 ), "sign_gvd_principal_point_x" );
+          WRITE_CODE( sei.m_expGvdPrincipalPointX[i], 6, "exp_gvd_principal_point_x" );
+          WRITE_CODE( sei.m_manGvdPrincipalPointX[i], getManGvdPrincipalPointXLen ), "man_gvd_principal_point_x" );
+          WRITE_FLAG( ( sei.m_signGvdPrincipalPointY[i] ? 1 : 0 ), "sign_gvd_principal_point_y" );
+          WRITE_CODE( sei.m_expGvdPrincipalPointY[i], 6, "exp_gvd_principal_point_y" );
+          WRITE_CODE( sei.m_manGvdPrincipalPointY[i], getManGvdPrincipalPointYLen ), "man_gvd_principal_point_y" );
+        }
+        if( sei.m_rotationGvdFlag )
+        {
+          for( Int j = 10; j  <=  3; j++ ) /* row */
+          {
+            for( Int k = 10; k  <=  3; k++ )  /* column */
+            {
+              WRITE_FLAG( ( sei.m_signGvdR[i][j][k] ? 1 : 0 ), "sign_gvd_r" );
+              WRITE_CODE( sei.m_expGvdR[i][j][k], 6, "exp_gvd_r" );
+              WRITE_CODE( sei.m_manGvdR[i][j][k], getManGvdRLen ), "man_gvd_r" );
+            }
+          }
+        }
+        if( sei.m_translationGvdFlag )
+        {
+          WRITE_FLAG( ( sei.m_signGvdTX[i] ? 1 : 0 ), "sign_gvd_t_x" );
+          WRITE_CODE( sei.m_expGvdTX[i], 6, "exp_gvd_t_x" );
+          WRITE_CODE( sei.m_manGvdTX[i], getManGvdTXLen ), "man_gvd_t_x" );
+        }
+      }
+    }
+    if( sei.m_depthType  ==  1 )
+    {
+      WRITE_SVLC( sei.m_minOffsetXInt, "min_offset_x_int" );
+      WRITE_CODE( sei.m_minOffsetXFrac, 8, "min_offset_x_frac" );
+      WRITE_SVLC( sei.m_maxOffsetXInt, "max_offset_x_int" );
+      WRITE_CODE( sei.m_maxOffsetXFrac, 8, "max_offset_x_frac" );
+      WRITE_FLAG( ( sei.m_offsetYPresentFlag ? 1 : 0 ), "offset_y_present_flag" );
+      if( sei.m_offsetYPresentFlag )
+      {
+        WRITE_SVLC( sei.m_minOffsetYInt, "min_offset_y_int" );
+        WRITE_CODE( sei.m_minOffsetYFrac, 8, "min_offset_y_frac" );
+        WRITE_SVLC( sei.m_maxOffsetYInt, "max_offset_y_int" );
+        WRITE_CODE( sei.m_maxOffsetYFrac, 8, "max_offset_y_frac" );
+      }
+      WRITE_FLAG( ( sei.m_warpMapSizePresentFlag ? 1 : 0 ), "warp_map_size_present_flag" );
+      if( sei.m_warpMapSizePresentFlag )
+      {
+        WRITE_UVLC( sei.m_warpMapWidthMinus2, "warp_map_width_minus2" );
+        WRITE_UVLC( sei.m_warpMapHeightMinus2, "warp_map_height_minus2" );
+      }
+    }
+  }
+};
+
+#endif
+
 //! \}
Index: branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIwrite.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIwrite.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibEncoder/SEIwrite.h	(revision 1328)
@@ -72,5 +72,7 @@
   Void xWriteSEIScalableNesting(TComBitIf& bs, const SEIScalableNesting& sei, const TComSPS *sps);
 #if NH_MV
+#if !NH_MV_SEI
   Void xWriteSEISubBitstreamProperty(const SEISubBitstreamProperty &sei);
+#endif
 #endif
   Void xWriteSEITempMotionConstrainedTileSets(const SEITempMotionConstrainedTileSets& sei);
@@ -81,6 +83,34 @@
   Void xWriteSEIMasteringDisplayColourVolume( const SEIMasteringDisplayColourVolume& sei);
 
+#if NH_MV_SEI
+#if NH_MV_SEI_TBD
+  Void xWriteSEILayersNotPresent              ( const SEILayersNotPresent& sei);
+#endif
+  Void xWriteSEIInterLayerConstrainedTileSets ( const SEIInterLayerConstrainedTileSets& sei);
+#if NH_MV_SEI_TBD
+  Void xWriteSEIBspNesting                    ( const SEIBspNesting& sei);
+  Void xWriteSEIBspInitialArrivalTime         ( const SEIBspInitialArrivalTime& sei);
+#endif
+  Void xWriteSEISubBitstreamProperty          ( const SEISubBitstreamProperty& sei);
+#if NH_MV_SEI_TBD
+  Void xWriteSEIAlphaChannelInfo              ( const SEIAlphaChannelInfo& sei);
+  Void xWriteSEIOverlayInfo                   ( const SEIOverlayInfo& sei);
+#endif
+  Void xWriteSEITemporalMvPredictionConstraints ( const SEITemporalMvPredictionConstraints& sei);
+#if NH_MV_SEI_TBD
+  Void xWriteSEIFrameFieldInfo                ( const SEIFrameFieldInfo& sei);
+  Void xWriteSEIThreeDimensionalReferenceDisplaysInfo ( const SEIThreeDimensionalReferenceDisplaysInfo& sei);
+  Void xWriteSEIDepthRepresentationInfo       ( const SEIDepthRepresentationInfo& sei);
+  Void xWriteSEIDepthRepInfoElement           ( const SEIDepthRepInfoElement& sei);
+#endif
+  Void xWriteSEIMultiviewSceneInfo            ( const SEIMultiviewSceneInfo& sei);
+  Void xWriteSEIMultiviewAcquisitionInfo      ( const SEIMultiviewAcquisitionInfo& sei);
+  Void xWriteSEIMultiviewViewPosition         ( const SEIMultiviewViewPosition& sei);
+#if NH_MV_SEI_TBD
+  Void xWriteSEIAlternativeDepthInfo          ( const SEIAlternativeDepthInfo& sei);
+#endif
   Void xWriteByteAlign();
 };
+#endif
 
 //! \}
Index: branches/HTM-15.1-dev0/source/Lib/TLibEncoder/TEncCfg.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibEncoder/TEncCfg.h	(revision 1328)
@@ -49,4 +49,8 @@
 #include "TAppCommon/TAppComCamPara.h"
 #include "TLibRenderer/TRenModSetupStrParser.h"
+#endif
+
+#if NH_MV
+#include "TLibCommon/SEI.h"
 #endif
 
@@ -350,4 +354,7 @@
   Int*      m_kneeSEIOutputKneePoint;
   TComSEIMasteringDisplay m_masteringDisplay;
+#if NH_MV_SEI
+  SEIMessages* m_seiMessages; 
+#endif
   //====== Weighted Prediction ========
   Bool      m_useWeightedPred;       //< Use of Weighting Prediction (P_SLICE)
@@ -432,4 +439,5 @@
 
 #if NH_MV
+#if !NH_MV_SEI
   Bool              m_subBistreamPropSEIEnabled;
   Int               m_numAdditionalSubStreams;
@@ -439,4 +447,5 @@
   std::vector<Int>  m_avgBitRate;
   std::vector<Int>  m_maxBitRate;
+#endif
 #endif
 
@@ -933,4 +942,8 @@
   const TComSEIMasteringDisplay &getMasteringDisplaySEI() const      { return m_masteringDisplay; }
 #if NH_MV
+#if NH_MV_SEI
+  Void setSeiMessages(SEIMessages *p)                                { m_seiMessages = p;    }
+  const SEIMessages*  getSeiMessages()                               { return m_seiMessages; }
+#else
   Bool   getSubBitstreamPropSEIEnabled()                             { return m_subBistreamPropSEIEnabled;}
   Void   setSubBitstreamPropSEIEnabled(Bool x)                       { m_subBistreamPropSEIEnabled = x;}
@@ -958,5 +971,5 @@
   Int   getMaxBitRate(Int idx)                                       { return m_maxBitRate[idx];}
   Void  setMaxBitRate(std::vector<Int> &x)                           { m_maxBitRate = x;}
-
+#endif
 #endif
 
Index: branches/HTM-15.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 1328)
@@ -412,9 +412,6 @@
 Void TEncGOP::xCreateIRAPLeadingSEIMessages (SEIMessages& seiMessages, const TComSPS *sps, const TComPPS *pps)
 {
-#if NH_MV
-  OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI, 0, getLayerId());
-#else
   OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
-#endif
+
   if(m_pcCfg->getActiveParameterSetsSEIEnabled())
   {
@@ -482,4 +479,5 @@
 
 #if NH_MV
+#if !NH_MV_SEI
   if( m_pcCfg->getSubBitstreamPropSEIEnabled() && ( getLayerId() == 0 ) )
   {
@@ -488,4 +486,5 @@
     seiMessages.push_back(sei);
   }
+#endif
 #endif
 }
@@ -1835,4 +1834,8 @@
     xCreatePerPictureSEIMessages(iGOPid, leadingSeiMessages, nestedSeiMessages, pcSlice);
 
+#if NH_MV_SEI
+    m_seiEncoder.createAnnexFGISeiMessages( leadingSeiMessages, pcSlice );
+#endif
+
     /* use the main bitstream buffer for storing the marshalled picture */
     m_pcEntropyCoder->setBitstream(NULL);
Index: branches/HTM-15.1-dev0/source/Lib/TLibRenderer/TRenModSetupStrParser.h
===================================================================
--- branches/HTM-15.1-dev0/source/Lib/TLibRenderer/TRenModSetupStrParser.h	(revision 1327)
+++ branches/HTM-15.1-dev0/source/Lib/TLibRenderer/TRenModSetupStrParser.h	(revision 1328)
@@ -87,6 +87,6 @@
                                 );
 
-  std::vector<Int>* getSynthViews() { return &m_aiAllSynthViewNums;  }
-  std::vector<Int>* getBaseViews()  { return &m_aiAllBaseViewIdx;    }
+  IntAry1d*  getSynthViews() { return &m_aiAllSynthViewNums;  }
+  IntAry1d*  getBaseViews()  { return &m_aiAllBaseViewIdx;    }
 
   TRenModSetupStrParser();
@@ -95,15 +95,15 @@
 
 private:
-  std::vector< std::vector<Int > > m_aaaiBaseViewsIdx  [2];
-  std::vector< std::vector<Int > > m_aaaiVideoDistMode [2];
-  std::vector< std::vector<Int > > m_aaaiDepthDistMode [2];
-  std::vector< std::vector<Int > > m_aaaiModelNums     [2];
-  std::vector< std::vector<Int > > m_aaaiSynthViewNums [2];
-  std::vector< std::vector<Bool> > m_aaabOrgRef        [2];
-  std::vector< std::vector<Bool> > m_aaabExtrapolate   [2];
-  std::vector< std::vector<Int > > m_aaaiBlendMode     [2];
+  IntAry2d                         m_aaaiBaseViewsIdx  [2];
+  IntAry2d                         m_aaaiVideoDistMode [2];
+  IntAry2d                         m_aaaiDepthDistMode [2];
+  IntAry2d                         m_aaaiModelNums     [2];
+  IntAry2d                         m_aaaiSynthViewNums [2];
+  BoolAry2d                        m_aaabOrgRef        [2];
+  BoolAry2d                        m_aaabExtrapolate   [2];
+  IntAry2d                         m_aaaiBlendMode     [2];
 
-  std::vector<Int>                 m_aiAllBaseViewIdx;
-  std::vector<Int>                 m_aiAllSynthViewNums;
+  IntAry1d                         m_aiAllBaseViewIdx;
+  IntAry1d                         m_aiAllSynthViewNums;
 
   Bool                             m_bCurrentViewSet;
