#include "hantro.h"
#include "rockchip_av1_entropymode.h"
#define AOM_ICDF …
#define AOM_CDF2(a0) …
#define AOM_CDF3(a0, a1) …
#define AOM_CDF4(a0, a1, a2) …
#define AOM_CDF5(a0, a1, a2, a3) …
#define AOM_CDF6(a0, a1, a2, a3, a4) …
#define AOM_CDF7(a0, a1, a2, a3, a4, a5) …
#define AOM_CDF8(a0, a1, a2, a3, a4, a5, a6) …
#define AOM_CDF9(a0, a1, a2, a3, a4, a5, a6, a7) …
#define AOM_CDF10(a0, a1, a2, a3, a4, a5, a6, a7, a8) …
#define AOM_CDF11(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) …
#define AOM_CDF12(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) …
#define AOM_CDF13(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) …
#define AOM_CDF14(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) …
#define AOM_CDF15(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) …
#define AOM_CDF16(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14) …
static const u16 default_kf_y_mode_cdf
[KF_MODE_CONTEXTS][KF_MODE_CONTEXTS][CDF_SIZE(AV1_INTRA_MODES)] = …;
static const u16 default_angle_delta_cdf[DIRECTIONAL_MODES]
[CDF_SIZE(2 * MAX_ANGLE_DELTA + 1)] = …;
static const u16 default_if_y_mode_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(AV1_INTRA_MODES)] = …;
static const u16 default_uv_mode_cdf[CFL_ALLOWED_TYPES]
[AV1_INTRA_MODES][CDF_SIZE(UV_INTRA_MODES)] = …;
static const u16 default_partition_cdf[13][16] = …;
static const u16 default_intra_ext_tx0_cdf[EXTTX_SIZES][AV1_INTRA_MODES][8] = …;
static const u16 default_intra_ext_tx1_cdf[EXTTX_SIZES][AV1_INTRA_MODES][4] = …;
static const u16 default_inter_ext_tx_cdf[2][EXTTX_SIZES][EXT_TX_TYPES] = …;
static const u16 default_cfl_sign_cdf[CDF_SIZE(CFL_JOINT_SIGNS)] = …;
static const u16 default_cfl_alpha_cdf[CFL_ALPHA_CONTEXTS][CDF_SIZE(CFL_ALPHABET_SIZE)] = …;
static const u16 default_switchable_interp_cdf[SWITCHABLE_FILTER_CONTEXTS]
[CDF_SIZE(AV1_SWITCHABLE_FILTERS)] = …;
static const u16 default_newmv_cdf[NEWMV_MODE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_zeromv_cdf[GLOBALMV_MODE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_refmv_cdf[REFMV_MODE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_drl_cdf[DRL_MODE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_inter_compound_mode_cdf[AV1_INTER_MODE_CONTEXTS]
[CDF_SIZE(INTER_COMPOUND_MODES)] = …;
static const u16 default_interintra_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(2)] = …;
static const u16 default_interintra_mode_cdf[BLOCK_SIZE_GROUPS][CDF_SIZE(INTERINTRA_MODES)] = …;
static const u16 default_wedge_interintra_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = …;
static const u16 default_compound_type_cdf[BLOCK_SIZES_ALL][CDF_SIZE(COMPOUND_TYPES - 1)] = …;
static const u16 default_wedge_idx_cdf[BLOCK_SIZES_ALL][CDF_SIZE(16)] = …;
static const u16 default_motion_mode_cdf[BLOCK_SIZES_ALL][CDF_SIZE(MOTION_MODES)] = …;
static const u16 default_obmc_cdf[BLOCK_SIZES_ALL][CDF_SIZE(2)] = …;
static const u16 default_intra_inter_cdf[INTRA_INTER_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_comp_inter_cdf[COMP_INTER_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_comp_ref_type_cdf[COMP_REF_TYPE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_uni_comp_ref_cdf[UNI_COMP_REF_CONTEXTS]
[UNIDIR_COMP_REFS - 1][CDF_SIZE(2)] = …;
static const u16 default_single_ref_cdf[REF_CONTEXTS][SINGLE_REFS - 1][CDF_SIZE(2)] = …;
static const u16 default_comp_ref_cdf[REF_CONTEXTS][FWD_REFS - 1][CDF_SIZE(2)] = …;
static const u16 default_comp_bwdref_cdf[REF_CONTEXTS][BWD_REFS - 1][CDF_SIZE(2)] = …;
static const u16 default_palette_y_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)] = …;
static const u16 default_palette_uv_size_cdf[PALETTE_BLOCK_SIZES][CDF_SIZE(PALETTE_SIZES)] = …;
static const u16 default_palette_y_mode_cdf[PALETTE_BLOCK_SIZES]
[PALETTE_Y_MODE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_palette_uv_mode_cdf[PALETTE_UV_MODE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_palette_y_color_index_cdf[PALETTE_IDX_CONTEXTS][8] = …;
static const u16 default_palette_uv_color_index_cdf[PALETTE_IDX_CONTEXTS][8] = …;
static const u16 default_txfm_partition_cdf[TXFM_PARTITION_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_skip_cdfs[SKIP_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_skip_mode_cdfs[SKIP_MODE_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_compound_idx_cdfs[COMP_INDEX_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_comp_group_idx_cdfs[COMP_GROUP_IDX_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 default_intrabc_cdf[CDF_SIZE(2)] = …;
static const u16 default_filter_intra_mode_cdf[CDF_SIZE(FILTER_INTRA_MODES)] = …;
static const u16 default_filter_intra_cdfs[BLOCK_SIZES_ALL][CDF_SIZE(2)] = …;
static const u16 default_delta_q_cdf[CDF_SIZE(DELTA_Q_PROBS + 1)] = …;
static const u16 default_delta_lf_multi_cdf[FRAME_LF_COUNT][CDF_SIZE(DELTA_LF_PROBS + 1)] = …;
static const u16 default_delta_lf_cdf[CDF_SIZE(DELTA_LF_PROBS + 1)] = …;
static const u16 default_segment_pred_cdf[SEG_TEMPORAL_PRED_CTXS][CDF_SIZE(2)] = …;
static const u16 default_spatial_pred_seg_tree_cdf[SPATIAL_PREDICTION_PROBS]
[CDF_SIZE(MAX_SEGMENTS)] = …;
static const u16 default_tx_size_cdf[MAX_TX_CATS]
[AV1_TX_SIZE_CONTEXTS][CDF_SIZE(MAX_TX_DEPTH + 1)] = …;
static const u16 av1_default_dc_sign_cdfs[TOKEN_CDF_Q_CTXS]
[PLANE_TYPES][DC_SIGN_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 av1_default_txb_skip_cdfs[TOKEN_CDF_Q_CTXS]
[TX_SIZES][TXB_SKIP_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 av1_default_eob_extra_cdfs[TOKEN_CDF_Q_CTXS][TX_SIZES][PLANE_TYPES]
[EOB_COEF_CONTEXTS][CDF_SIZE(2)] = …;
static const u16 av1_default_eob_multi16_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][2][4] = …;
static const u16 av1_default_eob_multi32_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][2][8] = …;
static const u16 av1_default_eob_multi64_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][2][8] = …;
static const u16 av1_default_eob_multi128_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][2][8] = …;
static const u16 av1_default_eob_multi256_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][2][8] = …;
static const u16 av1_default_eob_multi512_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][2][16] = …;
static const u16 av1_default_eob_multi1024_cdfs[TOKEN_CDF_Q_CTXS][PLANE_TYPES][2][16] = …;
static const u16 av1_default_coeff_lps_multi_cdfs[TOKEN_CDF_Q_CTXS]
[TX_SIZES][PLANE_TYPES][LEVEL_CONTEXTS][CDF_SIZE(BR_CDF_SIZE) + 1] = …;
static const u16 av1_default_coeff_base_multi_cdfs
[TOKEN_CDF_Q_CTXS][TX_SIZES][PLANE_TYPES]
[SIG_COEF_CONTEXTS][CDF_SIZE(NUM_BASE_LEVELS + 2) + 1] = …;
static const u16 av1_default_coeff_base_eob_multi_cdfs[TOKEN_CDF_Q_CTXS][TX_SIZES]
[PLANE_TYPES][SIG_COEF_CONTEXTS_EOB][CDF_SIZE(NUM_BASE_LEVELS + 1)] = …;
static const u16 default_joint_cdf[] = …;
static const u16 default_clsss_cdf[][10] = …;
static const u16 default_clsss0_fp_cdf[][2][3] = …;
static const u16 default_fp_cdf[][3] = …;
static const u16 default_sign_cdf[] = …;
static const u16 default_class0_hp_cdf[] = …;
static const u16 default_hp_cdf[] = …;
static const u16 default_class0_cdf[] = …;
static const u16 default_bits_cdf[][10] = …;
static int rockchip_av1_get_q_ctx(int q)
{ … }
void rockchip_av1_default_coeff_probs(u32 base_qindex, void *ptr)
{ … }
void rockchip_av1_set_default_cdfs(struct av1cdfs *cdfs,
struct mvcdfs *cdfs_ndvc)
{ … }
void rockchip_av1_get_cdfs(struct hantro_ctx *ctx, u32 ref_idx)
{ … }
void rockchip_av1_store_cdfs(struct hantro_ctx *ctx,
u32 refresh_frame_flags)
{ … }