History

remove unneed codes after new task-managements

sijchen committed 10 years ago

Commit 7a8da6a1 parent dcdd4961 file · +2 −14Browse files

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

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+2−14
@@ -257,7 +257,6 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 256 unmodified lines
257257 int32_t iThreadNum = 0;
258258 int32_t iIdx = 0;
259259 int32_t iReturn = ENC_RETURN_SUCCESS;
260− bool bWillUseTaskManage = false;
261260
262261 if (NULL == ppCtx || NULL == pCodingParam || NULL == *ppCtx || iCountBsLen <= 0)
263262 return 1;
@@ -281,15 +280,6 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 17 unmodified lines
281280 WelsSnprintf (pSmt->eventNamespace, sizeof (pSmt->eventNamespace), "%p%x", (void*) *ppCtx, getpid());
282281 #endif//!_WIN32
283282
284− iIdx = 0;
285− while (iIdx < iNumSpatialLayers) {
286− SSliceArgument* pSliceArgument = &pPara->sSpatialLayers[iIdx].sSliceArgument;
287− if (pSliceArgument->uiSliceMode == SM_FIXEDSLCNUM_SLICE || pSliceArgument->uiSliceMode == SM_RASTER_SLICE || pSliceArgument->uiSliceMode == SM_SIZELIMITED_SLICE) {
288− bWillUseTaskManage = true;
289− }
290− ++ iIdx;
291− }
292−
293283 #ifdef MT_DEBUG
294284 // file handle for MT debug
295285 pSmt->pFSliceDiff = NULL;
@@ -353,10 +343,8 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 57 unmodified lines
353343 iReturn = WelsMutexInit (&pSmt->mutexSliceNumUpdate);
354344 WELS_VERIFY_RETURN_PROC_IF (1, (WELS_THREAD_ERROR_OK != iReturn), FreeMemorySvc (ppCtx))
355345
356− if (bWillUseTaskManage) {
357− (*ppCtx)->pTaskManage = IWelsTaskManage::CreateTaskManage (*ppCtx, iNumSpatialLayers, bDynamicSlice);
358− WELS_VERIFY_RETURN_PROC_IF (iReturn, (NULL == (*ppCtx)->pTaskManage), FreeMemorySvc (ppCtx))
359− }
346+ (*ppCtx)->pTaskManage = IWelsTaskManage::CreateTaskManage (*ppCtx, iNumSpatialLayers, bDynamicSlice);
347+ WELS_VERIFY_RETURN_PROC_IF (iReturn, (NULL == (*ppCtx)->pTaskManage), FreeMemorySvc (ppCtx))
360348
361349 memset (&pSmt->bThreadBsBufferUsage, 0, MAX_THREADS_NUM * sizeof (bool));
362350 iReturn = WelsMutexInit (&pSmt->mutexThreadBsBufferUsage);

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