1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- #ifndef COMMON_VIDEO_H264_PPS_PARSER_H_
- #define COMMON_VIDEO_H264_PPS_PARSER_H_
- #include "absl/types/optional.h"
- namespace rtc {
- class BitBuffer;
- }
- namespace webrtc {
- class PpsParser {
- public:
-
-
- struct PpsState {
- PpsState() = default;
- bool bottom_field_pic_order_in_frame_present_flag = false;
- bool weighted_pred_flag = false;
- bool entropy_coding_mode_flag = false;
- uint32_t weighted_bipred_idc = false;
- uint32_t redundant_pic_cnt_present_flag = 0;
- int pic_init_qp_minus26 = 0;
- uint32_t id = 0;
- uint32_t sps_id = 0;
- };
-
- static absl::optional<PpsState> ParsePps(const uint8_t* data, size_t length);
- static bool ParsePpsIds(const uint8_t* data,
- size_t length,
- uint32_t* pps_id,
- uint32_t* sps_id);
- static absl::optional<uint32_t> ParsePpsIdFromSlice(const uint8_t* data,
- size_t length);
- protected:
-
-
- static absl::optional<PpsState> ParseInternal(rtc::BitBuffer* bit_buffer);
- static bool ParsePpsIdsInternal(rtc::BitBuffer* bit_buffer,
- uint32_t* pps_id,
- uint32_t* sps_id);
- };
- }
- #endif
|