ref: 7a8da6a46843cd9178cb244d16cc388daadd49aa
parent: dcdd49608226d29ed4517688bafb97e51c293cc5
author: sijchen <sijchen@cisco.com>
date: Mon Jan 11 10:01:57 EST 2016
remove unneed codes after new task-managements
--- a/codec/encoder/core/src/slice_multi_threading.cpp
+++ b/codec/encoder/core/src/slice_multi_threading.cpp
@@ -257,7 +257,6 @@
int32_t iThreadNum = 0;
int32_t iIdx = 0;
int32_t iReturn = ENC_RETURN_SUCCESS;
- bool bWillUseTaskManage = false;
if (NULL == ppCtx || NULL == pCodingParam || NULL == *ppCtx || iCountBsLen <= 0)
return 1;
@@ -281,15 +280,6 @@
WelsSnprintf (pSmt->eventNamespace, sizeof (pSmt->eventNamespace), "%p%x", (void*) *ppCtx, getpid());
#endif//!_WIN32
- iIdx = 0;
- while (iIdx < iNumSpatialLayers) {
- SSliceArgument* pSliceArgument = &pPara->sSpatialLayers[iIdx].sSliceArgument;
- if (pSliceArgument->uiSliceMode == SM_FIXEDSLCNUM_SLICE || pSliceArgument->uiSliceMode == SM_RASTER_SLICE || pSliceArgument->uiSliceMode == SM_SIZELIMITED_SLICE) {
- bWillUseTaskManage = true;
- }
- ++ iIdx;
- }
-
#ifdef MT_DEBUG
// file handle for MT debug
pSmt->pFSliceDiff = NULL;
@@ -353,10 +343,8 @@
iReturn = WelsMutexInit (&pSmt->mutexSliceNumUpdate);
WELS_VERIFY_RETURN_PROC_IF (1, (WELS_THREAD_ERROR_OK != iReturn), FreeMemorySvc (ppCtx))
- if (bWillUseTaskManage) {
- (*ppCtx)->pTaskManage = IWelsTaskManage::CreateTaskManage (*ppCtx, iNumSpatialLayers, bDynamicSlice);
- WELS_VERIFY_RETURN_PROC_IF (iReturn, (NULL == (*ppCtx)->pTaskManage), FreeMemorySvc (ppCtx))
- }
+ (*ppCtx)->pTaskManage = IWelsTaskManage::CreateTaskManage (*ppCtx, iNumSpatialLayers, bDynamicSlice);
+ WELS_VERIFY_RETURN_PROC_IF (iReturn, (NULL == (*ppCtx)->pTaskManage), FreeMemorySvc (ppCtx))
memset (&pSmt->bThreadBsBufferUsage, 0, MAX_THREADS_NUM * sizeof (bool));
iReturn = WelsMutexInit (&pSmt->mutexThreadBsBufferUsage);