diff --git a/codec/api/svc/codec_app_def.h b/codec/api/svc/codec_app_def.h index 963e1884..2859edfb 100644 --- a/codec/api/svc/codec_app_def.h +++ b/codec/api/svc/codec_app_def.h @@ -511,7 +511,7 @@ typedef struct TagEncParamExt { eSpsPpsIdStrategy; ///< different stategy in adjust ID in SPS/PPS: 0- constant ID, 1-additional ID, 6-mapping and additional bool bPrefixNalAddingCtrl; ///< false:not use Prefix NAL; true: use Prefix NAL 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 + bool bSimulcastAVC; ///< (when encoding more than 1 spatial layer) false: use SVC syntax for higher layers; true: use Simulcast AVC int iPaddingFlag; ///< 0:disable padding;1:padding int iEntropyCodingModeFlag; ///< 0:CAVLC 1:CABAC. diff --git a/codec/console/enc/src/welsenc.cpp b/codec/console/enc/src/welsenc.cpp index 0d73a2d4..cb90c025 100644 --- a/codec/console/enc/src/welsenc.cpp +++ b/codec/console/enc/src/welsenc.cpp @@ -223,9 +223,9 @@ int ParseConfig (CReadConfig& cRdCfg, SSourcePicture* pSrcPic, SEncParamExt& pSv if (strTag[0].compare ("UsageType") == 0) { pSvcParam.iUsageType = (EUsageType)atoi (strTag[1].c_str()); - } else if (strTag[0].compare ("SourceWidth") == 0) { - pSrcPic->iPicWidth = atoi (strTag[1].c_str()); - } else if (strTag[0].compare ("SourceHeight") == 0) { + }else if (strTag[0].compare ("SimulcastAVC") == 0) { + pSvcParam.bSimulcastAVC = atoi (strTag[1].c_str()) ? true : false; + }else if (strTag[0].compare ("SourceHeight") == 0) { pSrcPic->iPicHeight = atoi (strTag[1].c_str()); } else if (strTag[0].compare ("InputFile") == 0) { if (strTag[1].length() > 0) @@ -387,6 +387,8 @@ void PrintHelp() { printf (" -org Original file, example: -org src.yuv\n"); printf (" -sw the source width\n"); printf (" -sh the source height\n"); + printf (" -utype usage type\n"); + printf (" -savc simulcast avc\n"); printf (" -frms Number of total frames to be encoded\n"); printf (" -frin input frame rate\n"); printf (" -numtl Temporal layer number (default: 1)\n"); @@ -439,6 +441,9 @@ int ParseCommandLine (int argc, char** argv, SSourcePicture* pSrcPic, SEncParamE else if (!strcmp (pCommand, "-utype") && (n < argc)) pSvcParam.iUsageType = (EUsageType)atoi (argv[n++]); + else if (!strcmp (pCommand, "-savc") && (n < argc)) + pSvcParam.bSimulcastAVC = atoi (argv[n++]) ? true : false; + else if (!strcmp (pCommand, "-org") && (n < argc)) sFileSet.strSeqFile.assign (argv[n++]); @@ -661,6 +666,7 @@ int FillSpecificParameters (SEncParamExt& sParam) { sParam.eSpsPpsIdStrategy = INCREASING_ID; sParam.bPrefixNalAddingCtrl = 0; sParam.iComplexityMode = MEDIUM_COMPLEXITY; + sParam.bSimulcastAVC = false; int iIndexLayer = 0; sParam.sSpatialLayers[iIndexLayer].uiProfileIdc = PRO_BASELINE; sParam.sSpatialLayers[iIndexLayer].iVideoWidth = 160; diff --git a/testbin/welsenc.cfg b/testbin/welsenc.cfg index 32d35f89..bb7f77ab 100644 --- a/testbin/welsenc.cfg +++ b/testbin/welsenc.cfg @@ -2,6 +2,7 @@ #============================== GENERAL ============================== UsageType 0 #0: camera video 1:screen content +SimulcastAVC 0 #0: use SVC syntax for higher layers; 1: use Simulcast AVC SourceWidth 320 #input video width SourceHeight 192 #input video height InputFile ../res/CiscoVT2people_320x192_12fps.yuv # Input file diff --git a/testbin/welsenc_arbitrary_res.cfg b/testbin/welsenc_arbitrary_res.cfg index 47c5e0e4..267eb846 100644 --- a/testbin/welsenc_arbitrary_res.cfg +++ b/testbin/welsenc_arbitrary_res.cfg @@ -2,6 +2,7 @@ #============================== GENERAL ============================== UsageType 0 #0: camera video 1:screen content +SimulcastAVC 0 #0: use SVC syntax for higher layers; 1: use Simulcast AVC SourceWidth 152 # Input frame width SourceHeight 100 # Input frame height InputFile ../res/Static_152_100.yuv # Input file diff --git a/testbin/welsenc_ios.cfg b/testbin/welsenc_ios.cfg index 3aeef194..9bfd9fbc 100644 --- a/testbin/welsenc_ios.cfg +++ b/testbin/welsenc_ios.cfg @@ -2,6 +2,7 @@ #============================== GENERAL ============================== UsageType 0 #0: camera video 1:screen content +SimulcastAVC 0 #0: use SVC syntax for higher layers; 1: use Simulcast AVC SourceWidth 320 #input video width SourceHeight 192 #input video height InputFile ../res/CiscoVT2people_320x192_12fps.yuv # Input file diff --git a/testbin/welsenc_vd_1d.cfg b/testbin/welsenc_vd_1d.cfg index 10627f58..e032fc57 100644 --- a/testbin/welsenc_vd_1d.cfg +++ b/testbin/welsenc_vd_1d.cfg @@ -2,6 +2,7 @@ #============================== GENERAL ============================== UsageType 0 #0: camera video 1:screen content +SimulcastAVC 0 #0: use SVC syntax for higher layers; 1: use Simulcast AVC SourceWidth 320 # Input frame width SourceHeight 192 # Input frame height InputFile ../res/CiscoVT2people_320x192_12fps.yuv # Input file diff --git a/testbin/welsenc_vd_rc.cfg b/testbin/welsenc_vd_rc.cfg index 536dfc15..b8510097 100644 --- a/testbin/welsenc_vd_rc.cfg +++ b/testbin/welsenc_vd_rc.cfg @@ -2,6 +2,7 @@ #============================== GENERAL ============================== UsageType 0 #0: camera video 1:screen content +SimulcastAVC 0 #0: use SVC syntax for higher layers; 1: use Simulcast AVC SourceWidth 320 # Input frame width SourceHeight 192 # Input frame height InputFile ../res/CiscoVT2people_320x192_12fps.yuv