History

Provide a no-op WelsEmms macro if X86_ASM is disabled

This allows always calling this function, reducing the number of ifdefs in the calling code.

Martin Storsjö committed 12 years ago

Commit dd47d481 parent d767e213 files · +2 −12Browse files

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

Unified · Split

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

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