History

Unify the interface for the different variants of WelsCPUFeatureDetect

The caller of the function should not need to know exactly which implementation of it is being used. For the variants that don't support detecting the number of cores, the pNumberOfLogicProcessors parameter can be left untouched and the caller will use a higher level API for finding it out. This simplifies all the calling code, and simplifies adding more implementations of cpu feature detection.

Martin Storsjö committed 12 years ago

Commit 9cf34e71 parent 73cc5865 files · +14 −33Browse files

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

Unified · Split

codec/encoder/core/src/encoder_ext.cpp+1−1
@@ -1933,8 +1933,8 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 1932 unmodified lines
1933 }1933 }
1934 1934
1935 // for cpu features detection, Only detect once??1935 // for cpu features detection, Only detect once??
1936#ifdef X86_ASM
1937 uiCpuFeatureFlags = WelsCPUFeatureDetect (&uiCpuCores); // detect cpu capacity features1936 uiCpuFeatureFlags = WelsCPUFeatureDetect (&uiCpuCores); // detect cpu capacity features
1937#ifdef X86_ASM
1938 if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_128)1938 if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_128)
1939 iCacheLineSize = 128;1939 iCacheLineSize = 128;
1940 else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_64)1940 else if (uiCpuFeatureFlags & WELS_CPU_CACHELINE_64)

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