History

adjust the param validation of max bit rate

Sijia Chen committed 12 years ago

Commit 7e24efc1 parent cbb6e991 file · +8 −3Browse files

Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+8−3
@@ -155,11 +155,16 @@ int32_t ParamValidation (SLogContext* pLogCtx, SWelsSvcCodingParam* pCfg) { · 154 unmodified lines
155 pSpatialLayer->iSpatialBitrate);155 pSpatialLayer->iSpatialBitrate);
156 return ENC_RETURN_INVALIDINPUT;156 return ENC_RETURN_INVALIDINPUT;
157 }157 }
158 if (pSpatialLayer->iMaxSpatialBitrate < pSpatialLayer->iSpatialBitrate * 1.1f) {158 if (pSpatialLayer->iMaxSpatialBitrate == pSpatialLayer->iSpatialBitrate) {
159 WelsLog (pLogCtx, WELS_LOG_INFO,
160 "Setting MaxSpatialBitrate (%d) the same at SpatialBitrate (%d) will make the actual bit rate lower than SpatialBitrate",
161 pSpatialLayer->iMaxSpatialBitrate, pSpatialLayer->iSpatialBitrate);
162 }
163 if (pSpatialLayer->iMaxSpatialBitrate < pSpatialLayer->iSpatialBitrate) {
159 WelsLog (pLogCtx, WELS_LOG_WARNING,164 WelsLog (pLogCtx, WELS_LOG_WARNING,
160 "MaxSpatialBitrate (%d) should set be larger than 1.1 times of SpatialBitrate (%d)",165 "MaxSpatialBitrate (%d) should be lower than SpatialBitrate (%d), considering it as invalid setting, adjust it to be UNSPECIFIED(0)",
161 pSpatialLayer->iMaxSpatialBitrate, pSpatialLayer->iSpatialBitrate);166 pSpatialLayer->iMaxSpatialBitrate, pSpatialLayer->iSpatialBitrate);
162// pSpatialLayer->iSpatialBitrate = (int32_t) (pSpatialLayer->iMaxSpatialBitrate/1.1f);167 pSpatialLayer->iMaxSpatialBitrate = 0;
163 }168 }
164 }169 }
165 if (iTotalBitrate > pCfg->iTargetBitrate) {170 if (iTotalBitrate > pCfg->iTargetBitrate) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t