Merge pull request #2419 from ruil2/bitrate_update
fix bitrate update issue
This commit is contained in:
commit
38313b913d
@ -4718,7 +4718,7 @@ int32_t WelsEncoderParamAdjust (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pNewPa
|
||||
pOldDlpInternal->fInputFrameRate = pNewDlpInternal->fInputFrameRate; // input frame rate
|
||||
pOldDlpInternal->fOutputFrameRate = pNewDlpInternal->fOutputFrameRate; // output frame rate
|
||||
pOldDlp->iSpatialBitrate = pNewDlp->iSpatialBitrate;
|
||||
|
||||
pOldDlp->iMaxSpatialBitrate = pNewDlp->iMaxSpatialBitrate;
|
||||
pOldDlp->uiProfileIdc =
|
||||
pNewDlp->uiProfileIdc; // value of profile IDC (0 for auto-detection)
|
||||
pOldDlp->iDLayerQp = pNewDlp->iDLayerQp;
|
||||
|
@ -1331,10 +1331,20 @@ void WelsRcPictureInitGomTimeStamp (sWelsEncCtx* pEncCtx, long long uiTimeStamp
|
||||
int32_t iLumaQp = pWelsSvcRc->iLastCalculatedQScale;
|
||||
int32_t iTl = pEncCtx->uiTemporalId;
|
||||
SRCTemporal* pTOverRc = &pWelsSvcRc->pTemporalOverRc[iTl];
|
||||
//decide one frame bits allocated
|
||||
if (pEncCtx->eSliceType == I_SLICE) {
|
||||
if (0 == pWelsSvcRc->iIdrNum) { //iIdrNum == 0 means encoder has been initialed
|
||||
RcInitRefreshParameter (pEncCtx);
|
||||
}
|
||||
}
|
||||
if (RcJudgeBitrateFpsUpdate (pEncCtx)) {
|
||||
RcUpdateBitrateFps (pEncCtx);
|
||||
}
|
||||
if (pEncCtx->uiTemporalId == 0) {
|
||||
RcUpdateTemporalZero (pEncCtx);
|
||||
}
|
||||
//decide one frame bits allocated
|
||||
if (pEncCtx->eSliceType == I_SLICE) {
|
||||
if (0 == pWelsSvcRc->iIdrNum) { //iIdrNum == 0 means encoder has been initialed
|
||||
RcInitIdrQp (pEncCtx);
|
||||
iLumaQp = pWelsSvcRc->iInitialQp;
|
||||
pWelsSvcRc->iTargetBits = static_cast<int32_t> (((double) (pDLayerParam->iSpatialBitrate) / (double) (
|
||||
|
Loading…
Reference in New Issue
Block a user