#ifndef AOM_AV1_ENCODER_NONRD_OPT_H_
#define AOM_AV1_ENCODER_NONRD_OPT_H_
#include "av1/encoder/rdopt_utils.h"
#include "av1/encoder/rdopt.h"
#define RTC_INTER_MODES …
#define RTC_INTRA_MODES …
#define RTC_MODES …
#define CALC_BIASED_RDCOST(rdcost) …
#define NUM_COMP_INTER_MODES_RT …
#define NUM_INTER_MODES …
#define CAP_TX_SIZE_FOR_BSIZE_GT32(tx_mode_search_type, bsize) …
#define TX_SIZE_FOR_BSIZE_GT32 …
#define FILTER_SEARCH_SIZE …
#if !CONFIG_REALTIME_ONLY
#define MOTION_MODE_SEARCH_SIZE …
#endif
extern int g_pick_inter_mode_cnt;
PRED_BUFFER;
BEST_PICKMODE;
REF_MODE;
COMP_REF_MODE;
struct estimate_block_intra_args { … };
InterModeSearchStateNonrd;
static const uint8_t b_width_log2_lookup[BLOCK_SIZES] = …;
static const uint8_t b_height_log2_lookup[BLOCK_SIZES] = …;
static const PREDICTION_MODE intra_mode_list[] = …;
static const PREDICTION_MODE inter_mode_list[] = …;
static const THR_MODES mode_idx[REF_FRAMES][RTC_MODES] = …;
static const REF_MODE ref_mode_set[NUM_INTER_MODES] = …;
static const COMP_REF_MODE comp_ref_mode_set[NUM_COMP_INTER_MODES_RT] = …;
static const int_interpfilters filters_ref_set[9] = …;
enum { … };
DECLARE_ALIGNED(16, static const int16_t, default_scan_8x8_transpose[64]) = …;
DECLARE_ALIGNED(16, static const int16_t,
av1_default_iscan_8x8_transpose[64]) = …;
DECLARE_ALIGNED(16, static const int16_t,
default_scan_lp_16x16_transpose[256]) = …;
#if CONFIG_AV1_HIGHBITDEPTH
DECLARE_ALIGNED(16, static const int16_t,
default_scan_fp_16x16_transpose[256]) = {
0, 4, 2, 8, 6, 16, 20, 18, 12, 10, 64, 14, 24, 22, 32,
36, 34, 28, 26, 68, 66, 72, 70, 80, 30, 40, 38, 48, 52, 50,
44, 42, 84, 82, 76, 74, 128, 78, 88, 86, 96, 46, 56, 54, 1,
5, 3, 60, 58, 100, 98, 92, 90, 132, 130, 136, 134, 144, 94, 104,
102, 112, 62, 9, 7, 17, 21, 19, 13, 11, 116, 114, 108, 106, 148,
146, 140, 138, 192, 142, 152, 150, 160, 110, 120, 118, 65, 15, 25, 23,
33, 37, 35, 29, 27, 69, 67, 124, 122, 164, 162, 156, 154, 196, 194,
200, 198, 208, 158, 168, 166, 176, 126, 73, 71, 81, 31, 41, 39, 49,
53, 51, 45, 43, 85, 83, 77, 75, 180, 178, 172, 170, 212, 210, 204,
202, 206, 216, 214, 224, 174, 184, 182, 129, 79, 89, 87, 97, 47, 57,
55, 61, 59, 101, 99, 93, 91, 133, 131, 188, 186, 228, 226, 220, 218,
222, 232, 230, 240, 190, 137, 135, 145, 95, 105, 103, 113, 63, 117, 115,
109, 107, 149, 147, 141, 139, 244, 242, 236, 234, 238, 248, 246, 193, 143,
153, 151, 161, 111, 121, 119, 125, 123, 165, 163, 157, 155, 197, 195, 252,
250, 254, 201, 199, 209, 159, 169, 167, 177, 127, 181, 179, 173, 171, 213,
211, 205, 203, 207, 217, 215, 225, 175, 185, 183, 189, 187, 229, 227, 221,
219, 223, 233, 231, 241, 191, 245, 243, 237, 235, 239, 249, 247, 253, 251,
255
};
#endif
DECLARE_ALIGNED(16, static const int16_t,
av1_default_iscan_lp_16x16_transpose[256]) = …;
#if CONFIG_AV1_HIGHBITDEPTH
DECLARE_ALIGNED(16, static const int16_t,
av1_default_iscan_fp_16x16_transpose[256]) = {
0, 44, 2, 46, 1, 45, 4, 64, 3, 63, 9, 69, 8, 68, 11,
87, 5, 65, 7, 67, 6, 66, 13, 89, 12, 88, 18, 94, 17, 93,
24, 116, 14, 90, 16, 92, 15, 91, 26, 118, 25, 117, 31, 123, 30,
122, 41, 148, 27, 119, 29, 121, 28, 120, 43, 150, 42, 149, 48, 152,
47, 151, 62, 177, 10, 86, 20, 96, 19, 95, 22, 114, 21, 113, 35,
127, 34, 126, 37, 144, 23, 115, 33, 125, 32, 124, 39, 146, 38, 145,
52, 156, 51, 155, 58, 173, 40, 147, 50, 154, 49, 153, 60, 175, 59,
174, 73, 181, 72, 180, 83, 198, 61, 176, 71, 179, 70, 178, 85, 200,
84, 199, 98, 202, 97, 201, 112, 219, 36, 143, 54, 158, 53, 157, 56,
171, 55, 170, 77, 185, 76, 184, 79, 194, 57, 172, 75, 183, 74, 182,
81, 196, 80, 195, 102, 206, 101, 205, 108, 215, 82, 197, 100, 204, 99,
203, 110, 217, 109, 216, 131, 223, 130, 222, 140, 232, 111, 218, 129, 221,
128, 220, 142, 234, 141, 233, 160, 236, 159, 235, 169, 245, 78, 193, 104,
208, 103, 207, 106, 213, 105, 212, 135, 227, 134, 226, 136, 228, 107, 214,
133, 225, 132, 224, 138, 230, 137, 229, 164, 240, 163, 239, 165, 241, 139,
231, 162, 238, 161, 237, 167, 243, 166, 242, 189, 249, 188, 248, 190, 250,
168, 244, 187, 247, 186, 246, 192, 252, 191, 251, 210, 254, 209, 253, 211,
255
};
#endif
DECLARE_ALIGNED(16, static const int16_t,
av1_fast_idtx_scan_4x4[16]) = …;
DECLARE_ALIGNED(16, static const int16_t,
av1_fast_idtx_iscan_4x4[16]) = …;
static const SCAN_ORDER av1_fast_idtx_scan_order_4x4 = …;
DECLARE_ALIGNED(16, static const int16_t, av1_fast_idtx_scan_8x8[64]) = …;
DECLARE_ALIGNED(16, static const int16_t, av1_fast_idtx_iscan_8x8[64]) = …;
static const SCAN_ORDER av1_fast_idtx_scan_order_8x8 = …;
DECLARE_ALIGNED(16, static const int16_t, av1_fast_idtx_scan_16x16[256]) = …;
DECLARE_ALIGNED(16, static const int16_t, av1_fast_idtx_iscan_16x16[256]) = …;
static inline int get_model_rd_flag(const AV1_COMP *cpi, const MACROBLOCKD *xd,
BLOCK_SIZE bsize) { … }
static inline void find_predictors(
AV1_COMP *cpi, MACROBLOCK *x, MV_REFERENCE_FRAME ref_frame,
int_mv frame_mv[MB_MODE_COUNT][REF_FRAMES],
struct buf_2d yv12_mb[8][MAX_MB_PLANE], BLOCK_SIZE bsize,
int force_skip_low_temp_var, int skip_pred_mv, bool *use_scaled_ref_frame) { … }
static inline void init_mbmi_nonrd(MB_MODE_INFO *mbmi,
PREDICTION_MODE pred_mode,
MV_REFERENCE_FRAME ref_frame0,
MV_REFERENCE_FRAME ref_frame1,
const AV1_COMMON *cm) { … }
static inline void init_estimate_block_intra_args(
struct estimate_block_intra_args *args, AV1_COMP *cpi, MACROBLOCK *x) { … }
static inline int get_pred_buffer(PRED_BUFFER *p, int len) { … }
static inline void free_pred_buffer(PRED_BUFFER *p) { … }
#if CONFIG_INTERNAL_STATS
static inline void store_coding_context_nonrd(MACROBLOCK *x,
PICK_MODE_CONTEXT *ctx,
int mode_index) {
#else
static inline void store_coding_context_nonrd(MACROBLOCK *x,
PICK_MODE_CONTEXT *ctx) { … }
void av1_block_yrd(MACROBLOCK *x, RD_STATS *this_rdc, int *skippable,
BLOCK_SIZE bsize, TX_SIZE tx_size);
void av1_block_yrd_idtx(MACROBLOCK *x, const uint8_t *const pred_buf,
int pred_stride, RD_STATS *this_rdc, int *skippable,
BLOCK_SIZE bsize, TX_SIZE tx_size);
int64_t av1_model_rd_for_sb_uv(AV1_COMP *cpi, BLOCK_SIZE plane_bsize,
MACROBLOCK *x, MACROBLOCKD *xd,
RD_STATS *this_rdc, int start_plane,
int stop_plane);
void av1_estimate_block_intra(int plane, int block, int row, int col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
void *arg);
void av1_estimate_intra_mode(AV1_COMP *cpi, MACROBLOCK *x, BLOCK_SIZE bsize,
int best_early_term, unsigned int ref_cost_intra,
int reuse_prediction, struct buf_2d *orig_dst,
PRED_BUFFER *tmp_buffers,
PRED_BUFFER **this_mode_pred, RD_STATS *best_rdc,
BEST_PICKMODE *best_pickmode,
PICK_MODE_CONTEXT *ctx);
#endif