ref: 780101fcfd9b604b288393ec2bd1fbbade01d81e
parent: c96c8b05a8c2b85dedb015f2ca62f7745711f7dd
parent: 2ef9613e55cbad9b20ed1387ddc59776b1f1630e
author: HaiboZhu <haibozhu@cisco.com>
date: Wed May 25 05:59:36 EDT 2016
Merge pull request #2474 from ruil2/overflow avoid overflow
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -982,7 +982,7 @@
pTOverRc->iLinearCmplx = ((int64_t)pWelsSvcRc->iFrameDqBits) * iQStep;
} else {
pTOverRc->iLinearCmplx = WELS_DIV_ROUND64 ((LINEAR_MODEL_DECAY_FACTOR * (int64_t)pTOverRc->iLinearCmplx
- + (INT_MULTIPLY - LINEAR_MODEL_DECAY_FACTOR) * (int64_t) (pWelsSvcRc->iFrameDqBits * iQStep)),
+ + (INT_MULTIPLY - LINEAR_MODEL_DECAY_FACTOR) *((int64_t)pWelsSvcRc->iFrameDqBits * iQStep)),
INT_MULTIPLY);
}
int32_t iAlpha = WELS_DIV_ROUND (INT_MULTIPLY, (1 + pTOverRc->iPFrameNum));