#include "av1/encoder/txb_rdopt.h"
#include "av1/encoder/txb_rdopt_utils.h"
#include "av1/common/idct.h"
static inline void update_coeff_general(
int *accu_rate, int64_t *accu_dist, int si, int eob, TX_SIZE tx_size,
TX_CLASS tx_class, int bhl, int width, int64_t rdmult, int shift,
int dc_sign_ctx, const int16_t *dequant, const int16_t *scan,
const LV_MAP_COEFF_COST *txb_costs, const tran_low_t *tcoeff,
tran_low_t *qcoeff, tran_low_t *dqcoeff, uint8_t *levels,
const qm_val_t *iqmatrix, const qm_val_t *qmatrix) { … }
static AOM_FORCE_INLINE void update_coeff_simple(
int *accu_rate, int si, int eob, TX_SIZE tx_size, TX_CLASS tx_class,
int bhl, int64_t rdmult, int shift, const int16_t *dequant,
const int16_t *scan, const LV_MAP_COEFF_COST *txb_costs,
const tran_low_t *tcoeff, tran_low_t *qcoeff, tran_low_t *dqcoeff,
uint8_t *levels, const qm_val_t *iqmatrix, const qm_val_t *qmatrix) { … }
static AOM_FORCE_INLINE void update_coeff_eob(
int *accu_rate, int64_t *accu_dist, int *eob, int *nz_num, int *nz_ci,
int si, TX_SIZE tx_size, TX_CLASS tx_class, int bhl, int width,
int dc_sign_ctx, int64_t rdmult, int shift, const int16_t *dequant,
const int16_t *scan, const LV_MAP_EOB_COST *txb_eob_costs,
const LV_MAP_COEFF_COST *txb_costs, const tran_low_t *tcoeff,
tran_low_t *qcoeff, tran_low_t *dqcoeff, uint8_t *levels, int sharpness,
const qm_val_t *iqmatrix, const qm_val_t *qmatrix) { … }
static inline void update_skip(int *accu_rate, int64_t accu_dist, int *eob,
int nz_num, int *nz_ci, int64_t rdmult,
int skip_cost, int non_skip_cost,
tran_low_t *qcoeff, tran_low_t *dqcoeff) { … }
static int get_tx_type_cost(const MACROBLOCK *x, const MACROBLOCKD *xd,
int plane, TX_SIZE tx_size, TX_TYPE tx_type,
int reduced_tx_set_used) { … }
int av1_optimize_txb(const struct AV1_COMP *cpi, MACROBLOCK *x, int plane,
int block, TX_SIZE tx_size, TX_TYPE tx_type,
const TXB_CTX *const txb_ctx, int *rate_cost,
int sharpness) { … }
static AOM_FORCE_INLINE int warehouse_efficients_txb(
const MACROBLOCK *x, const int plane, const int block,
const TX_SIZE tx_size, const TXB_CTX *const txb_ctx,
const struct macroblock_plane *p, const int eob,
const PLANE_TYPE plane_type, const LV_MAP_COEFF_COST *const coeff_costs,
const MACROBLOCKD *const xd, const TX_TYPE tx_type, const TX_CLASS tx_class,
int reduced_tx_set_used) { … }
int av1_cost_coeffs_txb_estimate(const MACROBLOCK *x, const int plane,
const int block, const TX_SIZE tx_size,
const TX_TYPE tx_type) { … }
static AOM_FORCE_INLINE int warehouse_efficients_txb_laplacian(
const MACROBLOCK *x, const int plane, const int block,
const TX_SIZE tx_size, const TXB_CTX *const txb_ctx, const int eob,
const PLANE_TYPE plane_type, const LV_MAP_COEFF_COST *const coeff_costs,
const MACROBLOCKD *const xd, const TX_TYPE tx_type, const TX_CLASS tx_class,
int reduced_tx_set_used) { … }
int av1_cost_coeffs_txb(const MACROBLOCK *x, const int plane, const int block,
const TX_SIZE tx_size, const TX_TYPE tx_type,
const TXB_CTX *const txb_ctx, int reduced_tx_set_used) { … }
int av1_cost_coeffs_txb_laplacian(const MACROBLOCK *x, const int plane,
const int block, const TX_SIZE tx_size,
const TX_TYPE tx_type,
const TXB_CTX *const txb_ctx,
const int reduced_tx_set_used,
const int adjust_eob) { … }