FFmpeg
Loading...
Searching...
No Matches
inter_template.c File Reference

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)
 
#define DMVR_SHIFT(s)
 
#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 o)
 
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.

Referenced by put_scaled(), and put_uni_w_scaled().

◆ DMVR_FILTER

#define DMVR_FILTER ( src,
stride )
Value:
(filter[0] * src[x] + \
filter[1] * src[x + stride])
#define stride
void(* filter)(uint8_t *src, ptrdiff_t stride, int qscale)
Definition h263dsp.c:29
#define src
Definition vp8dsp.c:248

Definition at line 471 of file inter_template.c.

Referenced by dmvr_h(), and dmvr_v().

◆ DMVR_FILTER2

#define DMVR_FILTER2 ( filter,
src0,
src1 )
Value:
(filter[0] * src0 + filter[1] * src1)
#define src1
Definition h264pred.c:141
#define src0
Definition h264pred.c:140

Definition at line 475 of file inter_template.c.

Referenced by dmvr_hv().

◆ DMVR_SHIFT

#define DMVR_SHIFT ( s)
Value:
((s) << (10 - BIT_DEPTH))
#define BIT_DEPTH
Definition dsp_init.c:121
#define s(width, name)
Definition cbs_vp9.c:198

Referenced by dmvr().

◆ 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) \
#define FUNC(a)
int a
#define C
uint8_t w
Definition llvidencdsp.c:39

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);
#define _
#define PEL_FUNC(dst1, idx1, idx2, a, depth)
static double c[64]

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); \
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 at line 591 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init().

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(), and put_luma_scaled().

◆ 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(), and put_chroma_scaled().

◆ 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(), and put_uni_luma_scaled().

◆ 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(), and put_uni_chroma_scaled().

◆ 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

◆ 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(), and put_uni_luma_w_scaled().

◆ 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(), and put_uni_chroma_w_scaled().

◆ 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.

◆ 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 o )
static

Definition at line 202 of file inter_template.c.

Referenced by ff_vvc_inter_dsp_init(), and w_avg().

◆ 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(), and put_ciip().

◆ 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(), and put_gpm().

◆ 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 bdof_fetch_samples(), 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 fetch_samples(), and 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

◆ 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 apply_prof(), and 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 apply_prof_uni(), and 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 apply_prof_uni_w(), and 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(), and derive_bdof_vx_vy().

◆ 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(), and apply_bdof_min_block().

◆ 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 apply_bdof(), and 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 dmvr(), 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 dmvr_h(), and 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 dmvr_v(), and 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 dmvr_hv(), and 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.

Referenced by ff_vvc_inter_dsp_init().