ref: 26b225e34f5cd6e7df20d5765801426c7a151da5
parent: abc2495f2ff9c077316285bddeced48c2a95c3d4
parent: 470fc4288c4d984c9559ce186c11f2524109df5c
author: Licai Guo <licaguo@cisco.com>
date: Mon Feb 24 08:21:53 EST 2014
Merge pull request #341 from ruil2/cleanup cleanup encoder parameters--- review request #108
--- a/codec/api/svc/codec_app_def.h
+++ b/codec/api/svc/codec_app_def.h
@@ -193,7 +193,7 @@
typedef struct TagEncParamExt
{
- int iUsageType; //enable_screen_content_signal;// 0: //camera video signal; 1: screen content signal;
+ int iUsageType; //application type;// 0: //camera video signal; 1: screen content signal;
int iInputCsp; // color space of input sequence
int iPicWidth; // width of picture in samples
@@ -204,47 +204,46 @@
int iTemporalLayerNum; // layer number at temporal level
int iSpatialLayerNum; // layer number at spatial level
+ SSpatialLayerConfig sSpatialLayers[MAX_SPATIAL_LAYER_NUM];
unsigned int uiIntraPeriod; // period of Intra frame
+ int iNumRefFrame; // number of reference frame used
+ unsigned int uiFrameToBeCoded; // frame to be encoded (at input frame rate)
bool bEnableSpsPpsIdAddition;
bool bPrefixNalAddingCtrl;
- bool bEnableDenoise; // denoise control
- bool bEnableBackgroundDetection;// background detection control //VAA_BACKGROUND_DETECTION //BGD cmd
- bool bEnableAdaptiveQuant; // adaptive quantization control
+ bool bEnableSSEI;
+ int iPaddingFlag; // 0:disable padding;1:padding
+ int iEtropyCodingModeFlag;
+
+ /* rc control */
+ bool bEnableRc;
bool bEnableFrameSkip; // allow skipping frames to keep the bitrate within limits
- bool bEnableCropPic; // enable cropping source picture. 8/25/2010
- // false: Streaming Video Sharing; true: Video Conferencing Meeting;
+ int iMaxQp;
+ int iMinQp;
+ /*LTR settings*/
bool bEnableLongTermReference; // 0: on, 1: off
+ int iLTRRefNum;
int iLtrMarkPeriod;
- int iPaddingFlag; // 0:disable padding;1:padding
- int iEtropyCodingModeFlag;
- SSpatialLayerConfig sSpatialLayers[MAX_SPATIAL_LAYER_NUM];
- int iNumRefFrame; // number of reference frame used
- unsigned int uiFrameToBeCoded; // frame to be encoded (at input frame rate)
- bool bEnableRc;
+ /* multi-thread settings*/
short iMultipleThreadIdc; // 1 # 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
short iCountThreadsNum; // # derived from disable_multiple_slice_idc (=0 or >1) means;
- int iLTRRefNum;
- bool bEnableSSEI;
- bool bEnableFrameCroppingFlag;// enable frame cropping flag: TRUE always in application
-
- /* Deblocking loop filter */
+ /* Deblocking loop filter */
int iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries
int iLoopFilterAlphaC0Offset;// AlphaOffset: valid range [-6, 6], default 0
-
int iLoopFilterBetaOffset; // BetaOffset: valid range [-6, 6], default 0
int iInterLayerLoopFilterDisableIdc; // Employed based upon inter-layer, same comment as above
int iInterLayerLoopFilterAlphaC0Offset; // InterLayerLoopFilterAlphaC0Offset
int iInterLayerLoopFilterBetaOffset; // InterLayerLoopFilterBetaOffset
- bool bEnableSceneChangeDetect;
- //added
- int iMaxQp;
- int iMinQp;
-
+ /*pre-processing feature*/
+ bool bEnableDenoise; // denoise control
+ bool bEnableBackgroundDetection;// background detection control //VAA_BACKGROUND_DETECTION //BGD cmd
+ bool bEnableAdaptiveQuant; // adaptive quantization control
+ bool bEnableFrameCroppingFlag;// enable frame cropping flag: TRUE always in application
+ bool bEnableSceneChangeDetect;
}SEncParamExt;
//Define a new struct to show the property of video bitstream.
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -172,7 +172,6 @@
true; // Strategy of have MGS only at T0 frames (0: do not use this strategy; 1: use this strategy)
bEnableSSEI = true;
bEnableFrameCroppingFlag = true; // enable frame cropping flag: true alwayse in application
- bEnableCropPic = true; // enable cropping source picture. , 8/25/2010
// false: Streaming Video Sharing; true: Video Conferencing Meeting;
iDecompStages = 0; // GOP size dependency, unknown here and be revised later
@@ -339,9 +338,6 @@
/* Frame skipping */
bEnableFrameSkip = pCodingParam.bEnableFrameSkip ? true : false;
-
- /* Enable cropping source picture */
- bEnableCropPic = pCodingParam.bEnableCropPic ? true : false;
/* Enable int32_t term reference */
bEnableLongTermReference = pCodingParam.bEnableLongTermReference ? true : false;
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -746,7 +746,7 @@
WelsLog (m_pEncContext, WELS_LOG_INFO, "ENCODER_OPTION_SVC_ENCODE_PARAM_EXT, sEncodingParam.iInputCsp= 0x%x\n",
sEncodingParam.iInputCsp);
WelsLog (m_pEncContext, WELS_LOG_INFO,
- "coding_param->iPicWidth= %d;coding_param->iPicHeight= %d;coding_param->iTargetBitrate= %d;coding_param->iRCMode= %d;coding_param->iPaddingFlag= %d;coding_param->iTemporalLayerNum= %d;coding_param->iSpatialLayerNum= %d;coding_param->fFrameRate= %.6ff;coding_param->iInputCsp= %d;coding_param->uiIntraPeriod= %d;coding_param->bEnableSpsPpsIdAddition = %d;coding_param->bPrefixNalAddingCtrl = %d;coding_param->bEnableDenoise= %d;coding_param->bEnableBackgroundDetection= %d;coding_param->bEnableAdaptiveQuant= %d;coding_param->bEnableAdaptiveQuant= %d;coding_param->bEnableCropPic= %d;coding_param->bEnableLongTermReference= %d;coding_param->iLtrMarkPeriod= %d;\n",
+ "coding_param->iPicWidth= %d;coding_param->iPicHeight= %d;coding_param->iTargetBitrate= %d;coding_param->iRCMode= %d;coding_param->iPaddingFlag= %d;coding_param->iTemporalLayerNum= %d;coding_param->iSpatialLayerNum= %d;coding_param->fFrameRate= %.6ff;coding_param->iInputCsp= %d;coding_param->uiIntraPeriod= %d;coding_param->bEnableSpsPpsIdAddition = %d;coding_param->bPrefixNalAddingCtrl = %d;coding_param->bEnableDenoise= %d;coding_param->bEnableBackgroundDetection= %d;coding_param->bEnableAdaptiveQuant= %d;coding_param->bEnableAdaptiveQuant= %d;coding_param->bEnableLongTermReference= %d;coding_param->iLtrMarkPeriod= %d;\n",
sEncodingParam.iPicWidth,
sEncodingParam.iPicHeight,
sEncodingParam.iTargetBitrate,
@@ -763,7 +763,6 @@
sEncodingParam.bEnableBackgroundDetection,
sEncodingParam.bEnableAdaptiveQuant,
sEncodingParam.bEnableFrameSkip,
- sEncodingParam.bEnableCropPic,
sEncodingParam.bEnableLongTermReference,
sEncodingParam.iLtrMarkPeriod);
int32_t i = 0;
--- a/testbin/layer2.cfg
+++ b/testbin/layer2.cfg
@@ -4,7 +4,6 @@
#============================== INPUT / OUTPUT ==============================
FrameWidth 320 # Input frame width
FrameHeight 192 # Input frame height
-FrameRateIn 12 # Input frame rate [Hz]
FrameRateOut 12 # Output frame rate [Hz]
ReconFile rec_layer2.yuv # Reconstructed file