Index: branches/SHM-6-dev/source/Lib/TLibCommon/SEI.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/SEI.h	(revision 779)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/SEI.h	(revision 780)
@@ -106,4 +106,7 @@
     TMVP_CONSTRAINTS                     = 146,
 #endif
+#if Q0247_FRAME_FIELD_INFO
+    FRAME_FIELD_INFO                     = 147,
+#endif
   };
   
@@ -539,4 +542,25 @@
 #endif
 
+#if Q0247_FRAME_FIELD_INFO 
+class SEIFrameFieldInfo: public SEI
+{
+public:
+  PayloadType payloadType() const { return FRAME_FIELD_INFO; }
+
+  SEIFrameFieldInfo()
+    : m_ffinfo_picStruct(0),m_ffinfo_sourceScanType(0), m_ffinfo_duplicateFlag(false)
+    {}
+
+  virtual ~SEIFrameFieldInfo()
+  {
+  }
+
+  UInt  m_ffinfo_picStruct;
+  UInt  m_ffinfo_sourceScanType;
+  Bool  m_ffinfo_duplicateFlag;
+};
+
+#endif
+
 typedef std::list<SEI*> SEIMessages;
 
Index: branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 779)
+++ branches/SHM-6-dev/source/Lib/TLibCommon/TypeDef.h	(revision 780)
@@ -270,5 +270,5 @@
 #define P0050_KNEE_FUNCTION_SEI          1      ///< JCTVC-P0050: Knee function SEI
 #define Q0189_TMVP_CONSTRAINTS           1
-
+#define Q0247_FRAME_FIELD_INFO           1
 #if VIEW_ID_RELATED_SIGNALING
 /// scalability types
Index: branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.cpp	(revision 779)
+++ branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.cpp	(revision 780)
@@ -386,4 +386,10 @@
      break;
 #endif
+#if Q0247_FRAME_FIELD_INFO
+   case SEI::FRAME_FIELD_INFO:
+     sei =  new SEIFrameFieldInfo;
+     xParseSEIFrameFieldInfo    ((SEIFrameFieldInfo&) *sei, payloadSize); 
+     break;
+#endif
 #endif //SVC_EXTENSION
       break;
@@ -1036,4 +1042,15 @@
 #endif
 
+#if Q0247_FRAME_FIELD_INFO
+Void SEIReader::xParseSEIFrameFieldInfo    (SEIFrameFieldInfo& sei, UInt payloadSize)
+{
+  UInt code;
+  READ_CODE( 4, code, "ffinfo_pic_struct" );             sei.m_ffinfo_picStruct            = code;
+  READ_CODE( 2, code, "ffinfo_source_scan_type" );       sei.m_ffinfo_sourceScanType = code;
+  READ_FLAG(    code, "ffinfo_duplicate_flag" );         sei.m_ffinfo_duplicateFlag    = ( code == 1 ? true : false );
+  xParseByteAlign();
+}
+#endif
+
 #if LAYERS_NOT_PRESENT_SEI
 Void SEIReader::xParseSEIScalableNesting(SEIScalableNesting& sei, const NalUnitType nalUnitType, UInt payloadSize, TComVPS *vps, TComSPS *sps)
Index: branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.h	(revision 779)
+++ branches/SHM-6-dev/source/Lib/TLibDecoder/SEIread.h	(revision 780)
@@ -131,5 +131,7 @@
   Void xParseSEITMVPConstraints    (SEITMVPConstrains& sei, UInt payloadSize);
 #endif
-
+#if Q0247_FRAME_FIELD_INFO
+  Void xParseSEIFrameFieldInfo    (SEIFrameFieldInfo& sei, UInt payloadSize);
+#endif
   Void xParseByteAlign();
 };
Index: branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 779)
+++ branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.cpp	(revision 780)
@@ -250,4 +250,9 @@
      break;
 #endif
+#if Q0247_FRAME_FIELD_INFO
+   case SEI::FRAME_FIELD_INFO:
+     xWriteSEIFrameFieldInfo(*static_cast<const SEIFrameFieldInfo*>(&sei));
+     break;
+#endif
 #endif //SVC_EXTENSION
   default:
@@ -877,4 +882,14 @@
 #endif
 
+#if Q0247_FRAME_FIELD_INFO
+Void SEIWriter::xWriteSEIFrameFieldInfo  (const SEIFrameFieldInfo &sei)
+{
+  WRITE_CODE( sei.m_ffinfo_picStruct , 4,             "ffinfo_pic_struct" );
+  WRITE_CODE( sei.m_ffinfo_sourceScanType, 2,         "ffinfo_source_scan_type" );
+  WRITE_FLAG( sei.m_ffinfo_duplicateFlag ? 1 : 0,     "ffinfo_duplicate_flag" );
+  xWriteByteAlign();
+}
+#endif
+
 #if O0164_MULTI_LAYER_HRD
 Void SEIWriter::xWriteSEIBspNesting(TComBitIf& bs, const SEIBspNesting &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei)
Index: branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.h
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.h	(revision 779)
+++ branches/SHM-6-dev/source/Lib/TLibEncoder/SEIwrite.h	(revision 780)
@@ -98,4 +98,7 @@
 Void xWriteSEITMVPConstraints (const SEITMVPConstrains &sei);
 #endif
+#if Q0247_FRAME_FIELD_INFO
+  Void xWriteSEIFrameFieldInfo  (const SEIFrameFieldInfo &sei);
+#endif
 #if O0164_MULTI_LAYER_HRD
   Void xWriteSEIBspNesting(TComBitIf& bs, const SEIBspNesting &sei, TComVPS *vps, TComSPS *sps, const SEIScalableNesting &nestingSei);
Index: branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp
===================================================================
--- branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 779)
+++ branches/SHM-6-dev/source/Lib/TLibEncoder/TEncGOP.cpp	(revision 780)
@@ -2337,4 +2337,22 @@
    }
 #endif
+#if Q0247_FRAME_FIELD_INFO
+    if(  pcSlice->getLayerId()> 0 &&
+     ( (m_pcCfg->getProgressiveSourceFlag() && m_pcCfg->getInterlacedSourceFlag()) || m_pcCfg->getFrameFieldInfoPresentFlag()))
+    {
+      OutputNALUnit nalu(NAL_UNIT_PREFIX_SEI);
+      SEIFrameFieldInfo seiFFInfo;
+      m_pcEntropyCoder->setEntropyCoder(m_pcCavlcCoder, pcSlice);
+      m_pcEntropyCoder->setBitstream(&nalu.m_Bitstream);
+      seiFFInfo.m_ffinfo_picStruct = (isField && pcSlice->getPic()->isTopField())? 1 : isField? 2 : 0;
+#if   O0164_MULTI_LAYER_HRD
+      m_seiWriter.writeSEImessage( nalu.m_Bitstream, seiFFInfo, m_pcEncTop->getVPS(), pcSlice->getSPS() );
+#else
+      m_seiWriter.writeSEImessage( nalu.m_Bitstream, seiFFInfo, pcSlice->getSPS() );
+#endif
+      writeRBSPTrailingBits(nalu.m_Bitstream);
+      accessUnit.push_back(new NALUnitEBSP(nalu));
+    }
+#endif
 
     if( ( m_pcCfg->getPictureTimingSEIEnabled() || m_pcCfg->getDecodingUnitInfoSEIEnabled() ) &&
