#include "config/aom_config.h"
#include "config/av1_rtcd.h"
#include "config/aom_dsp_rtcd.h"
#include "aom_dsp/bitwriter.h"
#include "aom_dsp/quantize.h"
#include "aom_mem/aom_mem.h"
#include "aom_ports/mem.h"
#if CONFIG_BITSTREAM_DEBUG || CONFIG_MISMATCH_DEBUG
#include "aom_util/debug_util.h"
#endif
#include "av1/common/cfl.h"
#include "av1/common/idct.h"
#include "av1/common/reconinter.h"
#include "av1/common/reconintra.h"
#include "av1/common/scan.h"
#include "av1/encoder/av1_quantize.h"
#include "av1/encoder/encodemb.h"
#include "av1/encoder/hybrid_fwd_txfm.h"
#include "av1/encoder/txb_rdopt.h"
#include "av1/encoder/rd.h"
#include "av1/encoder/rdopt.h"
void av1_subtract_block(BitDepthInfo bd_info, int rows, int cols, int16_t *diff,
ptrdiff_t diff_stride, const uint8_t *src8,
ptrdiff_t src_stride, const uint8_t *pred8,
ptrdiff_t pred_stride) { … }
void av1_subtract_txb(MACROBLOCK *x, int plane, BLOCK_SIZE plane_bsize,
int blk_col, int blk_row, TX_SIZE tx_size) { … }
void av1_subtract_plane(MACROBLOCK *x, BLOCK_SIZE plane_bsize, int plane) { … }
int av1_optimize_b(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) { … }
static const tran_low_t DROPOUT_COEFF_MAX = …;
static const int DROPOUT_CONTINUITY_MAX = …;
static const int DROPOUT_Q_MAX = …;
static const int DROPOUT_Q_MIN = …;
static const int DROPOUT_BEFORE_BASE_MAX = …;
static const int DROPOUT_BEFORE_BASE_MIN = …;
static const int DROPOUT_AFTER_BASE_MAX = …;
static const int DROPOUT_AFTER_BASE_MIN = …;
static const int DROPOUT_MULTIPLIER_MAX = …;
static const int DROPOUT_MULTIPLIER_MIN = …;
static const int DROPOUT_MULTIPLIER_Q_BASE = …;
void av1_dropout_qcoeff(MACROBLOCK *mb, int plane, int block, TX_SIZE tx_size,
TX_TYPE tx_type, int qindex) { … }
void av1_dropout_qcoeff_num(MACROBLOCK *mb, int plane, int block,
TX_SIZE tx_size, TX_TYPE tx_type,
int dropout_num_before, int dropout_num_after) { … }
static const OPT_TYPE KEY_BLOCK_OPT_TYPE = …;
static const OPT_TYPE INTRA_BLOCK_OPT_TYPE = …;
static const OPT_TYPE INTER_BLOCK_OPT_TYPE = …;
enum { … } UENUM1BYTE(…) …;
#if CONFIG_AV1_HIGHBITDEPTH
static AV1_QUANT_FACADE
quant_func_list[AV1_XFORM_QUANT_TYPES][QUANT_FUNC_TYPES] = {
{ av1_quantize_fp_facade, av1_highbd_quantize_fp_facade },
{ av1_quantize_b_facade, av1_highbd_quantize_b_facade },
{ av1_quantize_dc_facade, av1_highbd_quantize_dc_facade },
{ NULL, NULL }
};
#else
static AV1_QUANT_FACADE quant_func_list[AV1_XFORM_QUANT_TYPES] = …;
#endif
void av1_xform_dc_only(MACROBLOCK *x, int plane, int block,
TxfmParam *txfm_param, int64_t per_px_mean) { … }
void av1_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row,
int blk_col, BLOCK_SIZE plane_bsize, TxfmParam *txfm_param,
const QUANT_PARAM *qparam) { … }
void av1_xform(MACROBLOCK *x, int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TxfmParam *txfm_param) { … }
void av1_quant(MACROBLOCK *x, int plane, int block, TxfmParam *txfm_param,
const QUANT_PARAM *qparam) { … }
void av1_setup_xform(const AV1_COMMON *cm, MACROBLOCK *x, TX_SIZE tx_size,
TX_TYPE tx_type, TxfmParam *txfm_param) { … }
void av1_setup_quant(TX_SIZE tx_size, int use_optimize_b, int xform_quant_idx,
int use_quant_b_adapt, QUANT_PARAM *qparam) { … }
void av1_setup_qmatrix(const CommonQuantParams *quant_params,
const MACROBLOCKD *xd, int plane, TX_SIZE tx_size,
TX_TYPE tx_type, QUANT_PARAM *qparam) { … }
static void encode_block(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg,
RUN_TYPE dry_run) { … }
static void encode_block_inter(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
void *arg, RUN_TYPE dry_run) { … }
void av1_foreach_transformed_block_in_plane(
const MACROBLOCKD *const xd, BLOCK_SIZE plane_bsize, int plane,
foreach_transformed_block_visitor visit, void *arg) { … }
encode_block_pass1_args;
static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
void *arg) { … }
void av1_encode_sby_pass1(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize) { … }
void av1_encode_sb(const struct AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
RUN_TYPE dry_run) { … }
static void encode_block_intra(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
void *arg) { … }
static void encode_block_intra_and_set_context(int plane, int block,
int blk_row, int blk_col,
BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) { … }
void av1_encode_intra_block_plane(const struct AV1_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bsize, int plane, RUN_TYPE dry_run,
TRELLIS_OPT_TYPE enable_optimize_b) { … }