adjust the param validation of max bit rate
This commit is contained in:
@@ -155,11 +155,16 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) {
|
|||||||
pSpatialLayer->iSpatialBitrate);
|
pSpatialLayer->iSpatialBitrate);
|
||||||
return ENC_RETURN_INVALIDINPUT;
|
return ENC_RETURN_INVALIDINPUT;
|
||||||
}
|
}
|
||||||
if (pSpatialLayer->iMaxSpatialBitrate < pSpatialLayer->iSpatialBitrate * 1.1f) {
|
if (pSpatialLayer->iMaxSpatialBitrate == pSpatialLayer->iSpatialBitrate) {
|
||||||
WelsLog (pLogCtx, WELS_LOG_WARNING,
|
WelsLog (pLogCtx, WELS_LOG_INFO,
|
||||||
"MaxSpatialBitrate (%d) should set be larger than 1.1 times of SpatialBitrate (%d)",
|
"Setting MaxSpatialBitrate (%d) the same at SpatialBitrate (%d) will make the actual bit rate lower than SpatialBitrate",
|
||||||
pSpatialLayer->iMaxSpatialBitrate, pSpatialLayer->iSpatialBitrate);
|
pSpatialLayer->iMaxSpatialBitrate, pSpatialLayer->iSpatialBitrate);
|
||||||
// pSpatialLayer->iSpatialBitrate = (int32_t) (pSpatialLayer->iMaxSpatialBitrate/1.1f);
|
}
|
||||||
|
if (pSpatialLayer->iMaxSpatialBitrate < pSpatialLayer->iSpatialBitrate) {
|
||||||
|
WelsLog (pLogCtx, WELS_LOG_WARNING,
|
||||||
|
"MaxSpatialBitrate (%d) should be lower than SpatialBitrate (%d), considering it as invalid setting, adjust it to be UNSPECIFIED(0)",
|
||||||
|
pSpatialLayer->iMaxSpatialBitrate, pSpatialLayer->iSpatialBitrate);
|
||||||
|
pSpatialLayer->iMaxSpatialBitrate = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (iTotalBitrate > pCfg->iTargetBitrate) {
|
if (iTotalBitrate > pCfg->iTargetBitrate) {
|
||||||
|
|||||||
Reference in New Issue
Block a user