History

fix overflow issue

Karina committed 10 years ago

Commit 8a341071 parent 3fd490d1 file · +1 −1Browse files

Showing the changes to codec/encoder/core/src/ratectl.cpp (1 of 1 file). Show all

Unified · Split

codec/encoder/core/src/ratectl.cpp+1−1
@@ -523,7 +523,7 @@ void RcInitSliceInformation (sWelsEncCtx* pEncCtx) { · 522 unmodified lines
523523 pSOverRc->iEndMbSlice += (pSliceInLayer[i].iCountMbNumInSlice - 1);
524524 pSOverRc->iTotalQpSlice = 0;
525525 pSOverRc->iTotalMbSlice = 0;
526− pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (kiBitsPerMb * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY);
526+ pSOverRc->iTargetBitsSlice = WELS_DIV_ROUND (static_cast<int64_t> (kiBitsPerMb) * pSliceInLayer[i].iCountMbNumInSlice, INT_MULTIPLY);
527527 pSOverRc->iFrameBitsSlice = 0;
528528 pSOverRc->iGomBitsSlice = 0;
529529 }

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t