Skip to content

Commit

Permalink
Add 4x4 WHT_WHT to inverse transform tests
Browse files Browse the repository at this point in the history
  • Loading branch information
barrbrain committed Oct 20, 2023
1 parent 05ec6f4 commit 5920bdc
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/asm/shared/transform/inverse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ pub fn call_inverse_hbd_func<T: Pixel>(
#[cfg(test)]
pub mod test {
use super::*;
use crate::asm::shared::transform::get_tx_type_idx;
use crate::context::av1_get_coded_tx_size;
use crate::cpu_features::CpuFeatureLevel;
use crate::frame::{AsRegion, Plane};
Expand All @@ -108,7 +109,8 @@ pub mod test {
let mut eob = 0;
let mut exit = 0;

let scan = av1_scan_orders[tx_size as usize][tx_type as usize].scan;
let scan =
av1_scan_orders[tx_size as usize][get_tx_type_idx(tx_type)].scan;

for (i, &pos) in scan.iter().enumerate() {
exit = i;
Expand Down Expand Up @@ -229,13 +231,16 @@ pub mod test {
};

($TYPES64:tt, $DIMS64:tt, $TYPES32:tt, $DIMS32:tt, $TYPES16:tt, $DIMS16:tt,
$TYPES84:tt, $DIMS84:tt) => {
$TYPES84:tt, $DIMS84:tt, $TYPES4:tt, $DIMS4:tt) => {
test_itx_fns!([$TYPES64], $DIMS64);
test_itx_fns!([$TYPES64, $TYPES32], $DIMS32);
test_itx_fns!([$TYPES64, $TYPES32, $TYPES16], $DIMS16);
test_itx_fns!(
[$TYPES64, $TYPES32, $TYPES16, $TYPES84], $DIMS84
);
test_itx_fns!(
[$TYPES64, $TYPES32, $TYPES16, $TYPES84, $TYPES4], $DIMS4
);
};
}

Expand All @@ -260,13 +265,16 @@ pub mod test {
(TxType::FLIPADST_FLIPADST, flipadst, flipadst)
],
[(16, 16)],
// 8x, 4x and 16x (minus 16x16)
// 8x, 4x and 16x (minus 16x16 and 4x4)
[
(TxType::V_ADST, adst, identity),
(TxType::H_ADST, identity, adst),
(TxType::V_FLIPADST, flipadst, identity),
(TxType::H_FLIPADST, identity, flipadst)
],
[(16, 8), (8, 16), (16, 4), (4, 16), (8, 8), (8, 4), (4, 8), (4, 4)]
[(16, 8), (8, 16), (16, 4), (4, 16), (8, 8), (8, 4), (4, 8)],
// 4x4
[(TxType::WHT_WHT, wht, wht)],
[(4, 4)]
);
}

0 comments on commit 5920bdc

Please sign in to comment.