shithub: openh264

Download patch

ref: 47f1ac730720399d55f59b64a3f53571ab8dc5aa
parent: b230a6deee7c7381fcecf1fb17f6ca5b10438aa1
author: lyao2 <[email protected]>
date: Wed Aug 20 07:54:07 EDT 2014

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

--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -1959,14 +1959,12 @@
   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
@@ -1976,12 +1974,6 @@
       uiCpuCores	= 1;
   }
 #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);