#include "av1/encoder/encodetxb.h"
#include <stdint.h>
#include "aom_ports/mem.h"
#include "av1/common/blockd.h"
#include "av1/common/idct.h"
#include "av1/common/pred_common.h"
#include "av1/common/scan.h"
#include "av1/encoder/bitstream.h"
#include "av1/encoder/cost.h"
#include "av1/encoder/encodeframe.h"
#include "av1/encoder/hash.h"
#include "av1/encoder/rdopt.h"
#include "av1/encoder/tokenize.h"
void av1_alloc_txb_buf(AV1_COMP *cpi) { … }
void av1_free_txb_buf(AV1_COMP *cpi) { … }
static void write_golomb(aom_writer *w, int level) { … }
static const int8_t eob_to_pos_small[33] = …;
static const int8_t eob_to_pos_large[17] = …;
int av1_get_eob_pos_token(const int eob, int *const extra) { … }
#if CONFIG_ENTROPY_STATS
static void update_eob_context(int cdf_idx, int eob, TX_SIZE tx_size,
TX_CLASS tx_class, PLANE_TYPE plane,
FRAME_CONTEXT *ec_ctx, FRAME_COUNTS *counts,
uint8_t allow_update_cdf) {
#else
static void update_eob_context(int eob, TX_SIZE tx_size, TX_CLASS tx_class,
PLANE_TYPE plane, FRAME_CONTEXT *ec_ctx,
uint8_t allow_update_cdf) { … }
static inline int get_nz_map_ctx(const uint8_t *const levels,
const int coeff_idx, const int bhl,
const int width, const int scan_idx,
const int is_eob, const TX_SIZE tx_size,
const TX_CLASS tx_class) { … }
void av1_txb_init_levels_c(const tran_low_t *const coeff, const int width,
const int height, uint8_t *const levels) { … }
void av1_get_nz_map_contexts_c(const uint8_t *const levels,
const int16_t *const scan, const uint16_t eob,
const TX_SIZE tx_size, const TX_CLASS tx_class,
int8_t *const coeff_contexts) { … }
void av1_write_coeffs_txb(const AV1_COMMON *const cm, MACROBLOCK *const x,
aom_writer *w, int blk_row, int blk_col, int plane,
int block, TX_SIZE tx_size) { … }
void av1_write_intra_coeffs_mb(const AV1_COMMON *const cm, MACROBLOCK *x,
aom_writer *w, BLOCK_SIZE bsize) { … }
uint8_t av1_get_txb_entropy_context(const tran_low_t *qcoeff,
const SCAN_ORDER *scan_order, int eob) { … }
static void update_tx_type_count(const AV1_COMP *cpi, const AV1_COMMON *cm,
MACROBLOCKD *xd, int blk_row, int blk_col,
int plane, TX_SIZE tx_size,
FRAME_COUNTS *counts,
uint8_t allow_update_cdf) { … }
void av1_update_and_record_txb_context(int plane, int block, int blk_row,
int blk_col, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) { … }
void av1_record_txb_context(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
void *arg) { … }
void av1_update_intra_mb_txb_context(const AV1_COMP *cpi, ThreadData *td,
RUN_TYPE dry_run, BLOCK_SIZE bsize,
uint8_t allow_update_cdf) { … }
CB_COEFF_BUFFER *av1_get_cb_coeff_buffer(const struct AV1_COMP *cpi, int mi_row,
int mi_col) { … }