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/decoder/core/src/decoder.cpp (1 of 5 files). Show all

Unified · Split

codec/decoder/core/src/decoder.cpp+0−9
@@ -144,16 +144,7 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx) { · 143 unmodified lines
144 pCtx->bAuReadyFlag = 0; // au data is not ready144 pCtx->bAuReadyFlag = 0; // au data is not ready
145 145
146 146
147#if defined(X86_ASM)
148 pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);147 pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);
149#elif defined(HAVE_NEON)
150#if defined(ANDROID_NDK)
151 pCtx->uiCpuFlag = WelsCPUFeatureDetect(&iCpuCores);
152#endif
153#if defined(APPLE_IOS)
154 pCtx->uiCpuFlag = WelsCPUFeatureDetectIOS();
155#endif
156#endif
157 148
158 pCtx->iImgWidthInPixel = 0;149 pCtx->iImgWidthInPixel = 0;
159 pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available150 pCtx->iImgHeightInPixel = 0; // alloc picture data when picture size is available

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