shithub: openh264

Download patch

ref: 6050bf89f6410722f78a80dcc92963f9041182d2
parent: 26ccd837f19c76326780ff498720703c9c67bf8e
author: Sijia Chen <sijchen@cisco.com>
date: Mon Dec 29 05:54:01 EST 2014

add interface of simulcast avc, the actual support is coming later

--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -64,8 +64,7 @@
  */
 ///
 /// E.g. SDK version is 1.2.0.0, major version number is 1, minor version number is 2, and revision number is 0.
-typedef struct  _tagVersion
-{
+typedef struct  _tagVersion {
   unsigned int uMajor;				///< The major version number
   unsigned int uMinor;				///< The minor version number
   unsigned int uRevision;				///< The revision number
@@ -423,7 +422,8 @@
   int               iNumRefFrame;      ///< number of reference frame used
   bool    bEnableSpsPpsIdAddition;     ///< false:not adjust ID in SPS/PPS; true: adjust ID in SPS/PPS
   bool    bPrefixNalAddingCtrl;        ///< false:not use Prefix NAL; true: use Prefix NAL
-  bool    bEnableSSEI;                 ///< false:not use SSEI; true: use SSEI
+  bool    bEnableSSEI;                 ///< false:not use SSEI; true: use SSEI -- TODO: planning to remove the interface of SSEI
+  bool    bSimulcastAVC;               ///< (when encoding more than 1 spatial layer) false: use SVC syntax for higher layers; true: use Simulcast AVC -- coming soon
   int     iPaddingFlag;                ///< 0:disable padding;1:padding
   int     iEntropyCodingModeFlag;      ///< 0:CAVLC  1:CABAC.
 
@@ -640,7 +640,8 @@
   unsigned int uiEcIDRNum;                     ///< number of actual unintegrity IDR or not received but eced
   unsigned int uiEcFrameNum;                   ///<
   unsigned int uiIDRLostNum;                   ///< number of whole lost IDR
-  unsigned int uiFreezingIDRNum;               ///< number of freezing IDR with error (partly received), under resolution change
+  unsigned int
+  uiFreezingIDRNum;               ///< number of freezing IDR with error (partly received), under resolution change
   unsigned int uiFreezingNonIDRNum;            ///< number of freezing non-IDR with error
   int iAvgLumaQp;                              ///< average luma QP. default: -1, no correct frame outputted
 
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -142,7 +142,8 @@
     param.iLTRRefNum				= 0;
     param.iLtrMarkPeriod			= 30;	//the min distance of two int32_t references
 
-    param.bEnableSSEI					= true;
+    param.bEnableSSEI					= false;
+    param.bSimulcastAVC       = false;
     param.bEnableFrameCroppingFlag	= true;	// enable frame cropping flag: true alwayse in application
     // false: Streaming Video Sharing; true: Video Conferencing Meeting;
 
@@ -320,6 +321,7 @@
 
     /* For ssei information */
     bEnableSSEI		= pCodingParam.bEnableSSEI;
+    bSimulcastAVC		= pCodingParam.bSimulcastAVC;
 
     /* Layer definition */
     iSpatialLayerNum	= (int8_t)WELS_CLIP3 (pCodingParam.iSpatialLayerNum, 1,
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -3938,6 +3938,7 @@
 
     // keep below values unchanged as before
     pOldParam->bEnableSSEI		= pNewParam->bEnableSSEI;
+    pOldParam->bSimulcastAVC		= pNewParam->bSimulcastAVC;
     pOldParam->bEnableFrameCroppingFlag	= pNewParam->bEnableFrameCroppingFlag;	// enable frame cropping flag
 
     /* Motion search */
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -886,7 +886,8 @@
   case ENCODER_OPTION_ENABLE_SSEI: {
     bool iValue = * ((bool*)pOption);
     m_pEncContext->pSvcParam->bEnableSSEI = iValue;
-    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO, " CWelsH264SVCEncoder::SetOption enable SSEI = %d ",
+    WelsLog (&m_pWelsTrace->m_sLogCtx, WELS_LOG_INFO,
+             " CWelsH264SVCEncoder::SetOption enable SSEI = %d -- this is not supported yet",
              m_pEncContext->pSvcParam->bEnableSSEI);
   }
   break;