Skip to content

Commit 395cb0d

Browse files
Nathan E. Eggekkysen
authored andcommitted
arm32/itx: Trim dav1d_inv_wht4_1d_c, saves 68 bytes
1 parent b94de46 commit 395cb0d

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/itx_1d.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,10 @@ void dav1d_inv_identity32_1d_c(int32_t *const c, const ptrdiff_t stride,
10161016
c[stride * i] *= 4;
10171017
}
10181018

1019-
#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ARCH_AARCH64)
1019+
#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ( \
1020+
ARCH_AARCH64 || \
1021+
(ARCH_ARM && (defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32))) \
1022+
))
10201023
void dav1d_inv_wht4_1d_c(int32_t *const c, const ptrdiff_t stride) {
10211024
assert(stride > 0);
10221025
const int in0 = c[0 * stride], in1 = c[1 * stride];

src/itx_tmpl.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,10 @@ inv_txfm_fn64(64, 16, 2)
159159
inv_txfm_fn64(64, 32, 1)
160160
inv_txfm_fn64(64, 64, 2)
161161

162-
#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ARCH_AARCH64)
162+
#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ( \
163+
ARCH_AARCH64 || \
164+
(ARCH_ARM && (defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32))) \
165+
))
163166
static void inv_txfm_add_wht_wht_4x4_c(pixel *dst, const ptrdiff_t stride,
164167
coef *const coeff, const int eob
165168
HIGHBD_DECL_SUFFIX)
@@ -234,7 +237,10 @@ COLD void bitfn(dav1d_itx_dsp_init)(Dav1dInvTxfmDSPContext *const c, int bpc) {
234237
c->itxfm_add[pfx##TX_##w##X##h][V_ADST] = \
235238
inv_txfm_add_identity_adst_##w##x##h##_c; \
236239

237-
#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ARCH_AARCH64)
240+
#if !(HAVE_ASM && TRIM_DSP_FUNCTIONS && ( \
241+
ARCH_AARCH64 || \
242+
(ARCH_ARM && (defined(__ARM_NEON) || defined(__APPLE__) || defined(_WIN32))) \
243+
))
238244
c->itxfm_add[TX_4X4][WHT_WHT] = inv_txfm_add_wht_wht_4x4_c;
239245
#endif
240246
assign_itx_all_fn84( 4, 4, );

0 commit comments

Comments
 (0)