pub mod forward;
pub mod inverse;
use crate::transform::*;
use std::ops::Index;
impl<T> Index<TxSize> for [T; TxSize::TX_SIZES_ALL] {
type Output = T;
#[inline]
fn index(&self, tx_size: TxSize) -> &Self::Output {
unsafe { self.get_unchecked(tx_size as usize) }
}
}
impl<T> Index<TxType> for [T; TX_TYPES] {
type Output = T;
#[inline]
fn index(&self, tx_type: TxType) -> &Self::Output {
unsafe { self.get_unchecked((tx_type as usize) & 15) }
}
}
impl<T> Index<TxType> for [T; TX_TYPES_PLUS_LL] {
type Output = T;
#[inline]
fn index(&self, tx_type: TxType) -> &Self::Output {
unsafe { self.get_unchecked(tx_type as usize) }
}
}