fix Loop filter error under multithreads on encoder when #TEST_BED enabled

This commit is contained in:
lyao2 2014-08-20 11:54:07 +08:00
parent b230a6deee
commit 47f1ac7307

View File

@ -1959,14 +1959,12 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar
iCacheLineSize = 16; // 16 bytes aligned in default
#endif//X86_ASM
#ifndef WELS_TESTBED
#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,
// for client application here it is constrained by maximal to MAX_THREADS_NUM
@ -1977,12 +1975,6 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar
}
#endif//DYNAMIC_DETECT_CPU_CORES
#else//WELS_TESTBED
uiCpuCores = pCodingParam->iMultipleThreadIdc; // assigned uiCpuCores from iMultipleThreadIdc from SGE testing
#endif//WELS_TESTBED
uiCpuCores = WELS_CLIP3 (uiCpuCores, 1, MAX_THREADS_NUM);
if (InitSliceSettings (pLogCtx, pCodingParam, uiCpuCores, &iSliceNum)) {