History

Merge pull request #2281 from sijchen/th11

[Encoder] remove duplicated operation after thread pool

HaiboZhu committed 10 years ago

Commit f679da92 parents b749fe7 05c89b77 files · +26 −23Browse files

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

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+3−14
@@ -242,21 +242,10 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 241 unmodified lines
242 }242 }
243 iRunLen[iSliceIdx] = iMbNumLeft;243 iRunLen[iSliceIdx] = iMbNumLeft;
244 MT_TRACE_LOG (pCtx, WELS_LOG_DEBUG,244 MT_TRACE_LOG (pCtx, WELS_LOG_DEBUG,
245 "[MT] DynamicAdjustSlicing(), iSliceIdx= %d, iSliceComplexRatio= %.2f, slice_run_org= %d, slice_run_adj= %d",245 "[MT] DynamicAdjustSlicing(), iSliceIdx= %d, pSliceComplexRatio= %.2f, slice_run_org= %d, slice_run_adj= %d",
246 iSliceIdx, pSliceInLayer[iSliceIdx].iSliceComplexRatio * 1.0f / INT_MULTIPLY,246 iSliceIdx, pSliceComplexRatio[iSliceIdx] * 1.0f / INT_MULTIPLY, pSliceCtx->pCountMbNumInSlice[iSliceIdx], iMbNumLeft);
247 pSliceInLayer[iSliceIdx].iCountMbNumInSlice, iMbNumLeft);
248 247
249 if (DynamicAdjustSlicePEncCtxAll (pCurDqLayer, iRunLen) == 0) {248 pCurDqLayer->bNeedAdjustingSlicing = !DynamicAdjustSlicePEncCtxAll (pCurDqLayer, iRunLen);
250 const int32_t kiThreadNum = pCtx->pSvcParam->iCountThreadsNum;
251 int32_t iThreadIdx = 0;
252 do {
253 WelsEventSignal (&pCtx->pSliceThreading->pUpdateMbListEvent[iThreadIdx]);
254 WelsEventSignal (&pCtx->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
255 ++ iThreadIdx;
256 } while (iThreadIdx < kiThreadNum);
257
258 WelsMultipleEventsWaitAllBlocking (kiThreadNum, &pCtx->pSliceThreading->pFinUpdateMbListEvent[0]);
259 }
260}249}
261 250
262int32_t SetMultiSliceBuffer (sWelsEncCtx** ppCtx, CMemoryAlign* pMa, SSliceThreading* pSmt,251int32_t SetMultiSliceBuffer (sWelsEncCtx** ppCtx, CMemoryAlign* pMa, SSliceThreading* pSmt,

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