| 1023 | } |
| 1024 | |
| 1025 | void 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 | |
| 1041 | void RcTraceFrameBits (sWelsEncCtx* pEncCtx, long long uiTimeStamp, int32_t iFrameSize) { |
no outgoing calls
no test coverage detected