ref: b6502a5406ff5ff21211382f9522be1906cef9c2
parent: f432ddeea8d80e024945ba8b489051a1a120f481
author: Martin Storsjö <[email protected]>
date: Tue Feb 18 07:03:23 EST 2014
Respect the bEnableRc field in SEncParamExt
--- a/codec/encoder/core/inc/param_svc.h
+++ b/codec/encoder/core/inc/param_svc.h
@@ -275,7 +275,7 @@
return 0;
}
-int32_t ParamTranscode (const SEncParamExt& pCodingParam, const bool kbEnableRc = true) {
+int32_t ParamTranscode (const SEncParamExt& pCodingParam) {
float fParamMaxFrameRate = WELS_CLIP3 (pCodingParam.fMaxFrameRate, MIN_FRAME_RATE, MAX_FRAME_RATE);
iInputCsp = pCodingParam.iInputCsp; // color space of input sequence
@@ -305,7 +305,7 @@
bEnableFrameCroppingFlag = true;
/* Rate Control */
- bEnableRc = kbEnableRc;
+ bEnableRc = pCodingParam.bEnableRc;
if (pCodingParam.iRCMode != RC_MODE0 && pCodingParam.iRCMode != RC_MODE1)
iRCMode = RC_MODE1;
else
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -222,7 +222,7 @@
else if(iInitType == INIT_TYPE_PARAMETER_EXT)
{
// Convert SEncParamExt into WelsSVCParamConfig here..
- if (sConfig.ParamTranscode (*(const SEncParamExt*)argv, true)) {
+ if (sConfig.ParamTranscode (*(const SEncParamExt*)argv)) {
WelsLog (m_pEncContext, WELS_LOG_ERROR, "CWelsH264SVCEncoder::Initialize(), parameter_translation failed.\n");
Uninitialize();
return cmInitParaError;
@@ -785,7 +785,7 @@
}
iInputColorspace = sEncodingParam.iInputCsp;
- if (sConfig.ParamTranscode (sEncodingParam, true)) {
+ if (sConfig.ParamTranscode (sEncodingParam)) {
return cmInitParaError;
}
if (sConfig.iSpatialLayerNum < 1) {