Showing the changes to codec/encoder/core/src/ratectl.cpp (1 of 2 files). Show all
Unified · Split
| @@ -473,7 +473,7 @@ void RcCalculatePictureQp (sWelsEncCtx* pEncCtx) { · 472 unmodified lines | ||
| 473 | 473 | pWelsSvcRc->iQStep = WELS_DIV_ROUND ((pTOverRc->iLinearCmplx * iCmplxRatio), (pWelsSvcRc->iTargetBits * INT_MULTIPLY)); |
| 474 | 474 | iLumaQp = RcConvertQStep2Qp (pWelsSvcRc->iQStep); |
| 475 | 475 | WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG, |
| 476 | − "iCmplxRatio = %d,frameComplexity = %lld,iFrameCmplxMean = %d,iQStep = %d,iLumaQp = %d", (int)iCmplxRatio, | |
| 476 | + "iCmplxRatio = %d,frameComplexity = %lld,iFrameCmplxMean = %" PRId64 ",iQStep = %d,iLumaQp = %d", (int)iCmplxRatio, | |
| 477 | 477 | pEncCtx->pVaa->sComplexityAnalysisParam.iFrameComplexity, pTOverRc->iFrameCmplxMean, pWelsSvcRc->iQStep, iLumaQp); |
| 478 | 478 | //limit QP |
| 479 | 479 | int32_t iLastIdxCodecInVGop = pWelsSvcRc->iFrameCodedInVGop - 1; |
| @@ -1043,7 +1043,7 @@ void RcUpdateIntraComplexity (sWelsEncCtx* pEncCtx) { · 563 unmodified lines | ||
| 1043 | 1043 | pWelsSvcRc->iIntraComplexity = iIntraCmplx; |
| 1044 | 1044 | pWelsSvcRc->iIntraComplxMean = pEncCtx->pVaa->sComplexityAnalysisParam.iFrameComplexity; |
| 1045 | 1045 | } else { |
| 1046 | − pWelsSvcRc->iIntraComplexity = WELS_DIV_ROUND (((LINEAR_MODEL_DECAY_FACTOR) * pWelsSvcRc->iIntraComplexity + | |
| 1046 | + pWelsSvcRc->iIntraComplexity = WELS_DIV_ROUND64 (((LINEAR_MODEL_DECAY_FACTOR) * pWelsSvcRc->iIntraComplexity + | |
| 1047 | 1047 | (INT_MULTIPLY - LINEAR_MODEL_DECAY_FACTOR) * |
| 1048 | 1048 | iIntraCmplx), INT_MULTIPLY); |
| 1049 | 1049 | |
| @@ -1080,7 +1080,7 @@ void RcUpdateFrameComplexity (sWelsEncCtx* pEncCtx) { · 30 unmodified lines | ||
| 1080 | 1080 | pTOverRc->iLinearCmplx = WELS_DIV_ROUND64 (((LINEAR_MODEL_DECAY_FACTOR) * (int64_t)pTOverRc->iLinearCmplx |
| 1081 | 1081 | + (INT_MULTIPLY - LINEAR_MODEL_DECAY_FACTOR) * ((int64_t)pWelsSvcRc->iFrameDqBits * iQStep)), |
| 1082 | 1082 | INT_MULTIPLY); |
| 1083 | − pTOverRc->iFrameCmplxMean = WELS_DIV_ROUND (((LINEAR_MODEL_DECAY_FACTOR) * static_cast<int64_t> | |
| 1083 | + pTOverRc->iFrameCmplxMean = WELS_DIV_ROUND64 (((LINEAR_MODEL_DECAY_FACTOR) * static_cast<int64_t> | |
| 1084 | 1084 | (pTOverRc->iFrameCmplxMean) |
| 1085 | 1085 | + (INT_MULTIPLY - LINEAR_MODEL_DECAY_FACTOR) * pEncCtx->pVaa->sComplexityAnalysisParam.iFrameComplexity), |
| 1086 | 1086 | INT_MULTIPLY); |
| @@ -1094,7 +1094,7 @@ void RcUpdateFrameComplexity (sWelsEncCtx* pEncCtx) { · 7 unmodified lines | ||
| 1094 | 1094 | "RcUpdateFrameComplexity iFrameDqBits = %d,iQStep= %d,pWelsSvcRc->iQStep= %d,pTOverRc->iLinearCmplx = %" PRId64, |
| 1095 | 1095 | pWelsSvcRc->iFrameDqBits, |
| 1096 | 1096 | iQStep, pWelsSvcRc->iQStep, pTOverRc->iLinearCmplx); |
| 1097 | − WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG, "iFrameCmplxMean = %d,iFrameComplexity = %lld", | |
| 1097 | + WelsLog (& (pEncCtx->sLogCtx), WELS_LOG_DEBUG, "iFrameCmplxMean = %" PRId64 ",iFrameComplexity = %lld", | |
| 1098 | 1098 | pTOverRc->iFrameCmplxMean, pEncCtx->pVaa->sComplexityAnalysisParam.iFrameComplexity); |
| 1099 | 1099 | } |
| 1100 | 1100 | |