#include "config.h"
#include <stdlib.h>
#include <string.h>
#include "common/attributes.h"
#include "common/intops.h"
#include "src/ipred.h"
#include "src/tables.h"
static NOINLINE void
splat_dc(pixel *dst, const ptrdiff_t stride,
const int width, const int height, const int dc HIGHBD_DECL_SUFFIX)
{ … }
static NOINLINE void
cfl_pred(pixel *dst, const ptrdiff_t stride,
const int width, const int height, const int dc,
const int16_t *ac, const int alpha HIGHBD_DECL_SUFFIX)
{ … }
static unsigned dc_gen_top(const pixel *const topleft, const int width) { … }
static void ipred_dc_top_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_cfl_top_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
const int16_t *ac, const int alpha
HIGHBD_DECL_SUFFIX)
{ … }
static unsigned dc_gen_left(const pixel *const topleft, const int height) { … }
static void ipred_dc_left_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_cfl_left_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
const int16_t *ac, const int alpha
HIGHBD_DECL_SUFFIX)
{ … }
#if BITDEPTH == 8
#define MULTIPLIER_1x2 …
#define MULTIPLIER_1x4 …
#define BASE_SHIFT …
#else
#define MULTIPLIER_1x2 …
#define MULTIPLIER_1x4 …
#define BASE_SHIFT …
#endif
static unsigned dc_gen(const pixel *const topleft,
const int width, const int height)
{ … }
static void ipred_dc_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_cfl_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
const int16_t *ac, const int alpha
HIGHBD_DECL_SUFFIX)
{ … }
#undef MULTIPLIER_1x2
#undef MULTIPLIER_1x4
#undef BASE_SHIFT
static void ipred_dc_128_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_cfl_128_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height,
const int16_t *ac, const int alpha
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_v_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_h_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_paeth_c(pixel *dst, const ptrdiff_t stride,
const pixel *const tl_ptr,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_smooth_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_smooth_v_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_smooth_h_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft,
const int width, const int height, const int a,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static NOINLINE int get_filter_strength(const int wh, const int angle,
const int is_sm)
{ … }
static NOINLINE void filter_edge(pixel *const out, const int sz,
const int lim_from, const int lim_to,
const pixel *const in, const int from,
const int to, const int strength)
{ … }
static inline int get_upsample(const int wh, const int angle, const int is_sm) { … }
static NOINLINE void upsample_edge(pixel *const out, const int hsz,
const pixel *const in, const int from,
const int to HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_z1_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft_in,
const int width, const int height, int angle,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_z2_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft_in,
const int width, const int height, int angle,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static void ipred_z3_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft_in,
const int width, const int height, int angle,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
#if ARCH_X86
#define FILTER(flt_ptr, p0, p1, p2, p3, p4, p5, p6) …
#define FLT_INCR …
#else
#define FILTER …
#define FLT_INCR …
#endif
static void ipred_filter_c(pixel *dst, const ptrdiff_t stride,
const pixel *const topleft_in,
const int width, const int height, int filt_idx,
const int max_width, const int max_height
HIGHBD_DECL_SUFFIX)
{ … }
static NOINLINE void
cfl_ac_c(int16_t *ac, const pixel *ypx, const ptrdiff_t stride,
const int w_pad, const int h_pad, const int width, const int height,
const int ss_hor, const int ss_ver)
{ … }
#define cfl_ac_fn(fmt, ss_hor, ss_ver) …
cfl_ac_fn(420, 1, 1)
cfl_ac_fn(422, 1, 0)
cfl_ac_fn(444, 0, 0)
static void pal_pred_c(pixel *dst, const ptrdiff_t stride,
const pixel *const pal, const uint8_t *idx,
const int w, const int h)
{ … }
#if HAVE_ASM
#if ARCH_AARCH64 || ARCH_ARM
#include "src/arm/ipred.h"
#elif ARCH_X86
#include "src/x86/ipred.h"
#endif
#endif
COLD void bitfn(dav1d_intra_pred_dsp_init)(Dav1dIntraPredDSPContext *const c) { … }