36 1, 1, 1, 2, 2, 3, 3, 2, 3
57 const SPS *sps,
void *logctx)
68 unsigned int i, num_clock_ts;
78 for (i = 0; i < num_clock_ts; i++) {
80 unsigned int full_timestamp_flag;
85 full_timestamp_flag =
get_bits(gb, 1);
89 if (full_timestamp_flag) {
141 int user_data_type_code;
147 user_data_type_code =
get_bits(gb, 8);
148 if (user_data_type_code == 0x3) {
158 if (cc_count && size >= cc_count * 3) {
163 if (new_size > INT_MAX)
171 for (i = 0; i < cc_count; i++) {
183 user_data_type_code);
184 for (i = 0; i < size - 1; i++)
192 void *logctx,
int size)
194 uint32_t country_code;
195 uint32_t user_identifier;
202 if (country_code == 0xFF) {
212 switch (user_identifier) {
213 case MKBETAG(
'D',
'T',
'G',
'1'):
215 case MKBETAG(
'G',
'A',
'9',
'4'):
227 void *logctx,
int size)
232 if (size < 16 || size >= INT_MAX - 16)
239 for (i = 0; i < size + 16; i++)
243 e = sscanf(user_data + 16,
"x264 - core %d", &build);
244 if (e == 1 && build > 0)
247 if (strlen(user_data + 16) > 0)
274 if (sps_id > 31 || !ps->
sps_list[sps_id]) {
276 "non-existing SPS %d referenced in buffering period\n", sps_id);
283 for (sched_sel_idx = 0; sched_sel_idx < sps->
cpb_cnt; sched_sel_idx++) {
291 for (sched_sel_idx = 0; sched_sel_idx < sps->
cpb_cnt; sched_sel_idx++) {
static int decode_picture_timing(H264SEIPictureTiming *h, GetBitContext *gb, const SPS *sps, void *logctx)
void * av_malloc(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int recovery_frame_cnt
recovery_frame_cnt
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
AVBufferRef * sps_list[MAX_SPS_COUNT]
av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\, len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic :ac->func_descr)
void ff_h264_sei_uninit(H264SEIContext *h)
Reset SEI values at the beginning of the frame.
H264SEIDisplayOrientation display_orientation
void av_freep(void *arg)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc() and set the pointer ...
static int decode_recovery_point(H264SEIRecoveryPoint *h, GetBitContext *gb)
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
int av_reallocp(void *ptr, size_t size)
Allocate or reallocate a block of memory.
static int decode_unregistered_user_data(H264SEIUnregistered *h, GetBitContext *gb, void *logctx, int size)
bitstream reader API header.
static int get_bits_left(GetBitContext *gb)
H.264 parameter set handling.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
static int get_ue_golomb(GetBitContext *gb)
read unsigned exp golomb code.
int present
Buffering period SEI flag.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
registered user data as specified by Rec. ITU-T T.35
H264SEIUnregistered unregistered
static int decode_registered_user_data_afd(H264SEIAFD *h, GetBitContext *gb, int size)
uint8_t active_format_description
static int decode_display_orientation(H264SEIDisplayOrientation *h, GetBitContext *gb)
recovery point (frame # to decoder sync)
int initial_cpb_removal_delay_length
initial_cpb_removal_delay_length_minus1 + 1
int ct_type
Bit set of clock types for fields/frames in picture timing SEI message.
int initial_cpb_removal_delay[32]
Initial timestamps for CPBs.
buffering period (H.264, D.1.1)
int cpb_removal_delay
cpb_removal_delay in picture timing SEI message, see H.264 C.1.2
if(ac->has_optimized_func)
int vcl_hrd_parameters_present_flag
Libavcodec external API header.
static int get_ue_golomb_31(GetBitContext *gb)
read unsigned exp golomb code, constraint to a max of 31.
SEI_PicStructType pic_struct
int dpb_output_delay_length
dpb_output_delay_length_minus1 + 1
uint8_t * data
The data buffer.
H264SEIA53Caption a53_caption
static unsigned int get_bits1(GetBitContext *s)
static void skip_bits1(GetBitContext *s)
static void skip_bits(GetBitContext *s, int n)
int content_interpretation_type
H264SEIBufferingPeriod buffering_period
H264SEIPictureTiming picture_timing
H264SEIRecoveryPoint recovery_point
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
static const uint8_t sei_num_clock_ts_table[9]
int pic_struct_present_flag
static int decode_frame_packing_arrangement(H264SEIFramePacking *h, GetBitContext *gb)
int anticlockwise_rotation
common internal api header.
int dpb_output_delay
dpb_output_delay in picture timing SEI message, see H.264 C.2.2
int nal_hrd_parameters_present_flag
H264SEIFramePacking frame_packing
#define MKBETAG(a, b, c, d)
static const uint8_t * align_get_bits(GetBitContext *s)
int cpb_cnt
See H.264 E.1.2.
frame packing arrangement
int ff_h264_sei_decode(H264SEIContext *h, GetBitContext *gb, const H264ParamSets *ps, void *logctx)
static int decode_registered_user_data(H264SEIContext *h, GetBitContext *gb, void *logctx, int size)
int cpb_removal_delay_length
cpb_removal_delay_length_minus1 + 1
static int decode_registered_user_data_closed_caption(H264SEIA53Caption *h, GetBitContext *gb, void *logctx, int size)
static int decode_buffering_period(H264SEIBufferingPeriod *h, GetBitContext *gb, const H264ParamSets *ps, void *logctx)