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

Function RcJudgeBaseUsability

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

Source from the content-addressed store, hash-verified

686}
687
688SWelsSvcRc* RcJudgeBaseUsability (sWelsEncCtx* pEncCtx) {
689 SWelsSvcRc* pWelsSvcRc = NULL, *pWelsSvcRc_Base = NULL;
690 SSpatialLayerConfig* pDlpBase = NULL, *pDLayerParam = NULL;
691 SSpatialLayerInternal* pDlpBaseInternal = NULL;
692 if (pEncCtx->uiDependencyId <= 0)
693 return NULL;
694 pDlpBaseInternal = &pEncCtx->pSvcParam->sDependencyLayers[pEncCtx->uiDependencyId - 1];
695 pDlpBase = &pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId - 1];
696 pWelsSvcRc_Base = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId - 1];
697 if (pEncCtx->uiTemporalId <= pDlpBaseInternal->iDecompositionStages) {
698 pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
699 pWelsSvcRc_Base = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId - 1];
700 pDLayerParam = &pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId];
701 pDlpBase = &pEncCtx->pSvcParam->sSpatialLayers[pEncCtx->uiDependencyId - 1];
702 if ((pDLayerParam->iVideoWidth * pDLayerParam->iVideoHeight / pWelsSvcRc->iNumberMbGom) ==
703 (pDlpBase->iVideoWidth * pDlpBase->iVideoHeight / pWelsSvcRc_Base->iNumberMbGom))
704 return pWelsSvcRc_Base;
705 else
706 return NULL;
707 } else
708 return NULL;
709}
710
711void RcGomTargetBits (sWelsEncCtx* pEncCtx, SSlice* pSlice) {
712 SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];

Callers 1

RcGomTargetBitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected