Merge pull request #1994 from sijchen/mt1

[encoder] remove one always-on macro to save code complexity
This commit is contained in:
huili2 2015-06-19 08:44:16 +08:00
commit dea4303357
2 changed files with 2 additions and 12 deletions

View File

@ -51,9 +51,6 @@
//#define MT_DEBUG
//#define ENABLE_TRACE_MT
#define DYNAMIC_DETECT_CPU_CORES
#define THRESHOLD_RMSE_CORE8 0.0320f // v1.1: 0.0320f; v1.0: 0.02f
#define THRESHOLD_RMSE_CORE4 0.0215f // v1.1: 0.0215f; v1.0: 0.03f
#define THRESHOLD_RMSE_CORE2 0.0200f // v1.1: 0.0200f; v1.0: 0.04f

View File

@ -2395,22 +2395,15 @@ int32_t GetMultipleThreadIdc (SLogContext* pLogCtx, SWelsSvcCodingParam* pCoding
iCacheLineSize = 16; // 16 bytes aligned in default
#endif//X86_ASM
#if defined(DYNAMIC_DETECT_CPU_CORES)
if (pCodingParam->iMultipleThreadIdc > 0)
uiCpuCores = pCodingParam->iMultipleThreadIdc;
else {
if (uiCpuCores ==
0) // cpuid not supported or doesn't expose the number of cores, use high level system API as followed to detect number of pysical/logic processor
0) { // cpuid not supported or doesn't expose the number of cores, use high level system API as followed to detect number of pysical/logic processor
uiCpuCores = DynamicDetectCpuCores();
// So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms,
}// So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms,
// for client application here it is constrained by maximal to MAX_THREADS_NUM
if (uiCpuCores > MAX_THREADS_NUM) // MAX_THREADS_NUM
uiCpuCores = MAX_THREADS_NUM; // MAX_THREADS_NUM
else if (uiCpuCores < 1) // just for safe
uiCpuCores = 1;
}
#endif//DYNAMIC_DETECT_CPU_CORES
uiCpuCores = WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM);
if (InitSliceSettings (pLogCtx, pCodingParam, uiCpuCores, &iSliceNum)) {