#ifndef AOM_AV1_COMMON_AV1_TXFM_H_
#define AOM_AV1_COMMON_AV1_TXFM_H_
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include "config/aom_config.h"
#include "av1/common/enums.h"
#include "av1/common/blockd.h"
#include "aom/aom_integer.h"
#include "aom_dsp/aom_dsp_common.h"
#ifdef __cplusplus
extern "C" {
#endif
#if !defined(DO_RANGE_CHECK_CLAMP)
#define DO_RANGE_CHECK_CLAMP …
#endif
extern const int32_t av1_cospi_arr_data[4][64];
extern const int32_t av1_sinpi_arr_data[4][5];
#define MAX_TXFM_STAGE_NUM …
static const int cos_bit_min = …;
#define NewSqrt2Bits …
static const int32_t NewSqrt2 = …;
static const int32_t NewInvSqrt2 = …;
static inline const int32_t *cospi_arr(int n) { … }
static inline const int32_t *sinpi_arr(int n) { … }
#if HAVE_NEON
extern const int16_t av1_cospi_arr_q13_data[4][128];
extern const int16_t av1_sinpi_arr_q13_data[4][4];
extern const int32_t av1_cospi_arr_s32_data[4][66];
static inline const int16_t *cospi_arr_q13(int n) {
return av1_cospi_arr_q13_data[n - cos_bit_min];
}
static inline const int16_t *sinpi_arr_q13(int n) {
return av1_sinpi_arr_q13_data[n - cos_bit_min];
}
static inline const int32_t *cospi_arr_s32(int n) {
return av1_cospi_arr_s32_data[n - cos_bit_min];
}
#endif
static inline int32_t range_check_value(int32_t value, int8_t bit) { … }
static inline int32_t round_shift(int64_t value, int bit) { … }
static inline int32_t half_btf(int32_t w0, int32_t in0, int32_t w1, int32_t in1,
int bit) { … }
static inline uint16_t highbd_clip_pixel_add(uint16_t dest, tran_high_t trans,
int bd) { … }
TxfmFunc;
FwdTxfm2dFunc;
enum { … } UENUM1BYTE(…) …;
TXFM_2D_FLIP_CFG;
static inline void get_flip_cfg(TX_TYPE tx_type, int *ud_flip, int *lr_flip) { … }
static inline void set_flip_cfg(TX_TYPE tx_type, TXFM_2D_FLIP_CFG *cfg) { … }
static inline int get_rect_tx_log_ratio(int col, int row) { … }
void av1_gen_fwd_stage_range(int8_t *stage_range_col, int8_t *stage_range_row,
const TXFM_2D_FLIP_CFG *cfg, int bd);
void av1_gen_inv_stage_range(int8_t *stage_range_col, int8_t *stage_range_row,
const TXFM_2D_FLIP_CFG *cfg, TX_SIZE tx_size,
int bd);
void av1_get_fwd_txfm_cfg(TX_TYPE tx_type, TX_SIZE tx_size,
TXFM_2D_FLIP_CFG *cfg);
void av1_get_inv_txfm_cfg(TX_TYPE tx_type, TX_SIZE tx_size,
TXFM_2D_FLIP_CFG *cfg);
extern const TXFM_TYPE av1_txfm_type_ls[5][TX_TYPES_1D];
extern const int8_t av1_txfm_stage_num_list[TXFM_TYPES];
static inline int get_txw_idx(TX_SIZE tx_size) { … }
static inline int get_txh_idx(TX_SIZE tx_size) { … }
void av1_range_check_buf(int32_t stage, const int32_t *input,
const int32_t *buf, int32_t size, int8_t bit);
#define MAX_TXWH_IDX …
#ifdef __cplusplus
}
#endif
#endif