Go to the documentation of this file.
37 hash_type = bytestream2_get_byte(gb);
39 for (cIdx = 0; cIdx < 3; cIdx++) {
43 }
else if (hash_type == 1) {
45 }
else if (hash_type == 2) {
61 for (
i = 0;
i < 3;
i++) {
62 s->display_primaries[
i][0] = bytestream2_get_be16u(gb);
63 s->display_primaries[
i][1] = bytestream2_get_be16u(gb);
66 s->white_point[0] = bytestream2_get_be16u(gb);
67 s->white_point[1] = bytestream2_get_be16u(gb);
70 s->max_luminance = bytestream2_get_be32u(gb);
71 s->min_luminance = bytestream2_get_be32u(gb);
88 s->max_content_light_level = bytestream2_get_be16u(gb);
89 s->max_pic_average_light_level = bytestream2_get_be16u(gb);
104 if (!ps->
sps_list[
s->active_seq_parameter_set_id])
108 if (
sps->vui.frame_field_info_present_flag) {
111 if (pic_struct == 2 || pic_struct == 10 || pic_struct == 12) {
114 }
else if (pic_struct == 1 || pic_struct == 9 || pic_struct == 11) {
117 }
else if (pic_struct == 7) {
120 }
else if (pic_struct == 8) {
131 int num_sps_ids_minus1;
132 unsigned active_seq_parameter_set_id;
139 if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) {
146 av_log(logctx,
AV_LOG_ERROR,
"active_parameter_set_id %d invalid\n", active_seq_parameter_set_id);
149 s->active_seq_parameter_set_id = active_seq_parameter_set_id;
158 for (
int i = 0;
i <
s->num_clock_ts;
i++) {
161 if (
s->clock_timestamp_flag[
i]) {
162 s->units_field_based_flag[
i] =
get_bits(gb, 1);
170 if (
s->full_timestamp_flag[
i]) {
176 if (
s->seconds_flag[
i]) {
179 if (
s->minutes_flag[
i]) {
182 if (
s->hours_flag[
i]) {
190 if (
s->time_offset_length[
i] > 0) {
244 int payload_type = 0;
245 int payload_size = 0;
250 while (
byte == 0xFF) {
253 byte = bytestream2_get_byteu(gb);
254 payload_type +=
byte;
257 while (
byte == 0xFF) {
260 byte = bytestream2_get_byteu(gb);
261 payload_size +=
byte;
271 logctx,
s, ps, payload_type);
274 logctx,
s, payload_type);
static int get_bits_left(GetBitContext *gb)
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
uint8_t * data
The data buffer.
@ AV_PICTURE_STRUCTURE_UNKNOWN
unknown
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
static av_always_inline void bytestream2_skipu(GetByteContext *g, unsigned int size)
static int get_bits_count(const GetBitContext *s)
static int decode_nal_sei_decoded_picture_hash(HEVCSEIPictureHash *s, GetByteContext *gb)
int ff_h2645_sei_message_decode(H2645SEI *h, enum SEIType type, enum AVCodecID codec_id, GetBitContext *gb, GetByteContext *gbyte, void *logctx)
Decode a single SEI message.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static int decode_nal_sei_prefix(GetBitContext *gb, GetByteContext *gbyte, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type)
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf type
static int decode_nal_sei_active_parameter_sets(HEVCSEI *s, GetBitContext *gb, void *logctx)
int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, enum HEVCNALUnitType type)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb, const HEVCParamSets *ps, void *logctx)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
@ AV_PICTURE_STRUCTURE_BOTTOM_FIELD
coded as bottom field
@ AV_PICTURE_STRUCTURE_TOP_FIELD
coded as top field
@ FF_H2645_SEI_MESSAGE_UNHANDLED
static int decode_nal_sei_content_light_info(HEVCSEIContentLight *s, GetByteContext *gb)
static av_always_inline unsigned int bytestream2_get_buffer(GetByteContext *g, uint8_t *dst, unsigned int size)
static int decode_nal_sei_message(GetByteContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int nal_unit_type)
static av_always_inline int bytestream2_get_bytes_left(GetByteContext *g)
static int decode_nal_sei_timecode(HEVCSEITimeCode *s, GetBitContext *gb)
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_WB32 unsigned int_TMPL AV_WB24 unsigned int_TMPL AV_WB16 unsigned int_TMPL byte
@ HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
@ SEI_TYPE_MASTERING_DISPLAY_COLOUR_VOLUME
#define i(width, name, range_min, range_max)
#define av_assert1(cond)
assert() equivalent, that does not lie in speed critical code.
HEVCNALUnitType
Table 7-1 – NAL unit type codes and NAL unit type classes in T-REC-H.265-201802.
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
static int decode_nal_sei_mastering_display_info(HEVCSEIMasteringDisplay *s, GetByteContext *gb)
AVBufferRef * sps_list[HEVC_MAX_SPS_COUNT]
static int decode_nal_sei_suffix(GetBitContext *gb, GetByteContext *gbyte, void *logctx, HEVCSEI *s, int type)
@ SEI_TYPE_DECODED_PICTURE_HASH
static unsigned get_ue_golomb_long(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
static av_always_inline void bytestream2_init(GetByteContext *g, const uint8_t *buf, int buf_size)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
@ SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO
@ SEI_TYPE_ACTIVE_PARAMETER_SETS