FFmpeg
hevc_ps.h
Go to the documentation of this file.
1 /*
2  * HEVC parameter set parsing
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_HEVC_PS_H
22 #define AVCODEC_HEVC_PS_H
23 
24 #include <stdint.h>
25 
26 #include "libavutil/buffer.h"
27 #include "libavutil/pixfmt.h"
28 #include "libavutil/rational.h"
29 
30 #include "avcodec.h"
31 #include "get_bits.h"
32 #include "h2645_vui.h"
33 #include "hevc.h"
34 
35 typedef struct ShortTermRPS {
36  unsigned int num_negative_pics;
40  uint8_t used[32];
41 } ShortTermRPS;
42 
43 typedef struct HEVCWindow {
44  unsigned int left_offset;
45  unsigned int right_offset;
46  unsigned int top_offset;
47  unsigned int bottom_offset;
48 } HEVCWindow;
49 
50 typedef struct VUI {
52 
54 
57 
60 
63  uint32_t vui_time_scale;
67 
77 } VUI;
78 
79 typedef struct PTLCommon {
80  uint8_t profile_space;
81  uint8_t tier_flag;
82  uint8_t profile_idc;
98  uint8_t inbld_flag;
99  uint8_t level_idc;
100 } PTLCommon;
101 
102 typedef struct PTL {
105 
108 } PTL;
109 
110 typedef struct HEVCVPS {
113  int vps_max_sub_layers; ///< vps_max_temporal_layers_minus1 + 1
114 
121  int vps_num_layer_sets; ///< vps_num_layer_sets_minus1 + 1
124  uint32_t vps_time_scale;
126  int vps_num_ticks_poc_diff_one; ///< vps_num_ticks_poc_diff_one_minus1 + 1
128 
129  uint8_t data[4096];
131 } HEVCVPS;
132 
133 typedef struct ScalingList {
134  /* This is a little wasteful, since sizeID 0 only needs 8 coeffs,
135  * and size ID 3 only has 2 arrays, not 6. */
136  uint8_t sl[4][6][64];
137  uint8_t sl_dc[2][6];
138 } ScalingList;
139 
140 typedef struct HEVCSPS {
141  unsigned vps_id;
144 
146 
148 
153 
154  unsigned int log2_max_poc_lsb;
156 
158  struct {
164 
167 
170 
171  unsigned int nb_st_rps;
173 
175  uint8_t sao_enabled;
176 
181 
182  struct {
183  uint8_t bit_depth;
185  unsigned int log2_min_pcm_cb_size;
186  unsigned int log2_max_pcm_cb_size;
188  } pcm;
191 
192  unsigned int log2_min_cb_size;
194  unsigned int log2_min_tb_size;
195  unsigned int log2_max_trafo_size;
196  unsigned int log2_ctb_size;
197  unsigned int log2_min_pu_size;
198 
201 
212 
213  ///< coded frame dimension in various units
214  int width;
215  int height;
218  int ctb_size;
225  int tb_mask;
226 
227  int hshift[3];
228  int vshift[3];
229 
231 
232  uint8_t data[4096];
234 } HEVCSPS;
235 
236 typedef struct HEVCPPS {
237  unsigned int sps_id; ///< seq_parameter_set_id
238 
240 
242 
243  int num_ref_idx_l0_default_active; ///< num_ref_idx_l0_default_active_minus1 + 1
244  int num_ref_idx_l1_default_active; ///< num_ref_idx_l1_default_active_minus1 + 1
246 
249 
252 
260 
264 
265  uint16_t num_tile_columns; ///< num_tile_columns_minus1 + 1
266  uint16_t num_tile_rows; ///< num_tile_rows_minus1 + 1
269 
271 
274  uint8_t disable_dbf;
275  int beta_offset; ///< beta_offset_div2 * 2
276  int tc_offset; ///< tc_offset_div2 * 2
277 
280 
282  int log2_parallel_merge_level; ///< log2_parallel_merge_level_minus2 + 2
291  int8_t cb_qp_offset_list[6];
292  int8_t cr_qp_offset_list[6];
295 
296  // Inferred parameters
297  unsigned int *column_width; ///< ColumnWidth
298  unsigned int *row_height; ///< RowHeight
299  unsigned int *col_bd; ///< ColBd
300  unsigned int *row_bd; ///< RowBd
301  int *col_idxX;
302 
303  int *ctb_addr_rs_to_ts; ///< CtbAddrRSToTS
304  int *ctb_addr_ts_to_rs; ///< CtbAddrTSToRS
305  int *tile_id; ///< TileId
306  int *tile_pos_rs; ///< TilePosRS
307  int *min_tb_addr_zs; ///< MinTbAddrZS
308  int *min_tb_addr_zs_tab;///< MinTbAddrZS
309 
310  uint8_t data[4096];
312 } HEVCPPS;
313 
314 typedef struct HEVCParamSets {
318 
319  /* currently active parameter sets */
320  const HEVCVPS *vps;
321  const HEVCSPS *sps;
322  const HEVCPPS *pps;
323 } HEVCParamSets;
324 
325 /**
326  * Parse the SPS from the bitstream into the provided HEVCSPS struct.
327  *
328  * @param sps_id the SPS id will be written here
329  * @param apply_defdispwin if set 1, the default display window from the VUI
330  * will be applied to the video dimensions
331  * @param vps_list if non-NULL, this function will validate that the SPS refers
332  * to an existing VPS
333  */
334 int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id,
335  int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx);
336 
338  HEVCParamSets *ps);
340  HEVCParamSets *ps, int apply_defdispwin);
342  HEVCParamSets *ps);
343 
345 
347  ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header);
348 
349 int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id,
350  uint8_t *buf, int buf_size);
351 
352 /**
353  * Compute POC of the current frame and return it.
354  */
355 int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type);
356 
357 #endif /* AVCODEC_HEVC_PS_H */
HEVCVPS::vps_poc_proportional_to_timing_flag
uint8_t vps_poc_proportional_to_timing_flag
Definition: hevc_ps.h:125
HEVCSPS::vui
VUI vui
Definition: hevc_ps.h:165
HEVCSPS::sps_strong_intra_smoothing_enable_flag
uint8_t sps_strong_intra_smoothing_enable_flag
Definition: hevc_ps.h:190
ff_hevc_decode_nal_vps
int ff_hevc_decode_nal_vps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
Definition: hevc_ps.c:436
HEVCPPS::tiles_enabled_flag
uint8_t tiles_enabled_flag
Definition: hevc_ps.h:262
HEVCSPS::log2_min_cb_size
unsigned int log2_min_cb_size
Definition: hevc_ps.h:192
HEVCSPS::used_by_curr_pic_lt_sps_flag
uint8_t used_by_curr_pic_lt_sps_flag[HEVC_MAX_LONG_TERM_REF_PICS]
Definition: hevc_ps.h:179
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
HEVCSPS::data_size
int data_size
Definition: hevc_ps.h:233
HEVCPPS::data_size
int data_size
Definition: hevc_ps.h:311
HEVCPPS::pps_range_extensions_flag
uint8_t pps_range_extensions_flag
Definition: hevc_ps.h:286
ShortTermRPS::used
uint8_t used[32]
Definition: hevc_ps.h:40
VUI::vui_time_scale
uint32_t vui_time_scale
Definition: hevc_ps.h:63
PTLCommon::max_10bit_constraint_flag
uint8_t max_10bit_constraint_flag
Definition: hevc_ps.h:89
HEVCSPS::long_term_ref_pics_present_flag
uint8_t long_term_ref_pics_present_flag
Definition: hevc_ps.h:177
HEVCSPS::lt_ref_pic_poc_lsb_sps
uint16_t lt_ref_pic_poc_lsb_sps[HEVC_MAX_LONG_TERM_REF_PICS]
Definition: hevc_ps.h:178
HEVCSPS::st_rps
ShortTermRPS st_rps[HEVC_MAX_SHORT_TERM_REF_PIC_SETS]
Definition: hevc_ps.h:172
HEVCSPS::pcm_enabled_flag
int pcm_enabled_flag
Definition: hevc_ps.h:155
HEVCWindow::bottom_offset
unsigned int bottom_offset
Definition: hevc_ps.h:47
HEVCPPS::column_width
unsigned int * column_width
ColumnWidth.
Definition: hevc_ps.h:297
PTL::sub_layer_ptl
PTLCommon sub_layer_ptl[HEVC_MAX_SUB_LAYERS]
Definition: hevc_ps.h:104
HEVCSPS::bit_depth
int bit_depth
Definition: hevc_ps.h:149
HEVCSPS::loop_filter_disable_flag
uint8_t loop_filter_disable_flag
Definition: hevc_ps.h:187
rational.h
PTLCommon::intra_constraint_flag
uint8_t intra_constraint_flag
Definition: hevc_ps.h:94
HEVC_MAX_SPS_COUNT
@ HEVC_MAX_SPS_COUNT
Definition: hevc.h:112
HEVCPPS::slice_header_extension_present_flag
uint8_t slice_header_extension_present_flag
Definition: hevc_ps.h:284
HEVCSPS::temporal_layer
struct HEVCSPS::@81 temporal_layer[HEVC_MAX_SUB_LAYERS]
HEVCPPS::output_flag_present_flag
uint8_t output_flag_present_flag
Definition: hevc_ps.h:258
HEVCVPS::vps_num_units_in_tick
uint32_t vps_num_units_in_tick
Definition: hevc_ps.h:123
HEVC_MAX_PPS_COUNT
@ HEVC_MAX_PPS_COUNT
Definition: hevc.h:114
HEVCSPS::log2_max_pcm_cb_size
unsigned int log2_max_pcm_cb_size
Definition: hevc_ps.h:186
HEVCPPS::lists_modification_present_flag
uint8_t lists_modification_present_flag
Definition: hevc_ps.h:281
HEVCPPS::cu_qp_delta_enabled_flag
uint8_t cu_qp_delta_enabled_flag
Definition: hevc_ps.h:250
VUI::tiles_fixed_structure_flag
int tiles_fixed_structure_flag
Definition: hevc_ps.h:69
VUI::vui_num_ticks_poc_diff_one_minus1
int vui_num_ticks_poc_diff_one_minus1
Definition: hevc_ps.h:65
ScalingList::sl
uint8_t sl[4][6][64]
Definition: hevc_ps.h:136
HEVCSPS::max_latency_increase
int max_latency_increase
Definition: hevc_ps.h:161
VUI::field_seq_flag
int field_seq_flag
Definition: hevc_ps.h:55
HEVCSPS::persistent_rice_adaptation_enabled_flag
int persistent_rice_adaptation_enabled_flag
Definition: hevc_ps.h:210
HEVCSPS::temporal_id_nesting_flag
uint8_t temporal_id_nesting_flag
Definition: hevc_ps.h:163
HEVCSPS::explicit_rdpcm_enabled_flag
int explicit_rdpcm_enabled_flag
Definition: hevc_ps.h:206
ff_hevc_decode_nal_pps
int ff_hevc_decode_nal_pps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps)
Definition: hevc_ps.c:1439
PTLCommon::profile_space
uint8_t profile_space
Definition: hevc_ps.h:80
VUI::bitstream_restriction_flag
int bitstream_restriction_flag
Definition: hevc_ps.h:68
HEVCSPS::max_dec_pic_buffering
int max_dec_pic_buffering
Definition: hevc_ps.h:159
HEVCVPS::data
uint8_t data[4096]
Definition: hevc_ps.h:129
HEVCPPS::deblocking_filter_control_present_flag
uint8_t deblocking_filter_control_present_flag
Definition: hevc_ps.h:272
HEVCPPS::num_tile_columns
uint16_t num_tile_columns
num_tile_columns_minus1 + 1
Definition: hevc_ps.h:265
HEVCSPS::min_tb_height
int min_tb_height
Definition: hevc_ps.h:222
HEVCSPS::min_cb_width
int min_cb_width
Definition: hevc_ps.h:219
HEVCSPS::min_pu_width
int min_pu_width
Definition: hevc_ps.h:223
HEVCSPS::intra_smoothing_disabled_flag
int intra_smoothing_disabled_flag
Definition: hevc_ps.h:208
HEVCSPS::output_window
HEVCWindow output_window
Definition: hevc_ps.h:145
PTLCommon::profile_compatibility_flag
uint8_t profile_compatibility_flag[32]
Definition: hevc_ps.h:83
HEVCPPS::min_tb_addr_zs_tab
int * min_tb_addr_zs_tab
MinTbAddrZS.
Definition: hevc_ps.h:308
HEVCSPS::separate_colour_plane_flag
uint8_t separate_colour_plane_flag
Definition: hevc_ps.h:143
PTLCommon::progressive_source_flag
uint8_t progressive_source_flag
Definition: hevc_ps.h:84
HEVCSPS::log2_diff_max_min_coding_block_size
unsigned int log2_diff_max_min_coding_block_size
Definition: hevc_ps.h:193
ff_hevc_ps_uninit
void ff_hevc_ps_uninit(HEVCParamSets *ps)
Definition: hevc_ps.c:1687
HEVCVPS::vps_time_scale
uint32_t vps_time_scale
Definition: hevc_ps.h:124
PTLCommon::interlaced_source_flag
uint8_t interlaced_source_flag
Definition: hevc_ps.h:85
PTLCommon::max_8bit_constraint_flag
uint8_t max_8bit_constraint_flag
Definition: hevc_ps.h:90
PTLCommon::one_picture_only_constraint_flag
uint8_t one_picture_only_constraint_flag
Definition: hevc_ps.h:95
HEVCSPS::max_transform_hierarchy_depth_intra
int max_transform_hierarchy_depth_intra
Definition: hevc_ps.h:200
HEVCSPS::pic_conf_win
HEVCWindow pic_conf_win
Definition: hevc_ps.h:147
HEVCWindow::left_offset
unsigned int left_offset
Definition: hevc_ps.h:44
GetBitContext
Definition: get_bits.h:107
HEVCPPS::weighted_pred_flag
uint8_t weighted_pred_flag
Definition: hevc_ps.h:256
HEVCSPS::log2_min_pcm_cb_size
unsigned int log2_min_pcm_cb_size
Definition: hevc_ps.h:185
HEVCSPS::log2_max_poc_lsb
unsigned int log2_max_poc_lsb
Definition: hevc_ps.h:154
HEVCPPS::cb_qp_offset
int cb_qp_offset
Definition: hevc_ps.h:253
ShortTermRPS::num_delta_pocs
int num_delta_pocs
Definition: hevc_ps.h:37
HEVCSPS::transform_skip_rotation_enabled_flag
int transform_skip_rotation_enabled_flag
Definition: hevc_ps.h:203
HEVCPPS::loop_filter_across_tiles_enabled_flag
uint8_t loop_filter_across_tiles_enabled_flag
Definition: hevc_ps.h:268
VUI::restricted_ref_pic_lists_flag
int restricted_ref_pic_lists_flag
Definition: hevc_ps.h:71
PTLCommon::frame_only_constraint_flag
uint8_t frame_only_constraint_flag
Definition: hevc_ps.h:87
PTLCommon::max_monochrome_constraint_flag
uint8_t max_monochrome_constraint_flag
Definition: hevc_ps.h:93
HEVCPPS::row_bd
unsigned int * row_bd
RowBd.
Definition: hevc_ps.h:300
HEVCPPS::num_extra_slice_header_bits
int num_extra_slice_header_bits
Definition: hevc_ps.h:283
PTL::sub_layer_level_present_flag
uint8_t sub_layer_level_present_flag[HEVC_MAX_SUB_LAYERS]
Definition: hevc_ps.h:107
HEVCPPS::col_bd
unsigned int * col_bd
ColBd.
Definition: hevc_ps.h:299
HEVCPPS::diff_cu_qp_delta_depth
int diff_cu_qp_delta_depth
Definition: hevc_ps.h:251
HEVCVPS::vps_max_latency_increase
unsigned int vps_max_latency_increase[HEVC_MAX_SUB_LAYERS]
Definition: hevc_ps.h:119
PTLCommon
Definition: hevc_ps.h:79
HEVCSPS::height
int height
Definition: hevc_ps.h:215
ff_hevc_decode_nal_sps
int ff_hevc_decode_nal_sps(GetBitContext *gb, AVCodecContext *avctx, HEVCParamSets *ps, int apply_defdispwin)
Definition: hevc_ps.c:1190
HEVCSPS::sps_temporal_mvp_enabled_flag
uint8_t sps_temporal_mvp_enabled_flag
Definition: hevc_ps.h:189
get_bits.h
VUI::motion_vectors_over_pic_boundaries_flag
int motion_vectors_over_pic_boundaries_flag
Definition: hevc_ps.h:70
PTLCommon::non_packed_constraint_flag
uint8_t non_packed_constraint_flag
Definition: hevc_ps.h:86
HEVCPPS::ctb_addr_ts_to_rs
int * ctb_addr_ts_to_rs
CtbAddrTSToRS.
Definition: hevc_ps.h:304
HEVCPPS::deblocking_filter_override_enabled_flag
uint8_t deblocking_filter_override_enabled_flag
Definition: hevc_ps.h:273
HEVCPPS::log2_sao_offset_scale_luma
uint8_t log2_sao_offset_scale_luma
Definition: hevc_ps.h:293
HEVCWindow::top_offset
unsigned int top_offset
Definition: hevc_ps.h:46
PTLCommon::profile_idc
uint8_t profile_idc
Definition: hevc_ps.h:82
ScalingList
Definition: hevc_ps.h:133
PTL::general_ptl
PTLCommon general_ptl
Definition: hevc_ps.h:103
PTLCommon::tier_flag
uint8_t tier_flag
Definition: hevc_ps.h:81
HEVCPPS::scaling_list
ScalingList scaling_list
Definition: hevc_ps.h:279
HEVC_MAX_SUB_LAYERS
@ HEVC_MAX_SUB_LAYERS
Definition: hevc.h:105
HEVCVPS::vps_num_hrd_parameters
int vps_num_hrd_parameters
Definition: hevc_ps.h:127
HEVCSPS::num_long_term_ref_pics_sps
uint8_t num_long_term_ref_pics_sps
Definition: hevc_ps.h:180
ScalingList::sl_dc
uint8_t sl_dc[2][6]
Definition: hevc_ps.h:137
VUI::frame_field_info_present_flag
int frame_field_info_present_flag
Definition: hevc_ps.h:56
HEVCPPS::constrained_intra_pred_flag
uint8_t constrained_intra_pred_flag
Definition: hevc_ps.h:247
VUI::vui_timing_info_present_flag
int vui_timing_info_present_flag
Definition: hevc_ps.h:61
HEVCPPS::tile_id
int * tile_id
TileId.
Definition: hevc_ps.h:305
HEVCPPS::cb_qp_offset_list
int8_t cb_qp_offset_list[6]
Definition: hevc_ps.h:291
HEVCPPS::dependent_slice_segments_enabled_flag
uint8_t dependent_slice_segments_enabled_flag
Definition: hevc_ps.h:261
H2645VUI
Definition: h2645_vui.h:27
VUI::log2_max_mv_length_horizontal
int log2_max_mv_length_horizontal
Definition: hevc_ps.h:75
HEVCParamSets::vps
const HEVCVPS * vps
Definition: hevc_ps.h:320
PTL
Definition: hevc_ps.h:102
HEVCVPS::vps_num_ticks_poc_diff_one
int vps_num_ticks_poc_diff_one
vps_num_ticks_poc_diff_one_minus1 + 1
Definition: hevc_ps.h:126
vps
static int FUNC() vps(CodedBitstreamContext *ctx, RWContext *rw, H265RawVPS *current)
Definition: cbs_h265_syntax_template.c:423
PTL::sub_layer_profile_present_flag
uint8_t sub_layer_profile_present_flag[HEVC_MAX_SUB_LAYERS]
Definition: hevc_ps.h:106
ff_hevc_decode_short_term_rps
int ff_hevc_decode_short_term_rps(GetBitContext *gb, AVCodecContext *avctx, ShortTermRPS *rps, const HEVCSPS *sps, int is_slice_header)
Definition: hevc_ps.c:100
VUI::max_bytes_per_pic_denom
int max_bytes_per_pic_denom
Definition: hevc_ps.h:73
HEVCSPS::bit_depth
uint8_t bit_depth
Definition: hevc_ps.h:183
HEVCWindow
Definition: hevc_ps.h:43
HEVCPPS::beta_offset
int beta_offset
beta_offset_div2 * 2
Definition: hevc_ps.h:275
HEVCSPS::high_precision_offsets_enabled_flag
int high_precision_offsets_enabled_flag
Definition: hevc_ps.h:209
HEVCPPS::cross_component_prediction_enabled_flag
uint8_t cross_component_prediction_enabled_flag
Definition: hevc_ps.h:287
ff_hevc_encode_nal_vps
int ff_hevc_encode_nal_vps(HEVCVPS *vps, unsigned int id, uint8_t *buf, int buf_size)
Definition: hevc_ps_enc.c:66
HEVCSPS::data
uint8_t data[4096]
Definition: hevc_ps.h:232
HEVCPPS::entropy_coding_sync_enabled_flag
uint8_t entropy_coding_sync_enabled_flag
Definition: hevc_ps.h:263
HEVCSPS::chroma_format_idc
int chroma_format_idc
Definition: hevc_ps.h:142
HEVCSPS::sps_range_extension_flag
int sps_range_extension_flag
Definition: hevc_ps.h:202
HEVCPPS::row_height
unsigned int * row_height
RowHeight.
Definition: hevc_ps.h:298
HEVCSPS::log2_max_trafo_size
unsigned int log2_max_trafo_size
Definition: hevc_ps.h:195
VUI::common
H2645VUI common
Definition: hevc_ps.h:51
VUI::def_disp_win
HEVCWindow def_disp_win
Definition: hevc_ps.h:59
VUI::vui_poc_proportional_to_timing_flag
int vui_poc_proportional_to_timing_flag
Definition: hevc_ps.h:64
VUI
Definition: hevc_ps.h:50
HEVCSPS::tb_mask
int tb_mask
Definition: hevc_ps.h:225
VUI::vui_num_units_in_tick
uint32_t vui_num_units_in_tick
Definition: hevc_ps.h:62
HEVCSPS::max_transform_hierarchy_depth_inter
int max_transform_hierarchy_depth_inter
Definition: hevc_ps.h:199
VUI::max_bits_per_min_cu_denom
int max_bits_per_min_cu_denom
Definition: hevc_ps.h:74
buffer.h
HEVCPPS::chroma_qp_offset_list_len_minus1
uint8_t chroma_qp_offset_list_len_minus1
Definition: hevc_ps.h:290
HEVCPPS::cr_qp_offset
int cr_qp_offset
Definition: hevc_ps.h:254
HEVCPPS::seq_loop_filter_across_slices_enabled_flag
uint8_t seq_loop_filter_across_slices_enabled_flag
Definition: hevc_ps.h:270
HEVCPPS::cabac_init_present_flag
uint8_t cabac_init_present_flag
Definition: hevc_ps.h:241
HEVCSPS::hshift
int hshift[3]
Definition: hevc_ps.h:227
HEVCParamSets::pps_list
AVBufferRef * pps_list[HEVC_MAX_PPS_COUNT]
Definition: hevc_ps.h:317
VUI::log2_max_mv_length_vertical
int log2_max_mv_length_vertical
Definition: hevc_ps.h:76
HEVCSPS::cabac_bypass_alignment_enabled_flag
int cabac_bypass_alignment_enabled_flag
coded frame dimension in various units
Definition: hevc_ps.h:211
HEVCVPS::vps_max_dec_pic_buffering
unsigned int vps_max_dec_pic_buffering[HEVC_MAX_SUB_LAYERS]
Definition: hevc_ps.h:117
HEVCSPS::max_sub_layers
int max_sub_layers
Definition: hevc_ps.h:157
HEVCSPS::log2_min_pu_size
unsigned int log2_min_pu_size
Definition: hevc_ps.h:197
HEVCPPS::tile_pos_rs
int * tile_pos_rs
TilePosRS.
Definition: hevc_ps.h:306
HEVC_MAX_LONG_TERM_REF_PICS
@ HEVC_MAX_LONG_TERM_REF_PICS
Definition: hevc.h:124
HEVCSPS::bit_depth_chroma
uint8_t bit_depth_chroma
Definition: hevc_ps.h:184
HEVCSPS::log2_ctb_size
unsigned int log2_ctb_size
Definition: hevc_ps.h:196
HEVCPPS::log2_parallel_merge_level
int log2_parallel_merge_level
log2_parallel_merge_level_minus2 + 2
Definition: hevc_ps.h:282
ShortTermRPS::num_negative_pics
unsigned int num_negative_pics
Definition: hevc_ps.h:36
HEVCSPS::bit_depth_chroma
int bit_depth_chroma
Definition: hevc_ps.h:150
PTLCommon::max_422chroma_constraint_flag
uint8_t max_422chroma_constraint_flag
Definition: hevc_ps.h:91
VUI::default_display_window_flag
int default_display_window_flag
Definition: hevc_ps.h:58
HEVCSPS::transform_skip_context_enabled_flag
int transform_skip_context_enabled_flag
Definition: hevc_ps.h:204
HEVCSPS::implicit_rdpcm_enabled_flag
int implicit_rdpcm_enabled_flag
Definition: hevc_ps.h:205
HEVCParamSets::sps
const HEVCSPS * sps
Definition: hevc_ps.h:321
HEVCSPS::pcm
struct HEVCSPS::@82 pcm
VUI::neutra_chroma_indication_flag
int neutra_chroma_indication_flag
Definition: hevc_ps.h:53
ShortTermRPS::rps_idx_num_delta_pocs
int rps_idx_num_delta_pocs
Definition: hevc_ps.h:38
HEVCVPS::vps_sub_layer_ordering_info_present_flag
int vps_sub_layer_ordering_info_present_flag
Definition: hevc_ps.h:116
PTLCommon::max_12bit_constraint_flag
uint8_t max_12bit_constraint_flag
Definition: hevc_ps.h:88
HEVCSPS::amp_enabled_flag
uint8_t amp_enabled_flag
Definition: hevc_ps.h:174
PTLCommon::max_420chroma_constraint_flag
uint8_t max_420chroma_constraint_flag
Definition: hevc_ps.h:92
HEVCPPS::pic_init_qp_minus26
int pic_init_qp_minus26
Definition: hevc_ps.h:245
HEVCSPS::width
int width
Definition: hevc_ps.h:214
HEVCPPS::disable_dbf
uint8_t disable_dbf
Definition: hevc_ps.h:274
HEVCSPS::min_pu_height
int min_pu_height
Definition: hevc_ps.h:224
hevc.h
PTLCommon::lower_bit_rate_constraint_flag
uint8_t lower_bit_rate_constraint_flag
Definition: hevc_ps.h:96
avcodec.h
pixfmt.h
h2645_vui.h
HEVCPPS::uniform_spacing_flag
uint8_t uniform_spacing_flag
Definition: hevc_ps.h:267
sps
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
Definition: cbs_h264_syntax_template.c:260
HEVC_MAX_VPS_COUNT
@ HEVC_MAX_VPS_COUNT
Definition: hevc.h:110
HEVCPPS::cr_qp_offset_list
int8_t cr_qp_offset_list[6]
Definition: hevc_ps.h:292
AVCodecContext
main external API structure.
Definition: avcodec.h:426
HEVCSPS::min_cb_height
int min_cb_height
Definition: hevc_ps.h:220
HEVCPPS::scaling_list_data_present_flag
uint8_t scaling_list_data_present_flag
Definition: hevc_ps.h:278
HEVCPPS::min_tb_addr_zs
int * min_tb_addr_zs
MinTbAddrZS.
Definition: hevc_ps.h:307
HEVCVPS::vps_max_layer_id
int vps_max_layer_id
Definition: hevc_ps.h:120
HEVCVPS::vps_temporal_id_nesting_flag
uint8_t vps_temporal_id_nesting_flag
Definition: hevc_ps.h:111
HEVCSPS::log2_min_tb_size
unsigned int log2_min_tb_size
Definition: hevc_ps.h:194
ff_hevc_compute_poc
int ff_hevc_compute_poc(const HEVCSPS *sps, int pocTid0, int poc_lsb, int nal_unit_type)
Compute POC of the current frame and return it.
Definition: hevc_ps.c:1703
HEVCSPS::nb_st_rps
unsigned int nb_st_rps
Definition: hevc_ps.h:171
HEVCVPS::vps_max_sub_layers
int vps_max_sub_layers
vps_max_temporal_layers_minus1 + 1
Definition: hevc_ps.h:113
HEVCSPS::ctb_height
int ctb_height
Definition: hevc_ps.h:217
PTLCommon::level_idc
uint8_t level_idc
Definition: hevc_ps.h:99
HEVCPPS::sign_data_hiding_flag
uint8_t sign_data_hiding_flag
Definition: hevc_ps.h:239
HEVCParamSets::sps_list
AVBufferRef * sps_list[HEVC_MAX_SPS_COUNT]
Definition: hevc_ps.h:316
HEVCParamSets::pps
const HEVCPPS * pps
Definition: hevc_ps.h:322
ff_hevc_parse_sps
int ff_hevc_parse_sps(HEVCSPS *sps, GetBitContext *gb, unsigned int *sps_id, int apply_defdispwin, AVBufferRef **vps_list, AVCodecContext *avctx)
Parse the SPS from the bitstream into the provided HEVCSPS struct.
Definition: hevc_ps.c:848
HEVCPPS::log2_max_transform_skip_block_size
uint8_t log2_max_transform_skip_block_size
Definition: hevc_ps.h:285
HEVCPPS::pic_slice_level_chroma_qp_offsets_present_flag
uint8_t pic_slice_level_chroma_qp_offsets_present_flag
Definition: hevc_ps.h:255
HEVCWindow::right_offset
unsigned int right_offset
Definition: hevc_ps.h:45
ShortTermRPS
Definition: hevc_ps.h:35
HEVCPPS::weighted_bipred_flag
uint8_t weighted_bipred_flag
Definition: hevc_ps.h:257
PTLCommon::inbld_flag
uint8_t inbld_flag
Definition: hevc_ps.h:98
HEVCVPS::vps_timing_info_present_flag
uint8_t vps_timing_info_present_flag
Definition: hevc_ps.h:122
VUI::vui_hrd_parameters_present_flag
int vui_hrd_parameters_present_flag
Definition: hevc_ps.h:66
HEVCPPS::data
uint8_t data[4096]
Definition: hevc_ps.h:310
VUI::min_spatial_segmentation_idc
int min_spatial_segmentation_idc
Definition: hevc_ps.h:72
HEVCPPS::log2_sao_offset_scale_chroma
uint8_t log2_sao_offset_scale_chroma
Definition: hevc_ps.h:294
HEVCPPS::num_ref_idx_l1_default_active
int num_ref_idx_l1_default_active
num_ref_idx_l1_default_active_minus1 + 1
Definition: hevc_ps.h:244
HEVCSPS::ctb_width
int ctb_width
Definition: hevc_ps.h:216
HEVCSPS::vshift
int vshift[3]
Definition: hevc_ps.h:228
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:82
HEVCVPS
Definition: hevc_ps.h:110
HEVCSPS::qp_bd_offset
int qp_bd_offset
Definition: hevc_ps.h:230
HEVCSPS
Definition: hevc_ps.h:140
HEVCSPS::extended_precision_processing_flag
int extended_precision_processing_flag
Definition: hevc_ps.h:207
HEVCSPS::pixel_shift
int pixel_shift
Definition: hevc_ps.h:151
HEVCPPS::num_ref_idx_l0_default_active
int num_ref_idx_l0_default_active
num_ref_idx_l0_default_active_minus1 + 1
Definition: hevc_ps.h:243
HEVCPPS
Definition: hevc_ps.h:236
HEVCPPS::sps_id
unsigned int sps_id
seq_parameter_set_id
Definition: hevc_ps.h:237
HEVCVPS::vps_max_layers
int vps_max_layers
Definition: hevc_ps.h:112
HEVCSPS::sao_enabled
uint8_t sao_enabled
Definition: hevc_ps.h:175
PTLCommon::max_14bit_constraint_flag
uint8_t max_14bit_constraint_flag
Definition: hevc_ps.h:97
HEVCSPS::vps_id
unsigned vps_id
Definition: hevc_ps.h:141
HEVCSPS::min_tb_width
int min_tb_width
Definition: hevc_ps.h:221
int32_t
int32_t
Definition: audioconvert.c:56
HEVCPPS::diff_cu_chroma_qp_offset_depth
uint8_t diff_cu_chroma_qp_offset_depth
Definition: hevc_ps.h:289
HEVCVPS::data_size
int data_size
Definition: hevc_ps.h:130
HEVCPPS::col_idxX
int * col_idxX
Definition: hevc_ps.h:301
HEVCSPS::num_reorder_pics
int num_reorder_pics
Definition: hevc_ps.h:160
HEVCPPS::transquant_bypass_enable_flag
uint8_t transquant_bypass_enable_flag
Definition: hevc_ps.h:259
HEVC_MAX_SHORT_TERM_REF_PIC_SETS
@ HEVC_MAX_SHORT_TERM_REF_PIC_SETS
Definition: hevc.h:122
HEVCVPS::vps_num_layer_sets
int vps_num_layer_sets
vps_num_layer_sets_minus1 + 1
Definition: hevc_ps.h:121
HEVCPPS::chroma_qp_offset_list_enabled_flag
uint8_t chroma_qp_offset_list_enabled_flag
Definition: hevc_ps.h:288
ShortTermRPS::delta_poc
int32_t delta_poc[32]
Definition: hevc_ps.h:39
HEVCVPS::vps_num_reorder_pics
unsigned int vps_num_reorder_pics[HEVC_MAX_SUB_LAYERS]
Definition: hevc_ps.h:118
HEVCSPS::ctb_size
int ctb_size
Definition: hevc_ps.h:218
HEVCVPS::ptl
PTL ptl
Definition: hevc_ps.h:115
HEVCPPS::num_tile_rows
uint16_t num_tile_rows
num_tile_rows_minus1 + 1
Definition: hevc_ps.h:266
HEVCSPS::pix_fmt
enum AVPixelFormat pix_fmt
Definition: hevc_ps.h:152
HEVCParamSets::vps_list
AVBufferRef * vps_list[HEVC_MAX_VPS_COUNT]
Definition: hevc_ps.h:315
HEVCSPS::scaling_list_enable_flag
uint8_t scaling_list_enable_flag
Definition: hevc_ps.h:168
HEVCPPS::transform_skip_enabled_flag
uint8_t transform_skip_enabled_flag
Definition: hevc_ps.h:248
HEVCPPS::tc_offset
int tc_offset
tc_offset_div2 * 2
Definition: hevc_ps.h:276
HEVCPPS::ctb_addr_rs_to_ts
int * ctb_addr_rs_to_ts
CtbAddrRSToTS.
Definition: hevc_ps.h:303
HEVCParamSets
Definition: hevc_ps.h:314
HEVCSPS::scaling_list
ScalingList scaling_list
Definition: hevc_ps.h:169
HEVCSPS::ptl
PTL ptl
Definition: hevc_ps.h:166