Showing the changes to codec/encoder/core/src/svc_encode_slice.cpp (1 of 16 files). Show all
Unified · Split
| @@ -823,11 +823,6 @@ void AddSliceBoundary (sWelsEncCtx* pEncCtx, SSlice* pCurSlice, SSliceCtx* pSlic · 822 unmodified lines | ||
| 823 | 823 | |
| 824 | 824 | pSliceCtx->pFirstMbInSlice[iNextSliceIdc] = iFirstMbIdxOfNextSlice; |
| 825 | 825 | |
| 826 | −#if !defined(MT_ENABLED) | |
| 827 | − pNextSlice->uiSliceIdx = iNextSliceIdc; | |
| 828 | − pNextSlice->pSliceBsa = & (pEncCtx->pOut->sBsWrite); | |
| 829 | −#endif//!MT_ENABLED | |
| 830 | − | |
| 831 | 826 | memset (pSliceCtx->pOverallMbMap + iFirstMbIdxOfNextSlice, (uint8_t)iNextSliceIdc, |
| 832 | 827 | (kiLastMbIdxInPartition - iFirstMbIdxOfNextSlice + 1)*sizeof (uint8_t)); |
| 833 | 828 | |
| @@ -863,10 +858,8 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 29 unmodified lines | ||
| 863 | 858 | #endif |
| 864 | 859 | uiLen = ((iPosBitOffset >> 3) + ((iPosBitOffset & 0x07) ? 1 : 0)); |
| 865 | 860 | |
| 866 | −#ifdef MT_ENABLED | |
| 867 | 861 | if (pEncCtx->pSvcParam->iMultipleThreadIdc > 1) |
| 868 | 862 | WelsMutexLock (&pEncCtx->pSliceThreading->mutexSliceNumUpdate); |
| 869 | −#endif//MT_ENABLED | |
| 870 | 863 | |
| 871 | 864 | //DYNAMIC_SLICING_ONE_THREAD: judge jump_avoiding_pack_exceed |
| 872 | 865 | if ( |
| @@ -874,9 +867,7 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 1 unmodified line | ||
| 874 | 867 | && JUMPPACKETSIZE_JUDGE (uiLen, iCurMbIdx, pSliceCtx->uiSliceSizeConstraint)) /*jump_avoiding_pack_exceed*/ |
| 875 | 868 | && kbCurMbNotLastMbOfCurPartition) //decide to add new pSlice |
| 876 | 869 | && (kbSliceNumNotExceedConstraint |
| 877 | −#ifdef MT_ENABLED | |
| 878 | 870 | && ((pCurSlice->uiSliceIdx + kiActiveThreadsNum) < pSliceCtx->iMaxSliceNumConstraint) |
| 879 | −#endif//MT_ENABLED | |
| 880 | 871 | )//able to add new pSlice |
| 881 | 872 | |
| 882 | 873 | ) { |
| @@ -885,19 +876,15 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 2 unmodified lines | ||
| 885 | 876 | |
| 886 | 877 | ++ pSliceCtx->iSliceNumInFrame; |
| 887 | 878 | |
| 888 | −#ifdef MT_ENABLED | |
| 889 | 879 | if (pEncCtx->pSvcParam->iMultipleThreadIdc > 1) |
| 890 | 880 | WelsMutexUnlock (&pEncCtx->pSliceThreading->mutexSliceNumUpdate); |
| 891 | −#endif//MT_ENABLED | |
| 892 | 881 | |
| 893 | 882 | return true; |
| 894 | 883 | } |
| 895 | 884 | |
| 896 | 885 | if ( |
| 897 | 886 | (kbSliceNumReachConstraint |
| 898 | −#ifdef MT_ENABLED | |
| 899 | 887 | || ((pCurSlice->uiSliceIdx + kiActiveThreadsNum) >= pSliceCtx->iMaxSliceNumConstraint) |
| 900 | −#endif//MT_ENABLED | |
| 901 | 888 | ) |
| 902 | 889 | && ((JUMPPACKETSIZE_JUDGE (uiLen, iCurMbIdx, |
| 903 | 890 | pSliceCtx->uiSliceSizeConstraint - ((kiLastMbIdxInPartition - iCurMbIdx) << |
| @@ -907,10 +894,8 @@ bool DynSlcJudgeSliceBoundaryStepBack (void* pCtx, void* pSlice, SSliceCtx* pSli · 3 unmodified lines | ||
| 907 | 894 | pCurSlice->bDynamicSlicingSliceSizeCtrlFlag = true; |
| 908 | 895 | } |
| 909 | 896 | |
| 910 | −#ifdef MT_ENABLED | |
| 911 | 897 | if (pEncCtx->pSvcParam->iMultipleThreadIdc > 1) |
| 912 | 898 | WelsMutexUnlock (&pEncCtx->pSliceThreading->mutexSliceNumUpdate); |
| 913 | −#endif//MT_ENABLED | |
| 914 | 899 | |
| 915 | 900 | return false; |
| 916 | 901 | } |