ref: 8a341070f2d2053c8d791d8bd90c112bf5a1ae64
parent: 3fd490dbedae851ef5996d9867980eec8958683d
author: Karina <[email protected]>
date: Thu May 19 08:00:49 EDT 2016
fix overflow issue
--- a/codec/encoder/core/src/ratectl.cpp
+++ b/codec/encoder/core/src/ratectl.cpp
@@ -523,7 +523,7 @@
pSOverRc->iEndMbSlice += (pSliceInLayer[i].iCountMbNumInSlice - 1);
pSOverRc->iTotalQpSlice = 0;
pSOverRc->iTotalMbSlice = 0;
- pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY);
+ pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (static_cast<int64_t> (kiBitsPerMb) * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY);
pSOverRc->iFrameBitsSlice = 0;
pSOverRc->iGomBitsSlice = 0;
}