FFmpeg
|
#include "libavcodec/cabac_functions.h"
#include "vvc_cabac.h"
#include "vvc_ctu.h"
#include "vvc_data.h"
Go to the source code of this file.
Data Structures | |
struct | ResidualCoding |
Macros | |
#define | CABAC_MAX_BIN 31 |
#define | CNU 35 |
#define | MAX_SUB_BLOCKS 16 |
#define | MAX_SUB_BLOCK_SIZE 4 |
#define | MAX_TB_SIZE 64 |
#define | GET_CABAC(ctx) vvc_get_cabac(&lc->ep->cc, lc->ep->cabac_state, ctx) |
Variables | |
static const uint8_t | init_values [4][SYNTAX_ELEMENT_LAST] |
static const uint8_t | qstate_translate_table [][2] |
#define CABAC_MAX_BIN 31 |
Definition at line 28 of file vvc_cabac.c.
#define CNU 35 |
Definition at line 30 of file vvc_cabac.c.
#define MAX_SUB_BLOCKS 16 |
Definition at line 767 of file vvc_cabac.c.
#define MAX_SUB_BLOCK_SIZE 4 |
Definition at line 768 of file vvc_cabac.c.
#define MAX_TB_SIZE 64 |
Definition at line 769 of file vvc_cabac.c.
#define GET_CABAC | ( | ctx | ) | vvc_get_cabac(&lc->ep->cc, lc->ep->cabac_state, ctx) |
Definition at line 913 of file vvc_cabac.c.
enum SyntaxElement |
Definition at line 32 of file vvc_cabac.c.
|
static |
Definition at line 808 of file vvc_cabac.c.
Referenced by ff_vvc_cabac_init().
|
static |
Definition at line 813 of file vvc_cabac.c.
Referenced by ff_vvc_cabac_init().
int ff_vvc_cabac_init | ( | VVCLocalContext * | lc, |
const int | ctu_idx, | ||
const int | rx, | ||
const int | ry | ||
) |
Definition at line 842 of file vvc_cabac.c.
Referenced by ff_vvc_coding_tree_unit().
|
static |
Definition at line 860 of file vvc_cabac.c.
Referenced by vvc_get_cabac().
|
inlinestatic |
Definition at line 885 of file vvc_cabac.c.
|
static |
Definition at line 916 of file vvc_cabac.c.
Referenced by ff_vvc_alf_luma_fixed_filter_idx(), ff_vvc_alf_luma_prev_filter_idx(), ff_vvc_intra_luma_mpm_remainder(), and ff_vvc_intra_mip_mode().
|
static |
Definition at line 932 of file vvc_cabac.c.
Referenced by abs_decode(), and ff_vvc_abs_mvd_minus2().
|
static |
Definition at line 951 of file vvc_cabac.c.
Referenced by ff_vvc_non_inter_flag(), ff_vvc_pred_mode_flag(), ff_vvc_pred_mode_ibc_flag(), ff_vvc_split_cu_flag(), get_inc(), get_inter_flag_inc(), and split_qt_flag_decode().
|
static |
Definition at line 969 of file vvc_cabac.c.
Referenced by ff_vvc_cu_skip_flag(), and ff_vvc_intra_mip_flag().
int ff_vvc_sao_merge_flag_decode | ( | VVCLocalContext * | lc | ) |
Definition at line 976 of file vvc_cabac.c.
Referenced by hls_sao().
int ff_vvc_sao_type_idx_decode | ( | VVCLocalContext * | lc | ) |
Definition at line 981 of file vvc_cabac.c.
Referenced by hls_sao().
int ff_vvc_sao_band_position_decode | ( | VVCLocalContext * | lc | ) |
Definition at line 991 of file vvc_cabac.c.
Referenced by hls_sao().
int ff_vvc_sao_offset_abs_decode | ( | VVCLocalContext * | lc | ) |
Definition at line 1000 of file vvc_cabac.c.
Referenced by hls_sao().
int ff_vvc_sao_offset_sign_decode | ( | VVCLocalContext * | lc | ) |
Definition at line 1010 of file vvc_cabac.c.
Referenced by hls_sao().
int ff_vvc_sao_eo_class_decode | ( | VVCLocalContext * | lc | ) |
Definition at line 1015 of file vvc_cabac.c.
Referenced by hls_sao().
int ff_vvc_alf_ctb_flag | ( | VVCLocalContext * | lc, |
const int | rx, | ||
const int | ry, | ||
const int | c_idx | ||
) |
Definition at line 1022 of file vvc_cabac.c.
Referenced by alf_params().
int ff_vvc_alf_use_aps_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1037 of file vvc_cabac.c.
Referenced by alf_params().
int ff_vvc_alf_luma_prev_filter_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1042 of file vvc_cabac.c.
Referenced by alf_params().
int ff_vvc_alf_luma_fixed_filter_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1047 of file vvc_cabac.c.
Referenced by alf_params().
int ff_vvc_alf_ctb_filter_alt_idx | ( | VVCLocalContext * | lc, |
const int | c_idx, | ||
const int | num_chroma_filters | ||
) |
Definition at line 1052 of file vvc_cabac.c.
Referenced by alf_params().
int ff_vvc_alf_ctb_cc_idc | ( | VVCLocalContext * | lc, |
const int | rx, | ||
const int | ry, | ||
const int | idx, | ||
const int | cc_filters_signalled | ||
) |
Definition at line 1062 of file vvc_cabac.c.
Referenced by alf_params().
int ff_vvc_split_cu_flag | ( | VVCLocalContext * | lc, |
const int | x0, | ||
const int | y0, | ||
const int | cb_width, | ||
const int | cb_height, | ||
const int | is_chroma, | ||
const VVCAllowedSplit * | a | ||
) |
Definition at line 1084 of file vvc_cabac.c.
Referenced by hls_coding_tree().
|
static |
Definition at line 1106 of file vvc_cabac.c.
Referenced by ff_vvc_split_mode().
|
static |
Definition at line 1120 of file vvc_cabac.c.
Referenced by ff_vvc_split_mode().
|
static |
Definition at line 1156 of file vvc_cabac.c.
Referenced by ff_vvc_split_mode().
VVCSplitMode ff_vvc_split_mode | ( | VVCLocalContext * | lc, |
const int | x0, | ||
const int | y0, | ||
const int | cb_width, | ||
const int | cb_height, | ||
const int | cqt_depth, | ||
const int | mtt_depth, | ||
const int | ch_type, | ||
const VVCAllowedSplit * | a | ||
) |
Definition at line 1162 of file vvc_cabac.c.
Referenced by hls_coding_tree().
int ff_vvc_non_inter_flag | ( | VVCLocalContext * | lc, |
const int | x0, | ||
const int | y0, | ||
const int | ch_type | ||
) |
Definition at line 1196 of file vvc_cabac.c.
Referenced by mode_type_decode().
int ff_vvc_pred_mode_flag | ( | VVCLocalContext * | lc, |
const int | is_chroma | ||
) |
Definition at line 1206 of file vvc_cabac.c.
Referenced by pred_mode_decode().
int ff_vvc_pred_mode_plt_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1217 of file vvc_cabac.c.
Referenced by hls_coding_unit().
int ff_vvc_intra_bdpcm_luma_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1222 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
int ff_vvc_intra_bdpcm_luma_dir_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1227 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
int ff_vvc_intra_bdpcm_chroma_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1232 of file vvc_cabac.c.
Referenced by intra_chroma_pred_modes().
int ff_vvc_intra_bdpcm_chroma_dir_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1237 of file vvc_cabac.c.
Referenced by intra_chroma_pred_modes().
int ff_vvc_cu_skip_flag | ( | VVCLocalContext * | lc, |
const uint8_t * | cu_skip_flag | ||
) |
Definition at line 1242 of file vvc_cabac.c.
Referenced by pred_mode_decode().
int ff_vvc_pred_mode_ibc_flag | ( | VVCLocalContext * | lc, |
const int | is_chroma | ||
) |
Definition at line 1248 of file vvc_cabac.c.
Referenced by pred_mode_decode().
int ff_vvc_intra_mip_flag | ( | VVCLocalContext * | lc, |
const uint8_t * | intra_mip_flag | ||
) |
Definition at line 1260 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
int ff_vvc_intra_mip_transposed_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1268 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
int ff_vvc_intra_mip_mode | ( | VVCLocalContext * | lc | ) |
Definition at line 1273 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
int ff_vvc_intra_luma_ref_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1282 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
int ff_vvc_intra_subpartitions_mode_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1292 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
enum IspType ff_vvc_isp_split_type | ( | VVCLocalContext * | lc, |
const int | intra_subpartitions_mode_flag | ||
) |
Definition at line 1297 of file vvc_cabac.c.
Referenced by intra_luma_pred_modes().
int ff_vvc_intra_luma_mpm_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1304 of file vvc_cabac.c.
Referenced by luma_intra_pred_mode().
int ff_vvc_intra_luma_not_planar_flag | ( | VVCLocalContext * | lc, |
const int | intra_subpartitions_mode_flag | ||
) |
Definition at line 1309 of file vvc_cabac.c.
Referenced by luma_intra_pred_mode().
int ff_vvc_intra_luma_mpm_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1314 of file vvc_cabac.c.
Referenced by luma_intra_pred_mode().
int ff_vvc_intra_luma_mpm_remainder | ( | VVCLocalContext * | lc | ) |
Definition at line 1322 of file vvc_cabac.c.
Referenced by luma_intra_pred_mode().
int ff_vvc_cclm_mode_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1327 of file vvc_cabac.c.
Referenced by intra_chroma_pred_modes().
int ff_vvc_cclm_mode_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1332 of file vvc_cabac.c.
Referenced by intra_chroma_pred_modes().
int ff_vvc_intra_chroma_pred_mode | ( | VVCLocalContext * | lc | ) |
Definition at line 1339 of file vvc_cabac.c.
Referenced by intra_chroma_pred_modes().
int ff_vvc_general_merge_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1346 of file vvc_cabac.c.
Referenced by inter_data().
|
static |
Definition at line 1351 of file vvc_cabac.c.
Referenced by ff_vvc_inter_affine_flag(), and ff_vvc_merge_subblock_flag().
int ff_vvc_merge_subblock_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1362 of file vvc_cabac.c.
Referenced by hls_merge_data().
int ff_vvc_merge_subblock_idx | ( | VVCLocalContext * | lc, |
const int | max_num_subblock_merge_cand | ||
) |
Definition at line 1368 of file vvc_cabac.c.
Referenced by merge_data_subblock().
int ff_vvc_regular_merge_flag | ( | VVCLocalContext * | lc, |
const int | cu_skip_flag | ||
) |
Definition at line 1378 of file vvc_cabac.c.
Referenced by merge_data_block().
int ff_vvc_mmvd_merge_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1384 of file vvc_cabac.c.
Referenced by merge_data_regular().
int ff_vvc_mmvd_cand_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1389 of file vvc_cabac.c.
Referenced by merge_data_regular().
|
static |
Definition at line 1394 of file vvc_cabac.c.
Referenced by ff_vvc_mmvd_offset_coding().
|
static |
Definition at line 1404 of file vvc_cabac.c.
Referenced by ff_vvc_mmvd_offset_coding().
void ff_vvc_mmvd_offset_coding | ( | VVCLocalContext * | lc, |
Mv * | mmvd_offset, | ||
const int | ph_mmvd_fullpel_only_flag | ||
) |
Definition at line 1409 of file vvc_cabac.c.
Referenced by merge_data_regular().
|
static |
Definition at line 1419 of file vvc_cabac.c.
Referenced by ff_vvc_merge_idx().
int ff_vvc_merge_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1436 of file vvc_cabac.c.
Referenced by merge_data_ciip(), merge_data_ibc(), and merge_data_regular().
int ff_vvc_merge_gpm_partition_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1451 of file vvc_cabac.c.
Referenced by merge_data_gpm().
int ff_vvc_merge_gpm_idx | ( | VVCLocalContext * | lc, |
const int | idx | ||
) |
Definition at line 1461 of file vvc_cabac.c.
Referenced by merge_data_gpm().
int ff_vvc_ciip_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1475 of file vvc_cabac.c.
Referenced by ciip_flag_decode().
PredFlag ff_vvc_pred_flag | ( | VVCLocalContext * | lc, |
const int | is_b | ||
) |
Definition at line 1480 of file vvc_cabac.c.
Referenced by mvp_data().
int ff_vvc_inter_affine_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1495 of file vvc_cabac.c.
Referenced by mvp_data().
int ff_vvc_cu_affine_type_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1501 of file vvc_cabac.c.
Referenced by mvp_data().
int ff_vvc_sym_mvd_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1506 of file vvc_cabac.c.
Referenced by mvp_data().
int ff_vvc_ref_idx_lx | ( | VVCLocalContext * | lc, |
const uint8_t | nb_refs | ||
) |
Definition at line 1511 of file vvc_cabac.c.
Referenced by ref_idx_decode().
int ff_vvc_abs_mvd_greater0_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1526 of file vvc_cabac.c.
Referenced by hls_mvd_coding().
int ff_vvc_abs_mvd_greater1_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1531 of file vvc_cabac.c.
Referenced by hls_mvd_coding().
int ff_vvc_abs_mvd_minus2 | ( | VVCLocalContext * | lc | ) |
Definition at line 1536 of file vvc_cabac.c.
Referenced by hls_mvd_coding().
int ff_vvc_mvd_sign_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1541 of file vvc_cabac.c.
Referenced by hls_mvd_coding().
int ff_vvc_mvp_lx_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1546 of file vvc_cabac.c.
Referenced by mvp_data(), and mvp_data_ibc().
|
static |
Definition at line 1551 of file vvc_cabac.c.
Referenced by ff_vvc_amvr_shift().
|
static |
Definition at line 1556 of file vvc_cabac.c.
Referenced by ff_vvc_amvr_shift().
int ff_vvc_amvr_shift | ( | VVCLocalContext * | lc, |
const int | inter_affine_flag, | ||
const PredMode | pred_mode, | ||
const int | has_amvr_flag | ||
) |
Definition at line 1567 of file vvc_cabac.c.
Referenced by mvp_data(), and mvp_data_ibc().
int ff_vvc_bcw_idx | ( | VVCLocalContext * | lc, |
const int | no_backward_pred_flag | ||
) |
Definition at line 1590 of file vvc_cabac.c.
Referenced by bcw_idx_decode().
int ff_vvc_tu_cb_coded_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1601 of file vvc_cabac.c.
Referenced by hls_transform_unit().
int ff_vvc_tu_cr_coded_flag | ( | VVCLocalContext * | lc, |
int | tu_cb_coded_flag | ||
) |
Definition at line 1606 of file vvc_cabac.c.
Referenced by hls_transform_unit().
int ff_vvc_tu_y_coded_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1611 of file vvc_cabac.c.
Referenced by tu_y_coded_flag_decode().
int ff_vvc_cu_qp_delta_abs | ( | VVCLocalContext * | lc | ) |
Definition at line 1625 of file vvc_cabac.c.
Referenced by set_qp_y().
int ff_vvc_cu_qp_delta_sign_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1653 of file vvc_cabac.c.
Referenced by set_qp_y().
int ff_vvc_cu_chroma_qp_offset_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 1658 of file vvc_cabac.c.
Referenced by chroma_qp_offset_decode().
int ff_vvc_cu_chroma_qp_offset_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 1663 of file vvc_cabac.c.
Referenced by chroma_qp_offset_decode().
|
static |
Definition at line 1672 of file vvc_cabac.c.
Referenced by last_significant_coeff_x_prefix_decode(), and last_significant_coeff_y_prefix_decode().
|
static |
Definition at line 1694 of file vvc_cabac.c.
Referenced by last_significant_coeff_x_y_decode().
|
static |
Definition at line 1700 of file vvc_cabac.c.
Referenced by last_significant_coeff_x_y_decode().
|
static |
Definition at line 1706 of file vvc_cabac.c.
Referenced by last_significant_coeff_x_y_decode().
int ff_vvc_tu_joint_cbcr_residual_flag | ( | VVCLocalContext * | lc, |
const int | tu_cb_coded_flag, | ||
const int | tu_cr_coded_flag | ||
) |
Definition at line 1717 of file vvc_cabac.c.
Referenced by hls_transform_unit().
int ff_vvc_transform_skip_flag | ( | VVCLocalContext * | lc, |
const int | inc | ||
) |
Definition at line 1722 of file vvc_cabac.c.
Referenced by hls_transform_unit().
|
static |
Definition at line 1728 of file vvc_cabac.c.
Referenced by abs_get_rice_param(), get_gtx_flag_inc(), and sig_coeff_flag_decode().
|
static |
Definition at line 1749 of file vvc_cabac.c.
Referenced by sig_coeff_flag_decode().
|
static |
Definition at line 1760 of file vvc_cabac.c.
Referenced by residual_coding_subblock().
|
static |
Definition at line 1783 of file vvc_cabac.c.
Referenced by residual_coding_subblock().
|
static |
Definition at line 1788 of file vvc_cabac.c.
Referenced by residual_coding_subblock().
|
static |
Definition at line 1793 of file vvc_cabac.c.
Referenced by residual_ts_coding_subblock().
|
static |
Definition at line 1799 of file vvc_cabac.c.
Referenced by residual_coding_subblock(), and residual_ts_coding_subblock().
|
static |
Definition at line 1820 of file vvc_cabac.c.
Referenced by residual_coding_subblock(), and residual_ts_coding_subblock().
|
static |
Definition at line 1843 of file vvc_cabac.c.
Referenced by abs_remainder_decode(), and dec_abs_level_decode().
|
static |
Definition at line 1869 of file vvc_cabac.c.
Referenced by abs_remainder_decode(), abs_remainder_ts_decode(), and dec_abs_level_decode().
|
static |
Definition at line 1891 of file vvc_cabac.c.
Referenced by residual_coding_subblock().
|
static |
Definition at line 1906 of file vvc_cabac.c.
Referenced by residual_ts_coding_subblock().
|
static |
Definition at line 1915 of file vvc_cabac.c.
Referenced by residual_coding_subblock(), and residual_ts_coding_subblock().
|
static |
Definition at line 1921 of file vvc_cabac.c.
Referenced by residual_ts_coding_subblock().
|
static |
Definition at line 1940 of file vvc_cabac.c.
Referenced by residual_ts_coding_subblock().
|
static |
Definition at line 1956 of file vvc_cabac.c.
Referenced by residual_ts_coding_subblock().
|
static |
Definition at line 1966 of file vvc_cabac.c.
Referenced by residual_coding_subblock().
|
static |
Definition at line 1982 of file vvc_cabac.c.
Referenced by residual_coding_subblock().
|
static |
Definition at line 1992 of file vvc_cabac.c.
Referenced by hls_residual_coding(), and hls_residual_ts_coding().
|
static |
< AbsLevelPass2
Definition at line 2036 of file vvc_cabac.c.
Referenced by hls_residual_ts_coding().
|
static |
Definition at line 2154 of file vvc_cabac.c.
Referenced by ff_vvc_residual_coding().
|
inlinestatic |
Definition at line 2168 of file vvc_cabac.c.
Referenced by hls_residual_coding().
|
static |
Definition at line 2312 of file vvc_cabac.c.
Referenced by hls_residual_coding().
|
static |
Definition at line 2328 of file vvc_cabac.c.
Referenced by hls_residual_coding().
|
static |
Definition at line 2359 of file vvc_cabac.c.
Referenced by ff_vvc_residual_coding().
int ff_vvc_residual_coding | ( | VVCLocalContext * | lc, |
TransformBlock * | tb | ||
) |
Definition at line 2407 of file vvc_cabac.c.
Referenced by hls_transform_unit().
int ff_vvc_cu_coded_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 2415 of file vvc_cabac.c.
Referenced by hls_coding_unit().
int ff_vvc_sbt_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 2420 of file vvc_cabac.c.
Referenced by sbt_info().
int ff_vvc_sbt_quad_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 2428 of file vvc_cabac.c.
Referenced by sbt_info().
int ff_vvc_sbt_horizontal_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 2433 of file vvc_cabac.c.
Referenced by sbt_info().
int ff_vvc_sbt_pos_flag | ( | VVCLocalContext * | lc | ) |
Definition at line 2441 of file vvc_cabac.c.
Referenced by sbt_info().
int ff_vvc_lfnst_idx | ( | VVCLocalContext * | lc, |
const int | inc | ||
) |
Definition at line 2446 of file vvc_cabac.c.
Referenced by lfnst_idx_decode().
int ff_vvc_mts_idx | ( | VVCLocalContext * | lc | ) |
Definition at line 2455 of file vvc_cabac.c.
Referenced by mts_idx_decode().
int ff_vvc_end_of_slice_flag_decode | ( | VVCLocalContext * | lc | ) |
Definition at line 2465 of file vvc_cabac.c.
Referenced by hls_coding_tree_unit().
int ff_vvc_end_of_tile_one_bit | ( | VVCLocalContext * | lc | ) |
Definition at line 2470 of file vvc_cabac.c.
Referenced by hls_coding_tree_unit().
int ff_vvc_end_of_subset_one_bit | ( | VVCLocalContext * | lc | ) |
Definition at line 2475 of file vvc_cabac.c.
Referenced by hls_coding_tree_unit().
|
static |
Definition at line 111 of file vvc_cabac.c.
Referenced by cabac_init_state().
|
static |
Definition at line 1962 of file vvc_cabac.c.
Referenced by residual_coding_subblock().