FFmpeg
Macros | Functions
vvc_intra.c File Reference
#include "libavutil/frame.h"
#include "libavutil/imgutils.h"
#include "vvc_data.h"
#include "vvc_inter.h"
#include "vvc_intra.h"
#include "vvc_itx_1d.h"

Go to the source code of this file.

Macros

#define MIN_ISP_PRED_WIDTH   4
 
#define DCT_A   64
 
#define POS(c_idx, x, y)
 
#define IBC_POS(c_idx, x, y)
 
#define IBC_X(x)   ((x) & ((fc->tab.sz.ibc_buffer_width >> hs) - 1))
 
#define IBC_Y(y)   ((y) & ((1 << sps->ctb_log2_size_y >> vs) - 1))
 

Functions

static int is_cclm (enum IntraPredMode mode)
 
static int derive_ilfnst_pred_mode_intra (const VVCLocalContext *lc, const TransformBlock *tb)
 
static void ilfnst_transform (const VVCLocalContext *lc, TransformBlock *tb)
 
static void derive_transform_type (const VVCFrameContext *fc, const VVCLocalContext *lc, const TransformBlock *tb, enum TxType *trh, enum TxType *trv)
 
static void add_residual_for_joint_coding_chroma (VVCLocalContext *lc, const TransformUnit *tu, TransformBlock *tb, const int chroma_scale)
 
static int add_reconstructed_area (VVCLocalContext *lc, const int ch_type, const int x0, const int y0, const int w, const int h)
 
static void add_tu_area (const TransformUnit *tu, int *x0, int *y0, int *w, int *h)
 
static int get_luma_predict_unit (const CodingUnit *cu, const TransformUnit *tu, const int idx, int *x0, int *y0, int *w, int *h)
 
static int get_chroma_predict_unit (const CodingUnit *cu, const TransformUnit *tu, const int idx, int *x0, int *y0, int *w, int *h)
 
static void predict_intra (VVCLocalContext *lc, const TransformUnit *tu, const int idx, const int target_ch_type)
 
static void scale_clip (int *coeff, const int nzw, const int w, const int h, const int shift, const int log2_transform_range)
 
static void scale (int *out, const int *in, const int w, const int h, const int shift)
 
static void derive_qp (const VVCLocalContext *lc, const TransformUnit *tu, TransformBlock *tb)
 
static av_always_inline int derive_scale (const TransformBlock *tb, const int sh_dep_quant_used_flag)
 
static const uint8_t * derive_scale_m (const VVCLocalContext *lc, const TransformBlock *tb, uint8_t *scale_m)
 
static av_always_inline int scale_coeff (const TransformBlock *tb, int coeff, const int scale, const int scale_m, const int log2_transform_range)
 
static void dequant (const VVCLocalContext *lc, const TransformUnit *tu, TransformBlock *tb)
 
static void itx_2d (const VVCFrameContext *fc, TransformBlock *tb, const enum TxType trh, const enum TxType trv)
 
static void itx_1d (const VVCFrameContext *fc, TransformBlock *tb, const enum TxType trh, const enum TxType trv)
 
static void transform_bdpcm (TransformBlock *tb, const VVCLocalContext *lc, const CodingUnit *cu)
 
static void itransform (VVCLocalContext *lc, TransformUnit *tu, const int tu_idx, const int target_ch_type)
 
static int reconstruct (VVCLocalContext *lc)
 
static void intra_block_copy (const VVCLocalContext *lc, const int c_idx)
 
static void vvc_predict_ibc (const VVCLocalContext *lc)
 
static void ibc_fill_vir_buf (const VVCLocalContext *lc, const CodingUnit *cu)
 
int ff_vvc_reconstruct (VVCLocalContext *lc, const int rs, const int rx, const int ry)
 reconstruct a CTU More...
 

Macro Definition Documentation

◆ MIN_ISP_PRED_WIDTH

#define MIN_ISP_PRED_WIDTH   4

Definition at line 217 of file vvc_intra.c.

◆ DCT_A

#define DCT_A   64

Definition at line 447 of file vvc_intra.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 584 of file vvc_intra.c.

◆ IBC_POS

#define IBC_POS (   c_idx,
  x,
 
)
Value:
(fc->tab.ibc_vir_buf[c_idx] + \
(x << ps) + (y + ((cu->y0 & ~(sps->ctb_size_y - 1)) >> vs)) * ibc_stride)

Definition at line 588 of file vvc_intra.c.

◆ IBC_X

#define IBC_X (   x)    ((x) & ((fc->tab.sz.ibc_buffer_width >> hs) - 1))

Definition at line 591 of file vvc_intra.c.

◆ IBC_Y

#define IBC_Y (   y)    ((y) & ((1 << sps->ctb_log2_size_y >> vs) - 1))

Definition at line 592 of file vvc_intra.c.

Function Documentation

◆ is_cclm()

static int is_cclm ( enum IntraPredMode  mode)
static

Definition at line 30 of file vvc_intra.c.

Referenced by derive_ilfnst_pred_mode_intra(), and predict_intra().

◆ derive_ilfnst_pred_mode_intra()

static int derive_ilfnst_pred_mode_intra ( const VVCLocalContext lc,
const TransformBlock tb 
)
static

Definition at line 35 of file vvc_intra.c.

Referenced by ilfnst_transform().

◆ ilfnst_transform()

static void ilfnst_transform ( const VVCLocalContext lc,
TransformBlock tb 
)
static

< nLfnstOutSize

< log2LfnstSize

< nLfnstSize

< nonZeroSize

Definition at line 66 of file vvc_intra.c.

Referenced by itransform().

◆ derive_transform_type()

static void derive_transform_type ( const VVCFrameContext fc,
const VVCLocalContext lc,
const TransformBlock tb,
enum TxType trh,
enum TxType trv 
)
static

Definition at line 131 of file vvc_intra.c.

Referenced by itransform().

◆ add_residual_for_joint_coding_chroma()

static void add_residual_for_joint_coding_chroma ( VVCLocalContext lc,
const TransformUnit tu,
TransformBlock tb,
const int  chroma_scale 
)
static

Definition at line 167 of file vvc_intra.c.

Referenced by itransform().

◆ add_reconstructed_area()

static int add_reconstructed_area ( VVCLocalContext lc,
const int  ch_type,
const int  x0,
const int  y0,
const int  w,
const int  h 
)
static

Definition at line 189 of file vvc_intra.c.

Referenced by ff_vvc_reconstruct(), and predict_intra().

◆ add_tu_area()

static void add_tu_area ( const TransformUnit tu,
int x0,
int y0,
int w,
int h 
)
static

Definition at line 209 of file vvc_intra.c.

Referenced by get_chroma_predict_unit(), and get_luma_predict_unit().

◆ get_luma_predict_unit()

static int get_luma_predict_unit ( const CodingUnit cu,
const TransformUnit tu,
const int  idx,
int x0,
int y0,
int w,
int h 
)
static

Definition at line 218 of file vvc_intra.c.

Referenced by predict_intra().

◆ get_chroma_predict_unit()

static int get_chroma_predict_unit ( const CodingUnit cu,
const TransformUnit tu,
const int  idx,
int x0,
int y0,
int w,
int h 
)
static

Definition at line 229 of file vvc_intra.c.

Referenced by predict_intra().

◆ predict_intra()

static void predict_intra ( VVCLocalContext lc,
const TransformUnit tu,
const int  idx,
const int  target_ch_type 
)
static

Definition at line 246 of file vvc_intra.c.

Referenced by reconstruct().

◆ scale_clip()

static void scale_clip ( int coeff,
const int  nzw,
const int  w,
const int  h,
const int  shift,
const int  log2_transform_range 
)
static

Definition at line 277 of file vvc_intra.c.

Referenced by itx_2d().

◆ scale()

static void scale ( int out,
const int in,
const int  w,
const int  h,
const int  shift 
)
static

Definition at line 291 of file vvc_intra.c.

Referenced by aac_decode_init(), ac3_decode_init(), ac3_fixed_mdct_init(), ac3_float_mdct_init(), add_8x8basis_c(), add_8x8basis_TMPL(), adpcm_decode_frame(), adx_decode(), adx_encode(), amplify_frame(), analyze_plane(), apply_band_extension(), apply_intensity_stereo(), apply_scalefactors(), arith2_get_number(), arith2_get_prob(), asf_write_markers(), atrac1_decode_init(), atrac3_decode_init(), atrac3p_decode_init(), atrac9_decode_init(), autocorrelation(), av_display_rotation_get(), av_fft_init(), av_mdct_init(), av_rdft_init(), av_tx_init(), blur(), bmv_aud_decode_frame(), build_filter(), calc_channel_uphases(), check_exprs(), check_sobel(), checkasm_check_synth_filter(), colorcontrast_slice16(), colorcontrast_slice16p(), colorcontrast_slice8(), colorcontrast_slice8p(), comp_adjust(), comp_autocorr(), comp_interp_index(), comp_ppf_coeff(), complex_xcorrelate(), compute_rates(), compute_vif2(), config_eq_output(), config_input(), config_output(), config_props(), convert_coeffs(), correlation(), d3d12va_hevc_end_frame(), dct_error(), de_tx_init(), decode_cce(), decode_hf_c(), decode_init(), decode_joint_c(), decode_p_block(), decode_segment(), decode_spectrum_and_dequant(), dequant(), dequantize_coefficients(), dither_color(), dmix_scale_c(), dnxhd_decode_dct_block(), do_colorkey_pixel(), do_corr(), do_hsvhold16_slice(), do_hsvhold_slice(), do_hsvkey_pixel(), dolby_e_init(), dot_dsp(), draw_mandelbrot(), dsp_init(), dump_curves(), dxva2_hevc_end_frame(), encode_dcs(), encode_init(), equ_init(), estimate_best_b_count(), estimate_dcs(), exposure_slice(), extrapolate_isf(), ff_aac_sbr_ctx_init(), ff_celt_bitalloc(), ff_celt_init(), ff_dca_core_dequantize(), ff_dca_core_init(), ff_dca_downmix_to_stereo_float(), ff_h263_encode_mb(), ff_hevc_hls_residual_coding(), ff_mpeg4_pred_dc(), ff_msmpeg4_pred_dc(), ff_mss34_gen_quant_mat(), ff_opus_psy_init(), ff_opus_rc_dec_cdf(), ff_opus_rc_dec_laplace(), ff_opus_rc_dec_log(), ff_opus_rc_dec_uint(), ff_opus_rc_dec_uint_step(), ff_opus_rc_dec_uint_tri(), ff_print_debug_info2(), ff_set_fixed_vector(), ff_snow_pred_block(), ff_tx_dct_init(), ff_tx_fft_init(), ff_tx_fft_inplace_small_init(), ff_tx_fft_pfa_init(), ff_tx_init_subtx(), ff_tx_mdct_init(), ff_tx_mdct_inv_full_init(), ff_tx_mdct_naive_fwd(), ff_tx_mdct_naive_init(), ff_tx_mdct_naive_inv(), ff_tx_mdct_pfa_init(), ff_tx_rdft_init(), fft_pfa_init(), fill_from_cache(), filter16_kirsch(), filter16_prewitt(), filter16_roberts(), filter16_scharr(), filter16_sobel(), filter_channel(), filter_dbl(), filter_flt(), filter_frame(), filter_frame_ref(), filter_kirsch(), filter_prewitt(), filter_rgb24(), filter_rgb48(), filter_rgba(), filter_rgba64(), filter_roberts(), filter_scharr(), filter_sobel(), filterfn(), fir_to_phase(), fits_decode_frame(), float_to_fixed24_c(), formant_postfilter(), FUNC(), gain_dequantization(), gather_input(), generate(), generate_window_func(), get_component(), get_dc(), get_fcb_param(), get_input(), get_iscale(), get_output(), get_scale(), get_xoutput(), get_zeropadded_input(), h263_pred_acdc(), hexfloat(), iac_generate_tabs(), imc_decode_init(), import_block(), import_row16(), import_row8(), init(), init_cook_mlt(), init_decoder(), init_mdct_win(), init_sample_rate(), init_segment(), interpolate(), interpolate_pchip(), intra_pred(), irdft_horizontal16(), irdft_horizontal8(), itx_1d(), itx_2d(), kbd_window_init(), lin_calc(), load_data(), m_inv_init(), make_lpf(), mcdc(), mkv_write_chapters(), model256_update(), model2_update(), model_update(), mp_decode_layer2(), multiply(), multiply_slice(), noise_scale(), normalize(), nppscale_eval_dimensions(), nppscale_filter_frame_ref(), nppscale_init(), nppscale_parse_expr(), nppscale_scale(), on2avc_decode_band_scales(), on2avc_decode_init(), on2avc_scale(), opus_encode_init(), opus_rc_dec_update(), parse_3dl(), parse_dmix_coeffs(), parse_gradient(), parse_m3d(), parse_mantissas(), parse_points_str(), parse_subframe_audio(), parse_value(), parse_x96_subframe_audio(), parse_xbr_subframe(), pnm_decode_frame(), postProcess_TMPL(), pred_mv(), pred_temp_direct_motion(), predictor(), preinit(), prescale_down_mix(), process_command(), qdm2_decode_init(), qdmc_decode_init(), quantize_lpc_coefs(), query_formats(), read_diff_float_data(), read_quant_table(), read_words(), remap_opencl_load(), rgb_to_xy(), run_channel_cwt(), run_psnr(), sb_decode(), scale_coeff(), scale_down_mix(), scale_eval_dimensions(), scale_field(), scale_frame(), scale_magnitudes(), scale_mat(), scale_parse_expr(), scaling_list(), search_for_pns(), signal_mul(), silk_decode_frame(), sin32(), siren_init(), spectral_centroid(), spectral_kurtosis(), spectral_rolloff(), spectral_skewness(), spectral_spread(), speex_decode_frame(), sub_qmf32_float_c(), sub_qmf64_float_c(), subband_scale(), subtract_mean_predictor(), swri_dither_init(), swri_get_dither(), synth_filter_float(), synth_filter_float_64(), synth_grain_8x8_c(), synth_percept_filter(), to_linear(), try_8x8basis_c(), try_8x8basis_TMPL(), uninit(), unpack(), vc1_decode_i_block(), vc1_decode_i_block_adv(), vc1_decode_intra_block(), vc1_decode_p_block(), vc1_i_pred_dc(), vibrance_slice16(), vibrance_slice16p(), vibrance_slice8(), vibrance_slice8p(), VMUL2(), VMUL2S(), VMUL4(), VMUL4S(), vorbis_parse_id_hdr(), w_c(), wma_decode_init(), wmavoice_decode_init(), write_words(), X264_frame(), X264_init(), xy_to_upvp(), xy_to_uv(), and yae_reset().

◆ derive_qp()

static void derive_qp ( const VVCLocalContext lc,
const TransformUnit tu,
TransformBlock tb 
)
static

Definition at line 304 of file vvc_intra.c.

Referenced by dequant().

◆ derive_scale()

static av_always_inline int derive_scale ( const TransformBlock tb,
const int  sh_dep_quant_used_flag 
)
static

Definition at line 340 of file vvc_intra.c.

Referenced by dequant().

◆ derive_scale_m()

static const uint8_t* derive_scale_m ( const VVCLocalContext lc,
const TransformBlock tb,
uint8_t *  scale_m 
)
static

Definition at line 367 of file vvc_intra.c.

Referenced by dequant().

◆ scale_coeff()

static av_always_inline int scale_coeff ( const TransformBlock tb,
int  coeff,
const int  scale,
const int  scale_m,
const int  log2_transform_range 
)
static

Definition at line 416 of file vvc_intra.c.

Referenced by dequant(), lmcs_derive_lut(), and lmcs_derive_lut_sample().

◆ dequant()

static void dequant ( const VVCLocalContext lc,
const TransformUnit tu,
TransformBlock tb 
)
static

Definition at line 424 of file vvc_intra.c.

Referenced by itransform().

◆ itx_2d()

static void itx_2d ( const VVCFrameContext fc,
TransformBlock tb,
const enum TxType  trh,
const enum TxType  trv 
)
static

Definition at line 448 of file vvc_intra.c.

Referenced by itransform().

◆ itx_1d()

static void itx_1d ( const VVCFrameContext fc,
TransformBlock tb,
const enum TxType  trh,
const enum TxType  trv 
)
static

Definition at line 477 of file vvc_intra.c.

Referenced by itransform().

◆ transform_bdpcm()

static void transform_bdpcm ( TransformBlock tb,
const VVCLocalContext lc,
const CodingUnit cu 
)
static

Definition at line 503 of file vvc_intra.c.

Referenced by itransform().

◆ itransform()

static void itransform ( VVCLocalContext lc,
TransformUnit tu,
const int  tu_idx,
const int  target_ch_type 
)
static

Definition at line 516 of file vvc_intra.c.

Referenced by reconstruct().

◆ reconstruct()

static int reconstruct ( VVCLocalContext lc)
static

Definition at line 566 of file vvc_intra.c.

Referenced by ff_vvc_reconstruct().

◆ intra_block_copy()

static void intra_block_copy ( const VVCLocalContext lc,
const int  c_idx 
)
static

< IbcBufWidthY and IbcBufWidthC

Definition at line 594 of file vvc_intra.c.

Referenced by vvc_predict_ibc().

◆ vvc_predict_ibc()

static void vvc_predict_ibc ( const VVCLocalContext lc)
static

Definition at line 625 of file vvc_intra.c.

Referenced by ff_vvc_reconstruct().

◆ ibc_fill_vir_buf()

static void ibc_fill_vir_buf ( const VVCLocalContext lc,
const CodingUnit cu 
)
static

Definition at line 636 of file vvc_intra.c.

Referenced by ff_vvc_reconstruct().

◆ ff_vvc_reconstruct()

int ff_vvc_reconstruct ( VVCLocalContext lc,
const int  rs,
const int  rx,
const int  ry 
)

reconstruct a CTU

Parameters
lclocal context for CTU
rsraster order for the CTU.
rxraster order x for the CTU.
ryraster order y for the CTU.
Returns
AVERROR

Definition at line 659 of file vvc_intra.c.

Referenced by run_recon().

fc
#define fc(width, name, range_min, range_max)
Definition: cbs_av1.c:472
sps
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
Definition: cbs_h264_syntax_template.c:260