FFmpeg
|
#include "libavutil/frame.h"
#include "vvc_ctu.h"
#include "vvc_data.h"
#include "vvc_filter.h"
#include "vvc_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 | TAB_BS(t, x, y) (t)[((y) >> 2) * (fc->tab.sz.bs_width) + ((x) >> 2)] |
#define | TAB_MAX_LEN(t, x, y) (t)[((y) >> 2) * (fc->tab.sz.bs_width) + ((x) >> 2)] |
#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) |
Functions | |
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 x_ctb, const int y_ctb, 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) |
void | ff_vvc_sao_filter (VVCLocalContext *lc, int x, int y) |
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 is_intra, const int has_subblock, const int vertical, uint8_t *max_len_p, uint8_t *max_len_q) |
static void | vvc_deblock_subblock_bs_vertical (const VVCLocalContext *lc, const int cb_x, const int cb_y, const int x0, const int y0, const int width, const int height) |
static void | vvc_deblock_subblock_bs_horizontal (const VVCLocalContext *lc, const int cb_x, const int cb_y, const int x0, const int y0, const int width, const int height) |
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 RefPicList *rpl_p, const int c_idx, const int off_to_cb, const uint8_t has_sub_block) |
static void | vvc_deblock_bs_luma_vertical (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height) |
static void | vvc_deblock_bs_luma_horizontal (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height) |
static void | vvc_deblock_bs_chroma_vertical (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height) |
static void | vvc_deblock_bs_chroma_horizontal (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height) |
static void | vvc_deblock_bs (const VVCLocalContext *lc, const int x0, const int y0, const int vertical) |
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) |
void | ff_vvc_deblock_vertical (const VVCLocalContext *lc, int x0, int y0) |
vertical deblock filter for the CTU More... | |
void | ff_vvc_deblock_horizontal (const VVCLocalContext *lc, int x0, int y0) |
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 x_ctb, const int y_ctb, 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 x_ctb, const int y_ctb, 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, 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, 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, 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, ALFParams *alf) |
void | ff_vvc_alf_copy_ctu_to_hv (VVCLocalContext *lc, const int x0, const int y0) |
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] |
#define LEFT 0 |
Definition at line 29 of file vvc_filter.c.
#define TOP 1 |
Definition at line 30 of file vvc_filter.c.
#define RIGHT 2 |
Definition at line 31 of file vvc_filter.c.
#define BOTTOM 3 |
Definition at line 32 of file vvc_filter.c.
#define MAX_EDGES 4 |
Definition at line 33 of file vvc_filter.c.
#define DEFAULT_INTRA_TC_OFFSET 2 |
Definition at line 35 of file vvc_filter.c.
#define TAB_BS | ( | t, | |
x, | |||
y | |||
) | (t)[((y) >> 2) * (fc->tab.sz.bs_width) + ((x) >> 2)] |
Definition at line 300 of file vvc_filter.c.
#define TAB_MAX_LEN | ( | t, | |
x, | |||
y | |||
) | (t)[((y) >> 2) * (fc->tab.sz.bs_width) + ((x) >> 2)] |
Definition at line 301 of file vvc_filter.c.
#define DEBLOCK_STEP 8 |
Definition at line 304 of file vvc_filter.c.
#define LUMA_GRID 4 |
Definition at line 305 of file vvc_filter.c.
#define CHROMA_GRID 8 |
Definition at line 306 of file vvc_filter.c.
#define TC_CALC | ( | qp, | |
bs | |||
) |
Definition at line 770 of file vvc_filter.c.
#define ALF_MAX_BLOCKS_IN_CTU (MAX_CTU_SIZE * MAX_CTU_SIZE / ALF_BLOCK_SIZE / ALF_BLOCK_SIZE) |
Definition at line 1086 of file vvc_filter.c.
#define ALF_MAX_FILTER_SIZE (ALF_MAX_BLOCKS_IN_CTU * ALF_NUM_COEFF_LUMA) |
Definition at line 1087 of file vvc_filter.c.
typedef void(* deblock_bs_fn) (const VVCLocalContext *lc, const int x0, const int y0, const int width, const int height) |
Definition at line 700 of file vvc_filter.c.
|
static |
Definition at line 54 of file vvc_filter.c.
Referenced by get_qp_c().
|
static |
Definition at line 62 of file vvc_filter.c.
Referenced by alf_prepare_buffer(), and ff_vvc_sao_filter().
|
static |
Definition at line 73 of file vvc_filter.c.
Referenced by ff_vvc_sao_filter().
|
static |
Definition at line 81 of file vvc_filter.c.
Referenced by copy_ctb_to_hv(), and ff_vvc_sao_filter().
|
static |
Definition at line 100 of file vvc_filter.c.
Referenced by sao_copy_ctb_to_hv().
|
static |
Definition at line 123 of file vvc_filter.c.
Referenced by 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 143 of file vvc_filter.c.
Referenced by run_deblock_h().
void ff_vvc_sao_filter | ( | VVCLocalContext * | lc, |
const int | x0, | ||
const int | y0 | ||
) |
|
static |
Definition at line 308 of file vvc_filter.c.
Referenced by deblock_bs(), vvc_deblock_subblock_bs_horizontal(), and vvc_deblock_subblock_bs_vertical().
|
static |
Definition at line 378 of file vvc_filter.c.
Referenced by vvc_deblock_bs_luma_horizontal(), and vvc_deblock_bs_luma_vertical().
|
static |
Definition at line 403 of file vvc_filter.c.
Referenced by vvc_deblock_bs_luma_vertical().
|
static |
Definition at line 441 of file vvc_filter.c.
Referenced by vvc_deblock_bs_luma_horizontal().
|
static |
Definition at line 481 of file vvc_filter.c.
Referenced by vvc_deblock_bs(), vvc_deblock_bs_chroma_horizontal(), vvc_deblock_bs_chroma_vertical(), vvc_deblock_bs_luma_horizontal(), and vvc_deblock_bs_luma_vertical().
|
static |
Definition at line 531 of file vvc_filter.c.
Referenced by vvc_deblock_bs().
|
static |
Definition at line 588 of file vvc_filter.c.
Referenced by vvc_deblock_bs().
|
static |
Definition at line 645 of file vvc_filter.c.
Referenced by vvc_deblock_bs().
|
static |
Definition at line 673 of file vvc_filter.c.
Referenced by vvc_deblock_bs().
|
static |
Definition at line 703 of file vvc_filter.c.
Referenced by ff_vvc_deblock_horizontal(), and ff_vvc_deblock_vertical().
|
static |
Definition at line 732 of file vvc_filter.c.
Referenced by max_filter_length().
|
static |
Definition at line 742 of file vvc_filter.c.
Referenced by max_filter_length().
|
static |
Definition at line 761 of file vvc_filter.c.
Referenced by ff_vvc_deblock_horizontal(), and ff_vvc_deblock_vertical().
|
static |
Definition at line 776 of file vvc_filter.c.
Referenced by get_qp().
|
static |
Definition at line 795 of file vvc_filter.c.
Referenced by get_qp().
|
static |
Definition at line 801 of file vvc_filter.c.
Referenced by ff_vvc_deblock_horizontal(), and ff_vvc_deblock_vertical().
void ff_vvc_deblock_vertical | ( | const VVCLocalContext * | lc, |
int | x0, | ||
int | y0 | ||
) |
vertical deblock filter for the CTU
Definition at line 808 of file vvc_filter.c.
Referenced by run_deblock_v().
void ff_vvc_deblock_horizontal | ( | const VVCLocalContext * | lc, |
int | x0, | ||
int | y0 | ||
) |
horizontal deblock filter for the CTU
Definition at line 878 of file vvc_filter.c.
Referenced by run_deblock_h().
|
static |
Definition at line 952 of file vvc_filter.c.
Referenced by alf_copy_ctb_to_hv(), alf_fill_border_h(), and alf_fill_border_v().
|
static |
Definition at line 963 of file vvc_filter.c.
Referenced by alf_fill_border_v().
|
static |
Definition at line 986 of file vvc_filter.c.
Referenced by alf_fill_border_h(), and alf_fill_border_v().
|
static |
Definition at line 996 of file vvc_filter.c.
Referenced by ff_vvc_alf_copy_ctu_to_hv().
|
static |
Definition at line 1018 of file vvc_filter.c.
Referenced by alf_prepare_buffer().
|
static |
Definition at line 1027 of file vvc_filter.c.
Referenced by alf_prepare_buffer().
|
static |
Definition at line 1052 of file vvc_filter.c.
Referenced by ff_vvc_alf_filter().
|
static |
Definition at line 1089 of file vvc_filter.c.
Referenced by alf_filter_luma().
|
static |
Definition at line 1119 of file vvc_filter.c.
Referenced by ff_vvc_alf_filter().
|
static |
Definition at line 1135 of file vvc_filter.c.
Referenced by alf_filter_chroma().
|
static |
Definition at line 1143 of file vvc_filter.c.
Referenced by ff_vvc_alf_filter().
|
static |
Definition at line 1160 of file vvc_filter.c.
Referenced by ff_vvc_alf_filter().
void ff_vvc_alf_copy_ctu_to_hv | ( | VVCLocalContext * | lc, |
const int | x0, | ||
const int | y0 | ||
) |
Definition at line 1177 of file vvc_filter.c.
Referenced by run_sao().
void ff_vvc_alf_filter | ( | VVCLocalContext * | lc, |
const int | x0, | ||
const int | y0 | ||
) |
void ff_vvc_lmcs_filter | ( | const VVCLocalContext * | lc, |
const int | x0, | ||
const int | y0 | ||
) |
|
static |
Definition at line 38 of file vvc_filter.c.
|
static |
Definition at line 47 of file vvc_filter.c.
Referenced by ff_vvc_deblock_horizontal(), and ff_vvc_deblock_vertical().