History

clean multi-threading macro

volvet committed 12 years ago

Commit 9f50e0c1 parent cad753d16 files · +12 −258Browse files

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

Unified · Split

codec/encoder/core/src/svc_encode_slice.cpp+0−15
@@ -823,11 +823,6 @@ void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSlic · 822 unmodified lines
823823
824824 pSliceCtx->pFirstMbInSlice[iNextSliceIdc] = iFirstMbIdxOfNextSlice;
825825
826−#if !defined(MT_ENABLED)
827− pNextSlice->uiSliceIdx = iNextSliceIdc;
828− pNextSlice->pSliceBsa = & (pEncCtx->pOut->sBsWrite);
829−#endif//!MT_ENABLED
830−
831826 memset (pSliceCtx->pOverallMbMap + iFirstMbIdxOfNextSlice, (uint8_t)iNextSliceIdc,
832827 (kiLastMbIdxInPartition - iFirstMbIdxOfNextSlice + 1)*sizeof (uint8_t));
833828
@@ -863,10 +858,8 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 29 unmodified lines
863858 #endif
864859 uiLen = ((iPosBitOffset >> 3) + ((iPosBitOffset & 0x07) ? 1 : 0));
865860
866−#ifdef MT_ENABLED
867861 if (pEncCtx->pSvcParam->iMultipleThreadIdc > 1)
868862 WelsMutexLock (&pEncCtx->pSliceThreading->mutexSliceNumUpdate);
869−#endif//MT_ENABLED
870863
871864 //DYNAMIC_SLICING_ONE_THREAD: judge jump_avoiding_pack_exceed
872865 if (
@@ -874,9 +867,7 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 1 unmodified line
874867 && JUMPPACKETSIZE_JUDGE (uiLen, iCurMbIdx, pSliceCtx->uiSliceSizeConstraint)) /*jump_avoiding_pack_exceed*/
875868 && kbCurMbNotLastMbOfCurPartition) //decide to add new pSlice
876869 && (kbSliceNumNotExceedConstraint
877−#ifdef MT_ENABLED
878870 && ((pCurSlice->uiSliceIdx + kiActiveThreadsNum) < pSliceCtx->iMaxSliceNumConstraint)
879−#endif//MT_ENABLED
880871 )//able to add new pSlice
881872
882873 ) {
@@ -885,19 +876,15 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 2 unmodified lines
885876
886877 ++ pSliceCtx->iSliceNumInFrame;
887878
888−#ifdef MT_ENABLED
889879 if (pEncCtx->pSvcParam->iMultipleThreadIdc > 1)
890880 WelsMutexUnlock (&pEncCtx->pSliceThreading->mutexSliceNumUpdate);
891−#endif//MT_ENABLED
892881
893882 return true;
894883 }
895884
896885 if (
897886 (kbSliceNumReachConstraint
898−#ifdef MT_ENABLED
899887 || ((pCurSlice->uiSliceIdx + kiActiveThreadsNum) >= pSliceCtx->iMaxSliceNumConstraint)
900−#endif//MT_ENABLED
901888 )
902889 && ((JUMPPACKETSIZE_JUDGE (uiLen, iCurMbIdx,
903890 pSliceCtx->uiSliceSizeConstraint - ((kiLastMbIdxInPartition - iCurMbIdx) <<
@@ -907,10 +894,8 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 3 unmodified lines
907894 pCurSlice->bDynamicSlicingSliceSizeCtrlFlag = true;
908895 }
909896
910−#ifdef MT_ENABLED
911897 if (pEncCtx->pSvcParam->iMultipleThreadIdc > 1)
912898 WelsMutexUnlock (&pEncCtx->pSliceThreading->mutexSliceNumUpdate);
913−#endif//MT_ENABLED
914899
915900 return false;
916901 }

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