TSDuck v3.40-3968
MPEG Transport Stream Toolkit
|
List of HEVC short-term reference picture sets. More...
#include <tsHEVCShortTermReferencePictureSetList.h>
Classes | |
class | ShortTermReferencePictureSet |
HEVC short-term reference picture set. More... | |
Public Types | |
using | SuperClass = AbstractVideoStructure |
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. | |
virtual void | clear () override |
Clear all values. | |
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. | |
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. | |
virtual bool | parse (AVCParser &, std::initializer_list< uint32_t >=std::initializer_list< uint32_t >()) override |
Parse the structure. | |
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. | |
bool | 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. | |
Public Attributes | |
std::vector< ShortTermReferencePictureSet > | list {} |
The list of ShortTermReferencePictureSet is organized as a vector. | |
bool | valid = false |
Valid 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. | |
List of HEVC short-term reference picture sets.
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:
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.
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.
[in] | data | Address of binary data to analyze. |
[in] | size | Size in bytes of binary data to analyze. |
[in] | num_short_term_ref_pic_sets | The corresponding HEVC parameter. |
bool 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.
[in] | num_short_term_ref_pic_sets | The corresponding HEVC parameter. |
|
inline |
Get the num_short_term_ref_pic_sets parameter of the list of st_ref_pic_set structures.
In practice, this is the size of the list of the ShortTermReferencePictureSet. The ShortTermReferencePictureSet index 0 to num_short_term_ref_pic_sets - 1 are stored in the HEVCSequenceParameterSet. The one with index num_short_term_ref_pic_sets, when present, is directly stored in the slice header.
|
overridevirtual |
Clear all values.
Should be reimplemented by subclasses. The data are marked invalid.
Reimplemented from ts::AbstractVideoData.
|
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.
[in] | addr | Address of the binary data to parse. |
[in] | size | Size in bytes of the binary data to parse. |
[in] | params | Additional parameters. May be needed by some structures. |
Reimplemented from ts::AbstractVideoStructure.
|
overridevirtual |
Parse the structure.
Must be reimplemented by subclasses. The data are marked as valid or invalid.
[in,out] | parser | The parser of an AVC stream. |
[in] | params | Additional parameters. May be needed by some structures. |
Implements ts::AbstractVideoStructure.
|
overridevirtual |
Display the content of this object to a stream.
[in,out] | stream | The stream where to print the content. Standard output by default. |
[in] | margin | The prefix string on each line, empty by default. |
[in] | level | Severity level (for instance, Severity::Info or Severity::Debug may display more information). |
Implements ts::DisplayInterface.
|
inlineprotectedinherited |
Display helper for subclasses.
Display an integer value.
INT | An integer type. |
[in,out] | out | The stream where to print the content. |
[in] | margin | The prefix string on each line. |
[in] | name | A name to display for the value. |
[in] | n | The integer value to display. |
|
inlineprotectedinherited |
Display helper for subclasses.
Display a vector of integer value.
INT | An integer type. |
[in,out] | out | The stream where to print the content. |
[in] | margin | The prefix string on each line. |
[in] | name | A name to display for the value. |
[in] | n | The integer values to display. |
|
inherited |
Valid flag.
Other fields are significant only if valid is true.