FFmpeg
Macros | Functions
inter_template.c File Reference
#include "libavcodec/h26x/h2656_inter_template.c"
#include "libavutil/imgutils.h"

Go to the source code of this file.

Macros

#define TMP_STRIDE   EDGE_EMU_BUFFER_STRIDE
 
#define DMVR_FILTER(src, stride)
 
#define DMVR_FILTER2(filter, src0, src1)   (filter[0] * src0 + filter[1] * src1)
 
#define DMVR_SHIFT(s)   ((s) << (10 - BIT_DEPTH))
 
#define PEL_FUNC(dst, C, idx1, idx2, a)
 
#define DIR_FUNCS(d, C, c)
 
#define FUNCS(C, c)
 

Functions

static void av_always_inline FUNC() put_scaled (uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *const _src, ptrdiff_t _src_stride, const int src_height, const int _x, const int _y, const int dx, const int dy, const int height, const int8_t *hf, const int8_t *vf, const int width, const int is_uni, const int is_chroma)
 
static void FUNC() put_luma_scaled (int16_t *_dst, const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, const int x, const int y, const int dx, const int dy, const int height, const int8_t *hf, const int8_t *vf, const int width)
 
static void FUNC() put_chroma_scaled (int16_t *_dst, const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, const int x, const int y, const int dx, const int dy, const int height, const int8_t *hf, const int8_t *vf, const int width)
 
static void FUNC() put_uni_luma_scaled (uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, const int x, const int y, const int dx, const int dy, const int height, const int8_t *hf, const int8_t *vf, const int width)
 
static void FUNC() put_uni_chroma_scaled (uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, const int x, const int y, const int dx, const int dy, const int height, const int8_t *hf, const int8_t *vf, const int width)
 
static void av_always_inline FUNC() put_uni_w_scaled (uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *const _src, ptrdiff_t _src_stride, const int src_height, const int _x, const int _y, const int dx, const int dy, const int denom, const int wx, const int _ox, const int height, const int8_t *hf, const int8_t *vf, const int width, const int is_chroma)
 
static void FUNC() put_uni_luma_w_scaled (uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, const int x, const int y, const int dx, const int dy, const int denom, const int wx, const int ox, const int height, const int8_t *hf, const int8_t *vf, const int width)
 
static void FUNC() put_uni_chroma_w_scaled (uint8_t *_dst, const ptrdiff_t _dst_stride, const uint8_t *_src, ptrdiff_t _src_stride, const int src_height, const int x, const int y, const int dx, const int dy, const int denom, const int wx, const int ox, const int height, const int8_t *hf, const int8_t *vf, const int width)
 
static void FUNC() avg (uint8_t *_dst, const ptrdiff_t _dst_stride, const int16_t *src0, const int16_t *src1, const int width, const int height)
 
static void FUNC() w_avg (uint8_t *_dst, const ptrdiff_t _dst_stride, const int16_t *src0, const int16_t *src1, const int width, const int height, const int denom, const int w0, const int w1, const int o0, const int o1)
 
static void FUNC() put_ciip (uint8_t *_dst, const ptrdiff_t _dst_stride, const int width, const int height, const uint8_t *_inter, const ptrdiff_t _inter_stride, const int intra_weight)
 
static void FUNC() put_gpm (uint8_t *_dst, ptrdiff_t dst_stride, const int width, const int height, const int16_t *src0, const int16_t *src1, const uint8_t *weights, const int step_x, const int step_y)
 
static void FUNC() bdof_fetch_samples (int16_t *_dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int x_frac, const int y_frac, const int width, const int height)
 
static void FUNC() fetch_samples (int16_t *_dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int x_frac, const int y_frac)
 
static void FUNC() prof_grad_filter (int16_t *gradient_h, int16_t *gradient_v, const ptrdiff_t gradient_stride, const int16_t *_src, const ptrdiff_t src_stride, const int width, const int height)
 
static void FUNC() apply_prof (int16_t *dst, const int16_t *src, const int16_t *diff_mv_x, const int16_t *diff_mv_y)
 
static void FUNC() apply_prof_uni (uint8_t *_dst, const ptrdiff_t _dst_stride, const int16_t *src, const int16_t *diff_mv_x, const int16_t *diff_mv_y)
 
static void FUNC() apply_prof_uni_w (uint8_t *_dst, const ptrdiff_t _dst_stride, const int16_t *src, const int16_t *diff_mv_x, const int16_t *diff_mv_y, const int denom, const int wx, const int _ox)
 
static void FUNC() derive_bdof_vx_vy (const int16_t *_src0, const int16_t *_src1, const int pad_left, const int pad_top, const int pad_right, const int pad_bottom, const int16_t **gradient_h, const int16_t **gradient_v, int *vx, int *vy)
 
static void FUNC() apply_bdof_min_block (pixel *dst, const ptrdiff_t dst_stride, const int16_t *src0, const int16_t *src1, const int16_t **gh, const int16_t **gv, const int vx, const int vy)
 
static void FUNC() apply_bdof (uint8_t *_dst, const ptrdiff_t _dst_stride, const int16_t *_src0, const int16_t *_src1, const int block_w, const int block_h)
 
static void FUNC() dmvr (int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const intptr_t mx, const intptr_t my, const int width)
 
static void FUNC() dmvr_h (int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const intptr_t mx, const intptr_t my, const int width)
 
static void FUNC() dmvr_v (int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const intptr_t mx, const intptr_t my, const int width)
 
static void FUNC() dmvr_hv (int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const intptr_t mx, const intptr_t my, const int width)
 
static void FUNC() ff_vvc_inter_dsp_init (VVCInterDSPContext *const inter)
 

Macro Definition Documentation

◆ TMP_STRIDE

#define TMP_STRIDE   EDGE_EMU_BUFFER_STRIDE

Definition at line 26 of file inter_template.c.

◆ DMVR_FILTER

#define DMVR_FILTER (   src,
  stride 
)
Value:
(filter[0] * src[x] + \
filter[1] * src[x + stride])

Definition at line 471 of file inter_template.c.

◆ DMVR_FILTER2

#define DMVR_FILTER2 (   filter,
  src0,
  src1 
)    (filter[0] * src0 + filter[1] * src1)

Definition at line 475 of file inter_template.c.

◆ DMVR_SHIFT

#define DMVR_SHIFT (   s)    ((s) << (10 - BIT_DEPTH))

◆ PEL_FUNC

#define PEL_FUNC (   dst,
  C,
  idx1,
  idx2,
  a 
)
Value:
do { \
for (int w = 0; w < 7; w++) \
inter->dst[C][w][idx1][idx2] = FUNC(a); \
} while (0) \

Definition at line 575 of file inter_template.c.

◆ DIR_FUNCS

#define DIR_FUNCS (   d,
  C,
  c 
)
Value:
PEL_FUNC(put_##d, C, 0, 0, put_##d##_pixels); \
PEL_FUNC(put_##d, C, 0, 1, put_##d##_##c##_h); \
PEL_FUNC(put_##d, C, 1, 0, put_##d##_##c##_v); \
PEL_FUNC(put_##d, C, 1, 1, put_##d##_##c##_hv); \
PEL_FUNC(put_##d##_w, C, 0, 0, put_##d##_w_pixels); \
PEL_FUNC(put_##d##_w, C, 0, 1, put_##d##_##c##_w_h); \
PEL_FUNC(put_##d##_w, C, 1, 0, put_##d##_##c##_w_v); \
PEL_FUNC(put_##d##_w, C, 1, 1, put_##d##_##c##_w_hv);

Definition at line 581 of file inter_template.c.

◆ FUNCS

#define FUNCS (   C,
  c 
)
Value:
PEL_FUNC(put, C, 0, 0, put_pixels); \
PEL_FUNC(put, C, 0, 1, put_##c##_h); \
PEL_FUNC(put, C, 1, 0, put_##c##_v); \
PEL_FUNC(put, C, 1, 1, put_##c##_hv); \
DIR_FUNCS(uni, C, c); \

Definition at line 591 of file inter_template.c.

Function Documentation

◆ put_scaled()

static void av_always_inline FUNC() put_scaled ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const uint8_t *const  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  _x,
const int  _y,
const int  dx,
const int  dy,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width,
const int  is_uni,
const int  is_chroma 
)
static

◆ put_luma_scaled()

static void FUNC() put_luma_scaled ( int16_t *  _dst,
const uint8_t *  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  x,
const int  y,
const int  dx,
const int  dy,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width 
)
static

Definition at line 84 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ put_chroma_scaled()

static void FUNC() put_chroma_scaled ( int16_t *  _dst,
const uint8_t *  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  x,
const int  y,
const int  dx,
const int  dy,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width 
)
static

Definition at line 92 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ put_uni_luma_scaled()

static void FUNC() put_uni_luma_scaled ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const uint8_t *  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  x,
const int  y,
const int  dx,
const int  dy,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width 
)
static

Definition at line 100 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ put_uni_chroma_scaled()

static void FUNC() put_uni_chroma_scaled ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const uint8_t *  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  x,
const int  y,
const int  dx,
const int  dy,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width 
)
static

Definition at line 108 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ put_uni_w_scaled()

static void av_always_inline FUNC() put_uni_w_scaled ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const uint8_t *const  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  _x,
const int  _y,
const int  dx,
const int  dy,
const int  denom,
const int  wx,
const int  _ox,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width,
const int  is_chroma 
)
static

Definition at line 116 of file inter_template.c.

Referenced by put_uni_chroma_w_scaled(), and put_uni_luma_w_scaled().

◆ put_uni_luma_w_scaled()

static void FUNC() put_uni_luma_w_scaled ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const uint8_t *  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  x,
const int  y,
const int  dx,
const int  dy,
const int  denom,
const int  wx,
const int  ox,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width 
)
static

Definition at line 167 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ put_uni_chroma_w_scaled()

static void FUNC() put_uni_chroma_w_scaled ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const uint8_t *  _src,
ptrdiff_t  _src_stride,
const int  src_height,
const int  x,
const int  y,
const int  dx,
const int  dy,
const int  denom,
const int  wx,
const int  ox,
const int  height,
const int8_t *  hf,
const int8_t *  vf,
const int  width 
)
static

Definition at line 175 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ avg()

static void FUNC() avg ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const int16_t *  src0,
const int16_t *  src1,
const int  width,
const int  height 
)
static

Definition at line 185 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ w_avg()

static void FUNC() w_avg ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const int16_t *  src0,
const int16_t *  src1,
const int  width,
const int  height,
const int  denom,
const int  w0,
const int  w1,
const int  o0,
const int  o1 
)
static

Definition at line 202 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ put_ciip()

static void FUNC() put_ciip ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const int  width,
const int  height,
const uint8_t *  _inter,
const ptrdiff_t  _inter_stride,
const int  intra_weight 
)
static

Definition at line 220 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ put_gpm()

static void FUNC() put_gpm ( uint8_t *  _dst,
ptrdiff_t  dst_stride,
const int  width,
const int  height,
const int16_t *  src0,
const int16_t *  src1,
const uint8_t *  weights,
const int  step_x,
const int  step_y 
)
static

Definition at line 238 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ bdof_fetch_samples()

static void FUNC() bdof_fetch_samples ( int16_t *  _dst,
const uint8_t *  _src,
const ptrdiff_t  _src_stride,
const int  x_frac,
const int  y_frac,
const int  width,
const int  height 
)
static

Definition at line 261 of file inter_template.c.

Referenced by fetch_samples(), and ff_vvc_inter_dsp_init().

◆ fetch_samples()

static void FUNC() fetch_samples ( int16_t *  _dst,
const uint8_t *  _src,
const ptrdiff_t  _src_stride,
const int  x_frac,
const int  y_frac 
)
static

Definition at line 290 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ prof_grad_filter()

static void FUNC() prof_grad_filter ( int16_t *  gradient_h,
int16_t *  gradient_v,
const ptrdiff_t  gradient_stride,
const int16_t *  _src,
const ptrdiff_t  src_stride,
const int  width,
const int  height 
)
static

Definition at line 295 of file inter_template.c.

Referenced by apply_bdof(), apply_prof(), apply_prof_uni(), and apply_prof_uni_w().

◆ apply_prof()

static void FUNC() apply_prof ( int16_t *  dst,
const int16_t *  src,
const int16_t *  diff_mv_x,
const int16_t *  diff_mv_y 
)
static

< dILimit

Definition at line 314 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ apply_prof_uni()

static void FUNC() apply_prof_uni ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const int16_t *  src,
const int16_t *  diff_mv_x,
const int16_t *  diff_mv_y 
)
static

< dILimit

Definition at line 335 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ apply_prof_uni_w()

static void FUNC() apply_prof_uni_w ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const int16_t *  src,
const int16_t *  diff_mv_x,
const int16_t *  diff_mv_y,
const int  denom,
const int  wx,
const int  _ox 
)
static

< dILimit

Definition at line 364 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ derive_bdof_vx_vy()

static void FUNC() derive_bdof_vx_vy ( const int16_t *  _src0,
const int16_t *  _src1,
const int  pad_left,
const int  pad_top,
const int  pad_right,
const int  pad_bottom,
const int16_t **  gradient_h,
const int16_t **  gradient_v,
int *  vx,
int *  vy 
)
static

Definition at line 391 of file inter_template.c.

Referenced by apply_bdof().

◆ apply_bdof_min_block()

static void FUNC() apply_bdof_min_block ( pixel dst,
const ptrdiff_t  dst_stride,
const int16_t *  src0,
const int16_t *  src1,
const int16_t **  gh,
const int16_t **  gv,
const int  vx,
const int  vy 
)
static

Definition at line 424 of file inter_template.c.

Referenced by apply_bdof().

◆ apply_bdof()

static void FUNC() apply_bdof ( uint8_t *  _dst,
const ptrdiff_t  _dst_stride,
const int16_t *  _src0,
const int16_t *  _src1,
const int  block_w,
const int  block_h 
)
static

Definition at line 442 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ dmvr()

static void FUNC() dmvr ( int16_t *  dst,
const uint8_t *  _src,
const ptrdiff_t  _src_stride,
const int  height,
const intptr_t  mx,
const intptr_t  my,
const int  width 
)
static

Definition at line 479 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init(), and ff_vvc_set_intra_mvf().

◆ dmvr_h()

static void FUNC() dmvr_h ( int16_t *  dst,
const uint8_t *  _src,
const ptrdiff_t  _src_stride,
const int  height,
const intptr_t  mx,
const intptr_t  my,
const int  width 
)
static

Definition at line 507 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ dmvr_v()

static void FUNC() dmvr_v ( int16_t *  dst,
const uint8_t *  _src,
const ptrdiff_t  _src_stride,
const int  height,
const intptr_t  mx,
const intptr_t  my,
const int  width 
)
static

Definition at line 525 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ dmvr_hv()

static void FUNC() dmvr_hv ( int16_t *  dst,
const uint8_t *  _src,
const ptrdiff_t  _src_stride,
const int  height,
const intptr_t  mx,
const intptr_t  my,
const int  width 
)
static

Definition at line 544 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

◆ ff_vvc_inter_dsp_init()

static void FUNC() ff_vvc_inter_dsp_init ( VVCInterDSPContext *const  inter)
static

Definition at line 598 of file inter_template.c.

w
uint8_t w
Definition: llviddspenc.c:38
filter
void(* filter)(uint8_t *src, int stride, int qscale)
Definition: h263dsp.c:29
C
s EdgeDetect Foobar g libavfilter vf_edgedetect c libavfilter vf_foobar c edit libavfilter and add an entry for foobar following the pattern of the other filters edit libavfilter allfilters and add an entry for foobar following the pattern of the other filters configure make j< whatever > ffmpeg ffmpeg i you should get a foobar png with Lena edge detected That s your new playground is ready Some little details about what s going which in turn will define variables for the build system and the C
Definition: writing_filters.txt:58
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
a
The reader does not expect b to be semantically here and if the code is changed by maybe adding a a division or other the signedness will almost certainly be mistaken To avoid this confusion a new type was SUINT is the C unsigned type but it holds a signed int to use the same example SUINT a
Definition: undefined.txt:41
put_pixels
static void FUNC() put_pixels(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const int8_t *hf, const int8_t *vf, const int width)
Definition: h2656_inter_template.c:29
stride
#define stride
Definition: h264pred_template.c:537
FUNC
#define FUNC(a)
Definition: bit_depth_template.c:104
_
#define _
PEL_FUNC
#define PEL_FUNC(dst, C, idx1, idx2, a)
Definition: inter_template.c:575
src
#define src
Definition: vp8dsp.c:248