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
2238 while (iThreadIdx < iThreadCount) {2238 while (iThreadIdx < iThreadCount) {
2239 int res = 0;2239 int res = 0;
2240 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {2240 if ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]) {
2241 WelsEventSignal (& (*ppCtx)->pSliceThreading->pExitEncodeEvent[iThreadIdx]);2241
2242 WelsEventSignal (& (*ppCtx)->pSliceThreading->pThreadMasterEvent[iThreadIdx]);
2243 res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit2242 res = WelsThreadJoin ((*ppCtx)->pSliceThreading->pThreadHandles[iThreadIdx]); // waiting thread exit
2244 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",2243 WelsLog (& (*ppCtx)->sLogCtx, WELS_LOG_INFO, "WelsUninitEncoderExt(), pthread_join(pThreadHandles%d) return %d..",
2245 iThreadIdx,2244 iThreadIdx,
@@ -3749,24 +3748,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 1503 unmodified lines
3749 else if ((SM_SIZELIMITED_SLICE == pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {3748 else if ((SM_SIZELIMITED_SLICE == pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
3750 const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum;3749 const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum;
3751 3750
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
3770 //TODO: use a function to remove duplicate code here and ln39943751 //TODO: use a function to remove duplicate code here and ln3994
3771 int32_t iLayerBsIdx = pCtx->pOut->iLayerBsIndex;3752 int32_t iLayerBsIdx = pCtx->pOut->iLayerBsIndex;
3772 SLayerBSInfo* pLbi = &pFbi->sLayerInfo[iLayerBsIdx];3753 SLayerBSInfo* pLbi = &pFbi->sLayerInfo[iLayerBsIdx];
@@ -3800,7 +3781,7 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 27 unmodified lines
3800 pParam->sSliceArgument.uiSliceMode, pCtx->iEncoderError);3781 pParam->sSliceArgument.uiSliceMode, pCtx->iEncoderError);
3801 return pCtx->iEncoderError;3782 return pCtx->iEncoderError;
3802 }3783 }
3803#endif3784
3804 iRet = SliceLayerInfoUpdate (pCtx, pFbi, pLayerBsInfo, pParam->sSliceArgument.uiSliceMode);3785 iRet = SliceLayerInfoUpdate (pCtx, pFbi, pLayerBsInfo, pParam->sSliceArgument.uiSliceMode);
3805 if (iRet) {3786 if (iRet) {
3806 WelsLog (pLogCtx, WELS_LOG_ERROR,3787 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