TSDuck Version 3.32-2769 (TSDuck - The MPEG Transport Stream Toolkit)
ts::HEVCShortTermReferencePictureSetList Class Reference

List of HEVC short-term reference picture sets. More...

Inheritance diagram for ts::HEVCShortTermReferencePictureSetList:
Collaboration diagram for ts::HEVCShortTermReferencePictureSetList:

Classes

class  ShortTermReferencePictureSet
 HEVC short-term reference picture set. More...
 

Public Types

typedef AbstractVideoStructure SuperClass
 Reference to the superclass.
 

Public Member Functions

 HEVCShortTermReferencePictureSetList (const uint8_t *data=nullptr, size_t size=0, uint32_t num_short_term_ref_pic_sets=0)
 Constructor from a binary area. More...
 
virtual void clear () override
 Clear all values. More...
 
virtual std::ostream & display (std::ostream &=std::cout, const UString &margin=UString(), int level=Severity::Info) const override
 Display the content of this object to a stream. More...
 
uint32_t num_short_term_ref_pic_sets () const
 Get the num_short_term_ref_pic_sets parameter of the list of st_ref_pic_set structures. More...
 
uint32_t NumDeltaPocs (uint32_t RefRpsIdx) const
 Compute the NumDeltaPocs[RefRpsIdx] variable. More...
 
virtual bool parse (AVCParser &, std::initializer_list< uint32_t >=std::initializer_list< uint32_t >()) override
 Parse the structure. More...
 
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. More...
 
void reset (uint32_t num_short_term_ref_pic_sets)
 Reset this object, makes it valid, resize the vector with empty st_ref_pic_set structures. More...
 

Public Attributes

std::vector< ShortTermReferencePictureSetlist
 The list of ShortTermReferencePictureSet is organized as a vector.
 
bool valid
 Valid flag. More...
 

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. More...
 
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. More...
 

Detailed Description

List of HEVC short-term reference picture sets.

See also
ITU-T Rec. H.265, 7.3.7 and 7.4.8.

The HEVC structure st_ref_pic_set(stRpsIdx) is defined in 7.3.7 for index stRpsIdx. This index ranges from 0 to num_short_term_ref_pic_sets. The structure at index i may reference similar structures at lower indexes. So, a st_ref_pic_set cannot be used alone, it needs a reference to the previous instances.

The structure st_ref_pic_set(stRpsIdx) is used in two structures:

  • In sequence parameter set (7.3.2.2), an array of index 0 to num_short_term_ref_pic_sets - 1.
  • in slice segment header (7.3.6), last element, index num_short_term_ref_pic_sets.

As a consequence, the st_ref_pic_set structure is not defined as an AbstractVideoStructure because it cannot be parsed alone. The AbstractVideoStructure is a vector of st_ref_pic_set. The vector structure is used because the st_ref_pic_set structure are accessed by index.

The constructor parses a list of num_short_term_ref_pic_sets - 1 elements.

Unlike other AbstractVideoStructure subclasses, the parse() methods do no clear the content and do not rebuild the complete object. The parse() methods only parse one st_ref_pic_set structure which is placed in an existing element of the vector. The parse() methods need one argument: the stRpsIdx index of the element to parse from memory.

To completely rebuild a new HEVCShortTermReferencePictureSetList, use reset() and then parse each element is sequence.

Constructor & Destructor Documentation

◆ HEVCShortTermReferencePictureSetList()

ts::HEVCShortTermReferencePictureSetList::HEVCShortTermReferencePictureSetList ( const uint8_t *  data = nullptr,
size_t  size = 0,
uint32_t  num_short_term_ref_pic_sets = 0 
)

Constructor from a binary area.

The constructor resizes the vector with num_short_term_ref_pic_sets + 1 elements and parses the elements indexes from 0 to num_short_term_ref_pic_sets. The last element is left uninitialized.

Parameters
[in]dataAddress of binary data to analyze.
[in]sizeSize in bytes of binary data to analyze.
[in]num_short_term_ref_pic_setsThe corresponding HEVC parameter.

Member Function Documentation

◆ reset()

void ts::HEVCShortTermReferencePictureSetList::reset ( uint32_t  num_short_term_ref_pic_sets)

Reset this object, makes it valid, resize the vector with empty st_ref_pic_set structures.

Parameters
[in]num_short_term_ref_pic_setsThe corresponding HEVC parameter.

◆ num_short_term_ref_pic_sets()

uint32_t ts::HEVCShortTermReferencePictureSetList::num_short_term_ref_pic_sets ( ) const
inline

Get the num_short_term_ref_pic_sets parameter of the list of st_ref_pic_set structures.

Returns
The num_short_term_ref_pic_sets parameter of the list of st_ref_pic_set structures.

◆ NumDeltaPocs()

uint32_t ts::HEVCShortTermReferencePictureSetList::NumDeltaPocs ( uint32_t  RefRpsIdx) const

Compute the NumDeltaPocs[RefRpsIdx] variable.

Parameters
[in]RefRpsIdxIndex in the list.
Returns
The NumDeltaPocs[RefRpsIdx] variable.
See also
ITU-T Rec. H.265, 7.4.8 (7-71).

◆ clear()

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

Clear all values.

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

Reimplemented from ts::AbstractVideoData.

◆ parse() [1/2]

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

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.

Reimplemented from ts::AbstractVideoStructure.

◆ parse() [2/2]

virtual bool ts::HEVCShortTermReferencePictureSetList::parse ( AVCParser parser,
std::initializer_list< uint32_t >  params = std::initializer_list< uint32_t >() 
)
overridevirtual

Parse the structure.

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

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

Implements ts::AbstractVideoStructure.

◆ display()

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

◆ 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
inherited

Valid flag.

Other fields are significant only if valid is true.


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