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;
405 LOG(VB_GENERAL, LOG_ERR,
406 "AVCParser::addbytes: malformed NAL units");
410 return startP -
bytes;
702 if (profile_idc == 100 || profile_idc == 110 || profile_idc == 122 ||
703 profile_idc == 244 || profile_idc == 44 || profile_idc == 83 ||
704 profile_idc == 86 || profile_idc == 118 || profile_idc == 128 )
721 int sl_n = ((idx < 6) ? 16 : 64);
722 for(
int sl_i = 0; sl_i < sl_n; ++sl_i)
727 nextScale = (lastScale + deltaScale + 256) % 256;
729 lastScale = (nextScale == 0) ? lastScale : nextScale;
784 (void) offset_for_non_ref_pic;
793 (void) offset_for_top_to_bottom_field;
803 for (
uint idx = 0; idx <
tmp; ++idx)
889 bool& interlaced, int32_t& max_ref_frames)
924 #if 0 // Rest not currently needed, and requires <math.h>
926 if (num_slice_groups > 1)
933 for (idx = 0; idx < num_slice_groups; ++idx)
937 for (idx = 0; idx < num_slice_groups; ++idx)
954 uint num_bits = (int)ceil(log2(num_slice_groups));
955 for (idx = 0; idx < pic_size_in_map_units; ++idx)
977 int recovery_frame_cnt = -1;
979 bool exact_match_flag =
false;
980 bool broken_link_flag =
false;
981 int changing_group_slice_idc = -1;
1005 exact_match_flag = (br.
get_bits(1) != 0U);
1006 broken_link_flag = (br.
get_bits(1) != 0U);
1007 changing_group_slice_idc = br.
get_bits(2);
1010 if ((size - 12) > 0)
1027 if (ChromaArrayType != 0)
1028 CropUnitX = SubWidthC;
1039 if (ChromaArrayType != 0)
1040 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
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
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
@ SEI_TYPE_RECOVERY_POINT
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)