fix overflow issue

This commit is contained in:
Karina 2016-05-19 12:00:49 +08:00
parent 3fd490dbed
commit 8a341070f2

View File

@ -523,7 +523,7 @@ void RcInitSliceInformation (sWelsEncCtx* pEncCtx) {
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;
}