ref: 3a602a382bb9d70bb8e22d58aaeefb7e2187a738
parent: 5be179e0aac230b0eeb493c228d27a3623b8ccb3
parent: dd47d4805fd578877494af7db386b70bae5c252f
author: volvet <[email protected]>
date: Mon Mar 3 04:03:41 EST 2014
Merge pull request #379 from mstorsjo/simplify-emms-calling Provide a no-op WelsEmms macro if X86_ASM is disabled
--- a/codec/common/cpu.h
+++ b/codec/common/cpu.h
@@ -74,6 +74,8 @@
void WelsXmmRegLoad(void * src);
#endif
+#else
+#define WelsEmms()
#endif
void WelsXmmRegEmptyOp(void * pSrc);
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -2948,9 +2948,7 @@
pCtx->eLastNalPriority = NRI_PRI_HIGHEST;
pFbi->iLayerNum = 1;
-#if defined(X86_ASM)
WelsEmms();
-#endif //X86_ASM
return ENC_RETURN_SUCCESS;
}
@@ -3609,9 +3607,7 @@
pCtx->eLastNalPriority = eNalRefIdc;
pFbi->iLayerNum = iLayerNum;
-#if defined(X86_ASM)
WelsEmms();
-#endif //X86_ASM
pFbi->eOutputFrameType = eFrameType;
return ENC_RETURN_SUCCESS;
--- a/codec/encoder/core/src/slice_multi_threading.cpp
+++ b/codec/encoder/core/src/slice_multi_threading.cpp
@@ -59,9 +59,7 @@
#include "crt_util_safe_x.h" // for safe crt like calls
#include "rc.h"
-#if defined(X86_ASM)
#include "cpu.h"
-#endif//X86_ASM
#include "measure_time.h"
namespace WelsSVCEnc {
@@ -123,9 +121,7 @@
const int32_t kiSliceCount = pSliceCtx->iSliceNumInFrame;
int32_t iSliceIdx = 0;
-#if defined(X86_ASM)
WelsEmms();
-#endif //X86_ASM
while (iSliceIdx < kiSliceCount) {
fAvI[iSliceIdx] = 1.0f * pCountMbInSlice[iSliceIdx] / pSliceTime[iSliceIdx];
@@ -149,9 +145,7 @@
int32_t iSliceIdx = 0;
int32_t iNeedAdj = false;
-#if defined(X86_ASM)
WelsEmms();
-#endif //X86_ASM
while (iSliceIdx < iSliceNum) {
uiTotalConsume += pSliceConsume[iSliceIdx] + pSliceConsume[1 + iSliceIdx];
@@ -235,9 +229,7 @@
iMaximalMbNum = kiCountNumMb - (kiCountSliceNum - 1) * iMinimalMbNum;
-#if defined(X86_ASM)
WelsEmms();
-#endif //X86_ASM
#if defined(ENABLE_TRACE_MT)
WelsLog (pCtx, WELS_LOG_DEBUG, "[MT] DynamicAdjustSlicing(), iDid= %d, iCountNumMb= %d\n", iCurDid, kiCountNumMb);