Go to the documentation of this file.
23 #ifndef AVCODEC_VVC_VVC_PS_H
24 #define AVCODEC_VVC_VVC_PS_H
29 #define IS_IDR(s) ((s)->vcl_unit_type == VVC_IDR_W_RADL || (s)->vcl_unit_type == VVC_IDR_N_LP)
30 #define IS_CRA(s) ((s)->vcl_unit_type == VVC_CRA_NUT)
31 #define IS_IRAP(s) (IS_IDR(s) || IS_CRA(s))
32 #define IS_GDR(s) ((s)->vcl_unit_type == VVC_GDR_NUT)
33 #define IS_CVSS(s) (IS_IRAP(s)|| IS_GDR(s))
34 #define IS_CLVSS(s) (IS_CVSS(s) && s->no_output_before_recovery_flag)
35 #define IS_RASL(s) ((s)->vcl_unit_type == VVC_RASL_NUT)
36 #define IS_RADL(s) ((s)->vcl_unit_type == VVC_RADL_NUT)
38 #define IS_I(rsh) ((rsh)->sh_slice_type == VVC_SLICE_TYPE_I)
39 #define IS_P(rsh) ((rsh)->sh_slice_type == VVC_SLICE_TYPE_P)
40 #define IS_B(rsh) ((rsh)->sh_slice_type == VVC_SLICE_TYPE_B)
42 #define INV_POC INT_MIN
43 #define GDR_IS_RECOVERED(s) (s->gdr_recovery_point_poc == INV_POC)
44 #define GDR_SET_RECOVERED(s) (s->gdr_recovery_point_poc = INV_POC)
46 #define LMCS_MAX_BIT_DEPTH 12
47 #define LMCS_MAX_LUT_SIZE (1 << LMCS_MAX_BIT_DEPTH)
48 #define LMCS_MAX_BIN_SIZE 16
49 #define LADF_MAX_INTERVAL 5
132 #define MAX_WEIGHTS 15
153 #define ALF_NUM_FILTERS_LUMA 25
154 #define ALF_NUM_FILTERS_CHROMA 8
155 #define ALF_NUM_FILTERS_CC 4
157 #define ALF_NUM_COEFF_LUMA 12
158 #define ALF_NUM_COEFF_CHROMA 6
159 #define ALF_NUM_COEFF_CC 7
183 #define SL_MAX_MATRIX_SIZE 8
203 #define VVC_MAX_ALF_COUNT 8
204 #define VVC_MAX_LMCS_COUNT 4
205 #define VVC_MAX_SL_COUNT 8
uint8_t weight_flag[2][2][MAX_WEIGHTS]
luma_weight_l0_flag, chroma_weight_l0_flag, luma_weight_l1_flag, chroma_weight_l1_flag,
uint8_t cu_qp_delta_subdiv
CuQpDeltaSubdiv.
uint32_t num_ctus_in_curr_slice
NumCtusInCurrSlice.
AVPixelFormat
Pixel format.
uint8_t log2_transform_range
Log2TransformRange.
uint32_t entry_point_start_ctu[VVC_MAX_ENTRY_POINTS]
entry point start in ctu_addr
const H266RawPPS * r
RefStruct reference.
int8_t chroma_qp_table[3][VVC_MAX_POINTS_IN_QP_TABLE]
ChromaQpTable.
uint8_t cu_chroma_qp_offset_subdiv
CuChromaQpOffsetSubdiv.
const H266RawSliceHeader * r
RefStruct reference.
#define LADF_MAX_INTERVAL
int16_t offset[2][VVC_MAX_SAMPLE_ARRAYS][MAX_WEIGHTS]
luma_offset_l0, luma_offset_l1, ChromaOffsetL0, ChromaOffsetL1
int ff_vvc_decode_frame_ps(VVCFrameParamSets *fps, struct VVCContext *s)
uint8_t num_chroma_filters
#define LMCS_MAX_LUT_SIZE
int ff_vvc_decode_aps(VVCParamSets *ps, const CodedBitstreamUnit *unit)
Coded bitstream unit structure.
uint8_t qp_bd_offset
QpBdOffset.
uint16_t chroma_scale_coeff[LMCS_MAX_BIN_SIZE]
const VVCSPS * sps
RefStruct reference.
uint16_t num_ctus_in_slice[VVC_MAX_SLICES]
uint8_t log2_denom[2]
luma_log2_weight_denom, ChromaLog2WeightDenom
uint8_t hshift[VVC_MAX_SAMPLE_ARRAYS]
const VVCPPS * pps_list[VVC_MAX_PPS_COUNT]
RefStruct reference.
int16_t cc_coeff[2][ALF_NUM_FILTERS_CC][ALF_NUM_COEFF_CC]
uint8_t max_num_merge_cand
MaxNumMergeCand.
const VVCScalingList * sl
RefStruct reference.
uint8_t chroma_clip_idx[ALF_NUM_FILTERS_CHROMA][ALF_NUM_COEFF_CHROMA]
#define ALF_NUM_FILTERS_CHROMA
uint16_t width64
width in 64 pixels
uint16_t ref_wraparound_offset
PpsRefWraparoundOffset.
int16_t weight[2][VVC_MAX_SAMPLE_ARRAYS][MAX_WEIGHTS]
LumaWeightL0, LumaWeightL1, ChromaWeightL0, ChromaWeightL1.
uint32_t * ctb_addr_in_slice
CtbAddrInCurrSlice for entire picture.
#define ALF_NUM_COEFF_CHROMA
@ VVC_MAX_POINTS_IN_QP_TABLE
const VVCSPS * sps_list[VVC_MAX_SPS_COUNT]
RefStruct reference.
#define ALF_NUM_FILTERS_CC
uint16_t slice_start_offset[VVC_MAX_SLICES]
uint8_t ctb_log2_size_y
CtbLog2SizeY.
int8_t ref_idx_sym[2]
RefIdxSymL0, RefIdxSymL1.
const VVCALF * alf_list[VVC_MAX_ALF_COUNT]
RefStruct reference.
#define VVC_MAX_LMCS_COUNT
uint8_t max_tt_size[2]
MaxTtSizeY, MaxTtSizeC.
#define SL_MAX_MATRIX_SIZE
const VVCScalingList * scaling_list[VVC_MAX_SL_COUNT]
RefStruct reference.
uint8_t bit_depth
BitDepth.
int8_t chroma_qp_offset_list[6][3]
pps_cb_qp_offset_list, pps_cr_qp_offset_list, pps_joint_cbcr_qp_offset_list
const H266RawPictureHeader * r
int16_t luma_coeff[ALF_NUM_FILTERS_LUMA][ALF_NUM_COEFF_LUMA]
int ff_vvc_decode_sh(VVCSH *sh, const VVCFrameParamSets *ps, const CodedBitstreamUnit *unit)
const VVCPPS * pps
RefStruct reference.
uint8_t max_mtt_depth[2]
MaxMttDepthY, MaxMttDepthC.
uint8_t max_num_ibc_merge_cand
MaxNumIbcMergeCand.
#define ALF_NUM_COEFF_LUMA
uint8_t nb_weights[2]
num_l0_weights, num_l1_weights
uint32_t ladf_interval_lower_bound[LADF_MAX_INTERVAL]
SpsLadfIntervalLowerBound[].
void ff_vvc_frame_ps_free(VVCFrameParamSets *fps)
const uint32_t * ctb_addr_in_curr_slice
CtbAddrInCurrSlice.
uint8_t scaling_matrix_dc_rec[SL_MAX_ID - SL_START_16x16]
ScalingMatrixDcRec[refId − 14].
uint8_t log2_parallel_merge_level
sps_log2_parallel_merge_level_minus2 + 2;
#define VVC_MAX_ALF_COUNT
int8_t chroma_qp_offset[3]
pps_cb_qp_offset, pps_cr_qp_offset, pps_joint_cbcr_qp_offset_value
#define ALF_NUM_FILTERS_LUMA
enum AVPixelFormat pix_fmt
uint32_t max_num_subblock_merge_cand
MaxNumSubblockMergeCand.
uint16_t pivot[LMCS_MAX_BIN_SIZE+1]
uint8_t vshift[VVC_MAX_SAMPLE_ARRAYS]
uint16_t width32
width in 32 pixels
void * rref
RefStruct reference, backing ph above.
int32_t poc
PicOrderCntVal.
uint16_t u16[LMCS_MAX_LUT_SIZE]
for high bit-depth
uint8_t num_ladf_intervals
sps_num_ladf_intervals_minus2 + 2;
uint8_t max_num_gpm_merge_cand
MaxNumGpmMergeCand.
uint8_t min_cb_log2_size_y
MinCbLog2SizeY.
void ff_vvc_ps_uninit(VVCParamSets *ps)
#define LMCS_MAX_BIN_SIZE
uint16_t height32
height in 32 pixels
const VVCALF * alf_list[VVC_MAX_ALF_COUNT]
RefStruct reference.
int8_t slice_qp_y
SliceQpY.
uint8_t max_tb_size_y
MaxTbSizeY.
uint8_t ctb_size_y
CtbSizeY.
uint8_t u8[LMCS_MAX_LUT_SIZE]
uint8_t luma_clip_idx[ALF_NUM_FILTERS_LUMA][ALF_NUM_COEFF_LUMA]
union VVCLMCS::@225 fwd_lut
uint8_t max_bt_size[2]
MaxBtSizeY, MaxBtSizeC.
const H266RawSPS * r
RefStruct reference.
uint8_t num_cc_filters[2]
alf_cc_cb_filters_signalled_minus1 + 1, alf_cc_cr_filters_signalled_minus1 + 1
union VVCLMCS::@225 inv_lut
uint8_t min_qt_size[2]
MinQtSizeY, MinQtSizeC.
uint16_t height64
height in 64 pixels
uint32_t max_pic_order_cnt_lsb
MaxPicOrderCntLsb.
uint8_t min_cb_size_y
MinCbSizeY.
uint8_t max_ts_size
MaxTsSize.
int16_t chroma_coeff[ALF_NUM_FILTERS_CHROMA][ALF_NUM_COEFF_CHROMA]
const H266RawAPS * lmcs_list[VVC_MAX_LMCS_COUNT]
RefStruct reference.
uint8_t scaling_matrix_rec[SL_MAX_ID][SL_MAX_MATRIX_SIZE *SL_MAX_MATRIX_SIZE]
ScalingMatrixRec.