From 9453443c0542cf97f76d0602198c3164641de011 Mon Sep 17 00:00:00 2001
From: Wan-Teh Chang <[EMAIL REDACTED]>
Date: Thu, 8 Aug 2024 20:29:57 -0700
Subject: [PATCH] Delete the AOM_INLINE macro
Replace AOM_INLINE with inline and delete the AOM_INLINE macro.
Although AOM_INLINE is defined in the public header aom/aom_integer.h,
it is clearly for libaom internal use. Clients of libaom are unlikely to
use AOM_INLINE. So it should be safe to delete AOM_INLINE.
Bug: aomedia:358402891
Change-Id: Ib595cdff1690c4027bd7e61580beb97d0c22865c
---
aom/aom_integer.h | 1 -
aom/internal/aom_codec_internal.h | 2 +-
aom_dsp/entenc.h | 11 +-
aom_dsp/mathutils.h | 2 +-
aom_dsp/x86/sum_squares_avx2.c | 4 +-
aom_dsp/x86/sum_squares_sse2.c | 4 +-
aom_dsp/x86/variance_impl_avx2.c | 2 +-
aom_ports/mem_ops.h | 14 +-
aom_ports/mem_ops_aligned.h | 70 ++--
aom_scale/yv12config.h | 2 +-
av1/av1_iface_common.h | 10 +-
av1/common/arm/highbd_wiener_convolve_neon.c | 2 +-
av1/common/arm/reconinter_neon.c | 18 +-
av1/common/arm/wiener_convolve_neon.c | 2 +-
av1/common/av1_loopfilter.c | 34 +-
av1/common/cdef_block.c | 8 +-
av1/common/entropy.c | 7 +-
av1/common/filter.h | 4 +-
av1/common/mv.h | 6 +-
av1/common/mvref_common.c | 54 +--
av1/common/reconinter.c | 39 +-
av1/common/reconinter.h | 25 +-
av1/common/reconinter_template.inc | 51 +--
av1/common/seg_common.h | 6 +-
av1/common/thread_common.c | 24 +-
av1/common/thread_common.h | 33 +-
av1/common/x86/convolve_avx2.c | 4 +-
av1/common/x86/jnt_convolve_avx2.c | 2 +-
av1/decoder/decodeframe.c | 403 +++++++++----------
av1/encoder/arm/shift_neon.h | 14 +-
av1/encoder/arm/txfm_neon.h | 8 +-
av1/encoder/bitstream.c | 380 +++++++++--------
av1/encoder/compound_type.c | 10 +-
av1/encoder/context_tree.h | 4 +-
av1/encoder/encode_strategy.h | 4 +-
av1/encoder/encodeframe.c | 81 ++--
av1/encoder/encodeframe_utils.c | 6 +-
av1/encoder/encodeframe_utils.h | 45 +--
av1/encoder/encoder.c | 10 +-
av1/encoder/encoder.h | 8 +-
av1/encoder/encoder_alloc.h | 35 +-
av1/encoder/encoder_utils.h | 70 ++--
av1/encoder/ethread.c | 160 ++++----
av1/encoder/firstpass.c | 19 +-
av1/encoder/global_motion_facade.c | 10 +-
av1/encoder/global_motion_facade.h | 4 +-
av1/encoder/gop_structure.c | 19 +-
av1/encoder/intra_mode_search.c | 21 +-
av1/encoder/intra_mode_search.h | 2 +-
av1/encoder/intra_mode_search_utils.h | 84 ++--
av1/encoder/mcomp.c | 28 +-
av1/encoder/mcomp.h | 2 +-
av1/encoder/model_rd.h | 38 +-
av1/encoder/motion_search_facade.c | 9 +-
av1/encoder/motion_search_facade.h | 8 +-
av1/encoder/mv_prec.c | 35 +-
av1/encoder/mv_prec.h | 8 +-
av1/encoder/nonrd_opt.c | 5 +-
av1/encoder/nonrd_pickmode.c | 68 ++--
av1/encoder/palette.c | 37 +-
av1/encoder/partition_search.c | 44 +-
av1/encoder/partition_search.h | 12 +-
av1/encoder/partition_strategy.c | 10 +-
av1/encoder/partition_strategy.h | 10 +-
av1/encoder/pickcdef.c | 10 +-
av1/encoder/pickrst.c | 127 +++---
av1/encoder/rc_utils.h | 46 +--
av1/encoder/rd.c | 2 +-
av1/encoder/rdopt.c | 138 +++----
av1/encoder/rdopt_utils.h | 38 +-
av1/encoder/reconinter_enc.c | 2 +-
av1/encoder/sorting_network.h | 4 +-
av1/encoder/speed_features.c | 32 +-
av1/encoder/temporal_filter.h | 15 +-
av1/encoder/thirdpass.c | 2 +-
av1/encoder/tokenize.c | 7 +-
av1/encoder/tokenize.h | 8 +-
av1/encoder/tpl_model.c | 97 +++--
av1/encoder/tpl_model.h | 6 +-
av1/encoder/tune_vmaf.c | 56 +--
av1/encoder/tx_search.c | 139 +++----
av1/encoder/tx_search.h | 4 +-
av1/encoder/var_based_part.c | 108 ++---
av1/encoder/x86/error_intrin_sse2.c | 2 +-
av1/encoder/x86/ml_sse3.c | 6 +-
av1/encoder/x86/pickrst_avx2.c | 30 +-
av1/encoder/x86/pickrst_sse4.c | 28 +-
av1/encoder/x86/temporal_filter_avx2.c | 2 +-
tools/auto_refactor/av1_preprocess.py | 2 -
89 files changed, 1516 insertions(+), 1547 deletions(-)
diff --git a/aom/aom_integer.h b/aom/aom_integer.h
index c284947e4d..9660301e51 100644
--- a/aom/aom_integer.h
+++ b/aom/aom_integer.h
@@ -19,7 +19,6 @@
#else
#define AOM_FORCE_INLINE __inline__ __attribute__((always_inline))
#endif
-#define AOM_INLINE inline
/* Assume platforms have the C99 standard integer types. */
diff --git a/aom/internal/aom_codec_internal.h b/aom/internal/aom_codec_internal.h
index d2af212ee8..ddd986120c 100644
--- a/aom/internal/aom_codec_internal.h
+++ b/aom/internal/aom_codec_internal.h
@@ -189,7 +189,7 @@ typedef const struct aom_codec_ctrl_fn_map {
#define CTRL_MAP_END \
{ 0, NULL }
-static AOM_INLINE int at_ctrl_map_end(aom_codec_ctrl_fn_map_t *e) {
+static inline int at_ctrl_map_end(aom_codec_ctrl_fn_map_t *e) {
return e->ctrl_id == 0 && e->fn == NULL;
}
diff --git a/aom_dsp/entenc.h b/aom_dsp/entenc.h
index c52088b843..fe8a38f17c 100644
--- a/aom_dsp/entenc.h
+++ b/aom_dsp/entenc.h
@@ -75,7 +75,7 @@ OD_WARN_UNUSED_RESULT uint32_t od_ec_enc_tell_frac(const od_ec_enc *enc)
OD_ARG_NONNULL(1);
// buf is the frame bitbuffer, offs is where carry to be added
-static AOM_INLINE void propagate_carry_bwd(unsigned char *buf, uint32_t offs) {
+static inline void propagate_carry_bwd(unsigned char *buf, uint32_t offs) {
uint16_t sum, carry = 1;
do {
sum = (uint16_t)buf[offs] + 1;
@@ -86,11 +86,10 @@ static AOM_INLINE void propagate_carry_bwd(unsigned char *buf, uint32_t offs) {
// Convert to big-endian byte order and write data to buffer adding the
// carry-bit
-static AOM_INLINE void write_enc_data_to_out_buf(unsigned char *out,
- uint32_t offs, uint64_t output,
- uint64_t carry,
- uint32_t *enc_offs,
- uint8_t num_bytes_ready) {
+static inline void write_enc_data_to_out_buf(unsigned char *out, uint32_t offs,
+ uint64_t output, uint64_t carry,
+ uint32_t *enc_offs,
+ uint8_t num_bytes_ready) {
const uint64_t reg = HToBE64(output << ((8 - num_bytes_ready) << 3));
memcpy(&out[offs], ®, 8);
// Propagate carry backwards if exists
diff --git a/aom_dsp/mathutils.h b/aom_dsp/mathutils.h
index 746585d6aa..d15569c63f 100644
--- a/aom_dsp/mathutils.h
+++ b/aom_dsp/mathutils.h
@@ -126,7 +126,7 @@ static inline void multiply_mat(const double *m1, const double *m2, double *res,
}
}
-static AOM_INLINE float approx_exp(float y) {
+static inline float approx_exp(float y) {
#define A ((1 << 23) / 0.69314718056f) // (1 << 23) / ln(2)
#define B \
127 // Offset for the exponent according to IEEE floating point standard.
diff --git a/aom_dsp/x86/sum_squares_avx2.c b/aom_dsp/x86/sum_squares_avx2.c
index 7ae58eef59..e2f5327efc 100644
--- a/aom_dsp/x86/sum_squares_avx2.c
+++ b/aom_dsp/x86/sum_squares_avx2.c
@@ -157,7 +157,7 @@ uint64_t aom_sum_sse_2d_i16_avx2(const int16_t *src, int src_stride, int width,
}
// Accumulate sum of 16-bit elements in the vector
-static AOM_INLINE int32_t mm256_accumulate_epi16(__m256i vec_a) {
+static inline int32_t mm256_accumulate_epi16(__m256i vec_a) {
__m128i vtmp1 = _mm256_extracti128_si256(vec_a, 1);
__m128i vtmp2 = _mm256_castsi256_si128(vec_a);
vtmp1 = _mm_add_epi16(vtmp1, vtmp2);
@@ -171,7 +171,7 @@ static AOM_INLINE int32_t mm256_accumulate_epi16(__m256i vec_a) {
}
// Accumulate sum of 32-bit elements in the vector
-static AOM_INLINE int32_t mm256_accumulate_epi32(__m256i vec_a) {
+static inline int32_t mm256_accumulate_epi32(__m256i vec_a) {
__m128i vtmp1 = _mm256_extracti128_si256(vec_a, 1);
__m128i vtmp2 = _mm256_castsi256_si128(vec_a);
vtmp1 = _mm_add_epi32(vtmp1, vtmp2);
diff --git a/aom_dsp/x86/sum_squares_sse2.c b/aom_dsp/x86/sum_squares_sse2.c
index 1f8ef656ed..b12c10d8e6 100644
--- a/aom_dsp/x86/sum_squares_sse2.c
+++ b/aom_dsp/x86/sum_squares_sse2.c
@@ -315,7 +315,7 @@ uint64_t aom_sum_squares_i16_sse2(const int16_t *src, uint32_t n) {
}
// Accumulate sum of 16-bit elements in the vector
-static AOM_INLINE int32_t mm_accumulate_epi16(__m128i vec_a) {
+static inline int32_t mm_accumulate_epi16(__m128i vec_a) {
__m128i vtmp = _mm_srli_si128(vec_a, 8);
vec_a = _mm_add_epi16(vec_a, vtmp);
vtmp = _mm_srli_si128(vec_a, 4);
@@ -326,7 +326,7 @@ static AOM_INLINE int32_t mm_accumulate_epi16(__m128i vec_a) {
}
// Accumulate sum of 32-bit elements in the vector
-static AOM_INLINE int32_t mm_accumulate_epi32(__m128i vec_a) {
+static inline int32_t mm_accumulate_epi32(__m128i vec_a) {
__m128i vtmp = _mm_srli_si128(vec_a, 8);
vec_a = _mm_add_epi32(vec_a, vtmp);
vtmp = _mm_srli_si128(vec_a, 4);
diff --git a/aom_dsp/x86/variance_impl_avx2.c b/aom_dsp/x86/variance_impl_avx2.c
index 39e3fcf14f..d402697501 100644
--- a/aom_dsp/x86/variance_impl_avx2.c
+++ b/aom_dsp/x86/variance_impl_avx2.c
@@ -168,7 +168,7 @@ DECLARE_ALIGNED(32, static const uint8_t, bilinear_filters_avx2[512]) = {
// binary size by optimizing the loops more carefully without duplicating the
// codes with a macro.
#define MAKE_SUB_PIXEL_VAR_32XH(height, log2height) \
- static AOM_INLINE int aom_sub_pixel_variance32x##height##_imp_avx2( \
+ static inline int aom_sub_pixel_variance32x##height##_imp_avx2( \
const uint8_t *src, int src_stride, int x_offset, int y_offset, \
const uint8_t *dst, int dst_stride, unsigned int *sse) { \
__m256i src_reg, dst_reg, exp_src_lo, exp_src_hi, exp_dst_lo, exp_dst_hi; \
diff --git a/aom_ports/mem_ops.h b/aom_ports/mem_ops.h
index 4e32fd51a5..e59246ea5b 100644
--- a/aom_ports/mem_ops.h
+++ b/aom_ports/mem_ops.h
@@ -134,7 +134,7 @@ static unsigned MEM_VALUE_T mem_get_le32(const void *vmem) {
}
#define mem_get_s_generic(end, sz) \
- static AOM_INLINE signed MEM_VALUE_T mem_get_s##end##sz(const void *vmem) { \
+ static inline signed MEM_VALUE_T mem_get_s##end##sz(const void *vmem) { \
const MAU_T *mem = (const MAU_T *)vmem; \
signed MEM_VALUE_T val = mem_get_##end##sz(mem); \
return (val << (MEM_VALUE_T_SZ_BITS - sz)) >> (MEM_VALUE_T_SZ_BITS - sz); \
@@ -167,7 +167,7 @@ mem_get_s_generic(le, 32)
#undef mem_put_be16
#define mem_put_be16 mem_ops_wrap_symbol(mem_put_be16)
-static AOM_INLINE void mem_put_be16(void *vmem, MEM_VALUE_T val) {
+static inline void mem_put_be16(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (MAU_T)((val >> 8) & 0xff);
@@ -176,7 +176,7 @@ static AOM_INLINE void mem_put_be16(void *vmem, MEM_VALUE_T val) {
#undef mem_put_be24
#define mem_put_be24 mem_ops_wrap_symbol(mem_put_be24)
-static AOM_INLINE void mem_put_be24(void *vmem, MEM_VALUE_T val) {
+static inline void mem_put_be24(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (MAU_T)((val >> 16) & 0xff);
@@ -186,7 +186,7 @@ static AOM_INLINE void mem_put_be24(void *vmem, MEM_VALUE_T val) {
#undef mem_put_be32
#define mem_put_be32 mem_ops_wrap_symbol(mem_put_be32)
-static AOM_INLINE void mem_put_be32(void *vmem, MEM_VALUE_T val) {
+static inline void mem_put_be32(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (MAU_T)((val >> 24) & 0xff);
@@ -197,7 +197,7 @@ static AOM_INLINE void mem_put_be32(void *vmem, MEM_VALUE_T val) {
#undef mem_put_le16
#define mem_put_le16 mem_ops_wrap_symbol(mem_put_le16)
-static AOM_INLINE void mem_put_le16(void *vmem, MEM_VALUE_T val) {
+static inline void mem_put_le16(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (MAU_T)((val >> 0) & 0xff);
@@ -206,7 +206,7 @@ static AOM_INLINE void mem_put_le16(void *vmem, MEM_VALUE_T val) {
#undef mem_put_le24
#define mem_put_le24 mem_ops_wrap_symbol(mem_put_le24)
-static AOM_INLINE void mem_put_le24(void *vmem, MEM_VALUE_T val) {
+static inline void mem_put_le24(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (MAU_T)((val >> 0) & 0xff);
@@ -216,7 +216,7 @@ static AOM_INLINE void mem_put_le24(void *vmem, MEM_VALUE_T val) {
#undef mem_put_le32
#define mem_put_le32 mem_ops_wrap_symbol(mem_put_le32)
-static AOM_INLINE void mem_put_le32(void *vmem, MEM_VALUE_T val) {
+static inline void mem_put_le32(void *vmem, MEM_VALUE_T val) {
MAU_T *mem = (MAU_T *)vmem;
mem[0] = (MAU_T)((val >> 0) & 0xff);
diff --git a/aom_ports/mem_ops_aligned.h b/aom_ports/mem_ops_aligned.h
index 411133d4ef..bdfb034859 100644
--- a/aom_ports/mem_ops_aligned.h
+++ b/aom_ports/mem_ops_aligned.h
@@ -44,51 +44,51 @@
} while (0)
#define swap_endian_32_se(val, raw) swap_endian_32(val, raw)
-#define mem_get_ne_aligned_generic(end, sz) \
- static AOM_INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
- const void *vmem) { \
- const uint##sz##_t *mem = (const uint##sz##_t *)vmem; \
- return *mem; \
+#define mem_get_ne_aligned_generic(end, sz) \
+ static inline unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
+ const void *vmem) { \
+ const uint##sz##_t *mem = (const uint##sz##_t *)vmem; \
+ return *mem; \
}
-#define mem_get_sne_aligned_generic(end, sz) \
- static AOM_INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
- const void *vmem) { \
- const int##sz##_t *mem = (const int##sz##_t *)vmem; \
- return *mem; \
+#define mem_get_sne_aligned_generic(end, sz) \
+ static inline signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
+ const void *vmem) { \
+ const int##sz##_t *mem = (const int##sz##_t *)vmem; \
+ return *mem; \
}
-#define mem_get_se_aligned_generic(end, sz) \
- static AOM_INLINE unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
- const void *vmem) { \
- const uint##sz##_t *mem = (const uint##sz##_t *)vmem; \
- unsigned MEM_VALUE_T val, raw = *mem; \
- swap_endian_##sz(val, raw); \
- return val; \
+#define mem_get_se_aligned_generic(end, sz) \
+ static inline unsigned MEM_VALUE_T mem_get_##end##sz##_aligned( \
+ const void *vmem) { \
+ const uint##sz##_t *mem = (const uint##sz##_t *)vmem; \
+ unsigned MEM_VALUE_T val, raw = *mem; \
+ swap_endian_##sz(val, raw); \
+ return val; \
}
-#define mem_get_sse_aligned_generic(end, sz) \
- static AOM_INLINE signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
- const void *vmem) { \
- const int##sz##_t *mem = (const int##sz##_t *)vmem; \
- unsigned MEM_VALUE_T val, raw = *mem; \
- swap_endian_##sz##_se(val, raw); \
- return val; \
+#define mem_get_sse_aligned_generic(end, sz) \
+ static inline signed MEM_VALUE_T mem_get_s##end##sz##_aligned( \
+ const void *vmem) { \
+ const int##sz##_t *mem = (const int##sz##_t *)vmem; \
+ unsigned MEM_VALUE_T val, raw = *mem; \
+ swap_endian_##sz##_se(val, raw); \
+ return val; \
}
-#define mem_put_ne_aligned_generic(end, sz) \
- static AOM_INLINE void mem_put_##end##sz##_aligned(void *vmem, \
- MEM_VALUE_T val) { \
- uint##sz##_t *mem = (uint##sz##_t *)vmem; \
- *mem = (uint##sz##_t)val; \
+#define mem_put_ne_aligned_generic(end, sz) \
+ static inline void mem_put_##end##sz##_aligned(void *vmem, \
+ MEM_VALUE_T val) { \
+ uint##sz##_t *mem = (uint##sz##_t *)vmem; \
+ *mem = (uint##sz##_t)val; \
}
-#define mem_put_se_aligned_generic(end, sz) \
- static AOM_INLINE void mem_put_##end##sz##_aligned(void *vmem, \
- MEM_VALUE_T val) { \
- uint##sz##_t *mem = (uint##sz##_t *)vmem, raw; \
- swap_endian_##sz(raw, val); \
- *mem = (uint##sz##_t)raw; \
+#define mem_put_se_aligned_generic(end, sz) \
+ static inline void mem_put_##end##sz##_aligned(void *vmem, \
+ MEM_VALUE_T val) { \
+ uint##sz##_t *mem = (uint##sz##_t *)vmem, raw; \
+ swap_endian_##sz(raw, val); \
+ *mem = (uint##sz##_t)raw; \
}
#include "config/aom_config.h"
diff --git a/aom_scale/yv12config.h b/aom_scale/yv12config.h
index 78fe1512e5..a29125db2f 100644
--- a/aom_scale/yv12config.h
+++ b/aom_scale/yv12config.h
@@ -212,7 +212,7 @@ int aom_copy_metadata_to_frame_buffer(YV12_BUFFER_CONFIG *ybf,
* \param[in] aligned_width Aligned width of the image
* \param[in] border Border in pixels
*/
-static AOM_INLINE int aom_calc_y_stride(int aligned_width, int border) {
+static inline int aom_calc_y_stride(int aligned_width, int border) {
return ((aligned_width + 2 * border) + 31) & ~31;
}
diff --git a/av1/av1_iface_common.h b/av1/av1_iface_common.h
index c1a2a5b252..e47f8b07f8 100644
--- a/av1/av1_iface_common.h
+++ b/av1/av1_iface_common.h
@@ -18,9 +18,9 @@
extern aom_codec_iface_t aom_codec_av1_inspect_algo;
-static AOM_INLINE void yuvconfig2image(aom_image_t *img,
- const YV12_BUFFER_CONFIG *yv12,
- void *user_priv) {
+static inline void yuvconfig2image(aom_image_t *img,
+ const YV12_BUFFER_CONFIG *yv12,
+ void *user_priv) {
/* aom_img_wrap() doesn't allow specifying independent strides for
* the Y, U, and V planes, nor other alignment adjustments that
* might be representable by a YV12_BUFFER_CONFIG, so we just
@@ -83,8 +83,8 @@ static AOM_INLINE void yuvconfig2image(aom_image_t *img,
img->metadata = NULL;
}
-static AOM_INLINE aom_codec_err_t image2yuvconfig(const aom_image_t *img,
- YV12_BUFFER_CONFIG *yv12) {
+static inline aom_codec_err_t image2yuvconfig(const aom_image_t *img,
+ YV12_BUFFER_CONFIG *yv12) {
yv12->y_buffer = img->planes[AOM_PLANE_Y];
yv12->u_buffer = img->planes[AOM_PLANE_U];
yv12->v_buffer = img->planes[AOM_PLANE_V];
diff --git a/av1/common/arm/highbd_wiener_convolve_neon.c b/av1/common/arm/highbd_wiener_convolve_neon.c
index 044a5f80ba..ac941437d5 100644
--- a/av1/common/arm/highbd_wiener_convolve_neon.c
+++ b/av1/common/arm/highbd_wiener_convolve_neon.c
@@ -309,7 +309,7 @@ HBD_WIENER_7TAP_VERT(highbd_12, 2 * FILTER_BITS - WIENER_ROUND0_BITS - 2)
#undef HBD_WIENER_7TAP_VERT
-static AOM_INLINE int get_wiener_filter_taps(const int16_t *filter) {
+static inline int get_wiener_filter_taps(const int16_t *filter) {
assert(filter[7] == 0);
if (filter[0] == 0 && filter[6] == 0) {
return WIENER_WIN_REDUCED;
diff --git a/av1/common/arm/reconinter_neon.c b/av1/common/arm/reconinter_neon.c
index a7f368948b..96a36c79d7 100644
--- a/av1/common/arm/reconinter_neon.c
+++ b/av1/common/arm/reconinter_neon.c
@@ -21,10 +21,12 @@
#include "av1/common/blockd.h"
#include "config/av1_rtcd.h"
-static AOM_INLINE void diffwtd_mask_d16_neon(
- uint8_t *mask, const bool inverse, const CONV_BUF_TYPE *src0,
- int src0_stride, const CONV_BUF_TYPE *src1, int src1_stride, int h, int w,
- ConvolveParams *conv_params, int bd) {
+static inline void diffwtd_mask_d16_neon(uint8_t *mask, const bool inverse,
+ const CONV_BUF_TYPE *src0,
+ int src0_stride,
+ const CONV_BUF_TYPE *src1,
+ int src1_stride, int h, int w,
+ ConvolveParams *conv_params, int bd) {
const int round =
2 * FILTER_BITS - conv_params->round_0 - conv_params->round_1 + (bd - 8);
const int16x8_t round_vec = vdupq_n_s16((int16_t)(-round));
@@ -125,10 +127,10 @@ void av1_build_compound_diffwtd_mask_d16_neon(
}
}
-static AOM_INLINE void diffwtd_mask_neon(uint8_t *mask, const bool inverse,
- const uint8_t *src0, int src0_stride,
- const uint8_t *src1, int src1_stride,
- int h, int w) {
+static inline void diffwtd_mask_neon(uint8_t *mask, const bool inverse,
+ const uint8_t *src0, int src0_stride,
+ const uint8_t *src1, int src1_stride,
+ int h, int w) {
if (w >= 16) {
int i = 0;
do {
diff --git a/av1/common/arm/wiener_convolve_neon.c b/av1/common/arm/wiener_convolve_neon.c
index e2887b95d8..575db59e48 100644
--- a/av1/common/arm/wiener_convolve_neon.c
+++ b/av1/common/arm/wiener_convolve_neon.c
@@ -275,7 +275,7 @@ static inline void convolve_add_src_vert_7tap_neon(
} while (w != 0);
}
-static AOM_INLINE int get_wiener_filter_taps(const int16_t *filter) {
+static inline int get_wiener_filter_taps(const int16_t *filter) {
assert(filter[7] == 0);
if (filter[0] == 0 && filter[6] == 0) {
return WIENER_WIN_REDUCED;
diff --git a/av1/common/av1_loopfilter.c b/av1/common/av1_loopfilter.c
index a6e3bb22c2..83549597e1 100644
--- a/av1/common/av1_loopfilter.c
+++ b/av1/common/av1_loopfilter.c
@@ -903,10 +903,10 @@ static AOM_FORCE_INLINE void set_lpf_parameters_for_line_chroma(
}
}
-static AOM_INLINE void filter_vert(uint8_t *dst, int dst_stride,
- const AV1_DEBLOCKING_PARAMETERS *params,
- const SequenceHeader *seq_params,
- USE_FILTER_TYPE use_filter_type) {
+static inline void filter_vert(uint8_t *dst, int dst_stride,
+ const AV1_DEBLOCKING_PARAMETERS *params,
+ const SequenceHeader *seq_params,
+ USE_FILTER_TYPE use_filter_type) {
const loop_filter_thresh *limits = params->lfthr;
#if CONFIG_AV1_HIGHBITDEPTH
const int use_highbitdepth = seq_params->use_highbitdepth;
@@ -1109,10 +1109,11 @@ static AOM_INLINE void filter_vert(uint8_t *dst, int dst_stride,
#endif // !CONFIG_AV1_HIGHBITDEPTH
}
-static AOM_INLINE void filter_vert_chroma(
- uint8_t *u_dst, uint8_t *v_dst, int dst_stride,
- const AV1_DEBLOCKING_PARAMETERS *params, const SequenceHeader *seq_params,
- USE_FILTER_TYPE use_filter_type) {
+static inline void filter_vert_chroma(uint8_t *u_dst, uint8_t *v_dst,
+ int dst_stride,
+ const AV1_DEBLOCKING_PARAMETERS *params,
+ const SequenceHeader *seq_params,
+ USE_FILTER_TYPE use_filter_type) {
const loop_filter_thresh *u_limits = params->lfthr;
const loop_filter_thresh *v_limits = params->lfthr;
#if CONFIG_AV1_HIGHBITDEPTH
@@ -1504,10 +1505,10 @@ void av1_filter_block_plane_vert_opt_chroma(
}
}
-static AOM_INLINE void filter_horz(uint8_t *dst, int dst_stride,
- const AV1_DEBLOCKING_PARAMETERS *params,
- const SequenceHeader *seq_params,
- USE_FILTER_TYPE use_filter_type) {
+static inline void filter_horz(uint8_t *dst, int dst_stride,
+ const AV1_DEBLOCKING_PARAMETERS *params,
+ const SequenceHeader *seq_params,
+ USE_FILTER_TYPE use_filter_type) {
const loop_filter_thresh *limits = params->lfthr;
#if CONFIG_AV1_HIGHBITDEPTH
const int use_highbitdepth = seq_params->use_highbitdepth;
@@ -1710,10 +1711,11 @@ static AOM_INLINE void filter_horz(uint8_t *dst, int dst_stride,
#endif // !CONFIG_AV1_HIGHBITDEPTH
}
-static AOM_INLINE void filter_horz_chroma(
- uint8_t *u_dst, uint8_t *v_dst, int dst_stride,
- const AV1_DEBLOCKING_PARAMETERS *params, const SequenceHeader *seq_params,
- USE_FILTER_TYPE use_filter_type) {
+static inline void filter_horz_chroma(uint8_t *u_dst, uint8_t *v_dst,
+ int dst_stride,
+ const AV1_DEBLOCKING_PARAMETERS *params,
+ const SequenceHeader *seq_params,
+ USE_FILTER_TYPE use_filter_type) {
const loop_filter_thresh *u_limits = params->lfthr;
const loop_filter_thresh *v_limits = params->lfthr;
#if CONFIG_AV1_HIGHBITDEPTH
diff --git a/av1/common/cdef_block.c b/av1/common/cdef_block.c
index ad269c7850..318779beda 100644
--- a/av1/common/cdef_block.c
+++ b/av1/common/cdef_block.c
@@ -292,10 +292,10 @@ static inline int adjust_strength(int strength, int32_t var) {
return var ? (strength * (4 + i) + 8) >> 4 : 0;
}
-static AOM_INLINE void aom_cdef_find_dir(const uint16_t *in, cdef_list *dlist,
- int var[CDEF_NBLOCKS][CDEF_NBLOCKS],
- int cdef_count, int coeff_shift,
- int dir[CDEF_NBLOCKS][CDEF_NBLOCKS]) {
+static inline void aom_cdef_find_dir(const uint16_t *in, cdef_list *dlist,
+ int var[CDEF_NBLOCKS][CDEF_NBLOCKS],
+ int cdef_count, int coeff_shift,
+ int dir[CDEF_NBLOCKS][CDEF_NBLOCKS]) {
int bi;
// Find direction of two 8x8 blocks together.
diff --git a/av1/common/entropy.c b/av1/common/entropy.c
index 8c5d675e4c..9b76ce5dcc 100644
--- a/av1/common/entropy.c
+++ b/av1/common/entropy.c
@@ -50,9 +50,8 @@ void av1_default_coef_probs(AV1_COMMON *cm) {
av1_copy(cm->fc->eob_flag_cdf1024, av1_default_eob_multi1024_cdfs[index]);
}
-static AOM_INLINE void reset_cdf_symbol_counter(aom_cdf_prob *cdf_ptr,
- int num_cdfs, int cdf_stride,
- int nsymbs) {
+static inline void reset_cdf_symbol_counter(aom_cdf_prob *cdf_ptr, int num_cdfs,
+ int cdf_stride, int nsymbs) {
for (int i = 0; i < num_cdfs; i++) {
cdf_ptr[i * cdf_stride + nsymbs] = 0;
}
@@ -69,7 +68,7 @@ static AOM_INLINE void reset_cdf_symbol_counter(aom_cdf_prob *cdf_ptr,
reset_cdf_symbol_counter(cdf_ptr, num_cdfs, cdf_stride, nsymbs); \
} while (0)
-static AOM_INLINE void reset_nmv_counter(nmv_context *nmv) {
+static inline void reset_nmv_counter(nmv_context *nmv) {
RESET_CDF_COUNTER(nmv->joints_cdf, 4);
for (int i = 0; i < 2; i++) {
RESET_CDF_COUNTER(nmv->comps[i].classes_cdf, MV_CLASSES);
diff --git a/av1/common/filter.h b/av1/common/filter.h
index 752b18a59b..7073da2ad4 100644
--- a/av1/common/filter.h
+++ b/av1/common/filter.h
@@ -294,8 +294,8 @@ static inline uint8_t get_interp_filter_allowed_mask(
return (allow_interp_mask >> filt_type) & 1;
}
-static AOM_INLINE int get_filter_tap(
- const InterpFilterParams *const filter_params, int subpel_qn) {
+static inline int get_filter_tap(const InterpFilterParams *const filter_params,
+ int subpel_qn) {
const int16_t *const filter = av1_get_interp_filter_subpel_kernel(
filter_params, subpel_qn & SUBPEL_MASK);
if (filter_params->taps == 12) {
diff --git a/av1/common/mv.h b/av1/common/mv.h
index b731bc875d..0f4fa9c2e8 100644
--- a/av1/common/mv.h
+++ b/av1/common/mv.h
@@ -76,19 +76,19 @@ typedef struct {
int row_max;
} SubpelMvLimits;
-static AOM_INLINE FULLPEL_MV get_fullmv_from_mv(const MV *subpel_mv) {
+static inline FULLPEL_MV get_fullmv_from_mv(const MV *subpel_mv) {
const FULLPEL_MV full_mv = { (int16_t)GET_MV_RAWPEL(subpel_mv->row),
(int16_t)GET_MV_RAWPEL(subpel_mv->col) };
return full_mv;
}
-static AOM_INLINE MV get_mv_from_fullmv(const FULLPEL_MV *full_mv) {
+static inline MV get_mv_from_fullmv(const FULLPEL_MV *full_mv) {
const MV subpel_mv = { (int16_t)GET_MV_SUBPEL(full_mv->row),
(int16_t)GET_MV_SUBPEL(full_mv->col) };
return subpel_mv;
}
-static AOM_INLINE void convert_fullmv_to_mv(int_mv *mv) {
+static inline void convert_fullmv_to_mv(int_mv *mv) {
mv->as_mv = get_mv_from_fullmv(&mv->as_fullmv);
}
diff --git a/av1/common/mvref_common.c b/av1/common/mvref_common.c
index b07a9b1a2b..c27fceb6b3 100644
(Patch may be truncated, please check the link at the top of this post.)