#include <assert.h>
#include "config/aom_dsp_rtcd.h"
#include "config/av1_rtcd.h"
#include "aom_dsp/txfm_common.h"
#include "av1/common/enums.h"
#include "av1/common/av1_txfm.h"
#include "av1/encoder/av1_fwd_txfm1d.h"
#include "av1/encoder/av1_fwd_txfm1d_cfg.h"
static inline TxfmFunc fwd_txfm_type_to_func(TXFM_TYPE txfm_type) { … }
void av1_gen_fwd_stage_range(int8_t *stage_range_col, int8_t *stage_range_row,
const TXFM_2D_FLIP_CFG *cfg, int bd) { … }
static inline void fwd_txfm2d_c(const int16_t *input, int32_t *output,
const int stride, const TXFM_2D_FLIP_CFG *cfg,
int32_t *buf, int bd) { … }
void av1_fwd_txfm2d_4x8_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_8x4_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_8x16_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_16x8_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_16x32_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_32x16_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
#if !CONFIG_REALTIME_ONLY
void av1_fwd_txfm2d_4x16_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) {
DECLARE_ALIGNED(32, int32_t, txfm_buf[4 * 16]);
TXFM_2D_FLIP_CFG cfg;
av1_get_fwd_txfm_cfg(tx_type, TX_4X16, &cfg);
fwd_txfm2d_c(input, output, stride, &cfg, txfm_buf, bd);
}
#endif
void av1_fwd_txfm2d_16x4_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
#if !CONFIG_REALTIME_ONLY
void av1_fwd_txfm2d_8x32_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) {
DECLARE_ALIGNED(32, int32_t, txfm_buf[32 * 8]);
TXFM_2D_FLIP_CFG cfg;
av1_get_fwd_txfm_cfg(tx_type, TX_8X32, &cfg);
fwd_txfm2d_c(input, output, stride, &cfg, txfm_buf, bd);
}
void av1_fwd_txfm2d_32x8_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) {
int32_t txfm_buf[32 * 8];
TXFM_2D_FLIP_CFG cfg;
av1_get_fwd_txfm_cfg(tx_type, TX_32X8, &cfg);
fwd_txfm2d_c(input, output, stride, &cfg, txfm_buf, bd);
}
#endif
void av1_fwd_txfm2d_4x4_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_8x8_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_16x16_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_32x32_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_64x64_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_32x64_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
void av1_fwd_txfm2d_64x32_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) { … }
#if !CONFIG_REALTIME_ONLY
void av1_fwd_txfm2d_16x64_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) {
DECLARE_ALIGNED(32, int32_t, txfm_buf[64 * 16]);
TXFM_2D_FLIP_CFG cfg;
av1_get_fwd_txfm_cfg(tx_type, TX_16X64, &cfg);
fwd_txfm2d_c(input, output, stride, &cfg, txfm_buf, bd);
for (int row = 0; row < 16; ++row) {
memset(output + row * 64 + 32, 0, 32 * sizeof(*output));
}
for (int row = 1; row < 16; ++row) {
memcpy(output + row * 32, output + row * 64, 32 * sizeof(*output));
}
}
void av1_fwd_txfm2d_64x16_c(const int16_t *input, int32_t *output, int stride,
TX_TYPE tx_type, int bd) {
int32_t txfm_buf[64 * 16];
TXFM_2D_FLIP_CFG cfg;
av1_get_fwd_txfm_cfg(tx_type, TX_64X16, &cfg);
fwd_txfm2d_c(input, output, stride, &cfg, txfm_buf, bd);
memset(output + 16 * 32, 0, 16 * 32 * sizeof(*output));
}
#endif
static const int8_t fwd_shift_4x4[3] = …;
static const int8_t fwd_shift_8x8[3] = …;
static const int8_t fwd_shift_16x16[3] = …;
static const int8_t fwd_shift_32x32[3] = …;
static const int8_t fwd_shift_64x64[3] = …;
static const int8_t fwd_shift_4x8[3] = …;
static const int8_t fwd_shift_8x4[3] = …;
static const int8_t fwd_shift_8x16[3] = …;
static const int8_t fwd_shift_16x8[3] = …;
static const int8_t fwd_shift_16x32[3] = …;
static const int8_t fwd_shift_32x16[3] = …;
static const int8_t fwd_shift_32x64[3] = …;
static const int8_t fwd_shift_64x32[3] = …;
static const int8_t fwd_shift_4x16[3] = …;
static const int8_t fwd_shift_16x4[3] = …;
static const int8_t fwd_shift_8x32[3] = …;
static const int8_t fwd_shift_32x8[3] = …;
static const int8_t fwd_shift_16x64[3] = …;
static const int8_t fwd_shift_64x16[3] = …;
const int8_t *av1_fwd_txfm_shift_ls[TX_SIZES_ALL] = …;
const int8_t av1_fwd_cos_bit_col[MAX_TXWH_IDX ]
[MAX_TXWH_IDX ] = …;
const int8_t av1_fwd_cos_bit_row[MAX_TXWH_IDX ]
[MAX_TXWH_IDX ] = …;
static const int8_t fdct4_range_mult2[4] = …;
static const int8_t fdct8_range_mult2[6] = …;
static const int8_t fdct16_range_mult2[8] = …;
static const int8_t fdct32_range_mult2[10] = …;
static const int8_t fdct64_range_mult2[12] = …;
static const int8_t fadst4_range_mult2[7] = …;
static const int8_t fadst8_range_mult2[8] = …;
static const int8_t fadst16_range_mult2[10] = …;
static const int8_t fidtx4_range_mult2[1] = …;
static const int8_t fidtx8_range_mult2[1] = …;
static const int8_t fidtx16_range_mult2[1] = …;
static const int8_t fidtx32_range_mult2[1] = …;
static const int8_t *fwd_txfm_range_mult2_list[TXFM_TYPES] = …;
static inline void set_fwd_txfm_non_scale_range(TXFM_2D_FLIP_CFG *cfg) { … }
void av1_get_fwd_txfm_cfg(TX_TYPE tx_type, TX_SIZE tx_size,
TXFM_2D_FLIP_CFG *cfg) { … }