FFmpeg
Macros | Functions
vvc_filter_template.c File Reference
#include "libavcodec/h26x/h2656_sao_template.c"
#include "libavcodec/h26x/h2656_deblock_template.c"

Go to the source code of this file.

Macros

#define ALF_DIR_VERT   0
 
#define ALF_DIR_HORZ   1
 
#define ALF_DIR_DIGA0   2
 
#define ALF_DIR_DIGA1   3
 
#define P7   pix[-8 * xstride]
 
#define P6   pix[-7 * xstride]
 
#define P5   pix[-6 * xstride]
 
#define P4   pix[-5 * xstride]
 
#define P3   pix[-4 * xstride]
 
#define P2   pix[-3 * xstride]
 
#define P1   pix[-2 * xstride]
 
#define P0   pix[-1 * xstride]
 
#define Q0   pix[0 * xstride]
 
#define Q1   pix[1 * xstride]
 
#define Q2   pix[2 * xstride]
 
#define Q3   pix[3 * xstride]
 
#define Q4   pix[4 * xstride]
 
#define Q5   pix[5 * xstride]
 
#define Q6   pix[6 * xstride]
 
#define Q7   pix[7 * xstride]
 
#define P(x)   pix[(-(x)-1) * xstride]
 
#define Q(x)   pix[(x) * xstride]
 
#define TP7   pix[-8 * xstride + 3 * ystride]
 
#define TP6   pix[-7 * xstride + 3 * ystride]
 
#define TP5   pix[-6 * xstride + 3 * ystride]
 
#define TP4   pix[-5 * xstride + 3 * ystride]
 
#define TP3   pix[-4 * xstride + 3 * ystride]
 
#define TP2   pix[-3 * xstride + 3 * ystride]
 
#define TP1   pix[-2 * xstride + 3 * ystride]
 
#define TP0   pix[-1 * xstride + 3 * ystride]
 
#define TQ0   pix[0 * xstride + 3 * ystride]
 
#define TQ1   pix[1 * xstride + 3 * ystride]
 
#define TQ2   pix[2 * xstride + 3 * ystride]
 
#define TQ3   pix[3 * xstride + 3 * ystride]
 
#define TQ4   pix[4 * xstride + 3 * ystride]
 
#define TQ5   pix[5 * xstride + 3 * ystride]
 
#define TQ6   pix[6 * xstride + 3 * ystride]
 
#define TQ7   pix[7 * xstride + 3 * ystride]
 
#define TP(x)   pix[(-(x)-1) * xstride + 3 * ystride]
 
#define TQ(x)   pix[(x) * xstride + 3 * ystride]
 
#define FP3   pix[-4 * xstride + 1 * ystride]
 
#define FP2   pix[-3 * xstride + 1 * ystride]
 
#define FP1   pix[-2 * xstride + 1 * ystride]
 
#define FP0   pix[-1 * xstride + 1 * ystride]
 
#define FQ0   pix[0 * xstride + 1 * ystride]
 
#define FQ1   pix[1 * xstride + 1 * ystride]
 
#define FQ2   pix[2 * xstride + 1 * ystride]
 
#define FQ3   pix[3 * xstride + 1 * ystride]
 

Functions

static void FUNC() lmcs_filter_luma (uint8_t *_dst, ptrdiff_t dst_stride, const int width, const int height, const void *_lut)
 
static av_always_inline int16_t FUNC() alf_clip (pixel curr, pixel v0, pixel v1, int16_t clip)
 
static void FUNC() alf_filter_luma (uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, const int width, const int height, const int16_t *filter, const int16_t *clip, const int vb_pos)
 
static void FUNC() alf_filter_chroma (uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_src, ptrdiff_t src_stride, const int width, const int height, const int16_t *filter, const int16_t *clip, const int vb_pos)
 
static void FUNC() alf_filter_cc (uint8_t *_dst, ptrdiff_t dst_stride, const uint8_t *_luma, const ptrdiff_t luma_stride, const int width, const int height, const int hs, const int vs, const int16_t *filter, const int vb_pos)
 
static void FUNC() alf_get_idx (int *class_idx, int *transpose_idx, const int *sum, const int ac)
 
static void FUNC() alf_classify (int *class_idx, int *transpose_idx, const uint8_t *_src, const ptrdiff_t _src_stride, const int width, const int height, const int vb_pos, int *gradient_tmp)
 
static void FUNC() alf_recon_coeff_and_clip (int16_t *coeff, int16_t *clip, const int *class_idx, const int *transpose_idx, const int size, const int16_t *coeff_set, const uint8_t *clip_idx_set, const uint8_t *class_to_filt)
 
static void FUNC() loop_filter_luma_large (pixel *pix, const ptrdiff_t xstride, const ptrdiff_t ystride, const int32_t tc, const uint8_t no_p, const uint8_t no_q, const uint8_t max_len_p, const uint8_t max_len_q)
 
static void FUNC() vvc_loop_filter_luma (uint8_t *_pix, ptrdiff_t _xstride, ptrdiff_t _ystride, const int32_t *_beta, const int32_t *_tc, const uint8_t *_no_p, const uint8_t *_no_q, const uint8_t *_max_len_p, const uint8_t *_max_len_q, const int hor_ctu_edge)
 
static void FUNC() loop_filter_chroma_strong (pixel *pix, const ptrdiff_t xstride, const ptrdiff_t ystride, const int size, const int32_t tc, const uint8_t no_p, const uint8_t no_q)
 
static void FUNC() loop_filter_chroma_strong_one_side (pixel *pix, const ptrdiff_t xstride, const ptrdiff_t ystride, const int size, const int32_t tc, const uint8_t no_p, const uint8_t no_q)
 
static void FUNC() vvc_loop_filter_chroma (uint8_t *_pix, const ptrdiff_t _xstride, const ptrdiff_t _ystride, const int32_t *_beta, const int32_t *_tc, const uint8_t *_no_p, const uint8_t *_no_q, const uint8_t *_max_len_p, const uint8_t *_max_len_q, const int shift)
 
static void FUNC() vvc_h_loop_filter_chroma (uint8_t *pix, ptrdiff_t stride, const int32_t *beta, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q, const uint8_t *max_len_p, const uint8_t *max_len_q, int shift)
 
static void FUNC() vvc_v_loop_filter_chroma (uint8_t *pix, ptrdiff_t stride, const int32_t *beta, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q, const uint8_t *max_len_p, const uint8_t *max_len_q, int shift)
 
static void FUNC() vvc_h_loop_filter_luma (uint8_t *pix, ptrdiff_t stride, const int32_t *beta, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q, const uint8_t *max_len_p, const uint8_t *max_len_q, const int hor_ctu_edge)
 
static void FUNC() vvc_v_loop_filter_luma (uint8_t *pix, ptrdiff_t stride, const int32_t *beta, const int32_t *tc, const uint8_t *no_p, const uint8_t *no_q, const uint8_t *max_len_p, const uint8_t *max_len_q, const int hor_ctu_edge)
 
static int FUNC() vvc_loop_ladf_level (const uint8_t *_pix, const ptrdiff_t _xstride, const ptrdiff_t _ystride)
 
static int FUNC() vvc_h_loop_ladf_level (const uint8_t *pix, ptrdiff_t stride)
 
static int FUNC() vvc_v_loop_ladf_level (const uint8_t *pix, ptrdiff_t stride)
 
static void FUNC() ff_vvc_lmcs_dsp_init (VVCLMCSDSPContext *const lmcs)
 
static void FUNC() ff_vvc_lf_dsp_init (VVCLFDSPContext *const lf)
 
static void FUNC() ff_vvc_sao_dsp_init (VVCSAODSPContext *const sao)
 
static void FUNC() ff_vvc_alf_dsp_init (VVCALFDSPContext *const alf)
 

Macro Definition Documentation

◆ ALF_DIR_VERT

#define ALF_DIR_VERT   0

Definition at line 265 of file vvc_filter_template.c.

◆ ALF_DIR_HORZ

#define ALF_DIR_HORZ   1

Definition at line 266 of file vvc_filter_template.c.

◆ ALF_DIR_DIGA0

#define ALF_DIR_DIGA0   2

Definition at line 267 of file vvc_filter_template.c.

◆ ALF_DIR_DIGA1

#define ALF_DIR_DIGA1   3

Definition at line 268 of file vvc_filter_template.c.

◆ P7

#define P7   pix[-8 * xstride]

Definition at line 416 of file vvc_filter_template.c.

◆ P6

#define P6   pix[-7 * xstride]

Definition at line 417 of file vvc_filter_template.c.

◆ P5

#define P5   pix[-6 * xstride]

Definition at line 418 of file vvc_filter_template.c.

◆ P4

#define P4   pix[-5 * xstride]

Definition at line 419 of file vvc_filter_template.c.

◆ P3

#define P3   pix[-4 * xstride]

Definition at line 420 of file vvc_filter_template.c.

◆ P2

#define P2   pix[-3 * xstride]

Definition at line 421 of file vvc_filter_template.c.

◆ P1

#define P1   pix[-2 * xstride]

Definition at line 422 of file vvc_filter_template.c.

◆ P0

#define P0   pix[-1 * xstride]

Definition at line 423 of file vvc_filter_template.c.

◆ Q0

#define Q0   pix[0 * xstride]

Definition at line 424 of file vvc_filter_template.c.

◆ Q1

#define Q1   pix[1 * xstride]

Definition at line 425 of file vvc_filter_template.c.

◆ Q2

#define Q2   pix[2 * xstride]

Definition at line 426 of file vvc_filter_template.c.

◆ Q3

#define Q3   pix[3 * xstride]

Definition at line 427 of file vvc_filter_template.c.

◆ Q4

#define Q4   pix[4 * xstride]

Definition at line 428 of file vvc_filter_template.c.

◆ Q5

#define Q5   pix[5 * xstride]

Definition at line 429 of file vvc_filter_template.c.

◆ Q6

#define Q6   pix[6 * xstride]

Definition at line 430 of file vvc_filter_template.c.

◆ Q7

#define Q7   pix[7 * xstride]

Definition at line 431 of file vvc_filter_template.c.

◆ P

#define P (   x)    pix[(-(x)-1) * xstride]

Definition at line 432 of file vvc_filter_template.c.

◆ Q

#define Q (   x)    pix[(x) * xstride]

Definition at line 433 of file vvc_filter_template.c.

◆ TP7

#define TP7   pix[-8 * xstride + 3 * ystride]

Definition at line 436 of file vvc_filter_template.c.

◆ TP6

#define TP6   pix[-7 * xstride + 3 * ystride]

Definition at line 437 of file vvc_filter_template.c.

◆ TP5

#define TP5   pix[-6 * xstride + 3 * ystride]

Definition at line 438 of file vvc_filter_template.c.

◆ TP4

#define TP4   pix[-5 * xstride + 3 * ystride]

Definition at line 439 of file vvc_filter_template.c.

◆ TP3

#define TP3   pix[-4 * xstride + 3 * ystride]

Definition at line 440 of file vvc_filter_template.c.

◆ TP2

#define TP2   pix[-3 * xstride + 3 * ystride]

Definition at line 441 of file vvc_filter_template.c.

◆ TP1

#define TP1   pix[-2 * xstride + 3 * ystride]

Definition at line 442 of file vvc_filter_template.c.

◆ TP0

#define TP0   pix[-1 * xstride + 3 * ystride]

Definition at line 443 of file vvc_filter_template.c.

◆ TQ0

#define TQ0   pix[0 * xstride + 3 * ystride]

Definition at line 444 of file vvc_filter_template.c.

◆ TQ1

#define TQ1   pix[1 * xstride + 3 * ystride]

Definition at line 445 of file vvc_filter_template.c.

◆ TQ2

#define TQ2   pix[2 * xstride + 3 * ystride]

Definition at line 446 of file vvc_filter_template.c.

◆ TQ3

#define TQ3   pix[3 * xstride + 3 * ystride]

Definition at line 447 of file vvc_filter_template.c.

◆ TQ4

#define TQ4   pix[4 * xstride + 3 * ystride]

Definition at line 448 of file vvc_filter_template.c.

◆ TQ5

#define TQ5   pix[5 * xstride + 3 * ystride]

Definition at line 449 of file vvc_filter_template.c.

◆ TQ6

#define TQ6   pix[6 * xstride + 3 * ystride]

Definition at line 450 of file vvc_filter_template.c.

◆ TQ7

#define TQ7   pix[7 * xstride + 3 * ystride]

Definition at line 451 of file vvc_filter_template.c.

◆ TP

#define TP (   x)    pix[(-(x)-1) * xstride + 3 * ystride]

Definition at line 452 of file vvc_filter_template.c.

◆ TQ

#define TQ (   x)    pix[(x) * xstride + 3 * ystride]

Definition at line 453 of file vvc_filter_template.c.

◆ FP3

#define FP3   pix[-4 * xstride + 1 * ystride]

Definition at line 455 of file vvc_filter_template.c.

◆ FP2

#define FP2   pix[-3 * xstride + 1 * ystride]

Definition at line 456 of file vvc_filter_template.c.

◆ FP1

#define FP1   pix[-2 * xstride + 1 * ystride]

Definition at line 457 of file vvc_filter_template.c.

◆ FP0

#define FP0   pix[-1 * xstride + 1 * ystride]

Definition at line 458 of file vvc_filter_template.c.

◆ FQ0

#define FQ0   pix[0 * xstride + 1 * ystride]

Definition at line 459 of file vvc_filter_template.c.

◆ FQ1

#define FQ1   pix[1 * xstride + 1 * ystride]

Definition at line 460 of file vvc_filter_template.c.

◆ FQ2

#define FQ2   pix[2 * xstride + 1 * ystride]

Definition at line 461 of file vvc_filter_template.c.

◆ FQ3

#define FQ3   pix[3 * xstride + 1 * ystride]

Definition at line 462 of file vvc_filter_template.c.

Function Documentation

◆ lmcs_filter_luma()

static void FUNC() lmcs_filter_luma ( uint8_t *  _dst,
ptrdiff_t  dst_stride,
const int  width,
const int  height,
const void *  _lut 
)
static

Definition at line 25 of file vvc_filter_template.c.

Referenced by ff_vvc_lmcs_dsp_init().

◆ alf_clip()

static av_always_inline int16_t FUNC() alf_clip ( pixel  curr,
pixel  v0,
pixel  v1,
int16_t  clip 
)
static

Definition at line 38 of file vvc_filter_template.c.

Referenced by alf_filter_chroma(), and alf_filter_luma().

◆ alf_filter_luma()

static void FUNC() alf_filter_luma ( uint8_t *  _dst,
ptrdiff_t  dst_stride,
const uint8_t *  _src,
ptrdiff_t  src_stride,
const int  width,
const int  height,
const int16_t *  filter,
const int16_t *  clip,
const int  vb_pos 
)
static

Definition at line 43 of file vvc_filter_template.c.

Referenced by ff_vvc_alf_dsp_init().

◆ alf_filter_chroma()

static void FUNC() alf_filter_chroma ( uint8_t *  _dst,
ptrdiff_t  dst_stride,
const uint8_t *  _src,
ptrdiff_t  src_stride,
const int  width,
const int  height,
const int16_t *  filter,
const int16_t *  clip,
const int  vb_pos 
)
static

Definition at line 137 of file vvc_filter_template.c.

Referenced by ff_vvc_alf_dsp_init().

◆ alf_filter_cc()

static void FUNC() alf_filter_cc ( uint8_t *  _dst,
ptrdiff_t  dst_stride,
const uint8_t *  _luma,
const ptrdiff_t  luma_stride,
const int  width,
const int  height,
const int  hs,
const int  vs,
const int16_t *  filter,
const int  vb_pos 
)
static

Definition at line 223 of file vvc_filter_template.c.

Referenced by ff_vvc_alf_dsp_init().

◆ alf_get_idx()

static void FUNC() alf_get_idx ( int class_idx,
int transpose_idx,
const int sum,
const int  ac 
)
static

Definition at line 270 of file vvc_filter_template.c.

Referenced by alf_classify().

◆ alf_classify()

static void FUNC() alf_classify ( int class_idx,
int transpose_idx,
const uint8_t *  _src,
const ptrdiff_t  _src_stride,
const int  width,
const int  height,
const int  vb_pos,
int gradient_tmp 
)
static

Definition at line 299 of file vvc_filter_template.c.

Referenced by ff_vvc_alf_dsp_init().

◆ alf_recon_coeff_and_clip()

static void FUNC() alf_recon_coeff_and_clip ( int16_t *  coeff,
int16_t *  clip,
const int class_idx,
const int transpose_idx,
const int  size,
const int16_t *  coeff_set,
const uint8_t *  clip_idx_set,
const uint8_t *  class_to_filt 
)
static

Definition at line 383 of file vvc_filter_template.c.

Referenced by ff_vvc_alf_dsp_init().

◆ loop_filter_luma_large()

static void FUNC() loop_filter_luma_large ( pixel pix,
const ptrdiff_t  xstride,
const ptrdiff_t  ystride,
const int32_t  tc,
const uint8_t  no_p,
const uint8_t  no_q,
const uint8_t  max_len_p,
const uint8_t  max_len_q 
)
static

Definition at line 466 of file vvc_filter_template.c.

Referenced by vvc_loop_filter_luma().

◆ vvc_loop_filter_luma()

static void FUNC() vvc_loop_filter_luma ( uint8_t *  _pix,
ptrdiff_t  _xstride,
ptrdiff_t  _ystride,
const int32_t _beta,
const int32_t _tc,
const uint8_t *  _no_p,
const uint8_t *  _no_q,
const uint8_t *  _max_len_p,
const uint8_t *  _max_len_q,
const int  hor_ctu_edge 
)
static

Definition at line 546 of file vvc_filter_template.c.

Referenced by vvc_h_loop_filter_luma(), and vvc_v_loop_filter_luma().

◆ loop_filter_chroma_strong()

static void FUNC() loop_filter_chroma_strong ( pixel pix,
const ptrdiff_t  xstride,
const ptrdiff_t  ystride,
const int  size,
const int32_t  tc,
const uint8_t  no_p,
const uint8_t  no_q 
)
static

Definition at line 633 of file vvc_filter_template.c.

Referenced by vvc_loop_filter_chroma().

◆ loop_filter_chroma_strong_one_side()

static void FUNC() loop_filter_chroma_strong_one_side ( pixel pix,
const ptrdiff_t  xstride,
const ptrdiff_t  ystride,
const int  size,
const int32_t  tc,
const uint8_t  no_p,
const uint8_t  no_q 
)
static

Definition at line 659 of file vvc_filter_template.c.

Referenced by vvc_loop_filter_chroma().

◆ vvc_loop_filter_chroma()

static void FUNC() vvc_loop_filter_chroma ( uint8_t *  _pix,
const ptrdiff_t  _xstride,
const ptrdiff_t  _ystride,
const int32_t _beta,
const int32_t _tc,
const uint8_t *  _no_p,
const uint8_t *  _no_q,
const uint8_t *  _max_len_p,
const uint8_t *  _max_len_q,
const int  shift 
)
static

Definition at line 681 of file vvc_filter_template.c.

Referenced by vvc_h_loop_filter_chroma(), and vvc_v_loop_filter_chroma().

◆ vvc_h_loop_filter_chroma()

static void FUNC() vvc_h_loop_filter_chroma ( uint8_t *  pix,
ptrdiff_t  stride,
const int32_t beta,
const int32_t tc,
const uint8_t *  no_p,
const uint8_t *  no_q,
const uint8_t *  max_len_p,
const uint8_t *  max_len_q,
int  shift 
)
static

Definition at line 756 of file vvc_filter_template.c.

Referenced by ff_vvc_lf_dsp_init().

◆ vvc_v_loop_filter_chroma()

static void FUNC() vvc_v_loop_filter_chroma ( uint8_t *  pix,
ptrdiff_t  stride,
const int32_t beta,
const int32_t tc,
const uint8_t *  no_p,
const uint8_t *  no_q,
const uint8_t *  max_len_p,
const uint8_t *  max_len_q,
int  shift 
)
static

Definition at line 764 of file vvc_filter_template.c.

Referenced by ff_vvc_lf_dsp_init().

◆ vvc_h_loop_filter_luma()

static void FUNC() vvc_h_loop_filter_luma ( uint8_t *  pix,
ptrdiff_t  stride,
const int32_t beta,
const int32_t tc,
const uint8_t *  no_p,
const uint8_t *  no_q,
const uint8_t *  max_len_p,
const uint8_t *  max_len_q,
const int  hor_ctu_edge 
)
static

Definition at line 772 of file vvc_filter_template.c.

Referenced by ff_vvc_lf_dsp_init().

◆ vvc_v_loop_filter_luma()

static void FUNC() vvc_v_loop_filter_luma ( uint8_t *  pix,
ptrdiff_t  stride,
const int32_t beta,
const int32_t tc,
const uint8_t *  no_p,
const uint8_t *  no_q,
const uint8_t *  max_len_p,
const uint8_t *  max_len_q,
const int  hor_ctu_edge 
)
static

Definition at line 780 of file vvc_filter_template.c.

Referenced by ff_vvc_lf_dsp_init().

◆ vvc_loop_ladf_level()

static int FUNC() vvc_loop_ladf_level ( const uint8_t *  _pix,
const ptrdiff_t  _xstride,
const ptrdiff_t  _ystride 
)
static

Definition at line 788 of file vvc_filter_template.c.

Referenced by vvc_h_loop_ladf_level(), and vvc_v_loop_ladf_level().

◆ vvc_h_loop_ladf_level()

static int FUNC() vvc_h_loop_ladf_level ( const uint8_t *  pix,
ptrdiff_t  stride 
)
static

Definition at line 796 of file vvc_filter_template.c.

Referenced by ff_vvc_lf_dsp_init().

◆ vvc_v_loop_ladf_level()

static int FUNC() vvc_v_loop_ladf_level ( const uint8_t *  pix,
ptrdiff_t  stride 
)
static

Definition at line 801 of file vvc_filter_template.c.

Referenced by ff_vvc_lf_dsp_init().

◆ ff_vvc_lmcs_dsp_init()

static void FUNC() ff_vvc_lmcs_dsp_init ( VVCLMCSDSPContext *const  lmcs)
static

Definition at line 840 of file vvc_filter_template.c.

◆ ff_vvc_lf_dsp_init()

static void FUNC() ff_vvc_lf_dsp_init ( VVCLFDSPContext *const  lf)
static

Definition at line 845 of file vvc_filter_template.c.

◆ ff_vvc_sao_dsp_init()

static void FUNC() ff_vvc_sao_dsp_init ( VVCSAODSPContext *const  sao)
static

Definition at line 855 of file vvc_filter_template.c.

◆ ff_vvc_alf_dsp_init()

static void FUNC() ff_vvc_alf_dsp_init ( VVCALFDSPContext *const  alf)
static

Definition at line 865 of file vvc_filter_template.c.