- uint32_t value;
- char name[12];
-} cap_dirs[] = {
-#if defined ( __i386__ ) || defined ( __x86_64__ )
- { CPU_CAPABILITY_MMX, "mmx" },
- { CPU_CAPABILITY_MMXEXT, "mmxext" },
- { CPU_CAPABILITY_3DNOW, "3dnow" },
- { CPU_CAPABILITY_SSE, "sse" },
-#endif
-#if defined (__ppc__) || defined (__ppc64__) || defined (__powerpc__)
- { CPU_CAPABILITY_ALTIVEC, "altivec" },
+ const unsigned flags = vlc_CPU();
+ char buf[200], *p = buf;
+
+#define PRINT_CAPABILITY( capability, string ) \
+ if (flags & (capability)) \
+ p += sprintf (p, "%s ", (string) )
+
+#if defined (__i386__) || defined (__x86_64__)
+ PRINT_CAPABILITY(CPU_CAPABILITY_MMX, "MMX");
+ PRINT_CAPABILITY(CPU_CAPABILITY_3DNOW, "3DNow!");
+ PRINT_CAPABILITY(CPU_CAPABILITY_MMXEXT, "MMXEXT");
+ PRINT_CAPABILITY(CPU_CAPABILITY_SSE, "SSE");
+ PRINT_CAPABILITY(CPU_CAPABILITY_SSE2, "SSE2");
+ PRINT_CAPABILITY(CPU_CAPABILITY_SSE3, "SSE3");
+ PRINT_CAPABILITY(CPU_CAPABILITY_SSSE3, "SSSE3");
+ PRINT_CAPABILITY(CPU_CAPABILITY_SSE4_1, "SSE4.1");
+ PRINT_CAPABILITY(CPU_CAPABILITY_SSE4_2, "SSE4.2");
+ PRINT_CAPABILITY(CPU_CAPABILITY_SSE4A, "SSE4A");
+
+#elif defined (__powerpc__) || defined (__ppc__) || defined (__ppc64__)
+ PRINT_CAPABILITY(CPU_CAPABILITY_ALTIVEC, "AltiVec");
+
+#elif defined (__arm__)
+ PRINT_CAPABILITY(CPU_CAPABILITY_NEON, "NEONv1");
+
+#else
+ (void) flags;
+