aom: Use AOM_FORCE_INLINE in Arm warp affine implementations

From 967b0ab014fd2508dd9db74325a85ea09142f86b Mon Sep 17 00:00:00 2001
From: George Steed <[EMAIL REDACTED]>
Date: Wed, 24 Jan 2024 12:44:20 +0000
Subject: [PATCH] Use AOM_FORCE_INLINE in Arm warp affine implementations

We currently pass function pointers into a common block of code to avoid
code duplication between the Neon and SVE implementations, however it is
beneficial for these function calls to be inlined to avoid loading and
storing vector registers between calls.

Change-Id: I73c9d7e805587cdf82f34512d6e60c9ce57da6e4
---
 av1/common/arm/highbd_warp_plane_neon.c | 30 +++++++------
 av1/common/arm/highbd_warp_plane_neon.h | 60 ++++++++++++++-----------
 av1/common/arm/highbd_warp_plane_sve.c  | 30 +++++++------
 av1/common/arm/warp_plane_neon.c        | 38 +++++++++-------
 av1/common/arm/warp_plane_neon.h        | 60 +++++++++++++------------
 av1/common/arm/warp_plane_neon_i8mm.c   | 38 +++++++++-------
 av1/common/arm/warp_plane_sve.c         | 38 +++++++++-------
 7 files changed, 160 insertions(+), 134 deletions(-)

diff --git a/av1/common/arm/highbd_warp_plane_neon.c b/av1/common/arm/highbd_warp_plane_neon.c
index c6f1e3ad92..89647bc921 100644
--- a/av1/common/arm/highbd_warp_plane_neon.c
+++ b/av1/common/arm/highbd_warp_plane_neon.c
@@ -23,8 +23,8 @@
 #include "config/av1_rtcd.h"
 #include "highbd_warp_plane_neon.h"
 
-static INLINE int16x8_t highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd,
-                                                        int sx, int alpha) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd, int sx, int alpha) {
   int16x8_t f[4];
   load_filters_4(f, sx, alpha);
 
@@ -57,8 +57,8 @@ static INLINE int16x8_t highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res), vdup_n_s16(0));
 }
 
-static INLINE int16x8_t highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd,
-                                                        int sx, int alpha) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd, int sx, int alpha) {
   int16x8_t f[8];
   load_filters_8(f, sx, alpha);
 
@@ -111,8 +111,8 @@ static INLINE int16x8_t highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res0), vmovn_s32(res1));
 }
 
-static INLINE int16x8_t highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd,
-                                                        int sx) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd, int sx) {
   int16x8_t f = load_filters_1(sx);
 
   int16x8_t rv0 = vextq_s16(vreinterpretq_s16_u16(in.val[0]),
@@ -144,8 +144,8 @@ static INLINE int16x8_t highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res), vdup_n_s16(0));
 }
 
-static INLINE int16x8_t highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd,
-                                                        int sx) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd, int sx) {
   int16x8_t f = load_filters_1(sx);
 
   int16x8_t rv0 = vextq_s16(vreinterpretq_s16_u16(in.val[0]),
@@ -197,7 +197,8 @@ static INLINE int16x8_t highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res0), vmovn_s32(res1));
 }
 
-static INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp, int sy) {
+static AOM_FORCE_INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp,
+                                                         int sy) {
   const int16x8_t f = load_filters_1(sy);
   const int16x4_t f0123 = vget_low_s16(f);
   const int16x4_t f4567 = vget_high_s16(f);
@@ -213,7 +214,8 @@ static INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp, int sy) {
   return m0123;
 }
 
-static INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp, int sy) {
+static AOM_FORCE_INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp,
+                                                           int sy) {
   const int16x8_t f = load_filters_1(sy);
   const int16x4_t f0123 = vget_low_s16(f);
   const int16x4_t f4567 = vget_high_s16(f);
@@ -238,8 +240,8 @@ static INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp, int sy) {
   return (int32x4x2_t){ { m0123, m4567 } };
 }
 
-static INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp, int sy,
-                                               int gamma) {
+static AOM_FORCE_INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp,
+                                                         int sy, int gamma) {
   int16x8_t s0, s1, s2, s3;
   transpose_elems_s16_4x8(
       vget_low_s16(tmp[0]), vget_low_s16(tmp[1]), vget_low_s16(tmp[2]),
@@ -262,8 +264,8 @@ static INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp, int sy,
   return horizontal_add_4d_s32x4(m0123);
 }
 
-static INLINE int32x4x2_t vertical_filter_8x1_f8(const int16x8_t *tmp, int sy,
-                                                 int gamma) {
+static AOM_FORCE_INLINE int32x4x2_t vertical_filter_8x1_f8(const int16x8_t *tmp,
+                                                           int sy, int gamma) {
   int16x8_t s0 = tmp[0];
   int16x8_t s1 = tmp[1];
   int16x8_t s2 = tmp[2];
diff --git a/av1/common/arm/highbd_warp_plane_neon.h b/av1/common/arm/highbd_warp_plane_neon.h
index 3b8982898e..48af4a707b 100644
--- a/av1/common/arm/highbd_warp_plane_neon.h
+++ b/av1/common/arm/highbd_warp_plane_neon.h
@@ -23,29 +23,31 @@
 #include "av1/common/warped_motion.h"
 #include "config/av1_rtcd.h"
 
-static INLINE int16x8_t highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd,
-                                                        int sx, int alpha);
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd, int sx, int alpha);
 
-static INLINE int16x8_t highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd,
-                                                        int sx, int alpha);
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd, int sx, int alpha);
 
-static INLINE int16x8_t highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd,
-                                                        int sx);
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd, int sx);
 
-static INLINE int16x8_t highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd,
-                                                        int sx);
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd, int sx);
 
-static INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp, int sy);
+static AOM_FORCE_INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp,
+                                                         int sy);
 
-static INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp, int sy);
+static AOM_FORCE_INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp,
+                                                           int sy);
 
-static INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp, int sy,
-                                               int gamma);
+static AOM_FORCE_INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp,
+                                                         int sy, int gamma);
 
-static INLINE int32x4x2_t vertical_filter_8x1_f8(const int16x8_t *tmp, int sy,
-                                                 int gamma);
+static AOM_FORCE_INLINE int32x4x2_t vertical_filter_8x1_f8(const int16x8_t *tmp,
+                                                           int sy, int gamma);
 
-static INLINE int16x8_t load_filters_1(int ofs) {
+static AOM_FORCE_INLINE int16x8_t load_filters_1(int ofs) {
   const int ofs0 = ROUND_POWER_OF_TWO(ofs, WARPEDDIFF_PREC_BITS);
 
   const int16_t *base =
@@ -53,7 +55,8 @@ static INLINE int16x8_t load_filters_1(int ofs) {
   return vld1q_s16(base + ofs0 * 8);
 }
 
-static INLINE void load_filters_4(int16x8_t out[], int ofs, int stride) {
+static AOM_FORCE_INLINE void load_filters_4(int16x8_t out[], int ofs,
+                                            int stride) {
   const int ofs0 = ROUND_POWER_OF_TWO(ofs + stride * 0, WARPEDDIFF_PREC_BITS);
   const int ofs1 = ROUND_POWER_OF_TWO(ofs + stride * 1, WARPEDDIFF_PREC_BITS);
   const int ofs2 = ROUND_POWER_OF_TWO(ofs + stride * 2, WARPEDDIFF_PREC_BITS);
@@ -67,7 +70,8 @@ static INLINE void load_filters_4(int16x8_t out[], int ofs, int stride) {
   out[3] = vld1q_s16(base + ofs3 * 8);
 }
 
-static INLINE void load_filters_8(int16x8_t out[], int ofs, int stride) {
+static AOM_FORCE_INLINE void load_filters_8(int16x8_t out[], int ofs,
+                                            int stride) {
   const int ofs0 = ROUND_POWER_OF_TWO(ofs + stride * 0, WARPEDDIFF_PREC_BITS);
   const int ofs1 = ROUND_POWER_OF_TWO(ofs + stride * 1, WARPEDDIFF_PREC_BITS);
   const int ofs2 = ROUND_POWER_OF_TWO(ofs + stride * 2, WARPEDDIFF_PREC_BITS);
@@ -89,16 +93,18 @@ static INLINE void load_filters_8(int16x8_t out[], int ofs, int stride) {
   out[7] = vld1q_s16(base + ofs7 * 8);
 }
 
-static INLINE uint16x4_t clip_pixel_highbd_vec(int32x4_t val, int bd) {
+static AOM_FORCE_INLINE uint16x4_t clip_pixel_highbd_vec(int32x4_t val,
+                                                         int bd) {
   const int limit = (1 << bd) - 1;
   return vqmovun_s32(vminq_s32(val, vdupq_n_s32(limit)));
 }
 
-static INLINE void warp_affine_horizontal(const uint16_t *ref, int width,
-                                          int height, int stride, int p_width,
-                                          int16_t alpha, int16_t beta, int iy4,
-                                          int sx4, int ix4, int16x8_t tmp[],
-                                          int bd) {
+static AOM_FORCE_INLINE void warp_affine_horizontal(const uint16_t *ref,
+                                                    int width, int height,
+                                                    int stride, int p_width,
+                                                    int16_t alpha, int16_t beta,
+                                                    int iy4, int sx4, int ix4,
+                                                    int16x8_t tmp[], int bd) {
   const int round0 = (bd == 12) ? ROUND0_BITS + 2 : ROUND0_BITS;
 
   if (ix4 <= -7) {
@@ -197,7 +203,7 @@ static INLINE void warp_affine_horizontal(const uint16_t *ref, int width,
   }
 }
 
-static INLINE void highbd_vertical_filter_4x1_f4(
+static AOM_FORCE_INLINE void highbd_vertical_filter_4x1_f4(
     uint16_t *pred, int p_stride, int bd, uint16_t *dst, int dst_stride,
     bool is_compound, bool do_average, bool use_dist_wtd_comp_avg, int fwd,
     int bwd, int16_t gamma, const int16x8_t *tmp, int i, int sy, int j) {
@@ -253,7 +259,7 @@ static INLINE void highbd_vertical_filter_4x1_f4(
   vst1_u16(dst16, res0);
 }
 
-static INLINE void highbd_vertical_filter_8x1_f8(
+static AOM_FORCE_INLINE void highbd_vertical_filter_8x1_f8(
     uint16_t *pred, int p_stride, int bd, uint16_t *dst, int dst_stride,
     bool is_compound, bool do_average, bool use_dist_wtd_comp_avg, int fwd,
     int bwd, int16_t gamma, const int16x8_t *tmp, int i, int sy, int j) {
@@ -328,7 +334,7 @@ static INLINE void highbd_vertical_filter_8x1_f8(
   vst1_u16(dst16 + 4, res1);
 }
 
-static INLINE void warp_affine_vertical(
+static AOM_FORCE_INLINE void warp_affine_vertical(
     uint16_t *pred, int p_width, int p_height, int p_stride, int bd,
     uint16_t *dst, int dst_stride, bool is_compound, bool do_average,
     bool use_dist_wtd_comp_avg, int fwd, int bwd, int16_t gamma, int16_t delta,
@@ -354,7 +360,7 @@ static INLINE void warp_affine_vertical(
   }
 }
 
-static INLINE void highbd_warp_affine_common(
+static AOM_FORCE_INLINE void highbd_warp_affine_common(
     const int32_t *mat, const uint16_t *ref, int width, int height, int stride,
     uint16_t *pred, int p_col, int p_row, int p_width, int p_height,
     int p_stride, int subsampling_x, int subsampling_y, int bd,
diff --git a/av1/common/arm/highbd_warp_plane_sve.c b/av1/common/arm/highbd_warp_plane_sve.c
index 7a14f21846..3653012ade 100644
--- a/av1/common/arm/highbd_warp_plane_sve.c
+++ b/av1/common/arm/highbd_warp_plane_sve.c
@@ -24,8 +24,8 @@
 #include "config/av1_rtcd.h"
 #include "highbd_warp_plane_neon.h"
 
-static INLINE int16x8_t highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd,
-                                                        int sx, int alpha) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd, int sx, int alpha) {
   int16x8_t f[4];
   load_filters_4(f, sx, alpha);
 
@@ -55,8 +55,8 @@ static INLINE int16x8_t highbd_horizontal_filter_4x1_f4(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res), vdup_n_s16(0));
 }
 
-static INLINE int16x8_t highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd,
-                                                        int sx, int alpha) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd, int sx, int alpha) {
   int16x8_t f[8];
   load_filters_8(f, sx, alpha);
 
@@ -103,8 +103,8 @@ static INLINE int16x8_t highbd_horizontal_filter_8x1_f8(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res0), vmovn_s32(res1));
 }
 
-static INLINE int16x8_t highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd,
-                                                        int sx) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd, int sx) {
   int16x8_t f = load_filters_1(sx);
 
   int16x8_t rv0 = vextq_s16(vreinterpretq_s16_u16(in.val[0]),
@@ -133,8 +133,8 @@ static INLINE int16x8_t highbd_horizontal_filter_4x1_f1(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res), vdup_n_s16(0));
 }
 
-static INLINE int16x8_t highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd,
-                                                        int sx) {
+static AOM_FORCE_INLINE int16x8_t
+highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd, int sx) {
   int16x8_t f = load_filters_1(sx);
 
   int16x8_t rv0 = vextq_s16(vreinterpretq_s16_u16(in.val[0]),
@@ -180,7 +180,8 @@ static INLINE int16x8_t highbd_horizontal_filter_8x1_f1(uint16x8x2_t in, int bd,
   return vcombine_s16(vmovn_s32(res0), vmovn_s32(res1));
 }
 
-static INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp, int sy) {
+static AOM_FORCE_INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp,
+                                                         int sy) {
   const int16x8_t f = load_filters_1(sy);
   const int16x4_t f0123 = vget_low_s16(f);
   const int16x4_t f4567 = vget_high_s16(f);
@@ -197,7 +198,8 @@ static INLINE int32x4_t vertical_filter_4x1_f1(const int16x8_t *tmp, int sy) {
   return m0123;
 }
 
-static INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp, int sy) {
+static AOM_FORCE_INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp,
+                                                           int sy) {
   const int16x8_t f = load_filters_1(sy);
   const int16x4_t f0123 = vget_low_s16(f);
   const int16x4_t f4567 = vget_high_s16(f);
@@ -223,8 +225,8 @@ static INLINE int32x4x2_t vertical_filter_8x1_f1(const int16x8_t *tmp, int sy) {
   return (int32x4x2_t){ { m0123, m4567 } };
 }
 
-static INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp, int sy,
-                                               int gamma) {
+static AOM_FORCE_INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp,
+                                                         int sy, int gamma) {
   int16x8_t s0, s1, s2, s3;
   transpose_elems_s16_4x8(
       vget_low_s16(tmp[0]), vget_low_s16(tmp[1]), vget_low_s16(tmp[2]),
@@ -244,8 +246,8 @@ static INLINE int32x4_t vertical_filter_4x1_f4(const int16x8_t *tmp, int sy,
   return vcombine_s32(vmovn_s64(m01), vmovn_s64(m23));
 }
 
-static INLINE int32x4x2_t vertical_filter_8x1_f8(const int16x8_t *tmp, int sy,
-                                                 int gamma) {
+static AOM_FORCE_INLINE int32x4x2_t vertical_filter_8x1_f8(const int16x8_t *tmp,
+                                                           int sy, int gamma) {
   int16x8_t s0 = tmp[0];
   int16x8_t s1 = tmp[1];
   int16x8_t s2 = tmp[2];
diff --git a/av1/common/arm/warp_plane_neon.c b/av1/common/arm/warp_plane_neon.c
index 4723154398..546aa2965b 100644
--- a/av1/common/arm/warp_plane_neon.c
+++ b/av1/common/arm/warp_plane_neon.c
@@ -11,8 +11,8 @@
 
 #include "warp_plane_neon.h"
 
-static INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in, int sx,
-                                                 int alpha) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in,
+                                                           int sx, int alpha) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   // Loading the 8 filter taps
@@ -39,8 +39,8 @@ static INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in, int sx,
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in, int sx,
-                                                 int alpha) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in,
+                                                           int sx, int alpha) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   // Loading the 8 filter taps
@@ -75,7 +75,8 @@ static INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in, int sx,
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in, int sx) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in,
+                                                           int sx) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   int16x8_t f_s16 =
@@ -101,7 +102,8 @@ static INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in, int sx) {
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in, int sx) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in,
+                                                           int sx) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   int16x8_t f_s16 =
@@ -135,8 +137,8 @@ static INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in, int sx) {
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE void vertical_filter_4x1_f1(const int16x8_t *src, int32x4_t *res,
-                                          int sy) {
+static AOM_FORCE_INLINE void vertical_filter_4x1_f1(const int16x8_t *src,
+                                                    int32x4_t *res, int sy) {
   int16x4_t s0 = vget_low_s16(src[0]);
   int16x4_t s1 = vget_low_s16(src[1]);
   int16x4_t s2 = vget_low_s16(src[2]);
@@ -161,8 +163,9 @@ static INLINE void vertical_filter_4x1_f1(const int16x8_t *src, int32x4_t *res,
   *res = m0123;
 }
 
-static INLINE void vertical_filter_4x1_f4(const int16x8_t *src, int32x4_t *res,
-                                          int sy, int gamma) {
+static AOM_FORCE_INLINE void vertical_filter_4x1_f4(const int16x8_t *src,
+                                                    int32x4_t *res, int sy,
+                                                    int gamma) {
   int16x8_t s0, s1, s2, s3;
   transpose_elems_s16_4x8(
       vget_low_s16(src[0]), vget_low_s16(src[1]), vget_low_s16(src[2]),
@@ -186,9 +189,10 @@ static INLINE void vertical_filter_4x1_f4(const int16x8_t *src, int32x4_t *res,
   *res = horizontal_add_4d_s32x4(m0123_pairs);
 }
 
-static INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
-                                          int32x4_t *res_low,
-                                          int32x4_t *res_high, int sy) {
+static AOM_FORCE_INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
+                                                    int32x4_t *res_low,
+                                                    int32x4_t *res_high,
+                                                    int sy) {
   int16x8_t s0 = src[0];
   int16x8_t s1 = src[1];
   int16x8_t s2 = src[2];
@@ -223,10 +227,10 @@ static INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
   *res_high = m4567;
 }
 
-static INLINE void vertical_filter_8x1_f8(const int16x8_t *src,
-                                          int32x4_t *res_low,
-                                          int32x4_t *res_high, int sy,
-                                          int gamma) {
+static AOM_FORCE_INLINE void vertical_filter_8x1_f8(const int16x8_t *src,
+                                                    int32x4_t *res_low,
+                                                    int32x4_t *res_high, int sy,
+                                                    int gamma) {
   int16x8_t s0 = src[0];
   int16x8_t s1 = src[1];
   int16x8_t s2 = src[2];
diff --git a/av1/common/arm/warp_plane_neon.h b/av1/common/arm/warp_plane_neon.h
index 5afd72f4ab..eece007ef3 100644
--- a/av1/common/arm/warp_plane_neon.h
+++ b/av1/common/arm/warp_plane_neon.h
@@ -24,32 +24,37 @@
 #include "av1/common/warped_motion.h"
 #include "av1/common/scale.h"
 
-static INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in, int sx,
-                                                 int alpha);
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in,
+                                                           int sx, int alpha);
 
-static INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in, int sx,
-                                                 int alpha);
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in,
+                                                           int sx, int alpha);
 
-static INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in, int sx);
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in,
+                                                           int sx);
 
-static INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in, int sx);
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in,
+                                                           int sx);
 
-static INLINE void vertical_filter_4x1_f1(const int16x8_t *src, int32x4_t *res,
-                                          int sy);
+static AOM_FORCE_INLINE void vertical_filter_4x1_f1(const int16x8_t *src,
+                                                    int32x4_t *res, int sy);
 
-static INLINE void vertical_filter_4x1_f4(const int16x8_t *src, int32x4_t *res,
-                                          int sy, int gamma);
+static AOM_FORCE_INLINE void vertical_filter_4x1_f4(const int16x8_t *src,
+                                                    int32x4_t *res, int sy,
+                                                    int gamma);
 
-static INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
-                                          int32x4_t *res_low,
-                                          int32x4_t *res_high, int sy);
+static AOM_FORCE_INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
+                                                    int32x4_t *res_low,
+                                                    int32x4_t *res_high,
+                                                    int sy);
 
-static INLINE void vertical_filter_8x1_f8(const int16x8_t *src,
-                                          int32x4_t *res_low,
-                                          int32x4_t *res_high, int sy,
-                                          int gamma);
+static AOM_FORCE_INLINE void vertical_filter_8x1_f8(const int16x8_t *src,
+                                                    int32x4_t *res_low,
+                                                    int32x4_t *res_high, int sy,
+                                                    int gamma);
 
-static INLINE void load_filters_4(int16x8_t out[], int offset, int stride) {
+static AOM_FORCE_INLINE void load_filters_4(int16x8_t out[], int offset,
+                                            int stride) {
   out[0] = vld1q_s16((int16_t *)(av1_warped_filter + ((offset + 0 * stride) >>
                                                       WARPEDDIFF_PREC_BITS)));
   out[1] = vld1q_s16((int16_t *)(av1_warped_filter + ((offset + 1 * stride) >>
@@ -60,7 +65,8 @@ static INLINE void load_filters_4(int16x8_t out[], int offset, int stride) {
                                                       WARPEDDIFF_PREC_BITS)));
 }
 
-static INLINE void load_filters_8(int16x8_t out[], int offset, int stride) {
+static AOM_FORCE_INLINE void load_filters_8(int16x8_t out[], int offset,
+                                            int stride) {
   out[0] = vld1q_s16((int16_t *)(av1_warped_filter + ((offset + 0 * stride) >>
                                                       WARPEDDIFF_PREC_BITS)));
   out[1] = vld1q_s16((int16_t *)(av1_warped_filter + ((offset + 1 * stride) >>
@@ -79,16 +85,14 @@ static INLINE void load_filters_8(int16x8_t out[], int offset, int stride) {
                                                       WARPEDDIFF_PREC_BITS)));
 }
 
-static INLINE int clamp_iy(int iy, int height) {
+static AOM_FORCE_INLINE int clamp_iy(int iy, int height) {
   return clamp(iy, 0, height - 1);
 }
 
-static INLINE void warp_affine_horizontal(const uint8_t *ref, int width,
-                                          int height, int stride, int p_width,
-                                          int p_height, int16_t alpha,
-                                          int16_t beta, const int64_t x4,
-                                          const int64_t y4, const int i,
-                                          int16x8_t tmp[]) {
+static AOM_FORCE_INLINE void warp_affine_horizontal(
+    const uint8_t *ref, int width, int height, int stride, int p_width,
+    int p_height, int16_t alpha, int16_t beta, const int64_t x4,
+    const int64_t y4, const int i, int16x8_t tmp[]) {
   const int bd = 8;
   const int reduce_bits_horiz = ROUND0_BITS;
   const int height_limit = AOMMIN(8, p_height - i) + 7;
@@ -197,7 +201,7 @@ static INLINE void warp_affine_horizontal(const uint8_t *ref, int width,
   }
 }
 
-static INLINE void warp_affine_vertical(
+static AOM_FORCE_INLINE void warp_affine_vertical(
     uint8_t *pred, int p_width, int p_height, int p_stride, int is_compound,
     uint16_t *dst, int dst_stride, int do_average, int use_dist_wtd_comp_avg,
     int16_t gamma, int16_t delta, const int64_t y4, const int i, const int j,
@@ -325,7 +329,7 @@ static INLINE void warp_affine_vertical(
   }
 }
 
-static INLINE void av1_warp_affine_common(
+static AOM_FORCE_INLINE void av1_warp_affine_common(
     const int32_t *mat, const uint8_t *ref, int width, int height, int stride,
     uint8_t *pred, int p_col, int p_row, int p_width, int p_height,
     int p_stride, int subsampling_x, int subsampling_y,
diff --git a/av1/common/arm/warp_plane_neon_i8mm.c b/av1/common/arm/warp_plane_neon_i8mm.c
index 39e3ad99f4..22a1be17b5 100644
--- a/av1/common/arm/warp_plane_neon_i8mm.c
+++ b/av1/common/arm/warp_plane_neon_i8mm.c
@@ -17,8 +17,8 @@ DECLARE_ALIGNED(16, static const uint8_t, usdot_permute_idx[48]) = {
   8, 9, 10, 11, 9, 10, 11, 12, 10, 11, 12, 13, 11, 12, 13, 14
 };
 
-static INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in, int sx,
-                                                 int alpha) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in,
+                                                           int sx, int alpha) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   // Loading the 8 filter taps
@@ -45,8 +45,8 @@ static INLINE int16x8_t horizontal_filter_4x1_f4(const uint8x16_t in, int sx,
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in, int sx,
-                                                 int alpha) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in,
+                                                           int sx, int alpha) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   // Loading the 8 filter taps
@@ -83,7 +83,8 @@ static INLINE int16x8_t horizontal_filter_8x1_f8(const uint8x16_t in, int sx,
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in, int sx) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in,
+                                                           int sx) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   int16x8_t f_s16 =
@@ -112,7 +113,8 @@ static INLINE int16x8_t horizontal_filter_4x1_f1(const uint8x16_t in, int sx) {
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in, int sx) {
+static AOM_FORCE_INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in,
+                                                           int sx) {
   const int32x4_t add_const = vdupq_n_s32(1 << (8 + FILTER_BITS - 1));
 
   int16x8_t f_s16 =
@@ -149,8 +151,8 @@ static INLINE int16x8_t horizontal_filter_8x1_f1(const uint8x16_t in, int sx) {
   return vreinterpretq_s16_u16(res);
 }
 
-static INLINE void vertical_filter_4x1_f1(const int16x8_t *src, int32x4_t *res,
-                                          int sy) {
+static AOM_FORCE_INLINE void vertical_filter_4x1_f1(const int16x8_t *src,
+                                                    int32x4_t *res, int sy) {
   int16x4_t s0 = vget_low_s16(src[0]);
   int16x4_t s1 = vget_low_s16(src[1]);
   int16x4_t s2 = vget_low_s16(src[2]);
@@ -175,8 +177,9 @@ static INLINE void vertical_filter_4x1_f1(const int16x8_t *src, int32x4_t *res,
   *res = m0123;
 }
 
-static INLINE void vertical_filter_4x1_f4(const int16x8_t *src, int32x4_t *res,
-                                          int sy, int gamma) {
+static AOM_FORCE_INLINE void vertical_filter_4x1_f4(const int16x8_t *src,
+                                                    int32x4_t *res, int sy,
+                                                    int gamma) {
   int16x8_t s0, s1, s2, s3;
   transpose_elems_s16_4x8(
       vget_low_s16(src[0]), vget_low_s16(src[1]), vget_low_s16(src[2]),
@@ -200,9 +203,10 @@ static INLINE void vertical_filter_4x1_f4(const int16x8_t *src, int32x4_t *res,
   *res = horizontal_add_4d_s32x4(m0123_pairs);
 }
 
-static INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
-                                          int32x4_t *res_low,
-                                          int32x4_t *res_high, int sy) {
+static AOM_FORCE_INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
+                                                    int32x4_t *res_low,
+                                                    int32x4_t *res_high,
+                                                    int sy) {
   int16x8_t s0 = src[0];
   int16x8_t s1 = src[1];
   int16x8_t s2 = src[2];
@@ -237,10 +241,10 @@ static INLINE void vertical_filter_8x1_f1(const int16x8_t *src,
   *res_high = m4567;
 }
 
-static INLINE void vertical_filter_8x1_f8(const int16x8_t *src,
-                                          int32x4_t *res_low,
-                                          i

(Patch may be truncated, please check the link at the top of this post.)