MCPcopy Create free account
hub / github.com/cisco/openh264 / RcJudgeBitrateFpsUpdate

Function RcJudgeBitrateFpsUpdate

codec/encoder/core/src/ratectl.cpp:335–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335bool RcJudgeBitrateFpsUpdate (sWelsEncCtx* pEncCtx) {
336 int32_t iCurDid = pEncCtx->uiDependencyId;
337 SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[iCurDid];
338 SSpatialLayerInternal* pDLayerParamInternal = &pEncCtx->pSvcParam->sDependencyLayers[iCurDid];
339 SSpatialLayerConfig* pDLayerParam = &pEncCtx->pSvcParam->sSpatialLayers[iCurDid];
340
341 if ((pWelsSvcRc->iPreviousBitrate != pDLayerParam->iSpatialBitrate) ||
342 (pWelsSvcRc->dPreviousFps - pDLayerParamInternal->fOutputFrameRate) > EPSN ||
343 (pWelsSvcRc->dPreviousFps - pDLayerParamInternal->fOutputFrameRate) < -EPSN) {
344 pWelsSvcRc->iPreviousBitrate = pDLayerParam->iSpatialBitrate;
345 pWelsSvcRc->dPreviousFps = pDLayerParamInternal->fOutputFrameRate;
346 return true;
347 } else
348 return false;
349}
350
351#if GOM_TRACE_FLAG
352void RcTraceVGopBitrate (sWelsEncCtx* pEncCtx) {

Callers 1

WelsRcPictureInitGomFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected