History

Implement WelsCPUFeatureDetect for AArch64

Previously it actually didn't return any cpu flags at all.

Martin Storsjö committed 12 years ago

Commit 66deed21 parent 894f0731 file · +13 −1Browse files

Showing the changes to codec/common/src/cpu.cpp (1 of 1 file). Show all

Unified · Split

codec/common/src/cpu.cpp+13−1
@@ -280,7 +280,19 @@ uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) { · 279 unmodified lines
280280 WELS_CPU_NEON;
281281 }
282282 #endif
283−#else /* Neither X86_ASM nor HAVE_NEON */
283+#elif defined(HAVE_NEON_AARCH64)
284+
285+/* For AArch64, no runtime detection actually is necessary for now, since
286+ * NEON and VFPv3 is mandatory on all such CPUs. (/proc/cpuinfo doesn't
287+ * contain neon, and the android cpufeatures library doesn't return it
288+ * either.) */
289+
290+uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
291+ return WELS_CPU_VFPv3 |
292+ WELS_CPU_NEON;
293+}
294+
295+#else /* Neither X86_ASM, HAVE_NEON nor HAVE_NEON_AARCH64 */
284296
285297 uint32_t WelsCPUFeatureDetect (int32_t* pNumberOfLogicProcessors) {
286298 return 0;

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