History

remove iCountThreadsNum and unitfy with iMultipleThreadIdc

huade committed 10 years ago

Commit e8536c61 parent ee01b3a4 files · +16 −21Browse files

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

Unified · Split

codec/encoder/core/src/slice_multi_threading.cpp+5−5
@@ -299,7 +299,7 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 298 unmodified lines
299 pMa = (*ppCtx)->pMemAlign;299 pMa = (*ppCtx)->pMemAlign;
300 pPara = pCodingParam;300 pPara = pCodingParam;
301 iNumSpatialLayers = pPara->iSpatialLayerNum;301 iNumSpatialLayers = pPara->iSpatialLayerNum;
302 iThreadNum = pPara->iCountThreadsNum;302 iThreadNum = pPara->iMultipleThreadIdc;
303 iMaxSliceNum = (*ppCtx)->iMaxSliceCount;303 iMaxSliceNum = (*ppCtx)->iMaxSliceCount;
304 304
305 pSmt = (SSliceThreading*)pMa->WelsMalloc (sizeof (SSliceThreading), "SSliceThreading");305 pSmt = (SSliceThreading*)pMa->WelsMalloc (sizeof (SSliceThreading), "SSliceThreading");
@@ -406,8 +406,8 @@ int32_t RequestMtResource (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPara · 100 unmodified lines
406 iReturn = WelsMutexInit (& (*ppCtx)->mutexEncoderError);406 iReturn = WelsMutexInit (& (*ppCtx)->mutexEncoderError);
407 WELS_VERIFY_RETURN_PROC_IF (1, (WELS_THREAD_ERROR_OK != iReturn), FreeMemorySvc (ppCtx))407 WELS_VERIFY_RETURN_PROC_IF (1, (WELS_THREAD_ERROR_OK != iReturn), FreeMemorySvc (ppCtx))
408 408
409 MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "RequestMtResource(), iThreadNum=%d, iCountSliceNum= %d",409 MT_TRACE_LOG (*ppCtx, WELS_LOG_INFO, "RequestMtResource(), iThreadNum=%d, iMultipleThreadIdc= %d",
410 pPara->iCountThreadsNum,410 pPara->iMultipleThreadIdc,
411 iMaxSliceNum);411 iMaxSliceNum);
412 412
413 return 0;413 return 0;
@@ -426,7 +426,7 @@ void ReleaseMtResource (sWelsEncCtx** ppCtx) { · 12 unmodified lines
426 426
427 pMa = (*ppCtx)->pMemAlign;427 pMa = (*ppCtx)->pMemAlign;
428 uiSliceNum = (*ppCtx)->iMaxSliceCount;428 uiSliceNum = (*ppCtx)->iMaxSliceCount;
429 iThreadNum = (*ppCtx)->pSvcParam->iCountThreadsNum;429 iThreadNum = (*ppCtx)->pSvcParam->iMultipleThreadIdc;
430 pSmt = (*ppCtx)->pSliceThreading;430 pSmt = (*ppCtx)->pSliceThreading;
431 431
432 if (NULL == pSmt)432 if (NULL == pSmt)
@@ -882,7 +882,7 @@ WELS_THREAD_ROUTINE_TYPE CodingSliceThreadProc (void* arg) { · 449 unmodified lines
882}882}
883 883
884int32_t CreateSliceThreads (sWelsEncCtx* pCtx) {884int32_t CreateSliceThreads (sWelsEncCtx* pCtx) {
885 const int32_t kiThreadCount = pCtx->pSvcParam->iCountThreadsNum;885 const int32_t kiThreadCount = pCtx->pSvcParam->iMultipleThreadIdc;
886 int32_t iIdx = 0;886 int32_t iIdx = 0;
887 887
888 while (iIdx < kiThreadCount) {888 while (iIdx < kiThreadCount) {

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