FFmpeg
Macros | Typedefs | Functions | Variables
filter.c File Reference
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
#include "ctu.h"
#include "data.h"
#include "filter.h"
#include "refs.h"

Go to the source code of this file.

Macros

#define LEFT   0
 
#define TOP   1
 
#define RIGHT   2
 
#define BOTTOM   3
 
#define MAX_EDGES   4
 
#define DEFAULT_INTRA_TC_OFFSET   2
 
#define POS(c_idx, x, y)
 
#define MAX_VBBS   4
 
#define TAB_BS(t, x, y)   (t)[((y) >> MIN_TU_LOG2) * (fc->ps.pps->min_tu_width) + ((x) >> MIN_TU_LOG2)]
 
#define TAB_MAX_LEN(t, x, y)   (t)[((y) >> MIN_TU_LOG2) * (fc->ps.pps->min_tu_width) + ((x) >> MIN_TU_LOG2)]
 
#define DEBLOCK_STEP   8
 
#define LUMA_GRID   4
 
#define CHROMA_GRID   8
 
#define TC_CALC(qp, bs)
 
#define ALF_MAX_BLOCKS_IN_CTU   (MAX_CTU_SIZE * MAX_CTU_SIZE / ALF_BLOCK_SIZE / ALF_BLOCK_SIZE)
 
#define ALF_MAX_FILTER_SIZE   (ALF_MAX_BLOCKS_IN_CTU * ALF_NUM_COEFF_LUMA)
 

Typedefs

typedef void(* deblock_bs_fn) (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height, const int rs, const int vertical)
 

Functions

static int get_virtual_boundary (const VVCFrameContext *fc, const int ctu_pos, const int vertical)
 
static int is_virtual_boundary (const VVCFrameContext *fc, const int pos, const int vertical)
 
static int get_qPc (const VVCFrameContext *fc, const int x0, const int y0, const int chroma)
 
static void copy_ctb (uint8_t *dst, const uint8_t *src, const int width, const int height, const ptrdiff_t dst_stride, const ptrdiff_t src_stride)
 
static void copy_pixel (uint8_t *dst, const uint8_t *src, const int pixel_shift)
 
static void copy_vert (uint8_t *dst, const uint8_t *src, const int pixel_shift, const int height, const ptrdiff_t dst_stride, const ptrdiff_t src_stride)
 
static void copy_ctb_to_hv (VVCFrameContext *fc, const uint8_t *src, const ptrdiff_t src_stride, const int x, const int y, const int width, const int height, const int c_idx, const int rx, const int ry, const int top)
 
static void sao_copy_ctb_to_hv (VVCLocalContext *lc, const int rx, const int ry, const int top)
 
void ff_vvc_sao_copy_ctb_to_hv (VVCLocalContext *lc, const int rx, const int ry, const int last_row)
 
static int sao_can_cross_slices (const VVCFrameContext *fc, const int rx, const int ry, const int dx, const int dy)
 
static void sao_get_edges (uint8_t vert_edge[2], uint8_t horiz_edge[2], uint8_t diag_edge[4], int *restore, const VVCLocalContext *lc, const int edges[4], const int rx, const int ry)
 
static void sao_copy_hor (uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, const ptrdiff_t src_stride, const int width, const int edges[4], const int ps)
 
static void sao_extends_edges (uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, const ptrdiff_t src_stride, const int width, const int height, const VVCFrameContext *fc, const int x0, const int y0, const int rx, const int ry, const int edges[4], const int c_idx)
 
static void sao_restore_vb (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, const int width, const int height, const int vb_pos, const int ps, const int vertical)
 
void ff_vvc_sao_filter (VVCLocalContext *lc, int x0, int y0)
 sao filter for the CTU More...
 
static int boundary_strength (const VVCLocalContext *lc, const MvField *curr, const MvField *neigh, const RefPicList *neigh_rpl)
 
static void derive_max_filter_length_luma (const VVCFrameContext *fc, const int qx, const int qy, const int size_q, const int has_subblock, const int vertical, uint8_t *max_len_p, uint8_t *max_len_q)
 
static void vvc_deblock_subblock_bs (const VVCLocalContext *lc, const int cb, int x0, int y0, int width, int height, const int vertical)
 
static av_always_inline int deblock_bs (const VVCLocalContext *lc, const int x_p, const int y_p, const int x_q, const int y_q, const CodingUnit *cu, const TransformUnit *tu, const RefPicList *rpl_p, const int c_idx, const int off_to_cb, const uint8_t has_sub_block)
 
static int deblock_is_boundary (const VVCLocalContext *lc, const int boundary, const int pos, const int rs, const int vertical)
 
static void vvc_deblock_bs_luma (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height, const CodingUnit *cu, const TransformUnit *tu, int rs, const int vertical)
 
static void vvc_deblock_bs_chroma (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height, const CodingUnit *cu, const TransformUnit *tu, const int rs, const int vertical)
 
void ff_vvc_deblock_bs (VVCLocalContext *lc, const int rx, const int ry, const int rs)
 derive boundary strength for the CTU More...
 
static void max_filter_length_luma (const VVCFrameContext *fc, const int qx, const int qy, const int vertical, uint8_t *max_len_p, uint8_t *max_len_q)
 
static void max_filter_length_chroma (const VVCFrameContext *fc, const int qx, const int qy, const int vertical, const int horizontal_ctu_edge, const int bs, uint8_t *max_len_p, uint8_t *max_len_q)
 
static void max_filter_length (const VVCFrameContext *fc, const int qx, const int qy, const int c_idx, const int vertical, const int horizontal_ctu_edge, const int bs, uint8_t *max_len_p, uint8_t *max_len_q)
 
static int get_qp_y (const VVCFrameContext *fc, const uint8_t *src, const int x, const int y, const int vertical)
 
static int get_qp_c (const VVCFrameContext *fc, const int x, const int y, const int c_idx, const int vertical)
 
static int get_qp (const VVCFrameContext *fc, const uint8_t *src, const int x, const int y, const int c_idx, const int vertical)
 
static void vvc_deblock (const VVCLocalContext *lc, int x0, int y0, const int rs, const int vertical)
 
void ff_vvc_deblock_vertical (const VVCLocalContext *lc, const int x0, const int y0, const int rs)
 vertical deblock filter for the CTU More...
 
void ff_vvc_deblock_horizontal (const VVCLocalContext *lc, const int x0, const int y0, const int rs)
 horizontal deblock filter for the CTU More...
 
static void alf_copy_border (uint8_t *dst, const uint8_t *src, const int pixel_shift, int width, const int height, const ptrdiff_t dst_stride, const ptrdiff_t src_stride)
 
static void alf_extend_vert (uint8_t *_dst, const uint8_t *_src, const int pixel_shift, const int width, const int height, ptrdiff_t stride)
 
static void alf_extend_horz (uint8_t *dst, const uint8_t *src, const int pixel_shift, int width, const int height, const ptrdiff_t stride)
 
static void alf_copy_ctb_to_hv (VVCFrameContext *fc, const uint8_t *src, const ptrdiff_t src_stride, const int x, const int y, const int width, const int height, const int rx, const int ry, const int c_idx)
 
static void alf_fill_border_h (uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, const ptrdiff_t src_stride, const uint8_t *border, const int width, const int border_pixels, const int ps, const int edge)
 
static void alf_fill_border_v (uint8_t *dst, const ptrdiff_t dst_stride, const uint8_t *src, const uint8_t *border, const int border_pixels, const int height, const int pixel_shift, const int *edges, const int edge)
 
static void alf_prepare_buffer (VVCFrameContext *fc, uint8_t *_dst, const uint8_t *_src, const int x, const int y, const int rx, const int ry, const int width, const int height, const ptrdiff_t dst_stride, const ptrdiff_t src_stride, const int c_idx, const int *edges)
 
static void alf_get_coeff_and_clip (VVCLocalContext *lc, int16_t *coeff, int16_t *clip, const uint8_t *src, ptrdiff_t src_stride, int width, int height, int vb_pos, const ALFParams *alf)
 
static void alf_filter_luma (VVCLocalContext *lc, uint8_t *dst, const uint8_t *src, const ptrdiff_t dst_stride, const ptrdiff_t src_stride, const int x0, const int y0, const int width, const int height, const int _vb_pos, const ALFParams *alf)
 
static int alf_clip_from_idx (const VVCFrameContext *fc, const int idx)
 
static void alf_filter_chroma (VVCLocalContext *lc, uint8_t *dst, const uint8_t *src, const ptrdiff_t dst_stride, const ptrdiff_t src_stride, const int c_idx, const int width, const int height, const int vb_pos, const ALFParams *alf)
 
static void alf_filter_cc (VVCLocalContext *lc, uint8_t *dst, const uint8_t *luma, const ptrdiff_t dst_stride, const ptrdiff_t luma_stride, const int c_idx, const int width, const int height, const int hs, const int vs, const int vb_pos, const ALFParams *alf)
 
void ff_vvc_alf_copy_ctu_to_hv (VVCLocalContext *lc, const int x0, const int y0)
 
static void alf_get_edges (const VVCLocalContext *lc, int edges[MAX_EDGES], const int rx, const int ry)
 
static void alf_init_subblock (VVCRect *sb, int sb_edges[MAX_EDGES], const VVCRect *b, const int edges[MAX_EDGES])
 
static void alf_get_subblock (VVCRect *sb, int edges[MAX_EDGES], const int bx, const int by, const int vb_pos[2], const int has_vb[2])
 
static void alf_get_subblocks (const VVCLocalContext *lc, VVCRect sbs[MAX_VBBS], int sb_edges[MAX_VBBS][MAX_EDGES], int *nb_sbs, const int x0, const int y0, const int rx, const int ry)
 
void ff_vvc_alf_filter (VVCLocalContext *lc, const int x0, const int y0)
 alf filter for the CTU More...
 
void ff_vvc_lmcs_filter (const VVCLocalContext *lc, const int x, const int y)
 lmcs filter for the CTU More...
 

Variables

static const uint16_t tctable [66]
 
static const uint8_t betatable [64]
 

Macro Definition Documentation

◆ LEFT

#define LEFT   0

Definition at line 30 of file filter.c.

◆ TOP

#define TOP   1

Definition at line 31 of file filter.c.

◆ RIGHT

#define RIGHT   2

Definition at line 32 of file filter.c.

◆ BOTTOM

#define BOTTOM   3

Definition at line 33 of file filter.c.

◆ MAX_EDGES

#define MAX_EDGES   4

Definition at line 34 of file filter.c.

◆ DEFAULT_INTRA_TC_OFFSET

#define DEFAULT_INTRA_TC_OFFSET   2

Definition at line 36 of file filter.c.

◆ POS

#define POS (   c_idx,
  x,
 
)
Value:
&fc->frame->data[c_idx][((y) >> fc->ps.sps->vshift[c_idx]) * fc->frame->linesize[c_idx] + \
(((x) >> fc->ps.sps->hshift[c_idx]) << fc->ps.sps->pixel_shift)]

Definition at line 38 of file filter.c.

◆ MAX_VBBS

#define MAX_VBBS   4

Definition at line 60 of file filter.c.

◆ TAB_BS

#define TAB_BS (   t,
  x,
 
)    (t)[((y) >> MIN_TU_LOG2) * (fc->ps.pps->min_tu_width) + ((x) >> MIN_TU_LOG2)]

Definition at line 375 of file filter.c.

◆ TAB_MAX_LEN

#define TAB_MAX_LEN (   t,
  x,
 
)    (t)[((y) >> MIN_TU_LOG2) * (fc->ps.pps->min_tu_width) + ((x) >> MIN_TU_LOG2)]

Definition at line 376 of file filter.c.

◆ DEBLOCK_STEP

#define DEBLOCK_STEP   8

Definition at line 379 of file filter.c.

◆ LUMA_GRID

#define LUMA_GRID   4

Definition at line 380 of file filter.c.

◆ CHROMA_GRID

#define CHROMA_GRID   8

Definition at line 381 of file filter.c.

◆ TC_CALC

#define TC_CALC (   qp,
  bs 
)
Value:
tctable[av_clip((qp) + DEFAULT_INTRA_TC_OFFSET * ((bs) - 1) + \
(tc_offset & -2), \

Definition at line 735 of file filter.c.

◆ ALF_MAX_BLOCKS_IN_CTU

#define ALF_MAX_BLOCKS_IN_CTU   (MAX_CTU_SIZE * MAX_CTU_SIZE / ALF_BLOCK_SIZE / ALF_BLOCK_SIZE)

Definition at line 980 of file filter.c.

◆ ALF_MAX_FILTER_SIZE

#define ALF_MAX_FILTER_SIZE   (ALF_MAX_BLOCKS_IN_CTU * ALF_NUM_COEFF_LUMA)

Definition at line 981 of file filter.c.

Typedef Documentation

◆ deblock_bs_fn

typedef void(* deblock_bs_fn) (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height, const int rs, const int vertical)

Definition at line 671 of file filter.c.

Function Documentation

◆ get_virtual_boundary()

static int get_virtual_boundary ( const VVCFrameContext fc,
const int  ctu_pos,
const int  vertical 
)
static

Definition at line 62 of file filter.c.

Referenced by alf_get_subblocks(), ff_vvc_sao_filter(), and is_virtual_boundary().

◆ is_virtual_boundary()

static int is_virtual_boundary ( const VVCFrameContext fc,
const int  pos,
const int  vertical 
)
static

◆ get_qPc()

static int get_qPc ( const VVCFrameContext fc,
const int  x0,
const int  y0,
const int  chroma 
)
static

Definition at line 85 of file filter.c.

Referenced by get_qp_c().

◆ copy_ctb()

static void copy_ctb ( uint8_t *  dst,
const uint8_t *  src,
const int  width,
const int  height,
const ptrdiff_t  dst_stride,
const ptrdiff_t  src_stride 
)
static

Definition at line 93 of file filter.c.

Referenced by alf_prepare_buffer(), and sao_extends_edges().

◆ copy_pixel()

static void copy_pixel ( uint8_t *  dst,
const uint8_t *  src,
const int  pixel_shift 
)
static

Definition at line 104 of file filter.c.

Referenced by sao_copy_hor().

◆ copy_vert()

static void copy_vert ( uint8_t *  dst,
const uint8_t *  src,
const int  pixel_shift,
const int  height,
const ptrdiff_t  dst_stride,
const ptrdiff_t  src_stride 
)
static

Definition at line 112 of file filter.c.

Referenced by copy_ctb_to_hv(), and sao_extends_edges().

◆ copy_ctb_to_hv()

static void copy_ctb_to_hv ( VVCFrameContext fc,
const uint8_t *  src,
const ptrdiff_t  src_stride,
const int  x,
const int  y,
const int  width,
const int  height,
const int  c_idx,
const int  rx,
const int  ry,
const int  top 
)
static

Definition at line 131 of file filter.c.

Referenced by sao_copy_ctb_to_hv().

◆ sao_copy_ctb_to_hv()

static void sao_copy_ctb_to_hv ( VVCLocalContext lc,
const int  rx,
const int  ry,
const int  top 
)
static

Definition at line 154 of file filter.c.

Referenced by ff_vvc_sao_copy_ctb_to_hv().

◆ ff_vvc_sao_copy_ctb_to_hv()

void ff_vvc_sao_copy_ctb_to_hv ( VVCLocalContext lc,
const int  rx,
const int  ry,
const int  last_row 
)

Definition at line 174 of file filter.c.

Referenced by run_deblock_h().

◆ sao_can_cross_slices()

static int sao_can_cross_slices ( const VVCFrameContext fc,
const int  rx,
const int  ry,
const int  dx,
const int  dy 
)
static

Definition at line 185 of file filter.c.

Referenced by sao_get_edges().

◆ sao_get_edges()

static void sao_get_edges ( uint8_t  vert_edge[2],
uint8_t  horiz_edge[2],
uint8_t  diag_edge[4],
int *  restore,
const VVCLocalContext lc,
const int  edges[4],
const int  rx,
const int  ry 
)
static

Definition at line 192 of file filter.c.

Referenced by ff_vvc_sao_filter().

◆ sao_copy_hor()

static void sao_copy_hor ( uint8_t *  dst,
const ptrdiff_t  dst_stride,
const uint8_t *  src,
const ptrdiff_t  src_stride,
const int  width,
const int  edges[4],
const int  ps 
)
static

Definition at line 248 of file filter.c.

Referenced by sao_extends_edges().

◆ sao_extends_edges()

static void sao_extends_edges ( uint8_t *  dst,
const ptrdiff_t  dst_stride,
const uint8_t *  src,
const ptrdiff_t  src_stride,
const int  width,
const int  height,
const VVCFrameContext fc,
const int  x0,
const int  y0,
const int  rx,
const int  ry,
const int  edges[4],
const int  c_idx 
)
static

Definition at line 269 of file filter.c.

Referenced by ff_vvc_sao_filter().

◆ sao_restore_vb()

static void sao_restore_vb ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
const int  width,
const int  height,
const int  vb_pos,
const int  ps,
const int  vertical 
)
static

Definition at line 296 of file filter.c.

Referenced by ff_vvc_sao_filter().

◆ ff_vvc_sao_filter()

void ff_vvc_sao_filter ( VVCLocalContext lc,
const int  x0,
const int  y0 
)

sao filter for the CTU

Parameters
lclocal context for CTU
x0x position for the CTU
y0y position for the CTU

Definition at line 314 of file filter.c.

Referenced by run_sao().

◆ boundary_strength()

static int boundary_strength ( const VVCLocalContext lc,
const MvField curr,
const MvField neigh,
const RefPicList neigh_rpl 
)
static

Definition at line 383 of file filter.c.

Referenced by deblock_bs(), and vvc_deblock_subblock_bs().

◆ derive_max_filter_length_luma()

static void derive_max_filter_length_luma ( const VVCFrameContext fc,
const int  qx,
const int  qy,
const int  size_q,
const int  has_subblock,
const int  vertical,
uint8_t *  max_len_p,
uint8_t *  max_len_q 
)
static

Definition at line 453 of file filter.c.

Referenced by vvc_deblock_bs_luma().

◆ vvc_deblock_subblock_bs()

static void vvc_deblock_subblock_bs ( const VVCLocalContext lc,
const int  cb,
int  x0,
int  y0,
int  width,
int  height,
const int  vertical 
)
static

Definition at line 478 of file filter.c.

Referenced by vvc_deblock_bs_luma().

◆ deblock_bs()

static av_always_inline int deblock_bs ( const VVCLocalContext lc,
const int  x_p,
const int  y_p,
const int  x_q,
const int  y_q,
const CodingUnit cu,
const TransformUnit tu,
const RefPicList rpl_p,
const int  c_idx,
const int  off_to_cb,
const uint8_t  has_sub_block 
)
static

Definition at line 527 of file filter.c.

Referenced by vvc_deblock_bs_chroma(), and vvc_deblock_bs_luma().

◆ deblock_is_boundary()

static int deblock_is_boundary ( const VVCLocalContext lc,
const int  boundary,
const int  pos,
const int  rs,
const int  vertical 
)
static

Definition at line 575 of file filter.c.

Referenced by vvc_deblock_bs_chroma(), and vvc_deblock_bs_luma().

◆ vvc_deblock_bs_luma()

static void vvc_deblock_bs_luma ( const VVCLocalContext lc,
const int  x0,
const int  y0,
const int  width,
const int  height,
const CodingUnit cu,
const TransformUnit tu,
int  rs,
const int  vertical 
)
static

Definition at line 606 of file filter.c.

Referenced by ff_vvc_deblock_bs().

◆ vvc_deblock_bs_chroma()

static void vvc_deblock_bs_chroma ( const VVCLocalContext lc,
const int  x0,
const int  y0,
const int  width,
const int  height,
const CodingUnit cu,
const TransformUnit tu,
const int  rs,
const int  vertical 
)
static

Definition at line 646 of file filter.c.

Referenced by ff_vvc_deblock_bs().

◆ ff_vvc_deblock_bs()

void ff_vvc_deblock_bs ( VVCLocalContext lc,
const int  rx,
const int  ry,
const int  rs 
)

derive boundary strength for the CTU

Parameters
lclocal context for CTU
rxraster x position for the CTU
ryraster y position for the CTU
rsraster position for the CTU

Definition at line 674 of file filter.c.

Referenced by run_deblock_bs().

◆ max_filter_length_luma()

static void max_filter_length_luma ( const VVCFrameContext fc,
const int  qx,
const int  qy,
const int  vertical,
uint8_t *  max_len_p,
uint8_t *  max_len_q 
)
static

Definition at line 699 of file filter.c.

Referenced by max_filter_length().

◆ max_filter_length_chroma()

static void max_filter_length_chroma ( const VVCFrameContext fc,
const int  qx,
const int  qy,
const int  vertical,
const int  horizontal_ctu_edge,
const int  bs,
uint8_t *  max_len_p,
uint8_t *  max_len_q 
)
static

Definition at line 707 of file filter.c.

Referenced by max_filter_length().

◆ max_filter_length()

static void max_filter_length ( const VVCFrameContext fc,
const int  qx,
const int  qy,
const int  c_idx,
const int  vertical,
const int  horizontal_ctu_edge,
const int  bs,
uint8_t *  max_len_p,
uint8_t *  max_len_q 
)
static

Definition at line 726 of file filter.c.

Referenced by vvc_deblock().

◆ get_qp_y()

static int get_qp_y ( const VVCFrameContext fc,
const uint8_t *  src,
const int  x,
const int  y,
const int  vertical 
)
static

Definition at line 741 of file filter.c.

Referenced by get_qp().

◆ get_qp_c()

static int get_qp_c ( const VVCFrameContext fc,
const int  x,
const int  y,
const int  c_idx,
const int  vertical 
)
static

Definition at line 760 of file filter.c.

Referenced by get_qp().

◆ get_qp()

static int get_qp ( const VVCFrameContext fc,
const uint8_t *  src,
const int  x,
const int  y,
const int  c_idx,
const int  vertical 
)
static

Definition at line 766 of file filter.c.

Referenced by vvc_deblock().

◆ vvc_deblock()

static void vvc_deblock ( const VVCLocalContext lc,
int  x0,
int  y0,
const int  rs,
const int  vertical 
)
static

Definition at line 773 of file filter.c.

Referenced by ff_vvc_deblock_horizontal(), and ff_vvc_deblock_vertical().

◆ ff_vvc_deblock_vertical()

void ff_vvc_deblock_vertical ( const VVCLocalContext lc,
int  x0,
int  y0,
int  rs 
)

vertical deblock filter for the CTU

Parameters
lclocal context for CTU
x0x position for the CTU
y0y position for the CTU
rsraster position for the CTU

Definition at line 836 of file filter.c.

Referenced by run_deblock_v().

◆ ff_vvc_deblock_horizontal()

void ff_vvc_deblock_horizontal ( const VVCLocalContext lc,
int  x0,
int  y0,
int  rs 
)

horizontal deblock filter for the CTU

Parameters
lclocal context for CTU
x0x position for the CTU
y0y position for the CTU
rsraster position for the CTU

Definition at line 841 of file filter.c.

Referenced by run_deblock_h().

◆ alf_copy_border()

static void alf_copy_border ( uint8_t *  dst,
const uint8_t *  src,
const int  pixel_shift,
int  width,
const int  height,
const ptrdiff_t  dst_stride,
const ptrdiff_t  src_stride 
)
static

Definition at line 846 of file filter.c.

Referenced by alf_copy_ctb_to_hv(), alf_fill_border_h(), and alf_fill_border_v().

◆ alf_extend_vert()

static void alf_extend_vert ( uint8_t *  _dst,
const uint8_t *  _src,
const int  pixel_shift,
const int  width,
const int  height,
ptrdiff_t  stride 
)
static

Definition at line 857 of file filter.c.

Referenced by alf_fill_border_v().

◆ alf_extend_horz()

static void alf_extend_horz ( uint8_t *  dst,
const uint8_t *  src,
const int  pixel_shift,
int  width,
const int  height,
const ptrdiff_t  stride 
)
static

Definition at line 880 of file filter.c.

Referenced by alf_fill_border_h(), and alf_fill_border_v().

◆ alf_copy_ctb_to_hv()

static void alf_copy_ctb_to_hv ( VVCFrameContext fc,
const uint8_t *  src,
const ptrdiff_t  src_stride,
const int  x,
const int  y,
const int  width,
const int  height,
const int  rx,
const int  ry,
const int  c_idx 
)
static

Definition at line 890 of file filter.c.

Referenced by ff_vvc_alf_copy_ctu_to_hv().

◆ alf_fill_border_h()

static void alf_fill_border_h ( uint8_t *  dst,
const ptrdiff_t  dst_stride,
const uint8_t *  src,
const ptrdiff_t  src_stride,
const uint8_t *  border,
const int  width,
const int  border_pixels,
const int  ps,
const int  edge 
)
static

Definition at line 912 of file filter.c.

Referenced by alf_prepare_buffer().

◆ alf_fill_border_v()

static void alf_fill_border_v ( uint8_t *  dst,
const ptrdiff_t  dst_stride,
const uint8_t *  src,
const uint8_t *  border,
const int  border_pixels,
const int  height,
const int  pixel_shift,
const int *  edges,
const int  edge 
)
static

Definition at line 921 of file filter.c.

Referenced by alf_prepare_buffer().

◆ alf_prepare_buffer()

static void alf_prepare_buffer ( VVCFrameContext fc,
uint8_t *  _dst,
const uint8_t *  _src,
const int  x,
const int  y,
const int  rx,
const int  ry,
const int  width,
const int  height,
const ptrdiff_t  dst_stride,
const ptrdiff_t  src_stride,
const int  c_idx,
const int *  edges 
)
static

Definition at line 946 of file filter.c.

Referenced by ff_vvc_alf_filter().

◆ alf_get_coeff_and_clip()

static void alf_get_coeff_and_clip ( VVCLocalContext lc,
int16_t *  coeff,
int16_t *  clip,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  width,
int  height,
int  vb_pos,
const ALFParams alf 
)
static

Definition at line 983 of file filter.c.

Referenced by alf_filter_luma().

◆ alf_filter_luma()

static void alf_filter_luma ( VVCLocalContext lc,
uint8_t *  dst,
const uint8_t *  src,
const ptrdiff_t  dst_stride,
const ptrdiff_t  src_stride,
const int  x0,
const int  y0,
const int  width,
const int  height,
const int  _vb_pos,
const ALFParams alf 
)
static

Definition at line 1013 of file filter.c.

Referenced by ff_vvc_alf_filter().

◆ alf_clip_from_idx()

static int alf_clip_from_idx ( const VVCFrameContext fc,
const int  idx 
)
static

Definition at line 1029 of file filter.c.

Referenced by alf_filter_chroma().

◆ alf_filter_chroma()

static void alf_filter_chroma ( VVCLocalContext lc,
uint8_t *  dst,
const uint8_t *  src,
const ptrdiff_t  dst_stride,
const ptrdiff_t  src_stride,
const int  c_idx,
const int  width,
const int  height,
const int  vb_pos,
const ALFParams alf 
)
static

Definition at line 1037 of file filter.c.

Referenced by ff_vvc_alf_filter().

◆ alf_filter_cc()

static void alf_filter_cc ( VVCLocalContext lc,
uint8_t *  dst,
const uint8_t *  luma,
const ptrdiff_t  dst_stride,
const ptrdiff_t  luma_stride,
const int  c_idx,
const int  width,
const int  height,
const int  hs,
const int  vs,
const int  vb_pos,
const ALFParams alf 
)
static

Definition at line 1054 of file filter.c.

Referenced by ff_vvc_alf_filter().

◆ ff_vvc_alf_copy_ctu_to_hv()

void ff_vvc_alf_copy_ctu_to_hv ( VVCLocalContext lc,
const int  x0,
const int  y0 
)

Definition at line 1071 of file filter.c.

Referenced by run_sao().

◆ alf_get_edges()

static void alf_get_edges ( const VVCLocalContext lc,
int  edges[MAX_EDGES],
const int  rx,
const int  ry 
)
static

Definition at line 1094 of file filter.c.

Referenced by alf_get_subblocks().

◆ alf_init_subblock()

static void alf_init_subblock ( VVCRect sb,
int  sb_edges[MAX_EDGES],
const VVCRect b,
const int  edges[MAX_EDGES] 
)
static

Definition at line 1132 of file filter.c.

Referenced by alf_get_subblocks().

◆ alf_get_subblock()

static void alf_get_subblock ( VVCRect sb,
int  edges[MAX_EDGES],
const int  bx,
const int  by,
const int  vb_pos[2],
const int  has_vb[2] 
)
static

Definition at line 1138 of file filter.c.

Referenced by alf_get_subblocks().

◆ alf_get_subblocks()

static void alf_get_subblocks ( const VVCLocalContext lc,
VVCRect  sbs[MAX_VBBS],
int  sb_edges[MAX_VBBS][MAX_EDGES],
int *  nb_sbs,
const int  x0,
const int  y0,
const int  rx,
const int  ry 
)
static

Definition at line 1151 of file filter.c.

Referenced by ff_vvc_alf_filter().

◆ ff_vvc_alf_filter()

void ff_vvc_alf_filter ( VVCLocalContext lc,
const int  x0,
const int  y0 
)

alf filter for the CTU

Parameters
lclocal context for CTU
x0x position for the CTU
y0y position for the CTU

Definition at line 1175 of file filter.c.

Referenced by run_alf().

◆ ff_vvc_lmcs_filter()

void ff_vvc_lmcs_filter ( const VVCLocalContext lc,
const int  x0,
const int  y0 
)

lmcs filter for the CTU

Parameters
lclocal context for CTU
x0x position for the CTU
y0y position for the CTU

Definition at line 1230 of file filter.c.

Referenced by run_lmcs().

Variable Documentation

◆ tctable

const uint16_t tctable[66]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 3, 4, 4, 4, 4, 5, 5, 5, 5, 7, 7, 8, 9, 10,
10, 11, 13, 14, 15, 17, 19, 21, 24, 25, 29, 33, 36, 41, 45, 51,
57, 64, 71, 80, 89, 100, 112, 125, 141, 157, 177, 198, 222, 250, 280, 314,
352, 395,
}

Definition at line 43 of file filter.c.

◆ betatable

const uint8_t betatable[64]
static
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 22, 24,
26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56,
58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88,
}

Definition at line 52 of file filter.c.

Referenced by vvc_deblock().

av_clip
#define av_clip
Definition: common.h:100
DEFAULT_INTRA_TC_OFFSET
#define DEFAULT_INTRA_TC_OFFSET
Definition: filter.c:36
fc
#define fc(width, name, range_min, range_max)
Definition: cbs_av1.c:472
tctable
static const uint16_t tctable[66]
Definition: filter.c:43
MAX_QP
#define MAX_QP
Definition: hevcdec.h:50