MythTV  master
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | List of all members
HEVCParser Class Reference

#include <HEVCParser.h>

Inheritance diagram for HEVCParser:
Inheritance graph
[legend]
Collaboration diagram for HEVCParser:
Collaboration graph
[legend]

Classes

struct  PPS
 
struct  ScalingList
 
struct  ShortTermRefPicSet
 
struct  SPS
 
struct  VPS
 

Public Types

enum  NAL_unit_type {
  TAIL_N = 0, TAIL_R = 1, TSA_N = 2, TSA_R = 3,
  STSA_N = 4, STSA_R = 5, RADL_N = 6, RADL_R = 7,
  RASL_N = 8, RASL_R = 9, RSV_VCL_N10 = 10, RSV_VCL_N12 = 12,
  RSV_VCL_N14 = 14, RSV_VCL_R11 = 11, RSV_VCL_R13 = 13, RSV_VCL_R15 = 15,
  BLA_W_LP = 16, BLA_W_RADL = 17, BLA_N_LP = 18, IDR_W_RADL = 19,
  IDR_N_LP = 20, CRA_NUT = 21, RSV_IRAP_VCL22 = 22, RSV_IRAP_VCL23 = 23,
  RSV_VCL24 = 24, RSV_VCL25 = 25, RSV_VCL26 = 26, RSV_VCL27 = 27,
  RSV_VCL28 = 28, RSV_VCL29 = 29, RSV_VCL30 = 30, RSV_VCL31 = 31,
  VPS_NUT = 32, SPS_NUT = 33, PPS_NUT = 34, AUD_NUT = 35,
  EOS_NUT = 36, EOB_NUT = 37, FD_NUT = 38, PREFIX_SEI_NUT = 39,
  SUFFIX_SEI_NUT = 40, RSV_NVCL41 = 41, RSV_NVCL42 = 42, RSV_NVCL43 = 43,
  RSV_NVCL44 = 44, RSV_NVCL45 = 45, RSV_NVCL46 = 46, RSV_NVCL47 = 47,
  UNSPEC48 = 48, UNSPEC49 = 49, UNSPEC50 = 50, UNSPEC51 = 51,
  UNSPEC52 = 52, UNSPEC53 = 53, UNSPEC54 = 54, UNSPEC55 = 55,
  UNSPEC56 = 56, UNSPEC57 = 57, UNSPEC58 = 58, UNSPEC59 = 59,
  UNSPEC60 = 60, UNSPEC61 = 61, UNSPEC62 = 62, UNSPEC63 = 63
}
 
enum  QuantMatrixSize { QUANT_MATIX_4X4 = 0, QUANT_MATIX_8X8 = 1, QUANT_MATIX_16X16 = 2, QUANT_MATIX_32X32 = 3 }
 
- Public Types inherited from H2645Parser
enum  { MAX_SLICE_HEADER_SIZE = 256 }
 
enum  field_type { FRAME = 'F', FIELD_TOP = 'T', FIELD_BOTTOM = 'B' }
 
enum  NAL_unit_type { UNKNOWN = -1 }
 
enum  SLICE_type {
  SLICE_P = 0, SLICE_B = 1, SLICE_I = 2, SLICE_SP = 3,
  SLICE_SI = 4, SLICE_P_a = 5, SLICE_B_a = 6, SLICE_I_a = 7,
  SLICE_SP_a = 8, SLICE_SI_a = 9, SLICE_UNDEF = 10
}
 

Public Member Functions

 HEVCParser (void)
 
 HEVCParser (const HEVCParser &rhs)
 
 ~HEVCParser (void) override
 
uint32_t addBytes (const uint8_t *bytes, uint32_t byte_count, uint64_t stream_offset) override
 
void Reset (void) override
 
QString NAL_type_str (int8_t type) override
 
uint pictureWidthCropped (void) const override
 
uint pictureHeightCropped (void) const override
 
field_type getFieldType (void) const override
 
void getFrameRate (FrameRate &result) const override
 
- Public Member Functions inherited from H2645Parser
 H2645Parser (void)
 
 H2645Parser (const H2645Parser &rhs)
 
virtual ~H2645Parser (void)
 
bool stateChanged (void) const
 
bool onFrameStart (void) const
 
bool onKeyFrameStart (void) const
 
uint pictureWidth (void) const
 
uint pictureHeight (void) const
 
uint aspectRatio (void) const
 Computes aspect ratio from picture size and sample aspect ratio. More...
 
uint64_t frameAUstreamOffset (void) const
 
uint64_t keyframeAUstreamOffset (void) const
 
uint64_t SPSstreamOffset (void) const
 
uint32_t GetTimeScale (void) const
 
uint32_t GetUnitsInTick (void) const
 
SCAN_t GetScanType (void) const
 

Static Public Member Functions

static bool NALisRAP (uint type)
 
static bool NALisIRAP (uint type)
 
static bool NALisVCL (uint type)
 

Protected Member Functions

bool newAU (void)
 
void processRBSP (bool rbsp_complete)
 
bool profileTierLevel (GetBitContext *gb, bool profilePresentFlag, int maxNumSubLayersMinus1)
 
bool parseSliceSegmentLayer (GetBitContext *gb)
 
bool parseSliceSegmentHeader (GetBitContext *gb)
 
bool parseSPS (GetBitContext *gb)
 
bool parseVPS (GetBitContext *gb)
 
bool parsePPS (GetBitContext *gb)
 
- Protected Member Functions inherited from H2645Parser
void resetRBSP (void)
 
bool fillRBSP (const uint8_t *byteP, uint32_t byte_count, bool found_start_code)
 
void vui_parameters (GetBitContext *gb, bool hevc)
 

Private Attributes

uint32_t m_maxPicOrderCntLsb {0}
 
uint32_t m_picOrderCntMsb {0}
 
uint32_t m_picOrderCntVal {0}
 
uint32_t m_prevPicOrderCntLsb {0}
 
uint32_t m_prevPicOrderCntMsb {0}
 
uint32_t m_resolutionCheck {0}
 
uint m_nalUnitType {UNSPEC63}
 
uint8_t m_nalTemperalId {0}
 
uint8_t m_nuhLayerId {0}
 
bool m_firstSliceSegmentInPicFlag {false}
 
bool m_nextNALisAU {false}
 
bool m_noRaslOutputFlag {false}
 
bool m_seenEOS {true}
 
std::map< uint, SPSm_sps
 
std::map< uint, PPSm_pps
 
std::map< uint, VPSm_vps
 
std::map< uint, uintm_poc
 

Additional Inherited Members

- Protected Types inherited from H2645Parser
enum  constants { EXTENDED_SAR = 255 }
 
- Protected Attributes inherited from H2645Parser
uint64_t m_framecnt {0}
 
uint64_t m_keyframecnt {0}
 
uint64_t m_totalframecnt {0}
 
uint64_t m_totalkeyframecnt {0}
 
uint64_t m_auOffset {0}
 
uint64_t m_frameStartOffset {0}
 
uint64_t m_keyframeStartOffset {0}
 
uint64_t m_pktOffset {0}
 
uint64_t m_spsOffset {0}
 
uint32_t m_consecutiveZeros {0}
 
uint32_t m_rbspBufferSize {188 * 2}
 
uint32_t m_rbspIndex {0}
 
uint32_t m_syncAccumulator {0xffffffff}
 
uint32_t m_timeScale {0}
 
uint32_t m_unitsInTick {0}
 
SCAN_t m_scanType {SCAN_t::UNKNOWN_SCAN}
 
uint m_frameCropBottomOffset {0}
 
uint m_frameCropLeftOffset {0}
 
uint m_frameCropRightOffset {0}
 
uint m_frameCropTopOffset {0}
 
uint m_picHeight {0}
 
uint m_picWidth {0}
 
uint m_sarHeight {0}
 
uint m_sarWidth {0}
 
uint8_t * m_rbspBuffer {nullptr}
 
uint8_t m_aspectRatioIdc {0}
 
int8_t m_chromaFormatIdc {1}
 
bool m_auPending {false}
 
bool m_fixedRate {false}
 
bool m_haveUnfinishedNAL {false}
 
bool m_isKeyframe {false}
 
bool m_onAU {false}
 
bool m_onFrame {false}
 
bool m_onKeyFrame {false}
 
bool m_seenSPS {false}
 
bool m_separateColourPlaneFlag {false}
 
bool m_stateChanged {false}
 

Detailed Description

Definition at line 29 of file HEVCParser.h.

Member Enumeration Documentation

◆ NAL_unit_type

Enumerator
TAIL_N 
TAIL_R 
TSA_N 
TSA_R 
STSA_N 
STSA_R 
RADL_N 
RADL_R 
RASL_N 
RASL_R 
RSV_VCL_N10 
RSV_VCL_N12 
RSV_VCL_N14 
RSV_VCL_R11 
RSV_VCL_R13 
RSV_VCL_R15 
BLA_W_LP 
BLA_W_RADL 
BLA_N_LP 
IDR_W_RADL 
IDR_N_LP 
CRA_NUT 
RSV_IRAP_VCL22 
RSV_IRAP_VCL23 
RSV_VCL24 
RSV_VCL25 
RSV_VCL26 
RSV_VCL27 
RSV_VCL28 
RSV_VCL29 
RSV_VCL30 
RSV_VCL31 
VPS_NUT 
SPS_NUT 
PPS_NUT 
AUD_NUT 
EOS_NUT 
EOB_NUT 
FD_NUT 
PREFIX_SEI_NUT 
SUFFIX_SEI_NUT 
RSV_NVCL41 
RSV_NVCL42 
RSV_NVCL43 
RSV_NVCL44 
RSV_NVCL45 
RSV_NVCL46 
RSV_NVCL47 
UNSPEC48 
UNSPEC49 
UNSPEC50 
UNSPEC51 
UNSPEC52 
UNSPEC53 
UNSPEC54 
UNSPEC55 
UNSPEC56 
UNSPEC57 
UNSPEC58 
UNSPEC59 
UNSPEC60 
UNSPEC61 
UNSPEC62 
UNSPEC63 

Definition at line 52 of file HEVCParser.h.

◆ QuantMatrixSize

Enumerator
QUANT_MATIX_4X4 
QUANT_MATIX_8X8 
QUANT_MATIX_16X16 
QUANT_MATIX_32X32 

Definition at line 222 of file HEVCParser.h.

Constructor & Destructor Documentation

◆ HEVCParser() [1/2]

HEVCParser::HEVCParser ( void  )
inline

Definition at line 231 of file HEVCParser.h.

◆ HEVCParser() [2/2]

HEVCParser::HEVCParser ( const HEVCParser rhs)

◆ ~HEVCParser()

HEVCParser::~HEVCParser ( void  )
inlineoverride

Definition at line 233 of file HEVCParser.h.

Member Function Documentation

◆ NALisRAP()

static bool HEVCParser::NALisRAP ( uint  type)
inlinestatic

Definition at line 240 of file HEVCParser.h.

◆ NALisIRAP()

static bool HEVCParser::NALisIRAP ( uint  type)
inlinestatic

Definition at line 250 of file HEVCParser.h.

Referenced by parseSliceSegmentHeader(), and processRBSP().

◆ NALisVCL()

static bool HEVCParser::NALisVCL ( uint  type)
inlinestatic

Definition at line 255 of file HEVCParser.h.

Referenced by addBytes(), newAU(), and processRBSP().

◆ addBytes()

uint32_t HEVCParser::addBytes ( const uint8_t *  bytes,
uint32_t  byte_count,
uint64_t  stream_offset 
)
overridevirtual

Implements H2645Parser.

Definition at line 130 of file HEVCParser.cpp.

◆ Reset()

void HEVCParser::Reset ( void  )
overridevirtual

Reimplemented from H2645Parser.

Definition at line 49 of file HEVCParser.cpp.

◆ NAL_type_str()

QString HEVCParser::NAL_type_str ( int8_t  type)
overridevirtual

Implements H2645Parser.

Definition at line 54 of file HEVCParser.cpp.

Referenced by addBytes().

◆ pictureWidthCropped()

uint HEVCParser::pictureWidthCropped ( void  ) const
overridevirtual

Implements H2645Parser.

Definition at line 2043 of file HEVCParser.cpp.

◆ pictureHeightCropped()

uint HEVCParser::pictureHeightCropped ( void  ) const
overridevirtual

Implements H2645Parser.

Definition at line 2054 of file HEVCParser.cpp.

◆ getFieldType()

field_type HEVCParser::getFieldType ( void  ) const
inlineoverridevirtual

Implements H2645Parser.

Definition at line 271 of file HEVCParser.h.

◆ getFrameRate()

void HEVCParser::getFrameRate ( FrameRate result) const
overridevirtual

Implements H2645Parser.

Definition at line 2064 of file HEVCParser.cpp.

◆ newAU()

bool HEVCParser::newAU ( void  )
protected

Definition at line 254 of file HEVCParser.cpp.

Referenced by processRBSP().

◆ processRBSP()

void HEVCParser::processRBSP ( bool  rbsp_complete)
protected

Definition at line 463 of file HEVCParser.cpp.

Referenced by addBytes().

◆ profileTierLevel()

bool HEVCParser::profileTierLevel ( GetBitContext *  gb,
bool  profilePresentFlag,
int  maxNumSubLayersMinus1 
)
protected

Definition at line 583 of file HEVCParser.cpp.

Referenced by parseSPS(), and parseVPS().

◆ parseSliceSegmentLayer()

bool HEVCParser::parseSliceSegmentLayer ( GetBitContext *  gb)
protected

Definition at line 1231 of file HEVCParser.cpp.

Referenced by processRBSP().

◆ parseSliceSegmentHeader()

bool HEVCParser::parseSliceSegmentHeader ( GetBitContext *  gb)
protected

Definition at line 1248 of file HEVCParser.cpp.

Referenced by parseSliceSegmentLayer().

◆ parseSPS()

bool HEVCParser::parseSPS ( GetBitContext *  gb)
protected

Definition at line 1575 of file HEVCParser.cpp.

Referenced by processRBSP().

◆ parseVPS()

bool HEVCParser::parseVPS ( GetBitContext *  gb)
protected

Definition at line 1832 of file HEVCParser.cpp.

Referenced by processRBSP().

◆ parsePPS()

bool HEVCParser::parsePPS ( GetBitContext *  gb)
protected

Definition at line 1959 of file HEVCParser.cpp.

Member Data Documentation

◆ m_maxPicOrderCntLsb

uint32_t HEVCParser::m_maxPicOrderCntLsb {0}
private

Definition at line 287 of file HEVCParser.h.

◆ m_picOrderCntMsb

uint32_t HEVCParser::m_picOrderCntMsb {0}
private

Definition at line 288 of file HEVCParser.h.

Referenced by parseSliceSegmentHeader().

◆ m_picOrderCntVal

uint32_t HEVCParser::m_picOrderCntVal {0}
private

Definition at line 289 of file HEVCParser.h.

Referenced by parseSliceSegmentHeader().

◆ m_prevPicOrderCntLsb

uint32_t HEVCParser::m_prevPicOrderCntLsb {0}
private

Definition at line 290 of file HEVCParser.h.

Referenced by parseSliceSegmentHeader().

◆ m_prevPicOrderCntMsb

uint32_t HEVCParser::m_prevPicOrderCntMsb {0}
private

Definition at line 291 of file HEVCParser.h.

Referenced by parseSliceSegmentHeader().

◆ m_resolutionCheck

uint32_t HEVCParser::m_resolutionCheck {0}
private

Definition at line 292 of file HEVCParser.h.

Referenced by parseSPS().

◆ m_nalUnitType

uint HEVCParser::m_nalUnitType {UNSPEC63}
private

Definition at line 294 of file HEVCParser.h.

Referenced by addBytes(), newAU(), parseSliceSegmentHeader(), and processRBSP().

◆ m_nalTemperalId

uint8_t HEVCParser::m_nalTemperalId {0}
private

Definition at line 296 of file HEVCParser.h.

Referenced by addBytes().

◆ m_nuhLayerId

uint8_t HEVCParser::m_nuhLayerId {0}
private

Definition at line 297 of file HEVCParser.h.

Referenced by addBytes(), newAU(), and parseSPS().

◆ m_firstSliceSegmentInPicFlag

bool HEVCParser::m_firstSliceSegmentInPicFlag {false}
private

Definition at line 299 of file HEVCParser.h.

Referenced by newAU(), and parseSliceSegmentHeader().

◆ m_nextNALisAU

bool HEVCParser::m_nextNALisAU {false}
private

Definition at line 300 of file HEVCParser.h.

Referenced by newAU().

◆ m_noRaslOutputFlag

bool HEVCParser::m_noRaslOutputFlag {false}
private

Definition at line 301 of file HEVCParser.h.

Referenced by newAU(), and parseSliceSegmentHeader().

◆ m_seenEOS

bool HEVCParser::m_seenEOS {true}
private

Definition at line 302 of file HEVCParser.h.

Referenced by newAU().

◆ m_sps

std::map<uint, SPS> HEVCParser::m_sps
private

Definition at line 304 of file HEVCParser.h.

Referenced by parseSliceSegmentHeader(), and parseSPS().

◆ m_pps

std::map<uint, PPS> HEVCParser::m_pps
private

Definition at line 305 of file HEVCParser.h.

Referenced by parsePPS(), and parseSliceSegmentHeader().

◆ m_vps

std::map<uint, VPS> HEVCParser::m_vps
private

Definition at line 306 of file HEVCParser.h.

Referenced by parseSPS(), and parseVPS().

◆ m_poc

std::map<uint, uint> HEVCParser::m_poc
private

Definition at line 307 of file HEVCParser.h.

Referenced by parseSPS().


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