Showing the changes to codec/encoder/core/src/encoder_ext.cpp (1 of 1 file). Show all
Unified · Split
| @@ -1959,14 +1959,12 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 1958 unmodified lines | |||
| 1959 | iCacheLineSize = 16; // 16 bytes aligned in default | 1959 | iCacheLineSize = 16; // 16 bytes aligned in default |
| 1960 | #endif//X86_ASM | 1960 | #endif//X86_ASM |
| 1961 | 1961 | ||
| 1962 | #ifndef WELS_TESTBED | ||
| 1963 | |||
| 1964 | #if defined(DYNAMIC_DETECT_CPU_CORES) | 1962 | #if defined(DYNAMIC_DETECT_CPU_CORES) |
| 1965 | if (pCodingParam->iMultipleThreadIdc > 0) | 1963 | if (pCodingParam->iMultipleThreadIdc > 0) |
| 1966 | uiCpuCores = pCodingParam->iMultipleThreadIdc; | 1964 | uiCpuCores = pCodingParam->iMultipleThreadIdc; |
| 1967 | else { | 1965 | else { |
| 1968 | if (uiCpuCores == | 1966 | if (uiCpuCores == |
| 1969 | 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 | 1967 | 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 |
| 1970 | uiCpuCores = DynamicDetectCpuCores(); | 1968 | uiCpuCores = DynamicDetectCpuCores(); |
| 1971 | // So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms, | 1969 | // So far so many cpu cores up to MAX_THREADS_NUM mean for server platforms, |
| 1972 | // for client application here it is constrained by maximal to MAX_THREADS_NUM | 1970 | // for client application here it is constrained by maximal to MAX_THREADS_NUM |
| @@ -1977,12 +1975,6 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 4 unmodified lines | |||
| 1977 | } | 1975 | } |
| 1978 | #endif//DYNAMIC_DETECT_CPU_CORES | 1976 | #endif//DYNAMIC_DETECT_CPU_CORES |
| 1979 | 1977 | ||
| 1980 | #else//WELS_TESTBED | ||
| 1981 | |||
| 1982 | uiCpuCores = pCodingParam->iMultipleThreadIdc; // assigned uiCpuCores from iMultipleThreadIdc from SGE testing | ||
| 1983 | |||
| 1984 | #endif//WELS_TESTBED | ||
| 1985 | |||
| 1986 | uiCpuCores = WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM); | 1978 | uiCpuCores = WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM); |
| 1987 | 1979 | ||
| 1988 | if (InitSliceSettings (pLogCtx, pCodingParam, uiCpuCores, &iSliceNum)) { | 1980 | if (InitSliceSettings (pLogCtx, pCodingParam, uiCpuCores, &iSliceNum)) { |