#ifndef AOM_AV1_ENCODER_MODEL_RD_H_
#define AOM_AV1_ENCODER_MODEL_RD_H_
#include "aom/aom_integer.h"
#include "av1/encoder/block.h"
#include "av1/encoder/encoder.h"
#include "av1/encoder/pustats.h"
#include "av1/encoder/rdopt_utils.h"
#include "config/aom_dsp_rtcd.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MODELRD_TYPE_INTERP_FILTER …
#define MODELRD_TYPE_TX_SEARCH_PRUNE …
#define MODELRD_TYPE_MASKED_COMPOUND …
#define MODELRD_TYPE_INTERINTRA …
#define MODELRD_TYPE_INTRA …
#define MODELRD_TYPE_MOTION_MODE_RD …
model_rd_for_sb_type;
model_rd_from_sse_type;
static int64_t calculate_sse(MACROBLOCKD *const xd,
const struct macroblock_plane *p,
struct macroblockd_plane *pd, const int bw,
const int bh) { … }
static inline int64_t compute_sse_plane(MACROBLOCK *x, MACROBLOCKD *xd,
int plane, const BLOCK_SIZE bsize) { … }
static inline void model_rd_from_sse(const AV1_COMP *const cpi,
const MACROBLOCK *const x,
BLOCK_SIZE plane_bsize, int plane,
int64_t sse, int num_samples, int *rate,
int64_t *dist) { … }
static inline void model_rd_with_curvfit(const AV1_COMP *const cpi,
const MACROBLOCK *const x,
BLOCK_SIZE plane_bsize, int plane,
int64_t sse, int num_samples,
int *rate, int64_t *dist) { … }
static inline void model_rd_for_sb(const AV1_COMP *const cpi, BLOCK_SIZE bsize,
MACROBLOCK *x, MACROBLOCKD *xd,
int plane_from, int plane_to,
int *out_rate_sum, int64_t *out_dist_sum,
uint8_t *skip_txfm_sb, int64_t *skip_sse_sb,
int *plane_rate, int64_t *plane_sse,
int64_t *plane_dist) { … }
static inline void model_rd_for_sb_with_curvfit(
const AV1_COMP *const cpi, BLOCK_SIZE bsize, MACROBLOCK *x, MACROBLOCKD *xd,
int plane_from, int plane_to, int *out_rate_sum, int64_t *out_dist_sum,
uint8_t *skip_txfm_sb, int64_t *skip_sse_sb, int *plane_rate,
int64_t *plane_sse, int64_t *plane_dist) { … }
enum { … } UENUM1BYTE(…) …;
static const model_rd_for_sb_type model_rd_sb_fn[MODELRD_TYPES] = …;
static const model_rd_from_sse_type model_rd_sse_fn[MODELRD_TYPES] = …;
#ifdef __cplusplus
}
#endif
#endif