History

using WelsRound for all the double-int32_t conversion

Sijia Chen committed 12 years ago

Commit 74130321 parent cc8102010 files · +67 −65Browse files

Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 10 files). Show all

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+2−2
@@ -236,11 +236,11 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 235 unmodified lines
236 236
237 iSliceIdx = 0;237 iSliceIdx = 0;
238 while (iSliceIdx + 1 < kiCountSliceNum) {238 while (iSliceIdx + 1 < kiCountSliceNum) {
239 int32_t iNumMbAssigning = (int32_t) (kiCountNumMb * pSliceComplexRatio[iSliceIdx] + EPSN);239 int32_t iNumMbAssigning = WELS_ROUND (kiCountNumMb * pSliceComplexRatio[iSliceIdx]);
240 240
241 // GOM boundary aligned241 // GOM boundary aligned
242 if (pCtx->pSvcParam->iRCMode != RC_OFF_MODE) {242 if (pCtx->pSvcParam->iRCMode != RC_OFF_MODE) {
243 iNumMbAssigning = (int32_t) (1.0f * iNumMbAssigning / iNumMbInEachGom + 0.5f + EPSN) * iNumMbInEachGom;243 iNumMbAssigning = WELS_ROUND (1.0f * iNumMbAssigning / iNumMbInEachGom) * iNumMbInEachGom;
244 }244 }
245 245
246 // make sure one GOM at least in each pSlice for safe246 // make sure one GOM at least in each pSlice for safe

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