This allows always calling this function, reducing the number of ifdefs in the calling code.
Showing the changes to codec/encoder/core/src/slice_multi_threading.cpp (1 of 3 files). Show all
Unified · Split
| @@ -59,9 +59,7 @@ · 58 unmodified lines | ||
| 59 | 59 | #include "crt_util_safe_x.h" // for safe crt like calls |
| 60 | 60 | #include "rc.h" |
| 61 | 61 | |
| 62 | −#if defined(X86_ASM) | |
| 63 | 62 | #include "cpu.h" |
| 64 | −#endif//X86_ASM | |
| 65 | 63 | |
| 66 | 64 | #include "measure_time.h" |
| 67 | 65 | namespace WelsSVCEnc { |
| @@ -123,9 +121,7 @@ void CalcSliceComplexRatio (void* pRatio, SSliceCtx* pSliceCtx, uint32_t* pSlice · 55 unmodified lines | ||
| 123 | 121 | const int32_t kiSliceCount = pSliceCtx->iSliceNumInFrame; |
| 124 | 122 | int32_t iSliceIdx = 0; |
| 125 | 123 | |
| 126 | −#if defined(X86_ASM) | |
| 127 | 124 | WelsEmms(); |
| 128 | −#endif //X86_ASM | |
| 129 | 125 | |
| 130 | 126 | while (iSliceIdx < kiSliceCount) { |
| 131 | 127 | fAvI[iSliceIdx] = 1.0f * pCountMbInSlice[iSliceIdx] / pSliceTime[iSliceIdx]; |
| @@ -149,9 +145,7 @@ int32_t NeedDynamicAdjust (void* pConsumeTime, const int32_t iSliceNum) { · 17 unmodified lines | ||
| 149 | 145 | int32_t iSliceIdx = 0; |
| 150 | 146 | int32_t iNeedAdj = false; |
| 151 | 147 | |
| 152 | −#if defined(X86_ASM) | |
| 153 | 148 | WelsEmms(); |
| 154 | −#endif //X86_ASM | |
| 155 | 149 | |
| 156 | 150 | while (iSliceIdx < iSliceNum) { |
| 157 | 151 | uiTotalConsume += pSliceConsume[iSliceIdx] + pSliceConsume[1 + iSliceIdx]; |
| @@ -235,9 +229,7 @@ void DynamicAdjustSlicing (sWelsEncCtx* pCtx, · 77 unmodified lines | ||
| 235 | 229 | |
| 236 | 230 | iMaximalMbNum = kiCountNumMb - (kiCountSliceNum - 1) * iMinimalMbNum; |
| 237 | 231 | |
| 238 | −#if defined(X86_ASM) | |
| 239 | 232 | WelsEmms(); |
| 240 | −#endif //X86_ASM | |
| 241 | 233 | |
| 242 | 234 | #if defined(ENABLE_TRACE_MT) |
| 243 | 235 | WelsLog (pCtx, WELS_LOG_DEBUG, "[MT] DynamicAdjustSlicing(), iDid= %d, iCountNumMb= %d\n", iCurDid, kiCountNumMb); |