History

clean unused multi-thread old functions

sijchen@cisco.com committed 9 years ago

Commit 1005d631 parent d26ebee5 files · +4 −386Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+2−21
@@ -2238,8 +2238,7 @@ void WelsUninitEncoderExt (sWelsEncCtx** ppCtx) { · 2237 unmodified lines
22382238 while (iThreadIdx < iThreadCount) {
22392239 int res = 0;
22402240 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {
2241− WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);
2242− WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
2241+
22432242 res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
22442243 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",
22452244 iThreadIdx,
@@ -3749,24 +3748,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 1503 unmodified lines
37493748 else if ((SM_SIZELIMITED_SLICE == pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
37503749 const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum;
37513750
3752−#if 0 //TODO: temporarily use this to keep old codes for a while, will remove old codes later
3753− int32_t iRet = 0;
3754− // to fire slice coding threads
3755− iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0],
3756− &pCtx->pSliceThreading->pReadySliceCodingEvent[0],
3757− &pCtx->pSliceThreading->pThreadMasterEvent[0],
3758− pFbi, kiPartitionCnt);
3759− if (iRet) {
3760− WelsLog (pLogCtx, WELS_LOG_ERROR,
3761− "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!",
3762− iRet, iSliceCount, pParam->sSliceArgument.uiSliceMode, pSvcParam->iMultipleThreadIdc);
3763− return ENC_RETURN_UNEXPECTED;
3764− }
3765−
3766− WelsMultipleEventsWaitAllBlocking (kiPartitionCnt, &pCtx->pSliceThreading->pSliceCodedEvent[0],
3767− &pCtx->pSliceThreading->pSliceCodedMasterEvent);
3768− WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
3769−#else
37703751 //TODO: use a function to remove duplicate code here and ln3994
37713752 int32_t iLayerBsIdx = pCtx->pOut->iLayerBsIndex;
37723753 SLayerBSInfo* pLbi = &pFbi->sLayerInfo[iLayerBsIdx];
@@ -3800,7 +3781,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 27 unmodified lines
38003781 pParam->sSliceArgument.uiSliceMode, pCtx->iEncoderError);
38013782 return pCtx->iEncoderError;
38023783 }
3803−#endif
3784+
38043785 iRet = SliceLayerInfoUpdate (pCtx, pFbi, pLayerBsInfo, pParam->sSliceArgument.uiSliceMode);
38053786 if (iRet) {
38063787 WelsLog (pLogCtx, WELS_LOG_ERROR,

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