TSDuck v3.40-3963
MPEG Transport Stream Toolkit
Loading...
Searching...
No Matches
ts::HEVCSequenceParameterSet Class Reference

Representation of an HEVC sequence parameter set access unit. More...

#include <tsHEVCSequenceParameterSet.h>

Inheritance diagram for ts::HEVCSequenceParameterSet:
Collaboration diagram for ts::HEVCSequenceParameterSet:

Classes

class  LongTermRef
 < An entry for lt_ref values More...
 
class  SPSMax
 < An entry for sps_max values More...
 

Public Types

using SuperClass = AbstractHEVCAccessUnit
 Reference to the superclass.
 

Public Member Functions

 HEVCSequenceParameterSet (const uint8_t *data=nullptr, size_t size=0)
 Constructor from a binary area.
 
uint8_t chroma () const
 Get chroma_format_idc, applying default value (see H.264 7.4.2.1.1).
 
virtual void clear () override
 Clear all values.
 
virtual std::ostream & display (std::ostream &strm=std::cout, const UString &margin=UString(), int level=Severity::Info) const override
 Display the content of this object to a stream.
 
uint32_t frameHeight () const
 Frame height in pixels.
 
uint32_t frameWidth () const
 Frame width in pixels.
 
virtual bool parse (const uint8_t *, size_t, std::initializer_list< uint32_t >=std::initializer_list< uint32_t >()) override
 Parse a memory area containing binary video data of the expected type.
 

Public Attributes

uint8_t amp_enabled_flag = 0
 amp_enabled_flag
 
uint32_t bit_depth_chroma_minus8 = 0
 bit_depth_chroma_minus8
 
uint32_t bit_depth_luma_minus8 = 0
 bit_depth_luma_minus8
 
uint32_t chroma_format_idc = 0
 chroma_format_idc
 
uint32_t conf_win_bottom_offset = 0
 conf_win_bottom_offset
 
uint32_t conf_win_left_offset = 0
 conf_win_left_offset
 
uint32_t conf_win_right_offset = 0
 conf_win_right_offset
 
uint32_t conf_win_top_offset = 0
 conf_win_top_offset
 
uint8_t conformance_window_flag = 0
 conformance_window_flag
 
uint8_t forbidden_zero_bit = 0
 1 bit
 
uint32_t log2_diff_max_min_luma_coding_block_size = 0
 log2_diff_max_min_luma_coding_block_size
 
uint32_t log2_diff_max_min_luma_transform_block_size = 0
 log2_diff_max_min_luma_transform_block_size
 
uint32_t log2_diff_max_min_pcm_luma_coding_block_size = 0
 log2_diff_max_min_pcm_luma_coding_block_size
 
uint32_t log2_max_pic_order_cnt_lsb_minus4 = 0
 log2_max_pic_order_cnt_lsb_minus4
 
uint32_t log2_min_luma_coding_block_size_minus3 = 0
 log2_min_luma_coding_block_size_minus3
 
uint32_t log2_min_luma_transform_block_size_minus2 = 0
 log2_min_luma_transform_block_size_minus2
 
uint32_t log2_min_pcm_luma_coding_block_size_minus3 = 0
 log2_min_pcm_luma_coding_block_size_minus3
 
uint8_t long_term_ref_pics_present_flag = 0
 long_term_ref_pics_present_flag
 
std::vector< LongTermReflt_ref {}
 lt_ref values
 
uint32_t max_transform_hierarchy_depth_inter = 0
 max_transform_hierarchy_depth_inter
 
uint32_t max_transform_hierarchy_depth_intra = 0
 max_transform_hierarchy_depth_intra
 
uint8_t nal_unit_type = 0
 6 bits
 
uint8_t nuh_layer_id = 0
 6 bits
 
uint8_t nuh_temporal_id_plus1 = 0
 3 bits
 
uint32_t num_long_term_ref_pics_sps = 0
 num_long_term_ref_pics_sps
 
uint32_t num_short_term_ref_pic_sets = 0
 num_short_term_ref_pic_sets
 
uint8_t pcm_enabled_flag = 0
 pcm_enabled_flag
 
uint8_t pcm_loop_filter_disabled_flag = 0
 pcm_loop_filter_disabled_flag
 
uint8_t pcm_sample_bit_depth_chroma_minus1 = 0
 pcm_sample_bit_depth_chroma_minus1
 
uint8_t pcm_sample_bit_depth_luma_minus1 = 0
 pcm_sample_bit_depth_luma_minus1
 
uint32_t pic_height_in_luma_samples = 0
 pic_height_in_luma_samples
 
uint32_t pic_width_in_luma_samples = 0
 pic_width_in_luma_samples
 
HEVCProfileTierLevel profile_tier_level {}
 profile_tier_level
 
size_t rbsp_trailing_bits_count = 0
 rbsp_trailing_bits_count
 
bool rbsp_trailing_bits_valid = false
 rbsp_trailing_bits_valid
 
uint8_t sample_adaptive_offset_enabled_flag = 0
 sample_adaptive_offset_enabled_flag
 
HEVCScalingListData scaling_list_data {}
 scaling_list_data
 
uint8_t scaling_list_enabled_flag = 0
 scaling_list_enabled_flag
 
uint8_t separate_colour_plane_flag = 0
 separate_colour_plane_flag
 
uint8_t sps_3d_extension_flag = 0
 sps_3d_extension_flag
 
uint8_t sps_extension_4bits = 0
 sps_extension_4bits
 
uint8_t sps_extension_present_flag = 0
 sps_extension_present_flag
 
std::vector< SPSMaxsps_max {}
 sps_max values
 
uint8_t sps_max_sub_layers_minus1 = 0
 sps_max_sub_layers_minus1
 
uint8_t sps_multilayer_extension_flag = 0
 sps_multilayer_extension_flag
 
uint8_t sps_range_extension_flag = 0
 sps_range_extension_flag
 
uint8_t sps_scaling_list_data_present_flag = 0
 sps_scaling_list_data_present_flag
 
uint8_t sps_scc_extension_flag = 0
 sps_scc_extension_flag
 
uint32_t sps_seq_parameter_set_id = 0
 sps_seq_parameter_set_id
 
uint8_t sps_sub_layer_ordering_info_present_flag = 0
 sps_sub_layer_ordering_info_present_flag
 
uint8_t sps_temporal_id_nesting_flag = 0
 sps_temporal_id_nesting_flag
 
uint8_t sps_temporal_mvp_enabled_flag = 0
 sps_temporal_mvp_enabled_flag
 
uint8_t sps_video_parameter_set_id = 0
 sps_video_parameter_set_id
 
HEVCShortTermReferencePictureSetList st_ref_pic_set {}
 st_ref_pic_set
 
uint8_t strong_intra_smoothing_enabled_flag = 0
 strong_intra_smoothing_enabled_flag
 
bool valid = false
 Valid flag.
 
HEVCVUIParameters vui {}
 vui
 
uint8_t vui_parameters_present_flag = 0
 vui_parameters_present_flag
 

Protected Member Functions

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
void disp (std::ostream &out, const UString &margin, const UChar *name, INT n) const
 Display helper for subclasses.
 
template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
void disp (std::ostream &out, const UString &margin, const UChar *name, std::vector< INT > n) const
 Display helper for subclasses.
 
virtual bool parseBody (AVCParser &, std::initializer_list< uint32_t >) override
 Parse the body of the access unit up to but not including the rbsp_trailing_bits.
 
virtual bool parseHeader (const uint8_t *&, size_t &, std::initializer_list< uint32_t >=std::initializer_list< uint32_t >()) override
 Parse the header of the access unit.
 

Detailed Description

Representation of an HEVC sequence parameter set access unit.

See also
ITU H.265, sections 7.3.2.2 and 7.4.3.2

Constructor & Destructor Documentation

◆ HEVCSequenceParameterSet()

ts::HEVCSequenceParameterSet::HEVCSequenceParameterSet ( const uint8_t *  data = nullptr,
size_t  size = 0 
)

Constructor from a binary area.

Parameters
[in]dataAddress of binary data to analyze.
[in]sizeSize in bytes of binary data to analyze.

Member Function Documentation

◆ clear()

virtual void ts::HEVCSequenceParameterSet::clear ( )
overridevirtual

Clear all values.

Should be reimplemented by subclasses. The data are marked invalid.

Reimplemented from ts::AbstractHEVCAccessUnit.

◆ display()

virtual std::ostream & ts::HEVCSequenceParameterSet::display ( std::ostream &  stream = std::cout,
const UString margin = UString(),
int  level = Severity::Info 
) const
overridevirtual

Display the content of this object to a stream.

Parameters
[in,out]streamThe stream where to print the content. Standard output by default.
[in]marginThe prefix string on each line, empty by default.
[in]levelSeverity level (for instance, Severity::Info or Severity::Debug may display more information).
Returns
A reference to stream.

Implements ts::DisplayInterface.

◆ chroma()

uint8_t ts::HEVCSequenceParameterSet::chroma ( ) const

Get chroma_format_idc, applying default value (see H.264 7.4.2.1.1).

Returns
The chroma_format_idc, applying default value.

◆ frameWidth()

uint32_t ts::HEVCSequenceParameterSet::frameWidth ( ) const

Frame width in pixels.

Returns
The frame width in pixels.

◆ frameHeight()

uint32_t ts::HEVCSequenceParameterSet::frameHeight ( ) const

Frame height in pixels.

Returns
The frame height in pixels.

◆ parseBody()

virtual bool ts::HEVCSequenceParameterSet::parseBody ( AVCParser parser,
std::initializer_list< uint32_t >  params 
)
overrideprotectedvirtual

Parse the body of the access unit up to but not including the rbsp_trailing_bits.

Must be reimplemented by subclasses. The data are marked as valid or invalid.

Parameters
[in,out]parserThe parser of an AVC-like video stream.
[in]paramsAdditional parameters. May be needed by some structures.
Returns
The valid flag.

Implements ts::AbstractVideoAccessUnit.

◆ parseHeader()

virtual bool ts::AbstractHEVCAccessUnit::parseHeader ( const uint8_t *&  addr,
size_t &  size,
std::initializer_list< uint32_t >  params = std::initializer_list< uint32_t >() 
)
overrideprotectedvirtualinherited

Parse the header of the access unit.

Must be reimplemented by subclasses. The data are marked as valid or invalid.

Parameters
[in,out]addrAddress of the binary data to parse. Adjusted after header.
[in,out]sizeSize in bytes of the binary data to parse. Adjusted as remaining size after header.
[in]paramsAdditional parameters. May be needed by some structures.
Returns
The valid flag.

Implements ts::AbstractVideoAccessUnit.

◆ parse()

virtual bool ts::AbstractVideoAccessUnit::parse ( const uint8_t *  addr,
size_t  size,
std::initializer_list< uint32_t >  params = std::initializer_list< uint32_t >() 
)
overridevirtualinherited

Parse a memory area containing binary video data of the expected type.

Must be reimplemented by subclasses. The data are marked as valid or invalid.

Parameters
[in]addrAddress of the binary data to parse.
[in]sizeSize in bytes of the binary data to parse.
[in]paramsAdditional parameters. May be needed by some structures.
Returns
The valid flag.

Implements ts::AbstractVideoData.

◆ disp() [1/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
void ts::AbstractVideoData::disp ( std::ostream &  out,
const UString margin,
const UChar name,
INT  n 
) const
inlineprotectedinherited

Display helper for subclasses.

Display an integer value.

Template Parameters
INTAn integer type.
Parameters
[in,out]outThe stream where to print the content.
[in]marginThe prefix string on each line.
[in]nameA name to display for the value.
[in]nThe integer value to display.

◆ disp() [2/2]

template<typename INT , typename std::enable_if< std::is_integral< INT >::value >::type * = nullptr>
void ts::AbstractVideoData::disp ( std::ostream &  out,
const UString margin,
const UChar name,
std::vector< INT n 
) const
inlineprotectedinherited

Display helper for subclasses.

Display a vector of integer value.

Template Parameters
INTAn integer type.
Parameters
[in,out]outThe stream where to print the content.
[in]marginThe prefix string on each line.
[in]nameA name to display for the value.
[in]nThe integer values to display.

Member Data Documentation

◆ valid

bool ts::AbstractVideoData::valid = false
inherited

Valid flag.

Other fields are significant only if valid is true.


The documentation for this class was generated from the following file: