#include "config.h"
#include <limits.h>
#include <stdlib.h>
#include "dav1d/common.h"
#include "common/intops.h"
#include "src/env.h"
#include "src/mem.h"
#include "src/refmvs.h"
static void add_spatial_candidate(refmvs_candidate *const mvstack, int *const cnt,
const int weight, const refmvs_block *const b,
const union refmvs_refpair ref, const mv gmv[2],
int *const have_newmv_match,
int *const have_refmv_match)
{ … }
static int scan_row(refmvs_candidate *const mvstack, int *const cnt,
const union refmvs_refpair ref, const mv gmv[2],
const refmvs_block *b, const int bw4, const int w4,
const int max_rows, const int step,
int *const have_newmv_match, int *const have_refmv_match)
{ … }
static int scan_col(refmvs_candidate *const mvstack, int *const cnt,
const union refmvs_refpair ref, const mv gmv[2],
refmvs_block *const *b, const int bh4, const int h4,
const int bx4, const int max_cols, const int step,
int *const have_newmv_match, int *const have_refmv_match)
{ … }
static inline union mv mv_projection(const union mv mv, const int num, const int den) { … }
static void add_temporal_candidate(const refmvs_frame *const rf,
refmvs_candidate *const mvstack, int *const cnt,
const refmvs_temporal_block *const rb,
const union refmvs_refpair ref, int *const globalmv_ctx,
const union mv gmv[])
{ … }
static void add_compound_extended_candidate(refmvs_candidate *const same,
int *const same_count,
const refmvs_block *const cand_b,
const int sign0, const int sign1,
const union refmvs_refpair ref,
const uint8_t *const sign_bias)
{ … }
static void add_single_extended_candidate(refmvs_candidate mvstack[8], int *const cnt,
const refmvs_block *const cand_b,
const int sign, const uint8_t *const sign_bias)
{ … }
void dav1d_refmvs_find(const refmvs_tile *const rt,
refmvs_candidate mvstack[8], int *const cnt,
int *const ctx,
const union refmvs_refpair ref, const enum BlockSize bs,
const enum EdgeFlags edge_flags,
const int by4, const int bx4)
{ … }
void dav1d_refmvs_tile_sbrow_init(refmvs_tile *const rt, const refmvs_frame *const rf,
const int tile_col_start4, const int tile_col_end4,
const int tile_row_start4, const int tile_row_end4,
const int sby, int tile_row_idx, const int pass)
{ … }
static void load_tmvs_c(const refmvs_frame *const rf, int tile_row_idx,
const int col_start8, const int col_end8,
const int row_start8, int row_end8)
{ … }
static void save_tmvs_c(refmvs_temporal_block *rp, const ptrdiff_t stride,
refmvs_block *const *const rr,
const uint8_t *const ref_sign,
const int col_end8, const int row_end8,
const int col_start8, const int row_start8)
{ … }
int dav1d_refmvs_init_frame(refmvs_frame *const rf,
const Dav1dSequenceHeader *const seq_hdr,
const Dav1dFrameHeader *const frm_hdr,
const unsigned ref_poc[7],
refmvs_temporal_block *const rp,
const unsigned ref_ref_poc[7][7],
refmvs_temporal_block *const rp_ref[7],
const int n_tile_threads, const int n_frame_threads)
{ … }
static void splat_mv_c(refmvs_block **rr, const refmvs_block *const rmv,
const int bx4, const int bw4, int bh4)
{ … }
#if HAVE_ASM
#if ARCH_AARCH64 || ARCH_ARM
#include "src/arm/refmvs.h"
#elif ARCH_LOONGARCH64
#include "src/loongarch/refmvs.h"
#elif ARCH_X86
#include "src/x86/refmvs.h"
#endif
#endif
COLD void dav1d_refmvs_dsp_init(Dav1dRefmvsDSPContext *const c)
{ … }