FFmpeg
ps.h
Go to the documentation of this file.
1 /*
2  * VVC parameter set parser
3  *
4  * Copyright (C) 2023 Nuo Mi
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_VVC_PS_H
24 #define AVCODEC_VVC_PS_H
25 
26 #include "libavcodec/cbs_h266.h"
27 #include "libavcodec/vvc.h"
28 
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)
37 
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)
41 
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)
45 
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
50 
51 enum {
56 };
57 
58 typedef struct VVCSPS {
59  const H266RawSPS *r; ///< RefStruct reference
60 
61  //derived values
64  uint32_t max_pic_order_cnt_lsb; ///< MaxPicOrderCntLsb
65 
66  uint8_t pixel_shift;
68 
69  uint8_t bit_depth; ///< BitDepth
70  uint8_t qp_bd_offset; ///< QpBdOffset
71  uint8_t ctb_log2_size_y; ///< CtbLog2SizeY
72  uint16_t ctb_size_y; ///< CtbSizeY
73  uint8_t min_cb_log2_size_y; ///< MinCbLog2SizeY
74  uint8_t min_cb_size_y; ///< MinCbSizeY
75  uint8_t max_tb_size_y; ///< MaxTbSizeY
76  uint8_t max_ts_size; ///< MaxTsSize
77  uint8_t max_num_merge_cand; ///< MaxNumMergeCand
78  uint8_t max_num_ibc_merge_cand; ///< MaxNumIbcMergeCand
79  uint8_t max_num_gpm_merge_cand; ///< MaxNumGpmMergeCand
80  uint8_t num_ladf_intervals; ///< sps_num_ladf_intervals_minus2 + 2;
81  uint32_t ladf_interval_lower_bound[LADF_MAX_INTERVAL]; ///< SpsLadfIntervalLowerBound[]
82  uint8_t log2_parallel_merge_level; ///< sps_log2_parallel_merge_level_minus2 + 2;
83  uint8_t log2_transform_range; ///< Log2TransformRange
84  int8_t chroma_qp_table[3][VVC_MAX_POINTS_IN_QP_TABLE]; ///< ChromaQpTable
85 } VVCSPS;
86 
87 typedef struct DBParams {
90 } DBParams;
91 
92 typedef struct VVCPPS {
93  const H266RawPPS *r; ///< RefStruct reference
94 
95  //derived value;
96  int8_t chroma_qp_offset[3]; ///< pps_cb_qp_offset, pps_cr_qp_offset, pps_joint_cbcr_qp_offset_value
97  int8_t chroma_qp_offset_list[6][3]; ///< pps_cb_qp_offset_list, pps_cr_qp_offset_list, pps_joint_cbcr_qp_offset_list
98 
99  uint16_t width;
100  uint16_t height;
101 
104 
105  uint16_t min_cb_width;
106  uint16_t min_cb_height;
107 
108  uint16_t ctb_width;
109  uint16_t ctb_height;
110  uint32_t ctb_count;
111 
112  uint16_t min_pu_width;
113  uint16_t min_pu_height;
114  uint16_t min_tu_width;
115  uint16_t min_tu_height;
116 
117  uint32_t *ctb_addr_in_slice; ///< CtbAddrInCurrSlice for entire picture
118  uint16_t *col_bd; ///< TileColBdVal
119  uint16_t *row_bd; ///< TileRowBdVal
120  uint16_t *ctb_to_col_bd; ///< CtbToTileColBd
121  uint16_t *ctb_to_row_bd; ///< CtbToTileRowBd
122 
123  uint16_t width32; ///< width in 32 pixels
124  uint16_t height32; ///< height in 32 pixels
125  uint16_t width64; ///< width in 64 pixels
126  uint16_t height64; ///< height in 64 pixels
127 
128  uint16_t ref_wraparound_offset; ///< PpsRefWraparoundOffset
129 
130  uint16_t subpic_x[VVC_MAX_SLICES]; ///< SubpicLeftBoundaryPos
131  uint16_t subpic_y[VVC_MAX_SLICES]; ///< SubpicTopBoundaryPos
134 } VVCPPS;
135 
136 #define MAX_WEIGHTS 15
137 typedef struct PredWeightTable {
138  uint8_t log2_denom[2]; ///< luma_log2_weight_denom, ChromaLog2WeightDenom
139 
140  uint8_t nb_weights[2]; ///< num_l0_weights, num_l1_weights
141  uint8_t weight_flag[2][2][MAX_WEIGHTS]; ///< luma_weight_l0_flag, chroma_weight_l0_flag,
142  ///< luma_weight_l1_flag, chroma_weight_l1_flag,
143  int16_t weight[2][VVC_MAX_SAMPLE_ARRAYS][MAX_WEIGHTS]; ///< LumaWeightL0, LumaWeightL1, ChromaWeightL0, ChromaWeightL1
144  int16_t offset[2][VVC_MAX_SAMPLE_ARRAYS][MAX_WEIGHTS]; ///< luma_offset_l0, luma_offset_l1, ChromaOffsetL0, ChromaOffsetL1
146 
147 typedef struct VVCPH {
149  void *rref; ///< RefStruct reference, backing ph above
150 
151  //derived values
152  uint32_t max_num_subblock_merge_cand; ///< MaxNumSubblockMergeCand
153  int32_t poc; ///< PicOrderCntVal
154 
155  uint8_t num_ver_vbs; ///< NumVerVirtualBoundaries
156  uint16_t vb_pos_x[VVC_MAX_VBS]; ///< VirtualBoundaryPosX
157  uint8_t num_hor_vbs; ///< NumHorVirtualBoundaries
158  uint16_t vb_pos_y[VVC_MAX_VBS]; ///< VirtualBoundaryPosY
159 
161 } VVCPH;
162 
163 #define ALF_NUM_FILTERS_LUMA 25
164 #define ALF_NUM_FILTERS_CHROMA 8
165 #define ALF_NUM_FILTERS_CC 4
166 
167 #define ALF_NUM_COEFF_LUMA 12
168 #define ALF_NUM_COEFF_CHROMA 6
169 #define ALF_NUM_COEFF_CC 7
170 
171 typedef struct VVCALF {
172  const H266RawAPS *r;
175 
179 
180  uint8_t num_cc_filters[2]; ///< alf_cc_cb_filters_signalled_minus1 + 1, alf_cc_cr_filters_signalled_minus1 + 1
182 } VVCALF;
183 
184 enum {
191  SL_MAX_ID = 28,
192 };
193 
194 #define SL_MAX_MATRIX_SIZE 8
195 
196 typedef struct VVCScalingList {
198  uint8_t scaling_matrix_dc_rec[SL_MAX_ID - SL_START_16x16]; ///< ScalingMatrixDcRec[refId − 14]
200 
201 typedef struct VVCLMCS {
202  uint8_t min_bin_idx;
203  uint8_t max_bin_idx;
204 
205  union {
207  uint16_t u16[LMCS_MAX_LUT_SIZE]; ///< for high bit-depth
208  } fwd_lut, inv_lut;
209 
210  uint16_t pivot[LMCS_MAX_BIN_SIZE + 1];
212 } VVCLMCS;
213 
214 #define VVC_MAX_ALF_COUNT 8
215 #define VVC_MAX_LMCS_COUNT 4
216 #define VVC_MAX_SL_COUNT 8
217 
218 typedef struct VVCParamSets {
219  const VVCSPS *sps_list[VVC_MAX_SPS_COUNT]; ///< RefStruct reference
220  const VVCPPS *pps_list[VVC_MAX_PPS_COUNT]; ///< RefStruct reference
221  const VVCALF *alf_list[VVC_MAX_ALF_COUNT]; ///< RefStruct reference
222  const H266RawAPS *lmcs_list[VVC_MAX_LMCS_COUNT]; ///< RefStruct reference
223  const VVCScalingList *scaling_list[VVC_MAX_SL_COUNT]; ///< RefStruct reference
224 
225  // Bit field of SPS IDs used in the current CVS
226  uint16_t sps_id_used;
227 } VVCParamSets;
228 
229 typedef struct VVCFrameParamSets {
230  const VVCSPS *sps; ///< RefStruct reference
231  const VVCPPS *pps; ///< RefStruct reference
233  const VVCALF *alf_list[VVC_MAX_ALF_COUNT]; ///< RefStruct reference
235  const VVCScalingList *sl; ///< RefStruct reference
237 
238 typedef struct VVCSH {
239  const H266RawSliceHeader *r; ///< RefStruct reference
240 
241  // derived values
242  // ctu address
243  uint32_t num_ctus_in_curr_slice; ///< NumCtusInCurrSlice
244  const uint32_t* ctb_addr_in_curr_slice; ///< CtbAddrInCurrSlice
245 
246  // inter
248  int8_t ref_idx_sym[2]; ///< RefIdxSymL0, RefIdxSymL1
249 
250  // qp_y
251  int8_t slice_qp_y; ///< SliceQpY
252 
253  // deblock_offsets
255 
256  // partition constrains
257  uint8_t min_qt_size[2]; ///< MinQtSizeY, MinQtSizeC
258  uint8_t max_bt_size[2]; ///< MaxBtSizeY, MaxBtSizeC
259  uint8_t max_tt_size[2]; ///< MaxTtSizeY, MaxTtSizeC
260  uint8_t max_mtt_depth[2]; ///< MaxMttDepthY, MaxMttDepthC
261  uint8_t cu_qp_delta_subdiv; ///< CuQpDeltaSubdiv
262  uint8_t cu_chroma_qp_offset_subdiv; ///< CuChromaQpOffsetSubdiv
263 
264  // entries
265  uint32_t entry_point_start_ctu[VVC_MAX_ENTRY_POINTS]; ///< entry point start in ctu_addr
266 } VVCSH;
267 
268 struct VVCContext;
269 
272 int ff_vvc_decode_sh(VVCSH *sh, const VVCFrameParamSets *ps, const CodedBitstreamUnit *unit);
275 
276 #endif /* AVCODEC_VVC_PS_H */
VVCPH::num_hor_vbs
uint8_t num_hor_vbs
NumHorVirtualBoundaries.
Definition: ps.h:157
VVCSPS
Definition: ps.h:58
VVCPPS::ctb_width
uint16_t ctb_width
Definition: ps.h:108
PredWeightTable::weight_flag
uint8_t weight_flag[2][2][MAX_WEIGHTS]
luma_weight_l0_flag, chroma_weight_l0_flag, luma_weight_l1_flag, chroma_weight_l1_flag,
Definition: ps.h:141
DBParams
Definition: hevcdec.h:347
VVCSH::cu_qp_delta_subdiv
uint8_t cu_qp_delta_subdiv
CuQpDeltaSubdiv.
Definition: ps.h:261
VVCSH::num_ctus_in_curr_slice
uint32_t num_ctus_in_curr_slice
NumCtusInCurrSlice.
Definition: ps.h:243
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:71
VVCPH
Definition: ps.h:147
VVCSPS::log2_transform_range
uint8_t log2_transform_range
Log2TransformRange.
Definition: ps.h:83
VVCPPS
Definition: ps.h:92
VVCLMCS::min_bin_idx
uint8_t min_bin_idx
Definition: ps.h:202
cbs_h266.h
VVCSH::entry_point_start_ctu
uint32_t entry_point_start_ctu[VVC_MAX_ENTRY_POINTS]
entry point start in ctu_addr
Definition: ps.h:265
VVCPPS::r
const H266RawPPS * r
RefStruct reference.
Definition: ps.h:93
SL_MAX_MATRIX_SIZE
#define SL_MAX_MATRIX_SIZE
Definition: ps.h:194
VVCSPS::chroma_qp_table
int8_t chroma_qp_table[3][VVC_MAX_POINTS_IN_QP_TABLE]
ChromaQpTable.
Definition: ps.h:84
SL_START_32x32
@ SL_START_32x32
Definition: ps.h:189
ff_vvc_decode_aps
int ff_vvc_decode_aps(VVCParamSets *ps, const CodedBitstreamUnit *unit)
Definition: ps.c:1159
VVCSH::cu_chroma_qp_offset_subdiv
uint8_t cu_chroma_qp_offset_subdiv
CuChromaQpOffsetSubdiv.
Definition: ps.h:262
LMCS_MAX_BIN_SIZE
#define LMCS_MAX_BIN_SIZE
Definition: ps.h:48
VVCLMCS::max_bin_idx
uint8_t max_bin_idx
Definition: ps.h:203
VVCSH::r
const H266RawSliceHeader * r
RefStruct reference.
Definition: ps.h:239
VVCPH::vb_pos_x
uint16_t vb_pos_x[VVC_MAX_VBS]
VirtualBoundaryPosX.
Definition: ps.h:156
PredWeightTable::offset
int16_t offset[2][VVC_MAX_SAMPLE_ARRAYS][MAX_WEIGHTS]
luma_offset_l0, luma_offset_l1, ChromaOffsetL0, ChromaOffsetL1
Definition: ps.h:144
VVCLMCS
Definition: ps.h:201
VVC_MAX_LMCS_COUNT
#define VVC_MAX_LMCS_COUNT
Definition: ps.h:215
VVCSPS::pixel_shift
uint8_t pixel_shift
Definition: ps.h:66
VVCALF::num_chroma_filters
uint8_t num_chroma_filters
Definition: ps.h:176
CodedBitstreamUnit
Coded bitstream unit structure.
Definition: cbs.h:70
VVCSPS::qp_bd_offset
uint8_t qp_bd_offset
QpBdOffset.
Definition: ps.h:70
VVCPH::vb_pos_y
uint16_t vb_pos_y[VVC_MAX_VBS]
VirtualBoundaryPosY.
Definition: ps.h:158
VVC_MAX_PPS_COUNT
@ VVC_MAX_PPS_COUNT
Definition: vvc.h:99
VVCLMCS::chroma_scale_coeff
uint16_t chroma_scale_coeff[LMCS_MAX_BIN_SIZE]
Definition: ps.h:211
VVCPPS::subpic_x
uint16_t subpic_x[VVC_MAX_SLICES]
SubpicLeftBoundaryPos.
Definition: ps.h:130
VVCPPS::width
uint16_t width
Definition: ps.h:99
VVCPPS::subpic_y
uint16_t subpic_y[VVC_MAX_SLICES]
SubpicTopBoundaryPos.
Definition: ps.h:131
VVCFrameParamSets::sps
const VVCSPS * sps
RefStruct reference.
Definition: ps.h:230
ALF_NUM_COEFF_CHROMA
#define ALF_NUM_COEFF_CHROMA
Definition: ps.h:168
VVCFrameParamSets
Definition: ps.h:229
VVCPPS::num_ctus_in_slice
uint16_t num_ctus_in_slice[VVC_MAX_SLICES]
Definition: ps.h:103
VVC_MAX_SPS_COUNT
@ VVC_MAX_SPS_COUNT
Definition: vvc.h:97
PredWeightTable::log2_denom
uint8_t log2_denom[2]
luma_log2_weight_denom, ChromaLog2WeightDenom
Definition: ps.h:138
SL_START_16x16
@ SL_START_16x16
Definition: ps.h:188
VVCSH::pwt
PredWeightTable pwt
Definition: ps.h:247
VVCSPS::hshift
uint8_t hshift[VVC_MAX_SAMPLE_ARRAYS]
Definition: ps.h:62
H266RawAPS
Definition: cbs_h266.h:600
VVCParamSets::pps_list
const VVCPPS * pps_list[VVC_MAX_PPS_COUNT]
RefStruct reference.
Definition: ps.h:220
VVCPPS::height
uint16_t height
Definition: ps.h:100
VVCALF::cc_coeff
int16_t cc_coeff[2][ALF_NUM_FILTERS_CC][ALF_NUM_COEFF_CC]
Definition: ps.h:181
VVCSPS::max_num_merge_cand
uint8_t max_num_merge_cand
MaxNumMergeCand.
Definition: ps.h:77
VVCFrameParamSets::sl
const VVCScalingList * sl
RefStruct reference.
Definition: ps.h:235
VVCALF
Definition: ps.h:171
VVCALF::chroma_clip_idx
uint8_t chroma_clip_idx[ALF_NUM_FILTERS_CHROMA][ALF_NUM_COEFF_CHROMA]
Definition: ps.h:178
VVC_MAX_SAMPLE_ARRAYS
@ VVC_MAX_SAMPLE_ARRAYS
Definition: vvc.h:77
VVCPPS::min_cb_height
uint16_t min_cb_height
Definition: ps.h:106
VVC_MAX_ALF_COUNT
#define VVC_MAX_ALF_COUNT
Definition: ps.h:214
DBParams::beta_offset
int beta_offset
Definition: hevcdec.h:348
DBParams::tc_offset
int tc_offset
Definition: hevcdec.h:349
VVCPPS::width64
uint16_t width64
width in 64 pixels
Definition: ps.h:125
SL_START_4x4
@ SL_START_4x4
Definition: ps.h:186
s
#define s(width, name)
Definition: cbs_vp9.c:198
LMCS_MAX_LUT_SIZE
#define LMCS_MAX_LUT_SIZE
Definition: ps.h:47
VVCPPS::ref_wraparound_offset
uint16_t ref_wraparound_offset
PpsRefWraparoundOffset.
Definition: ps.h:128
CHROMA_FORMAT_444
@ CHROMA_FORMAT_444
Definition: ps.h:55
PredWeightTable::weight
int16_t weight[2][VVC_MAX_SAMPLE_ARRAYS][MAX_WEIGHTS]
LumaWeightL0, LumaWeightL1, ChromaWeightL0, ChromaWeightL1.
Definition: ps.h:143
VVCFrameParamSets::lmcs
VVCLMCS lmcs
Definition: ps.h:234
VVCPPS::ctb_addr_in_slice
uint32_t * ctb_addr_in_slice
CtbAddrInCurrSlice for entire picture.
Definition: ps.h:117
VVCSPS::ctb_size_y
uint16_t ctb_size_y
CtbSizeY.
Definition: ps.h:72
VVCSH
Definition: ps.h:238
PredWeightTable
Definition: ps.h:137
VVCPPS::ctb_to_row_bd
uint16_t * ctb_to_row_bd
CtbToTileRowBd.
Definition: ps.h:121
VVCFrameParamSets::ph
VVCPH ph
Definition: ps.h:232
CHROMA_FORMAT_420
@ CHROMA_FORMAT_420
Definition: ps.h:53
VVCParamSets::sps_list
const VVCSPS * sps_list[VVC_MAX_SPS_COUNT]
RefStruct reference.
Definition: ps.h:219
H266RawSPS
Definition: cbs_h266.h:308
SL_START_2x2
@ SL_START_2x2
Definition: ps.h:185
H266RawPPS
Definition: cbs_h266.h:496
VVCPPS::slice_start_offset
uint16_t slice_start_offset[VVC_MAX_SLICES]
Definition: ps.h:102
VVCSPS::ctb_log2_size_y
uint8_t ctb_log2_size_y
CtbLog2SizeY.
Definition: ps.h:71
VVCPH::pwt
PredWeightTable pwt
Definition: ps.h:160
H266RawPictureHeader
Definition: cbs_h266.h:676
VVCSH::ref_idx_sym
int8_t ref_idx_sym[2]
RefIdxSymL0, RefIdxSymL1.
Definition: ps.h:248
VVCFrameParamSets::alf_list
const VVCALF * alf_list[VVC_MAX_ALF_COUNT]
RefStruct reference.
Definition: ps.h:233
VVCPPS::ctb_height
uint16_t ctb_height
Definition: ps.h:109
VVCSH::max_tt_size
uint8_t max_tt_size[2]
MaxTtSizeY, MaxTtSizeC.
Definition: ps.h:259
VVCParamSets::scaling_list
const VVCScalingList * scaling_list[VVC_MAX_SL_COUNT]
RefStruct reference.
Definition: ps.h:223
ALF_NUM_FILTERS_CC
#define ALF_NUM_FILTERS_CC
Definition: ps.h:165
VVCSPS::bit_depth
uint8_t bit_depth
BitDepth.
Definition: ps.h:69
SL_START_64x64
@ SL_START_64x64
Definition: ps.h:190
VVCPPS::chroma_qp_offset_list
int8_t chroma_qp_offset_list[6][3]
pps_cb_qp_offset_list, pps_cr_qp_offset_list, pps_joint_cbcr_qp_offset_list
Definition: ps.h:97
VVCPH::r
const H266RawPictureHeader * r
Definition: ps.h:148
VVCALF::luma_coeff
int16_t luma_coeff[ALF_NUM_FILTERS_LUMA][ALF_NUM_COEFF_LUMA]
Definition: ps.h:173
VVCFrameParamSets::pps
const VVCPPS * pps
RefStruct reference.
Definition: ps.h:231
VVCSH::max_mtt_depth
uint8_t max_mtt_depth[2]
MaxMttDepthY, MaxMttDepthC.
Definition: ps.h:260
VVCSPS::max_num_ibc_merge_cand
uint8_t max_num_ibc_merge_cand
MaxNumIbcMergeCand.
Definition: ps.h:78
VVCScalingList
Definition: ps.h:196
VVC_MAX_POINTS_IN_QP_TABLE
@ VVC_MAX_POINTS_IN_QP_TABLE
Definition: vvc.h:121
ff_vvc_decode_sh
int ff_vvc_decode_sh(VVCSH *sh, const VVCFrameParamSets *ps, const CodedBitstreamUnit *unit)
Definition: ps.c:1348
VVCPH::num_ver_vbs
uint8_t num_ver_vbs
NumVerVirtualBoundaries.
Definition: ps.h:155
PredWeightTable::nb_weights
uint8_t nb_weights[2]
num_l0_weights, num_l1_weights
Definition: ps.h:140
VVCSPS::ladf_interval_lower_bound
uint32_t ladf_interval_lower_bound[LADF_MAX_INTERVAL]
SpsLadfIntervalLowerBound[].
Definition: ps.h:81
VVC_MAX_SL_COUNT
#define VVC_MAX_SL_COUNT
Definition: ps.h:216
SL_MAX_ID
@ SL_MAX_ID
Definition: ps.h:191
CHROMA_FORMAT_MONO
@ CHROMA_FORMAT_MONO
Definition: ps.h:52
VVCPPS::min_tu_width
uint16_t min_tu_width
Definition: ps.h:114
VVCLMCS::inv_lut
union VVCLMCS::@291 inv_lut
LADF_MAX_INTERVAL
#define LADF_MAX_INTERVAL
Definition: ps.h:49
VVCSH::deblock
DBParams deblock
Definition: ps.h:254
VVCSH::ctb_addr_in_curr_slice
const uint32_t * ctb_addr_in_curr_slice
CtbAddrInCurrSlice.
Definition: ps.h:244
VVCScalingList::scaling_matrix_dc_rec
uint8_t scaling_matrix_dc_rec[SL_MAX_ID - SL_START_16x16]
ScalingMatrixDcRec[refId − 14].
Definition: ps.h:198
VVCSPS::log2_parallel_merge_level
uint8_t log2_parallel_merge_level
sps_log2_parallel_merge_level_minus2 + 2;
Definition: ps.h:82
VVCPPS::chroma_qp_offset
int8_t chroma_qp_offset[3]
pps_cb_qp_offset, pps_cr_qp_offset, pps_joint_cbcr_qp_offset_value
Definition: ps.h:96
VVCSPS::pix_fmt
enum AVPixelFormat pix_fmt
Definition: ps.h:67
vvc.h
VVCPH::max_num_subblock_merge_cand
uint32_t max_num_subblock_merge_cand
MaxNumSubblockMergeCand.
Definition: ps.h:152
H266RawSliceHeader
Definition: cbs_h266.h:771
VVCLMCS::pivot
uint16_t pivot[LMCS_MAX_BIN_SIZE+1]
Definition: ps.h:210
VVC_MAX_ENTRY_POINTS
@ VVC_MAX_ENTRY_POINTS
Definition: vvc.h:153
VVCSPS::vshift
uint8_t vshift[VVC_MAX_SAMPLE_ARRAYS]
Definition: ps.h:63
VVCPPS::min_pu_width
uint16_t min_pu_width
Definition: ps.h:112
SL_START_8x8
@ SL_START_8x8
Definition: ps.h:187
VVCPPS::width32
uint16_t width32
width in 32 pixels
Definition: ps.h:123
VVCPH::rref
void * rref
RefStruct reference, backing ph above.
Definition: ps.h:149
VVCPPS::subpic_height
uint16_t subpic_height[VVC_MAX_SLICES]
Definition: ps.h:133
VVCPH::poc
int32_t poc
PicOrderCntVal.
Definition: ps.h:153
VVCLMCS::u16
uint16_t u16[LMCS_MAX_LUT_SIZE]
for high bit-depth
Definition: ps.h:207
ALF_NUM_COEFF_CC
#define ALF_NUM_COEFF_CC
Definition: ps.h:169
VVC_MAX_VBS
@ VVC_MAX_VBS
Definition: vvc.h:156
VVCPPS::min_tu_height
uint16_t min_tu_height
Definition: ps.h:115
VVCSPS::num_ladf_intervals
uint8_t num_ladf_intervals
sps_num_ladf_intervals_minus2 + 2;
Definition: ps.h:80
VVCSPS::max_num_gpm_merge_cand
uint8_t max_num_gpm_merge_cand
MaxNumGpmMergeCand.
Definition: ps.h:79
VVCSPS::min_cb_log2_size_y
uint8_t min_cb_log2_size_y
MinCbLog2SizeY.
Definition: ps.h:73
VVCALF::r
const H266RawAPS * r
Definition: ps.h:172
ff_vvc_ps_uninit
void ff_vvc_ps_uninit(VVCParamSets *ps)
Definition: ps.c:962
ALF_NUM_COEFF_LUMA
#define ALF_NUM_COEFF_LUMA
Definition: ps.h:167
VVCPPS::ctb_count
uint32_t ctb_count
Definition: ps.h:110
VVCContext::ps
VVCParamSets ps
Definition: dec.h:220
VVCPPS::subpic_width
uint16_t subpic_width[VVC_MAX_SLICES]
Definition: ps.h:132
VVCPPS::height32
uint16_t height32
height in 32 pixels
Definition: ps.h:124
VVCPPS::row_bd
uint16_t * row_bd
TileRowBdVal.
Definition: ps.h:119
VVCPPS::min_pu_height
uint16_t min_pu_height
Definition: ps.h:113
VVCParamSets::alf_list
const VVCALF * alf_list[VVC_MAX_ALF_COUNT]
RefStruct reference.
Definition: ps.h:221
VVCSH::slice_qp_y
int8_t slice_qp_y
SliceQpY.
Definition: ps.h:251
VVCSPS::max_tb_size_y
uint8_t max_tb_size_y
MaxTbSizeY.
Definition: ps.h:75
CHROMA_FORMAT_422
@ CHROMA_FORMAT_422
Definition: ps.h:54
VVCPPS::col_bd
uint16_t * col_bd
TileColBdVal.
Definition: ps.h:118
VVCLMCS::u8
uint8_t u8[LMCS_MAX_LUT_SIZE]
Definition: ps.h:206
ff_vvc_frame_ps_free
void ff_vvc_frame_ps_free(VVCFrameParamSets *fps)
Definition: ps.c:952
VVCALF::luma_clip_idx
uint8_t luma_clip_idx[ALF_NUM_FILTERS_LUMA][ALF_NUM_COEFF_LUMA]
Definition: ps.h:174
VVCParamSets
Definition: ps.h:218
VVCSH::max_bt_size
uint8_t max_bt_size[2]
MaxBtSizeY, MaxBtSizeC.
Definition: ps.h:258
VVCPPS::min_cb_width
uint16_t min_cb_width
Definition: ps.h:105
VVC_MAX_SLICES
@ VVC_MAX_SLICES
Definition: vvc.h:144
VVCSPS::r
const H266RawSPS * r
RefStruct reference.
Definition: ps.h:59
VVCALF::num_cc_filters
uint8_t num_cc_filters[2]
alf_cc_cb_filters_signalled_minus1 + 1, alf_cc_cr_filters_signalled_minus1 + 1
Definition: ps.h:180
VVCLMCS::fwd_lut
union VVCLMCS::@291 fwd_lut
ALF_NUM_FILTERS_LUMA
#define ALF_NUM_FILTERS_LUMA
Definition: ps.h:163
int32_t
int32_t
Definition: audioconvert.c:56
VVCPPS::ctb_to_col_bd
uint16_t * ctb_to_col_bd
CtbToTileColBd.
Definition: ps.h:120
VVCSH::min_qt_size
uint8_t min_qt_size[2]
MinQtSizeY, MinQtSizeC.
Definition: ps.h:257
VVCPPS::height64
uint16_t height64
height in 64 pixels
Definition: ps.h:126
VVCSPS::max_pic_order_cnt_lsb
uint32_t max_pic_order_cnt_lsb
MaxPicOrderCntLsb.
Definition: ps.h:64
VVCSPS::min_cb_size_y
uint8_t min_cb_size_y
MinCbSizeY.
Definition: ps.h:74
MAX_WEIGHTS
#define MAX_WEIGHTS
Definition: ps.h:136
ff_vvc_decode_frame_ps
int ff_vvc_decode_frame_ps(VVCFrameParamSets *fps, struct VVCContext *s)
Definition: ps.c:933
VVCSPS::max_ts_size
uint8_t max_ts_size
MaxTsSize.
Definition: ps.h:76
VVCALF::chroma_coeff
int16_t chroma_coeff[ALF_NUM_FILTERS_CHROMA][ALF_NUM_COEFF_CHROMA]
Definition: ps.h:177
VVCParamSets::sps_id_used
uint16_t sps_id_used
Definition: ps.h:226
ALF_NUM_FILTERS_CHROMA
#define ALF_NUM_FILTERS_CHROMA
Definition: ps.h:164
VVCParamSets::lmcs_list
const H266RawAPS * lmcs_list[VVC_MAX_LMCS_COUNT]
RefStruct reference.
Definition: ps.h:222
VVCContext
Definition: dec.h:214
VVCScalingList::scaling_matrix_rec
uint8_t scaling_matrix_rec[SL_MAX_ID][SL_MAX_MATRIX_SIZE *SL_MAX_MATRIX_SIZE]
ScalingMatrixRec.
Definition: ps.h:197