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

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

#include <tsAVCSequenceParameterSet.h>

Inheritance diagram for ts::AVCSequenceParameterSet:
Collaboration diagram for ts::AVCSequenceParameterSet:

Public Types

using SuperClass = AbstractAVCAccessUnit
 Reference to the superclass.
 

Public Member Functions

 AVCSequenceParameterSet (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).
 
uint8_t chromaArrayType () const
 The ChromaArrayType variable (see H.264 7.4.2.1.1).
 
virtual void clear () override
 Clear all values.
 
uint32_t cropUnitX () const
 The CropUnitX variable (see H.264 7.4.2.1.1).
 
uint32_t cropUnitY () const
 The CropUnitY variable (see H.264 7.4.2.1.1).
 
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.
 
bool extension1 () const
 Check validity of extension fields 1.
 
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.
 
uint8_t separateColourPlaneFlag () const
 Get separate_colour_plane_flag, applying default value (see H.264 7.4.2.1.1).
 
uint32_t subHeightC () const
 The SubHeightC variable (see H.264 6.2).
 
uint32_t subWidthC () const
 The SubWidthC variable (see H.264 6.2).
 

Public Attributes

uint32_t bit_depth_chroma_minus8 = 0
 bit_depth_chroma_minus8
 
uint32_t bit_depth_luma_minus8 = 0
 bit_depth_luma_minus8
 
uint8_t chroma_format_idc = 0
 chroma_format_idc
 
uint8_t constraint_set0_flag = 0
 constraint_set0_flag
 
uint8_t constraint_set1_flag = 0
 constraint_set1_flag
 
uint8_t constraint_set2_flag = 0
 constraint_set2_flag
 
uint8_t constraint_set3_flag = 0
 constraint_set3_flag
 
uint8_t delta_pic_order_always_zero_flag = 0
 delta_pic_order_always_zero_flag
 
uint8_t direct_8x8_inference_flag = 0
 direct_8x8_inference_flag
 
uint8_t forbidden_zero_bit = 0
 See ISO/IEC 14496-10 section 7.3.1.
 
uint32_t frame_crop_bottom_offset = 0
 frame_crop_bottom_offset
 
uint32_t frame_crop_left_offset = 0
 frame_crop_left_offset
 
uint32_t frame_crop_right_offset = 0
 frame_crop_right_offset
 
uint32_t frame_crop_top_offset = 0
 frame_crop_top_offset
 
uint8_t frame_cropping_flag = 0
 frame_cropping_flag
 
uint8_t frame_mbs_only_flag = 0
 frame_mbs_only_flag
 
uint8_t gaps_in_frame_num_value_allowed_flag = 0
 gaps_in_frame_num_value_allowed_flag
 
uint8_t level_idc = 0
 level_idc
 
uint32_t log2_max_frame_num_minus4 = 0
 log2_max_frame_num_minus4
 
uint32_t log2_max_pic_order_cnt_lsb_minus4 = 0
 log2_max_pic_order_cnt_lsb_minus4
 
uint8_t mb_adaptive_frame_field_flag = 0
 mb_adaptive_frame_field_flag
 
uint8_t nal_ref_idc = 0
 See ISO/IEC 14496-10 section 7.3.1.
 
uint8_t nal_unit_type = 0
 See ISO/IEC 14496-10 section 7.3.1.
 
uint32_t num_ref_frames = 0
 num_ref_frames
 
uint32_t num_ref_frames_in_pic_order_cnt_cycle = 0
 num_ref_frames_in_pic_order_cnt_cycle
 
int32_t offset_for_non_ref_pic = 0
 offset_for_non_ref_pic
 
std::vector< int32_t > offset_for_ref_frame {}
 offset_for_ref_frame
 
int32_t offset_for_top_to_bottom_field = 0
 offset_for_top_to_bottom_field
 
uint32_t pic_height_in_map_units_minus1 = 0
 pic_height_in_map_units_minus1
 
uint32_t pic_order_cnt_type = 0
 pic_order_cnt_type
 
uint32_t pic_width_in_mbs_minus1 = 0
 pic_width_in_mbs_minus1
 
uint8_t profile_idc = 0
 profile_idc
 
uint8_t qpprime_y_zero_transform_bypass_flag = 0
 qpprime_y_zero_transform_bypass_flag
 
size_t rbsp_trailing_bits_count = 0
 rbsp_trailing_bits_count
 
bool rbsp_trailing_bits_valid = false
 rbsp_trailing_bits_valid
 
uint8_t reserved_zero_4bits = 0
 reserved_zero_4bits
 
uint8_t separate_colour_plane_flag = 0
 separate_colour_plane_flag
 
uint32_t seq_parameter_set_id = 0
 seq_parameter_set_id
 
uint8_t seq_scaling_matrix_present_flag = 0
 seq_scaling_matrix_present_flag
 
bool valid = false
 Valid flag.
 
AVCVUIParameters vui {}
 vui
 
uint8_t vui_parameters_present_flag = 0
 vui_parameters_present_flag
 

Protected Member Functions

template<typename INT >
requires std::integral<INT>
void disp (std::ostream &out, const UString &margin, const UChar *name, INT n) const
 Display helper for subclasses.
 
template<typename INT >
requires std::integral<INT>
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 AVC sequence parameter set access unit.

AVC is Advanced Video Coding, ISO 14496-10, ITU H.264.

Constructor & Destructor Documentation

◆ AVCSequenceParameterSet()

ts::AVCSequenceParameterSet::AVCSequenceParameterSet ( 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::AVCSequenceParameterSet::clear ( )
overridevirtual

Clear all values.

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

Reimplemented from ts::AbstractAVCAccessUnit.

◆ display()

virtual std::ostream & ts::AVCSequenceParameterSet::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::AVCSequenceParameterSet::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.

◆ separateColourPlaneFlag()

uint8_t ts::AVCSequenceParameterSet::separateColourPlaneFlag ( ) const

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

Returns
The separate_colour_plane_flag, applying default value.

◆ chromaArrayType()

uint8_t ts::AVCSequenceParameterSet::chromaArrayType ( ) const

The ChromaArrayType variable (see H.264 7.4.2.1.1).

Returns
The ChromaArrayType variable.

◆ subWidthC()

uint32_t ts::AVCSequenceParameterSet::subWidthC ( ) const

The SubWidthC variable (see H.264 6.2).

Returns
The SubWidthC variable (see H.264 6.2).

◆ subHeightC()

uint32_t ts::AVCSequenceParameterSet::subHeightC ( ) const

The SubHeightC variable (see H.264 6.2).

Returns
The SubHeightC variable (see H.264 6.2).

◆ cropUnitX()

uint32_t ts::AVCSequenceParameterSet::cropUnitX ( ) const

The CropUnitX variable (see H.264 7.4.2.1.1).

Returns
The CropUnitX variable.

◆ cropUnitY()

uint32_t ts::AVCSequenceParameterSet::cropUnitY ( ) const

The CropUnitY variable (see H.264 7.4.2.1.1).

Returns
The CropUnitY variable.

◆ frameWidth()

uint32_t ts::AVCSequenceParameterSet::frameWidth ( ) const

Frame width in pixels.

Returns
The frame width in pixels.

◆ frameHeight()

uint32_t ts::AVCSequenceParameterSet::frameHeight ( ) const

Frame height in pixels.

Returns
The frame height in pixels.

◆ extension1()

bool ts::AVCSequenceParameterSet::extension1 ( ) const

Check validity of extension fields 1.

Returns
True if extension fields 1 are valid.

◆ parseBody()

virtual bool ts::AVCSequenceParameterSet::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::AbstractAVCAccessUnit::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 >
requires std::integral<INT>
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 >
requires std::integral<INT>
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: