History

use pthread_condition instead of semaphores on apple platform

Karina committed 10 years ago

Commit c12b88a1 parent 30328b810 files · +108 −146Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+0−19
@@ -3804,24 +3804,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 3803 unmodified lines
38043804 else if ((SM_SIZELIMITED_SLICE == pParam->sSliceArgument.uiSliceMode) && (pSvcParam->iMultipleThreadIdc > 1)) {
38053805 const int32_t kiPartitionCnt = pCtx->iActiveThreadsNum;
38063806
3807−#if 0 //TODO: temporarily use this to keep old codes for a while, will remove old codes later
3808− int32_t iRet = 0;
3809− // to fire slice coding threads
3810− iRet = FiredSliceThreads (pCtx, &pCtx->pSliceThreading->pThreadPEncCtx[0],
3811− &pCtx->pSliceThreading->pReadySliceCodingEvent[0],
3812− &pCtx->pSliceThreading->pThreadMasterEvent[0],
3813− pFbi, kiPartitionCnt, &pCtx->pCurDqLayer->sSliceEncCtx, true);
3814− if (iRet) {
3815− WelsLog (pLogCtx, WELS_LOG_ERROR,
3816− "[MT] WelsEncoderEncodeExt(), FiredSliceThreads return(%d) failed and exit encoding frame, iSliceCount= %d, uiSliceMode= %d, iMultipleThreadIdc= %d!!",
3817− iRet, iSliceCount, pParam->sSliceArgument.uiSliceMode, pSvcParam->iMultipleThreadIdc);
3818− return ENC_RETURN_UNEXPECTED;
3819− }
3820−
3821− WelsMultipleEventsWaitAllBlocking (kiPartitionCnt, &pCtx->pSliceThreading->pSliceCodedEvent[0],
3822− &pCtx->pSliceThreading->pSliceCodedMasterEvent);
3823− WELS_VERIFY_RETURN_IFNEQ (pCtx->iEncoderError, ENC_RETURN_SUCCESS)
3824−#else
38253807 int32_t iEndMbIdx = pCtx->pCurDqLayer->sSliceEncCtx.iMbNumInFrame;
38263808 for (int32_t iIdx = kiPartitionCnt - 1; iIdx >= 0; --iIdx) {
38273809 const int32_t iFirstMbIdx =
@@ -3857,7 +3839,6 @@ int32_t WelsEncoderEncodeExt (sWelsEncCtx* pCtx, SFrameBSInfo* pFbi, const SSour · 29 unmodified lines
38573839 pParam->sSliceArgument.uiSliceMode, pCtx->iEncoderError);
38583840 return pCtx->iEncoderError;
38593841 }
3860−#endif
38613842
38623843 iLayerSize = AppendSliceToFrameBs (pCtx, pLayerBsInfo, kiPartitionCnt);
38633844 } else { // for non-dynamic-slicing mode single threading branch..

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