On Sat, 11 Jan 2014, Martin Storsjö wrote:

On Sat, 11 Jan 2014, Janne Grunau wrote:

index 08f6e85..e90209b 100644
--- a/libavutil/cpu_internal.h
+++ b/libavutil/aarch64/cpu.h
@@ -16,18 +16,20 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

-#ifndef AVUTIL_CPU_INTERNAL_H
-#define AVUTIL_CPU_INTERNAL_H
+#ifndef AVUTIL_AARCH64_CPU_H
+#define AVUTIL_AARCH64_CPU_H

-#include "cpu.h"
+#include "config.h"
+#include "libavutil/cpu.h"
+#include "libavutil/cpu_internal.h"

-#define CPUEXT_SUFFIX(flags, suffix, cpuext)                            \
-    (HAVE_ ## cpuext ## suffix && ((flags) & AV_CPU_FLAG_ ## cpuext))
+#define have_neon(flags)    CPUEXT(flags, NEON)
+#define have_vfpv4(flags)   CPUEXT(flags, VFPV3)

-#define CPUEXT(flags, cpuext) CPUEXT_SUFFIX(flags, , cpuext)
+#define have_neon_external(flags)    CPUEXT_SUFFIX(flags, _EXTERNAL, NEON)
+#define have_vfpv4_external(flags) CPUEXT_SUFFIX(flags, _EXTERNAL, VFPV3)

-int ff_get_cpu_flags_arm(void);
-int ff_get_cpu_flags_ppc(void);
-int ff_get_cpu_flags_x86(void);
+#define have_neon_inline(flags)      CPUEXT_SUFFIX(flags, _INLINE, NEON)
+#define have_vfpv4_inline(flags)     CPUEXT_SUFFIX(flags, _INLINE, VFPV3)


We don't have the _external and _inline ones on 32 bit arm - I guess this is ok but I'll want to think about this again when I get to the other patches on how you use them there (but I wanted to send the rest of this review before getting there).

After starting to look at the actual asm patches and thinking more about it - yes, this is ok since we don't have runtime cpu feature detection.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to