Go to the documentation of this file.
37 for (cIdx = 0; cIdx < 3; cIdx++) {
40 for (
i = 0;
i < 16;
i++)
42 }
else if (hash_type == 1) {
45 }
else if (hash_type == 2) {
57 for (
i = 0;
i < 3;
i++) {
79 s->max_content_light_level =
get_bits(gb, 16);
80 s->max_pic_average_light_level =
get_bits(gb, 16);
96 s->content_interpretation_type =
get_bits(gb, 6);
100 s->current_frame_is_frame0_flag =
get_bits1(gb);
104 if (!
s->quincunx_subsampling &&
s->arrangement_type != 5)
121 s->anticlockwise_rotation =
get_bits(gb, 16);
129 void *logctx,
int size)
134 if (!ps->
sps_list[
s->active_seq_parameter_set_id])
138 if (
sps->vui.frame_field_info_present_flag) {
141 if (pic_struct == 2 || pic_struct == 10 || pic_struct == 12) {
144 }
else if (pic_struct == 1 || pic_struct == 9 || pic_struct == 11) {
147 }
else if (pic_struct == 7) {
150 }
else if (pic_struct == 8) {
168 int user_data_type_code;
174 user_data_type_code =
get_bits(gb, 8);
175 if (user_data_type_code == 0x3) {
185 if (cc_count &&
size >= cc_count * 3) {
186 int old_size =
s->buf_ref ?
s->buf_ref->size : 0;
187 const uint64_t new_size = (old_size + cc_count
191 if (new_size > INT_MAX)
199 for (
i = 0;
i < cc_count;
i++) {
200 s->buf_ref->data[old_size++] =
get_bits(gb, 8);
201 s->buf_ref->data[old_size++] =
get_bits(gb, 8);
202 s->buf_ref->data[old_size++] =
get_bits(gb, 8);
219 uint32_t country_code;
220 uint32_t user_identifier;
227 if (country_code == 0xFF) {
237 switch (user_identifier) {
238 case MKBETAG(
'G',
'A',
'9',
'4'):
249 int num_sps_ids_minus1;
251 unsigned active_seq_parameter_set_id;
258 if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) {
265 av_log(logctx,
AV_LOG_ERROR,
"active_parameter_set_id %d invalid\n", active_seq_parameter_set_id);
268 s->active_seq_parameter_set_id = active_seq_parameter_set_id;
270 for (
i = 1;
i <= num_sps_ids_minus1;
i++)
279 s->preferred_transfer_characteristics =
get_bits(gb, 8);
328 int payload_type = 0;
329 int payload_size = 0;
333 while (
byte == 0xFF) {
337 payload_type +=
byte;
340 while (
byte == 0xFF) {
344 payload_size +=
byte;
static int decode_nal_sei_frame_packing_arrangement(HEVCSEIFramePacking *s, GetBitContext *gb)
static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetBitContext *gb, int size)
@ HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
@ HEVC_SEI_TYPE_DISPLAY_ORIENTATION
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
int av_buffer_realloc(AVBufferRef **pbuf, int size)
Reallocate a given buffer.
uint8_t * data
The data buffer.
@ AV_PICTURE_STRUCTURE_UNKNOWN
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
@ HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS
static int decode_nal_sei_mastering_display_info(HEVCSEIMasteringDisplay *s, GetBitContext *gb)
static void skip_bits(GetBitContext *s, int n)
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
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)
static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb, const HEVCParamSets *ps, void *logctx, int size)
int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitContext *gb, int size)
static int decode_nal_sei_message(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int nal_unit_type)
static int decode_nal_sei_prefix(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type, int size)
@ HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
@ HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
@ AV_PICTURE_STRUCTURE_BOTTOM_FIELD
static int decode_nal_sei_content_light_info(HEVCSEIContentLight *s, GetBitContext *gb)
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it.
@ AV_PICTURE_STRUCTURE_TOP_FIELD
static unsigned int get_bits1(GetBitContext *s)
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
#define MKBETAG(a, b, c, d)
@ HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
static void skip_bits1(GetBitContext *s)
@ HEVC_SEI_TYPE_PICTURE_TIMING
static int decode_nal_sei_display_orientation(HEVCSEIDisplayOrientation *s, GetBitContext *gb)
static int more_rbsp_data(GetBitContext *gb)
#define i(width, name, range_min, range_max)
static int decode_nal_sei_suffix(GetBitContext *gb, void *logctx, HEVCSEI *s, int type, int size)
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
@ HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO
@ HEVC_SEI_TYPE_FRAME_PACKING
static int decode_nal_sei_alternative_transfer(HEVCSEIAlternativeTransfer *s, GetBitContext *gb)
void ff_hevc_reset_sei(HEVCSEI *s)
Reset SEI values that are stored on the Context.
@ HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
AVBufferRef * sps_list[HEVC_MAX_SPS_COUNT]
static unsigned get_ue_golomb_long(GetBitContext *gb)
Read an unsigned Exp-Golomb code in the range 0 to UINT32_MAX-1.
static int decode_nal_sei_decoded_picture_hash(HEVCSEIPictureHash *s, GetBitContext *gb)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
@ HEVC_SEI_TYPE_DECODED_PICTURE_HASH