From a5bf431ca94603145061043a0f781ce7fa074683 Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Mon, 12 Aug 2024 16:26:01 -0700
Subject: [PATCH] Move AOM_FORCE_INLINE to aom_dsp/aom_dsp_common.h
The AOM_FORCE_INLINE macro is for libaom internal use. Move its
definition from the public header aom/aom_integer.h to the internal
header aom_dsp/aom_dsp_common.h.
Bug: aomedia:358402891
Change-Id: I4b15670060f816f00cdb9c9fa1a0f905c8cc9c9e
---
aom/aom_integer.h | 6 ------
aom_dsp/aom_dsp_common.h | 6 ++++++
aom_dsp/aom_simd_inline.h | 2 +-
aom_dsp/arm/reinterpret_neon.h | 2 +-
aom_dsp/arm/transpose_neon.h | 2 +-
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/aom/aom_integer.h b/aom/aom_integer.h
index 9660301e51..8c17bd2972 100644
--- a/aom/aom_integer.h
+++ b/aom/aom_integer.h
@@ -14,12 +14,6 @@
/* get ptrdiff_t, size_t, wchar_t, NULL */
#include <stddef.h> // IWYU pragma: export
-#if defined(_MSC_VER)
-#define AOM_FORCE_INLINE __forceinline
-#else
-#define AOM_FORCE_INLINE __inline__ __attribute__((always_inline))
-#endif
-
/* Assume platforms have the C99 standard integer types. */
#if defined(__cplusplus)
diff --git a/aom_dsp/aom_dsp_common.h b/aom_dsp/aom_dsp_common.h
index c279ad1fc0..acd0498854 100644
--- a/aom_dsp/aom_dsp_common.h
+++ b/aom_dsp/aom_dsp_common.h
@@ -23,6 +23,12 @@
extern "C" {
#endif
+#if defined(_MSC_VER)
+#define AOM_FORCE_INLINE __forceinline
+#else
+#define AOM_FORCE_INLINE __inline__ __attribute__((always_inline))
+#endif
+
#define PI 3.141592653589793238462643383279502884
#define AOMMIN(x, y) (((x) < (y)) ? (x) : (y))
diff --git a/aom_dsp/aom_simd_inline.h b/aom_dsp/aom_simd_inline.h
index 41c29f6b00..85f9ec3226 100644
--- a/aom_dsp/aom_simd_inline.h
+++ b/aom_dsp/aom_simd_inline.h
@@ -12,7 +12,7 @@
#ifndef AOM_AOM_DSP_AOM_SIMD_INLINE_H_
#define AOM_AOM_DSP_AOM_SIMD_INLINE_H_
-#include "aom/aom_integer.h"
+#include "aom_dsp/aom_dsp_common.h"
#ifndef SIMD_INLINE
#define SIMD_INLINE static AOM_FORCE_INLINE
diff --git a/aom_dsp/arm/reinterpret_neon.h b/aom_dsp/arm/reinterpret_neon.h
index c3951183f4..7ea5ab35e2 100644
--- a/aom_dsp/arm/reinterpret_neon.h
+++ b/aom_dsp/arm/reinterpret_neon.h
@@ -14,7 +14,7 @@
#include <arm_neon.h>
-#include "aom/aom_integer.h" // For AOM_FORCE_INLINE.
+#include "aom_dsp/aom_dsp_common.h" // For AOM_FORCE_INLINE.
#include "config/aom_config.h"
#define REINTERPRET_NEON(u, to_sz, to_count, from_sz, from_count, n, q) \
diff --git a/aom_dsp/arm/transpose_neon.h b/aom_dsp/arm/transpose_neon.h
index 5d0804ec19..91cda0f46c 100644
--- a/aom_dsp/arm/transpose_neon.h
+++ b/aom_dsp/arm/transpose_neon.h
@@ -14,7 +14,7 @@
#include <arm_neon.h>
-#include "aom/aom_integer.h" // For AOM_FORCE_INLINE.
+#include "aom_dsp/aom_dsp_common.h" // For AOM_FORCE_INLINE.
#include "config/aom_config.h"
static inline void transpose_elems_u8_8x8(