#include "av1/common/pred_common.h"
#include "av1/encoder/interp_search.h"
#include "av1/encoder/model_rd.h"
#include "av1/encoder/rdopt_utils.h"
#include "av1/encoder/reconinter_enc.h"
static inline int is_interp_filter_good_match(
const INTERPOLATION_FILTER_STATS *st, MB_MODE_INFO *const mi,
int skip_level) { … }
static inline int save_interp_filter_search_stat(
MB_MODE_INFO *const mbmi, int64_t rd, unsigned int pred_sse,
INTERPOLATION_FILTER_STATS *interp_filter_stats,
int interp_filter_stats_idx) { … }
static inline int find_interp_filter_in_stats(
MB_MODE_INFO *const mbmi, INTERPOLATION_FILTER_STATS *interp_filter_stats,
int interp_filter_stats_idx, int skip_level) { … }
static int find_interp_filter_match(
MB_MODE_INFO *const mbmi, const AV1_COMP *const cpi,
const InterpFilter assign_filter, const int need_search,
INTERPOLATION_FILTER_STATS *interp_filter_stats,
int interp_filter_stats_idx) { … }
static inline int get_switchable_rate(MACROBLOCK *const x,
const int_interpfilters filters,
const int ctx[2], int dual_filter) { … }
static inline void interp_model_rd_eval(
MACROBLOCK *const x, const AV1_COMP *const cpi, BLOCK_SIZE bsize,
const BUFFER_SET *const orig_dst, int plane_from, int plane_to,
RD_STATS *rd_stats, int is_skip_build_pred) { … }
static inline int64_t interpolation_filter_rd(
MACROBLOCK *const x, const AV1_COMP *const cpi,
const TileDataEnc *tile_data, BLOCK_SIZE bsize,
const BUFFER_SET *const orig_dst, int64_t *const rd,
RD_STATS *rd_stats_luma, RD_STATS *rd_stats, int *const switchable_rate,
const BUFFER_SET *dst_bufs[2], int filter_idx, const int switchable_ctx[2],
const int skip_pred) { … }
static inline INTERP_PRED_TYPE is_pred_filter_search_allowed(
const AV1_COMP *const cpi, MACROBLOCKD *xd, BLOCK_SIZE bsize,
int_interpfilters *af, int_interpfilters *lf) { … }
static DUAL_FILTER_TYPE find_best_interp_rd_facade(
MACROBLOCK *const x, const AV1_COMP *const cpi,
const TileDataEnc *tile_data, BLOCK_SIZE bsize,
const BUFFER_SET *const orig_dst, int64_t *const rd, RD_STATS *rd_stats_y,
RD_STATS *rd_stats, int *const switchable_rate,
const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
const int skip_pred, uint16_t allow_interp_mask, int is_w4_or_h4) { … }
static inline void pred_dual_interp_filter_rd(
MACROBLOCK *const x, const AV1_COMP *const cpi,
const TileDataEnc *tile_data, BLOCK_SIZE bsize,
const BUFFER_SET *const orig_dst, int64_t *const rd, RD_STATS *rd_stats_y,
RD_STATS *rd_stats, int *const switchable_rate,
const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
const int skip_pred, INTERP_PRED_TYPE pred_filt_type, int_interpfilters *af,
int_interpfilters *lf) { … }
static inline void fast_dual_interp_filter_rd(
MACROBLOCK *const x, const AV1_COMP *const cpi,
const TileDataEnc *tile_data, BLOCK_SIZE bsize,
const BUFFER_SET *const orig_dst, int64_t *const rd, RD_STATS *rd_stats_y,
RD_STATS *rd_stats, int *const switchable_rate,
const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
const int skip_hor, const int skip_ver) { … }
static inline void find_best_non_dual_interp_filter(
MACROBLOCK *const x, const AV1_COMP *const cpi,
const TileDataEnc *tile_data, BLOCK_SIZE bsize,
const BUFFER_SET *const orig_dst, int64_t *const rd, RD_STATS *rd_stats_y,
RD_STATS *rd_stats, int *const switchable_rate,
const BUFFER_SET *dst_bufs[2], const int switchable_ctx[2],
const int skip_ver, const int skip_hor) { … }
static inline void calc_interp_skip_pred_flag(MACROBLOCK *const x,
const AV1_COMP *const cpi,
int *skip_hor, int *skip_ver) { … }
int64_t av1_interpolation_filter_search(
MACROBLOCK *const x, const AV1_COMP *const cpi,
const TileDataEnc *tile_data, BLOCK_SIZE bsize,
const BUFFER_SET *const tmp_dst, const BUFFER_SET *const orig_dst,
int64_t *const rd, int *const switchable_rate, int *skip_build_pred,
HandleInterModeArgs *args, int64_t ref_best_rd) { … }