get cpu cores for android
This commit is contained in:
parent
ff94e7053d
commit
4d729c9418
@ -216,7 +216,7 @@ void WelsXmmRegEmptyOp(void * pSrc) {
|
||||
|
||||
#if defined(HAVE_NEON)//For supporting both android platform and iOS platform
|
||||
#if defined(ANDROID_NDK)
|
||||
uint32_t WelsCPUFeatureDetectAndroid()
|
||||
uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors)
|
||||
{
|
||||
uint32_t uiCPU = 0;
|
||||
AndroidCpuFamily cpuFamily = ANDROID_CPU_FAMILY_UNKNOWN;
|
||||
@ -234,6 +234,11 @@ uint32_t WelsCPUFeatureDetectAndroid()
|
||||
uiCPU |= WELS_CPU_NEON;
|
||||
}
|
||||
}
|
||||
|
||||
if( pNumberOfLogicProcessors != NULL ){
|
||||
*pNumberOfLogicProcessors = android_getCpuCount();
|
||||
}
|
||||
|
||||
return uiCPU;
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,9 @@ void WelsXmmRegEmptyOp(void * pSrc);
|
||||
|
||||
#if defined(HAVE_NEON)
|
||||
#if defined(ANDROID_NDK)
|
||||
uint32_t WelsCPUFeatureDetectAndroid();
|
||||
|
||||
uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors);
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(APPLE_IOS)
|
||||
|
@ -148,7 +148,7 @@ void WelsDecoderDefaults (PWelsDecoderContext pCtx) {
|
||||
pCtx->uiCpuFlag = WelsCPUFeatureDetect (&iCpuCores);
|
||||
#elif defined(HAVE_NEON)
|
||||
#if defined(ANDROID_NDK)
|
||||
pCtx->uiCpuFlag = WelsCPUFeatureDetectAndroid();
|
||||
pCtx->uiCpuFlag = WelsCPUFeatureDetect(&iCpuCores);
|
||||
#endif
|
||||
#if defined(APPLE_IOS)
|
||||
pCtx->uiCpuFlag = WelsCPUFeatureDetectIOS();
|
||||
|
Loading…
Reference in New Issue
Block a user