Skip to content

Commit c7de0bb

Browse files
Frank Bossenkkysen
authored andcommitted
arm/itx backport: Trim dav1d_inv_wht4_1d_c
1 parent de272b0 commit c7de0bb

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/itx.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ use crate::include::common::intops::iclip;
1818
use crate::include::dav1d::picture::{
1919
FFISafeRav1dPictureDataComponentOffset, Rav1dPictureDataComponentOffset,
2020
};
21+
#[cfg(not(all(feature = "asm", target_feature = "neon")))]
22+
use crate::itx_1d::rav1d_inv_wht4_1d_c;
2123
use crate::itx_1d::{
2224
rav1d_inv_adst16_1d_c, rav1d_inv_adst4_1d_c, rav1d_inv_adst8_1d_c, rav1d_inv_dct16_1d_c,
2325
rav1d_inv_dct32_1d_c, rav1d_inv_dct4_1d_c, rav1d_inv_dct64_1d_c, rav1d_inv_dct8_1d_c,
2426
rav1d_inv_flipadst16_1d_c, rav1d_inv_flipadst4_1d_c, rav1d_inv_flipadst8_1d_c,
2527
rav1d_inv_identity16_1d_c, rav1d_inv_identity32_1d_c, rav1d_inv_identity4_1d_c,
26-
rav1d_inv_identity8_1d_c, rav1d_inv_wht4_1d_c,
28+
rav1d_inv_identity8_1d_c,
2729
};
2830
use crate::levels::{
2931
TxfmSize, TxfmType, ADST_ADST, ADST_DCT, ADST_FLIPADST, DCT_ADST, DCT_DCT, DCT_FLIPADST,
@@ -187,7 +189,16 @@ fn inv_txfm_add_rust<const W: usize, const H: usize, const TYPE: TxfmType, BD: B
187189
H_FLIPADST => (Identity, FlipAdst),
188190
V_ADST => (Adst, Identity),
189191
V_FLIPADST => (FlipAdst, Identity),
190-
WHT_WHT if (W, H) == (4, 4) => return inv_txfm_add_wht_wht_4x4_rust(dst, coeff, bd),
192+
193+
WHT_WHT if (W, H) == (4, 4) => {
194+
cfg_if! {
195+
if #[cfg(not(all(feature = "asm", target_feature = "neon")))] {
196+
return inv_txfm_add_wht_wht_4x4_rust(dst, coeff, bd)
197+
} else {
198+
unreachable!()
199+
}
200+
}
201+
}
191202
_ => unreachable!(),
192203
};
193204

@@ -288,6 +299,7 @@ pub struct Rav1dInvTxfmDSPContext {
288299
pub itxfm_add: [[itxfm::Fn; N_TX_TYPES_PLUS_LL]; TxfmSize::COUNT],
289300
}
290301

302+
#[cfg(not(all(feature = "asm", target_feature = "neon")))]
291303
fn inv_txfm_add_wht_wht_4x4_rust<BD: BitDepth>(
292304
dst: Rav1dPictureDataComponentOffset,
293305
coeff: &mut [BD::Coef],

src/itx_1d.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,7 @@ pub fn rav1d_inv_identity32_1d_c(c: &mut [i32], stride: NonZeroUsize, _min: c_in
11331133
}
11341134
}
11351135

1136+
#[cfg(not(all(feature = "asm", target_feature = "neon")))]
11361137
pub fn rav1d_inv_wht4_1d_c(c: &mut [i32], stride: NonZeroUsize) {
11371138
let stride = stride.get();
11381139

0 commit comments

Comments
 (0)