Go to the documentation of this file.
153 return "AU_DELIMITER";
155 return "END_SEQUENCE";
159 return "FILLER_DATA";
286 const uint32_t byte_count,
287 const uint64_t stream_offset)
289 const uint8_t *startP =
bytes;
297 const uint8_t *endP =
308 if (!
fillRBSP(startP, endP - startP, found_start_code))
320 if (found_start_code)
328 LOG(VB_GENERAL, LOG_ERR,
329 "AVCParser::addBytes: Found new start "
330 "code, but previous NAL is incomplete!");
366 bool good_nal_unit =
true;
375 good_nal_unit =
false;
383 good_nal_unit =
false;
406 LOG(VB_GENERAL, LOG_ERR,
407 "AVCParser::addbytes: malformed NAL units");
412 return startP -
bytes;
708 if (profile_idc == 100 || profile_idc == 110 || profile_idc == 122 ||
709 profile_idc == 244 || profile_idc == 44 || profile_idc == 83 ||
710 profile_idc == 86 || profile_idc == 118 || profile_idc == 128 )
728 int sl_n = ((idx < 6) ? 16 : 64);
729 for(
int sl_i = 0; sl_i < sl_n; ++sl_i)
734 nextScale = (lastScale + deltaScale + 256) % 256;
736 lastScale = (nextScale == 0) ? lastScale : nextScale;
790 [[maybe_unused]]
int offset_for_non_ref_pic = br.
get_se_golomb();
798 [[maybe_unused]]
int offset_for_top_to_bottom_field = br.
get_se_golomb();
808 for (
uint idx = 0; idx <
tmp; ++idx)
894 bool& interlaced, int32_t& max_ref_frames)
929 #if 0 // Rest not currently needed, and requires <math.h>
931 if (num_slice_groups > 1)
938 for (idx = 0; idx < num_slice_groups; ++idx)
942 for (idx = 0; idx < num_slice_groups; ++idx)
959 uint num_bits = (int)ceil(log2(num_slice_groups));
960 for (idx = 0; idx < pic_size_in_map_units; ++idx)
982 int recovery_frame_cnt = -1;
984 bool exact_match_flag =
false;
985 bool broken_link_flag =
false;
986 int changing_group_slice_idc = -1;
1010 exact_match_flag = (br.
get_bits(1) != 0U);
1011 broken_link_flag = (br.
get_bits(1) != 0U);
1012 changing_group_slice_idc = br.
get_bits(2);
1015 if ((size - 12) > 0)
1032 if (ChromaArrayType != 0)
1033 CropUnitX = SubWidthC;
1044 if (ChromaArrayType != 0)
1045 CropUnitY *= SubHeightC;
void getFrameRate(FrameRate &result) const override
uint m_frameCropRightOffset
uint64_t m_frameStartOffset
bool fillRBSP(const uint8_t *byteP, uint32_t byte_count, bool found_start_code)
bool m_separateColourPlaneFlag
uint8_t m_prevPicOrderCntType
uint64_t m_keyframeStartOffset
static constexpr uint16_t kMaxSliceHeaderSize
std::array< int, 2 > m_deltaPicOrderCnt
void parse_SPS(uint8_t *sps, uint32_t sps_size, bool &interlaced, int32_t &max_ref_frames)
QString NAL_type_str(int8_t type) override
uint8_t m_deltaPicOrderAlwaysZeroFlag
uint m_frameCropLeftOffset
uint32_t get_bits(unsigned n)
Read 0-32 bits.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
int m_prevPicParameterSetId
int8_t m_prevBottomFieldFlag
int get_ue_golomb_31()
read unsigned exp golomb code, constraint to a max of 31.
std::array< int, 2 > m_prevDeltaPicOrderCnt
int m_prevDeltaPicOrderCntBottom
void vui_parameters(BitReader &br, bool hevc)
int get_se_golomb()
read signed exp golomb code.
uint pictureHeightCropped(void) const override
bool decode_Header(BitReader &br)
void decode_PPS(BitReader &br)
void processRBSP(bool rbsp_complete)
uint m_frameCropBottomOffset
int8_t m_picOrderPresentFlag
field_type getFieldType(void) const override
bool m_auContainsKeyframeMessage
int m_deltaPicOrderCntBottom
@ SEI_TYPE_RECOVERY_POINT
int8_t m_redundantPicCntPresentFlag
void decode_SPS(BitReader &br)
double frameRate(void) const
bool start_code_is_valid(uint32_t start_code)
Test whether a start code found by find_start_code() is valid.
uint m_frameCropTopOffset
void set_AU_pending(void)
uint32_t m_syncAccumulator
static bool NALisSlice(int8_t nal_type)
void decode_SEI(BitReader &br)
uint pictureWidthCropped(void) const override
uint32_t show_bits(unsigned n)
void skip_bits(unsigned n)
uint8_t m_picOrderCntType
int8_t m_prevFieldPicFlag
uint m_log2MaxPicOrderCntLsb
int get_ue_golomb()
Read an unsigned Exp-Golomb code in the range 0 to 8190 (2^13 - 2).
void Reset(void) override
uint32_t addBytes(const uint8_t *bytes, uint32_t byte_count, uint64_t stream_offset) override
const MTV_PUBLIC uint8_t * find_start_code_truncated(const uint8_t *p, const uint8_t *end, uint32_t *start_code)
By preserving the start_code value between subsequent calls, the caller can detect start codes across...
int8_t m_frameMbsOnlyFlag
static bool isKeySlice(uint slice_type)