FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
vp9dsp.c File Reference
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "vp9dsp.h"
#include "rnd_avg.h"

Go to the source code of this file.

Macros

#define DST(x, y)   dst[(x) + (y) * stride]
 
#define def_diag_downleft(size)
 
#define def_diag_downright(size)
 
#define def_vert_right(size)
 
#define def_hor_down(size)
 
#define def_vert_left(size)
 
#define def_hor_up(size)
 
#define init_intra_pred(tx, sz)
 
#define itxfm_wrapper(type_a, type_b, sz, bits)
 
#define itxfm_wrap(sz, bits)
 
#define IN(x)   in[x * stride]
 
#define init_itxfm(tx, sz)
 
#define init_idct(tx, nm)
 
#define lf_8_fn(dir, wd, stridea, strideb)
 
#define lf_8_fns(wd)
 
#define lf_16_fn(dir, stridea)
 
#define lf_mix_fn(dir, wd1, wd2, stridea)
 
#define lf_mix_fns(wd1, wd2)
 
#define fpel_fn(type, sz)
 
#define copy_avg_fn(sz)
 
#define FILTER_8TAP(src, x, F, stride)
 
#define filter_8tap_1d_fn(opn, opa, dir, ds)
 
#define filter_8tap_2d_fn(opn, opa)
 
#define filter_fn_1d(sz, dir, dir_m, type, type_idx, avg)
 
#define filter_fn_2d(sz, type, type_idx, avg)
 
#define FILTER_BILIN(src, x, mxy, stride)   (src[x] + ((mxy * (src[x + stride] - src[x]) + 8) >> 4))
 
#define bilin_1d_fn(opn, opa, dir, ds)
 
#define bilin_2d_fn(opn, opa)
 
#define bilinf_fn_1d(sz, dir, dir_m, avg)
 
#define bilinf_fn_2d(sz, avg)
 
#define filter_fn(sz, avg)
 
#define filter_fn_set(avg)
 
#define init_fpel(idx1, idx2, sz, type)
 
#define init_copy_avg(idx, sz)
 
#define init_subpel1(idx1, idx2, idxh, idxv, sz, dir, type)
 
#define init_subpel2(idx, idxh, idxv, dir, type)
 
#define init_subpel3(idx, type)
 

Functions

static void vert_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void vert_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void vert_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void vert_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void hor_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void hor_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void hor_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void hor_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void tm_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void tm_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void tm_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void tm_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_left_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_left_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_left_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_left_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_top_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_top_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_top_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_top_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_128_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_128_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_128_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_128_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_127_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_127_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_127_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_127_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_129_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_129_8x8_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_129_16x16_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void dc_129_32x32_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
static void diag_downleft_4x4_c (uint8_t *dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *top)
 
 def_diag_downleft (8)
 
 def_diag_downright (8)
 
 def_vert_right (8)
 
 def_hor_down (8)
 
 def_vert_left (8)
 
 def_hor_up (8)
 
static av_always_inline void idct4_1d (const int16_t *in, ptrdiff_t stride, int16_t *out, int pass)
 
static av_always_inline void iadst4_1d (const int16_t *in, ptrdiff_t stride, int16_t *out, int pass)
 
 itxfm_wrap (4, 4)
 
static av_always_inline void iadst8_1d (const int16_t *in, ptrdiff_t stride, int16_t *out, int pass)
 
 itxfm_wrap (8, 5)
 
static av_always_inline void iadst16_1d (const int16_t *in, ptrdiff_t stride, int16_t *out, int pass)
 
 itxfm_wrap (16, 6)
 
 itxfm_wrapper (idct, idct, 32, 6)
 
 itxfm_wrapper (iwht, iwht, 4, 0)
 
static av_always_inline void loop_filter (uint8_t *dst, ptrdiff_t stride, int E, int I, int H, ptrdiff_t stridea, ptrdiff_t strideb, int wd)
 
 lf_8_fns (4)
 
static av_always_inline void copy_c (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h)
 
static av_always_inline void avg_c (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h)
 
 copy_avg_fn (64)
 
static av_always_inline void do_8tap_1d_c (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, ptrdiff_t ds, const int8_t *filter, int avg)
 
 filter_8tap_1d_fn (filter_8tap_1d_fn(put, filter_8tap_1d_fn(0, filter_8tap_1d_fn(v, src_stride)
 
 filter_8tap_2d_fn (put, 0)
 
 bilin_1d_fn (bilin_1d_fn(put, bilin_1d_fn(0, bilin_1d_fn(v, src_stride)
 
 bilin_2d_fn (put, 0)
 
av_cold void ff_vp9dsp_init (VP9DSPContext *dsp)
 

Macro Definition Documentation

#define DST (   x,
  y 
)    dst[(x) + (y) * stride]
#define def_diag_downleft (   size)
Value:
static void diag_downleft_##size##x##size##_c(uint8_t *dst, ptrdiff_t stride, \
const uint8_t *left, const uint8_t *top) \
{ \
int i, j; \
uint8_t v[size - 1]; \
for (i = 0; i < size - 2; i++) \
v[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; \
v[size - 2] = (top[size - 2] + top[size - 1] * 3 + 2) >> 2; \
for (j = 0; j < size; j++) { \
memcpy(dst + j*stride, v + j, size - 1 - j); \
memset(dst + j*stride + size - 1 - j, top[size - 1], j + 1); \
} \
}

Definition at line 591 of file vp9dsp.c.

#define def_diag_downright (   size)
Value:
static void diag_downright_##size##x##size##_c(uint8_t *dst, ptrdiff_t stride, \
const uint8_t *left, const uint8_t *top) \
{ \
int i, j; \
uint8_t v[size + size - 1]; \
for (i = 0; i < size - 2; i++) { \
v[i ] = (left[size - 1 - i] + left[size - 2 - i] * 2 + left[size - 3 - i] + 2) >> 2; \
v[size + 1 + i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; \
} \
v[size - 2] = (left[1] + left[0] * 2 + top[-1] + 2) >> 2; \
v[size - 1] = (left[0] + top[-1] * 2 + top[ 0] + 2) >> 2; \
v[size ] = (top[-1] + top[0] * 2 + top[ 1] + 2) >> 2; \
for (j = 0; j < size; j++) \
memcpy(dst + j*stride, v + size - 1 - j, size); \
}

Definition at line 627 of file vp9dsp.c.

#define def_vert_right (   size)
Value:
static void vert_right_##size##x##size##_c(uint8_t *dst, ptrdiff_t stride, \
const uint8_t *left, const uint8_t *top) \
{ \
int i, j; \
uint8_t ve[size + size/2 - 1], vo[size + size/2 - 1]; \
for (i = 0; i < size/2 - 2; i++) { \
vo[i] = (left[size - 4 - i*2] + left[size - 3 - i*2] * 2 + left[size - 2 - i*2] + 2) >> 2; \
ve[i] = (left[size - 5 - i*2] + left[size - 4 - i*2] * 2 + left[size - 3 - i*2] + 2) >> 2; \
} \
vo[size/2 - 2] = (left[0] + left[1] * 2 + left[2] + 2) >> 2; \
ve[size/2 - 2] = (top[-1] + left[0] * 2 + left[1] + 2) >> 2; \
\
ve[size/2 - 1] = (top[-1] + top[0] + 1) >> 1; \
vo[size/2 - 1] = (left[0] + top[-1] * 2 + top[0] + 2) >> 2; \
for (i = 0; i < size - 1; i++) { \
ve[size/2 + i] = (top[i] + top[i + 1] + 1) >> 1; \
vo[size/2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; \
} \
for (j = 0; j < size / 2; j++) { \
memcpy(dst + j*2 *stride, ve + size/2 - 1 - j, size); \
memcpy(dst + (j*2 + 1)*stride, vo + size/2 - 1 - j, size); \
} \
}

Definition at line 668 of file vp9dsp.c.

#define def_hor_down (   size)
Value:
static void hor_down_##size##x##size##_c(uint8_t *dst, ptrdiff_t stride, \
const uint8_t *left, const uint8_t *top) \
{ \
int i, j; \
uint8_t v[size * 3 - 2]; \
for (i = 0; i < size - 2; i++) { \
v[i*2 ] = (left[size - 2 - i] + left[size - 1 - i] + 1) >> 1; \
v[i*2 + 1] = (left[size - 3 - i] + left[size - 2 - i] * 2 + left[size - 1 - i] + 2) >> 2; \
v[size*2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; \
} \
v[size*2 - 2] = (top[-1] + left[0] + 1) >> 1; \
v[size*2 - 4] = (left[0] + left[1] + 1) >> 1; \
v[size*2 - 1] = (top[0] + top[-1] * 2 + left[0] + 2) >> 2; \
v[size*2 - 3] = (top[-1] + left[0] * 2 + left[1] + 2) >> 2; \
for (j = 0; j < size; j++) \
memcpy(dst + j*stride, v + size*2 - 2 - j*2, size); \
}

Definition at line 717 of file vp9dsp.c.

#define def_vert_left (   size)
Value:
static void vert_left_##size##x##size##_c(uint8_t *dst, ptrdiff_t stride, \
const uint8_t *left, const uint8_t *top) \
{ \
int i, j; \
uint8_t ve[size - 1], vo[size - 1]; \
for (i = 0; i < size - 2; i++) { \
ve[i] = (top[i] + top[i + 1] + 1) >> 1; \
vo[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; \
} \
ve[size - 2] = (top[size - 2] + top[size - 1] + 1) >> 1; \
vo[size - 2] = (top[size - 2] + top[size - 1] * 3 + 2) >> 2; \
for (j = 0; j < size / 2; j++) { \
memcpy(dst + j*2 * stride, ve + j, size - j - 1); \
memset(dst + j*2 * stride + size - j - 1, top[size - 1], j + 1); \
memcpy(dst + (j*2 + 1) * stride, vo + j, size - j - 1); \
memset(dst + (j*2 + 1) * stride + size - j - 1, top[size - 1], j + 1); \
} \
}

Definition at line 760 of file vp9dsp.c.

#define def_hor_up (   size)
Value:
static void hor_up_##size##x##size##_c(uint8_t *dst, ptrdiff_t stride, \
const uint8_t *left, const uint8_t *top) \
{ \
int i, j; \
uint8_t v[size*2 - 2]; \
for (i = 0; i < size - 2; i++) { \
v[i*2 ] = (left[i] + left[i + 1] + 1) >> 1; \
v[i*2 + 1] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; \
} \
v[size*2 - 4] = (left[size - 2] + left[size - 1] + 1) >> 1; \
v[size*2 - 3] = (left[size - 2] + left[size - 1] * 3 + 2) >> 2; \
for (j = 0; j < size / 2; j++) \
memcpy(dst + j*stride, v + j*2, size); \
for (j = size / 2; j < size; j++) { \
memcpy(dst + j*stride, v + j*2, size*2 - 2 - j*2); \
memset(dst + j*stride + size*2 - 2 - j*2, left[size - 1], \
2 + j*2 - size); \
} \
}

Definition at line 800 of file vp9dsp.c.

#define init_intra_pred (   tx,
  sz 
)
Value:
dsp->intra_pred[tx][VERT_PRED] = vert_##sz##_c; \
dsp->intra_pred[tx][HOR_PRED] = hor_##sz##_c; \
dsp->intra_pred[tx][DC_PRED] = dc_##sz##_c; \
dsp->intra_pred[tx][DIAG_DOWN_LEFT_PRED] = diag_downleft_##sz##_c; \
dsp->intra_pred[tx][DIAG_DOWN_RIGHT_PRED] = diag_downright_##sz##_c; \
dsp->intra_pred[tx][VERT_RIGHT_PRED] = vert_right_##sz##_c; \
dsp->intra_pred[tx][HOR_DOWN_PRED] = hor_down_##sz##_c; \
dsp->intra_pred[tx][VERT_LEFT_PRED] = vert_left_##sz##_c; \
dsp->intra_pred[tx][HOR_UP_PRED] = hor_up_##sz##_c; \
dsp->intra_pred[tx][TM_VP8_PRED] = tm_##sz##_c; \
dsp->intra_pred[tx][LEFT_DC_PRED] = dc_left_##sz##_c; \
dsp->intra_pred[tx][TOP_DC_PRED] = dc_top_##sz##_c; \
dsp->intra_pred[tx][DC_128_PRED] = dc_128_##sz##_c; \
dsp->intra_pred[tx][DC_127_PRED] = dc_127_##sz##_c; \
dsp->intra_pred[tx][DC_129_PRED] = dc_129_##sz##_c

Referenced by def_hor_up().

#define itxfm_wrapper (   type_a,
  type_b,
  sz,
  bits 
)
Value:
static void type_a##_##type_b##_##sz##x##sz##_add_c(uint8_t *dst, \
ptrdiff_t stride, \
int16_t *block, int eob) \
{ \
int i, j; \
int16_t tmp[sz * sz], out[sz]; \
for (i = 0; i < sz; i++) \
type_a##sz##_1d(block + i, sz, tmp + i * sz, 0); \
memset(block, 0, sz * sz * sizeof(*block)); \
for (i = 0; i < sz; i++) { \
type_b##sz##_1d(tmp + i, sz, out, 1); \
for (j = 0; j < sz; j++) \
dst[j * stride] = av_clip_uint8(dst[j * stride] + \
(bits ? \
(out[j] + (1 << (bits - 1))) >> bits : \
out[j])); \
dst++; \
} \
}

Definition at line 856 of file vp9dsp.c.

#define itxfm_wrap (   sz,
  bits 
)
Value:
itxfm_wrapper(iadst, idct, sz, bits) \
itxfm_wrapper(idct, iadst, sz, bits) \
itxfm_wrapper(iadst, iadst, sz, bits)

Definition at line 877 of file vp9dsp.c.

#define IN (   x)    in[x * stride]
#define init_itxfm (   tx,
  sz 
)
Value:
dsp->itxfm_add[tx][DCT_DCT] = idct_idct_##sz##_add_c; \
dsp->itxfm_add[tx][DCT_ADST] = iadst_idct_##sz##_add_c; \
dsp->itxfm_add[tx][ADST_DCT] = idct_iadst_##sz##_add_c; \
dsp->itxfm_add[tx][ADST_ADST] = iadst_iadst_##sz##_add_c

Referenced by itxfm_wrapper().

#define init_idct (   tx,
  nm 
)
Value:
dsp->itxfm_add[tx][DCT_DCT] = \
dsp->itxfm_add[tx][ADST_DCT] = \
dsp->itxfm_add[tx][DCT_ADST] = \
dsp->itxfm_add[tx][ADST_ADST] = nm##_add_c

Referenced by itxfm_wrapper().

#define lf_8_fn (   dir,
  wd,
  stridea,
  strideb 
)
Value:
static void loop_filter_##dir##_##wd##_8_c(uint8_t *dst, \
ptrdiff_t stride, \
int E, int I, int H) \
{ \
loop_filter(dst, stride, E, I, H, stridea, strideb, wd); \
}

Definition at line 1571 of file vp9dsp.c.

#define lf_8_fns (   wd)
Value:
lf_8_fn(h, wd, stride, 1) \
lf_8_fn(v, wd, 1, stride)

Definition at line 1579 of file vp9dsp.c.

#define lf_16_fn (   dir,
  stridea 
)
Value:
static void loop_filter_##dir##_16_16_c(uint8_t *dst, \
ptrdiff_t stride, \
int E, int I, int H) \
{ \
loop_filter_##dir##_16_8_c(dst, stride, E, I, H); \
loop_filter_##dir##_16_8_c(dst + 8 * stridea, stride, E, I, H); \
}

Referenced by lf_8_fns().

#define lf_mix_fn (   dir,
  wd1,
  wd2,
  stridea 
)
Value:
static void loop_filter_##dir##_##wd1##wd2##_16_c(uint8_t *dst, \
ptrdiff_t stride, \
int E, int I, int H) \
{ \
loop_filter_##dir##_##wd1##_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); \
loop_filter_##dir##_##wd2##_8_c(dst + 8 * stridea, stride, E >> 8, I >> 8, H >> 8); \
}
#define lf_mix_fns (   wd1,
  wd2 
)
Value:
lf_mix_fn(h, wd1, wd2, stride) \
lf_mix_fn(v, wd1, wd2, 1)

Referenced by lf_8_fns().

#define fpel_fn (   type,
  sz 
)
Value:
static void type##sz##_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int h, int mx, int my) \
{ \
type##_c(dst, dst_stride, src, src_stride, sz, h); \
}

Definition at line 1674 of file vp9dsp.c.

#define copy_avg_fn (   sz)
Value:
fpel_fn(copy, sz) \
fpel_fn(avg, sz)

Definition at line 1682 of file vp9dsp.c.

#define FILTER_8TAP (   src,
  x,
  F,
  stride 
)
Value:
av_clip_uint8((F[0] * src[x + -3 * stride] + \
F[1] * src[x + -2 * stride] + \
F[2] * src[x + -1 * stride] + \
F[3] * src[x + +0 * stride] + \
F[4] * src[x + +1 * stride] + \
F[5] * src[x + +2 * stride] + \
F[6] * src[x + +3 * stride] + \
F[7] * src[x + +4 * stride] + 64) >> 7)

Definition at line 1747 of file vp9dsp.c.

Referenced by do_8tap_1d_c(), and filter_8tap_1d_fn().

#define filter_8tap_1d_fn (   opn,
  opa,
  dir,
  ds 
)
Value:
static av_noinline void opn##_8tap_1d_##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int w, int h, const int8_t *filter) \
{ \
do_8tap_1d_c(dst, dst_stride, src, src_stride, w, h, ds, filter, opa); \
}

Definition at line 1777 of file vp9dsp.c.

#define filter_8tap_2d_fn (   opn,
  opa 
)
Value:
static av_noinline void opn##_8tap_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int w, int h, const int8_t *filterx, \
const int8_t *filtery) \
{ \
do_8tap_2d_c(dst, dst_stride, src, src_stride, w, h, filterx, filtery, opa); \
}

Definition at line 1827 of file vp9dsp.c.

#define filter_fn_1d (   sz,
  dir,
  dir_m,
  type,
  type_idx,
  avg 
)
Value:
static void avg##_8tap_##type##_##sz##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int h, int mx, int my) \
{ \
avg##_8tap_1d_##dir##_c(dst, dst_stride, src, src_stride, sz, h, \
vp9_subpel_filters[type_idx][dir_m - 1]); \
}
#define filter_fn_2d (   sz,
  type,
  type_idx,
  avg 
)
Value:
static void avg##_8tap_##type##_##sz##hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int h, int mx, int my) \
{ \
avg##_8tap_2d_hv_c(dst, dst_stride, src, src_stride, sz, h, \
vp9_subpel_filters[type_idx][mx - 1], \
vp9_subpel_filters[type_idx][my - 1]); \
}
#define FILTER_BILIN (   src,
  x,
  mxy,
  stride 
)    (src[x] + ((mxy * (src[x + stride] - src[x]) + 8) >> 4))

Referenced by bilin_1d_fn(), and filter_8tap_2d_fn().

#define bilin_1d_fn (   opn,
  opa,
  dir,
  ds 
)
Value:
static av_noinline void opn##_bilin_1d_##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int w, int h, int mxy) \
{ \
do_bilin_1d_c(dst, dst_stride, src, src_stride, w, h, ds, mxy, opa); \
}

Definition at line 1884 of file vp9dsp.c.

#define bilin_2d_fn (   opn,
  opa 
)
Value:
static av_noinline void opn##_bilin_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int w, int h, int mx, int my) \
{ \
do_bilin_2d_c(dst, dst_stride, src, src_stride, w, h, mx, my, opa); \
}

Definition at line 1932 of file vp9dsp.c.

#define bilinf_fn_1d (   sz,
  dir,
  dir_m,
  avg 
)
Value:
static void avg##_bilin_##sz##dir##_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int h, int mx, int my) \
{ \
avg##_bilin_1d_##dir##_c(dst, dst_stride, src, src_stride, sz, h, dir_m); \
}
#define bilinf_fn_2d (   sz,
  avg 
)
Value:
static void avg##_bilin_##sz##hv_c(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *src, ptrdiff_t src_stride, \
int h, int mx, int my) \
{ \
avg##_bilin_2d_hv_c(dst, dst_stride, src, src_stride, sz, h, mx, my); \
}
#define filter_fn (   sz,
  avg 
)
Value:
filter_fn_1d(sz, h, mx, regular, FILTER_8TAP_REGULAR, avg) \
filter_fn_1d(sz, v, my, regular, FILTER_8TAP_REGULAR, avg) \
filter_fn_2d(sz, regular, FILTER_8TAP_REGULAR, avg) \
filter_fn_1d(sz, h, mx, smooth, FILTER_8TAP_SMOOTH, avg) \
filter_fn_1d(sz, v, my, smooth, FILTER_8TAP_SMOOTH, avg) \
filter_fn_2d(sz, smooth, FILTER_8TAP_SMOOTH, avg) \
filter_fn_1d(sz, h, mx, sharp, FILTER_8TAP_SHARP, avg) \
filter_fn_1d(sz, v, my, sharp, FILTER_8TAP_SHARP, avg) \
filter_fn_2d(sz, sharp, FILTER_8TAP_SHARP, avg) \
bilinf_fn_1d(sz, h, mx, avg) \
bilinf_fn_1d(sz, v, my, avg) \
bilinf_fn_2d(sz, avg)
#define filter_fn_set (   avg)
Value:
filter_fn(64, avg) \
filter_fn(32, avg) \
filter_fn(16, avg) \
filter_fn(8, avg) \
filter_fn(4, avg)

Referenced by bilin_2d_fn().

#define init_fpel (   idx1,
  idx2,
  sz,
  type 
)
Value:
dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][0][0] = type##sz##_c; \
dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][0][0] = type##sz##_c; \
dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][0][0] = type##sz##_c; \
dsp->mc[idx1][FILTER_BILINEAR ][idx2][0][0] = type##sz##_c

Referenced by ff_vp9dsp_init_x86().

#define init_copy_avg (   idx,
  sz 
)
Value:
init_fpel(idx, 0, sz, copy); \
init_fpel(idx, 1, sz, avg)

Referenced by bilin_2d_fn().

#define init_subpel1 (   idx1,
  idx2,
  idxh,
  idxv,
  sz,
  dir,
  type 
)
Value:
dsp->mc[idx1][FILTER_8TAP_SMOOTH ][idx2][idxh][idxv] = type##_8tap_smooth_##sz##dir##_c; \
dsp->mc[idx1][FILTER_8TAP_REGULAR][idx2][idxh][idxv] = type##_8tap_regular_##sz##dir##_c; \
dsp->mc[idx1][FILTER_8TAP_SHARP ][idx2][idxh][idxv] = type##_8tap_sharp_##sz##dir##_c; \
dsp->mc[idx1][FILTER_BILINEAR ][idx2][idxh][idxv] = type##_bilin_##sz##dir##_c
#define init_subpel2 (   idx,
  idxh,
  idxv,
  dir,
  type 
)
Value:
init_subpel1(0, idx, idxh, idxv, 64, dir, type); \
init_subpel1(1, idx, idxh, idxv, 32, dir, type); \
init_subpel1(2, idx, idxh, idxv, 16, dir, type); \
init_subpel1(3, idx, idxh, idxv, 8, dir, type); \
init_subpel1(4, idx, idxh, idxv, 4, dir, type)
#define init_subpel3 (   idx,
  type 
)
Value:
init_subpel2(idx, 1, 1, hv, type); \
init_subpel2(idx, 0, 1, v, type); \
init_subpel2(idx, 1, 0, h, type)

Referenced by bilin_2d_fn(), and ff_vp9dsp_init_x86().

Function Documentation

static void vert_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 32 of file vp9dsp.c.

static void vert_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 43 of file vp9dsp.c.

static void vert_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 55 of file vp9dsp.c.

static void vert_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 68 of file vp9dsp.c.

static void hor_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 84 of file vp9dsp.c.

static void hor_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 93 of file vp9dsp.c.

static void hor_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 104 of file vp9dsp.c.

static void hor_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 118 of file vp9dsp.c.

static void tm_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 134 of file vp9dsp.c.

static void tm_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 150 of file vp9dsp.c.

static void tm_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 170 of file vp9dsp.c.

static void tm_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 198 of file vp9dsp.c.

static void dc_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 242 of file vp9dsp.c.

static void dc_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 254 of file vp9dsp.c.

static void dc_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 269 of file vp9dsp.c.

static void dc_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 287 of file vp9dsp.c.

static void dc_left_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 312 of file vp9dsp.c.

static void dc_left_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 323 of file vp9dsp.c.

static void dc_left_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 337 of file vp9dsp.c.

static void dc_left_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 353 of file vp9dsp.c.

static void dc_top_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 374 of file vp9dsp.c.

static void dc_top_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 385 of file vp9dsp.c.

static void dc_top_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 399 of file vp9dsp.c.

static void dc_top_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 415 of file vp9dsp.c.

static void dc_128_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 436 of file vp9dsp.c.

static void dc_128_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 445 of file vp9dsp.c.

static void dc_128_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 456 of file vp9dsp.c.

static void dc_128_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 468 of file vp9dsp.c.

static void dc_127_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 482 of file vp9dsp.c.

static void dc_127_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 491 of file vp9dsp.c.

static void dc_127_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 502 of file vp9dsp.c.

static void dc_127_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 514 of file vp9dsp.c.

static void dc_129_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 528 of file vp9dsp.c.

static void dc_129_8x8_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 537 of file vp9dsp.c.

static void dc_129_16x16_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 548 of file vp9dsp.c.

static void dc_129_32x32_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 560 of file vp9dsp.c.

static void diag_downleft_4x4_c ( uint8_t dst,
ptrdiff_t  stride,
const uint8_t left,
const uint8_t top 
)
static

Definition at line 576 of file vp9dsp.c.

def_diag_downleft ( )

Definition at line 608 of file vp9dsp.c.

def_diag_downright ( )

Definition at line 646 of file vp9dsp.c.

def_vert_right ( )

Definition at line 695 of file vp9dsp.c.

def_hor_down ( )

Definition at line 738 of file vp9dsp.c.

def_vert_left ( )

Definition at line 782 of file vp9dsp.c.

def_hor_up ( )

Definition at line 823 of file vp9dsp.c.

static av_always_inline void idct4_1d ( const int16_t *  in,
ptrdiff_t  stride,
int16_t *  out,
int  pass 
)
static

Definition at line 885 of file vp9dsp.c.

static av_always_inline void iadst4_1d ( const int16_t *  in,
ptrdiff_t  stride,
int16_t *  out,
int  pass 
)
static

Definition at line 901 of file vp9dsp.c.

itxfm_wrap ( ,
 
)

Definition at line 917 of file vp9dsp.c.

static av_always_inline void iadst8_1d ( const int16_t *  in,
ptrdiff_t  stride,
int16_t *  out,
int  pass 
)
static

Definition at line 955 of file vp9dsp.c.

itxfm_wrap ( ,
 
)

Definition at line 999 of file vp9dsp.c.

static av_always_inline void iadst16_1d ( const int16_t *  in,
ptrdiff_t  stride,
int16_t *  out,
int  pass 
)
static

Definition at line 1089 of file vp9dsp.c.

itxfm_wrap ( 16  ,
 
)

Definition at line 1192 of file vp9dsp.c.

itxfm_wrapper ( idct  ,
idct  ,
32  ,
 
)

Definition at line 1400 of file vp9dsp.c.

itxfm_wrapper ( iwht  ,
iwht  ,
,
 
)

Definition at line 1433 of file vp9dsp.c.

static av_always_inline void loop_filter ( uint8_t dst,
ptrdiff_t  stride,
int  E,
int  I,
int  H,
ptrdiff_t  stridea,
ptrdiff_t  strideb,
int  wd 
)
static

Definition at line 1463 of file vp9dsp.c.

lf_8_fns ( )

Definition at line 1583 of file vp9dsp.c.

static av_always_inline void copy_c ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src,
ptrdiff_t  src_stride,
int  w,
int  h 
)
static

Definition at line 1647 of file vp9dsp.c.

static av_always_inline void avg_c ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src,
ptrdiff_t  src_stride,
int  w,
int  h 
)
static

Definition at line 1659 of file vp9dsp.c.

copy_avg_fn ( 64  )

Definition at line 1686 of file vp9dsp.c.

static av_always_inline void do_8tap_1d_c ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src,
ptrdiff_t  src_stride,
int  w,
int  h,
ptrdiff_t  ds,
const int8_t *  filter,
int  avg 
)
static

Definition at line 1757 of file vp9dsp.c.

filter_8tap_1d_fn ( filter_8tap_1d_fn(  put,
filter_8tap_1d_fn(  0,
filter_8tap_1d_fn(  v,
src_stride   
)

Definition at line 1785 of file vp9dsp.c.

filter_8tap_2d_fn ( put  ,
 
)

Definition at line 1836 of file vp9dsp.c.

bilin_1d_fn ( bilin_1d_fn(  put,
bilin_1d_fn(  0,
bilin_1d_fn(  v,
src_stride   
)

Definition at line 1892 of file vp9dsp.c.

bilin_2d_fn ( put  ,
 
)

Definition at line 1940 of file vp9dsp.c.

av_cold void ff_vp9dsp_init ( VP9DSPContext dsp)

Definition at line 2041 of file vp9dsp.c.

Referenced by vp9_decode_init().