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

Function RcVBufferCalculationPadding

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

Source from the content-addressed store, hash-verified

1023}
1024
1025void RcVBufferCalculationPadding (sWelsEncCtx* pEncCtx) {
1026 SWelsSvcRc* pWelsSvcRc = &pEncCtx->pWelsSvcRc[pEncCtx->uiDependencyId];
1027 const int32_t kiOutputBits = pWelsSvcRc->iBitsPerFrame;
1028 const int32_t kiBufferThreshold = WELS_DIV_ROUND (PADDING_THRESHOLD * (-pWelsSvcRc->iBufferSizePadding), INT_MULTIPLY);
1029
1030 pWelsSvcRc->iBufferFullnessPadding += (pWelsSvcRc->iFrameDqBits - kiOutputBits);
1031
1032 if (pWelsSvcRc->iBufferFullnessPadding < kiBufferThreshold) {
1033 pWelsSvcRc->iPaddingSize = -pWelsSvcRc->iBufferFullnessPadding;
1034 pWelsSvcRc->iPaddingSize >>= 3; // /8
1035 pWelsSvcRc->iBufferFullnessPadding = 0;
1036 } else
1037 pWelsSvcRc->iPaddingSize = 0;
1038}
1039
1040
1041void RcTraceFrameBits (sWelsEncCtx* pEncCtx, long long uiTimeStamp, int32_t iFrameSize) {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected