39 for (cIdx = 0; cIdx < 3; cIdx++) {
42 for (i = 0; i < 16; i++)
44 }
else if (hash_type == 1) {
47 }
else if (hash_type == 2) {
59 for (i = 0; i < 3; i++) {
131 void *logctx,
int size)
143 if (pic_struct == 2 || pic_struct == 10 || pic_struct == 12) {
146 }
else if (pic_struct == 1 || pic_struct == 9 || pic_struct == 11) {
149 }
else if (pic_struct == 7) {
152 }
else if (pic_struct == 8) {
239 void *logctx,
int size)
241 int country_code, provider_code;
248 if (country_code == 0xFF) {
256 if (country_code != 0xB5) {
258 "Unsupported User Data Registered ITU-T T35 SEI message (country_code = %d)\n",
265 switch (provider_code) {
268 const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
269 const uint8_t smpte2094_40_application_identifier = 0x04;
270 uint16_t provider_oriented_code;
271 uint8_t application_identifier;
277 provider_oriented_code =
get_bits(gb, 16);
278 application_identifier =
get_bits(gb, 8);
279 if (provider_oriented_code == smpte2094_40_provider_oriented_code &&
280 application_identifier == smpte2094_40_application_identifier) {
286 uint32_t user_identifier;
293 switch (user_identifier) {
294 case MKBETAG(
'G',
'A',
'9',
'4'):
298 "Unsupported User Data Registered ITU-T T35 SEI message (atsc user_identifier = 0x%04x)\n",
306 "Unsupported User Data Registered ITU-T T35 SEI message (provider_code = %d)\n",
318 int num_sps_ids_minus1;
320 unsigned active_seq_parameter_set_id;
327 if (num_sps_ids_minus1 < 0 || num_sps_ids_minus1 > 15) {
334 av_log(logctx,
AV_LOG_ERROR,
"active_parameter_set_id %d invalid\n", active_seq_parameter_set_id);
339 for (i = 1; i <= num_sps_ids_minus1; i++)
448 int payload_type = 0;
449 int payload_size = 0;
453 while (byte == 0xFF) {
457 payload_type +=
byte;
460 while (byte == 0xFF) {
464 payload_size +=
byte;
static int decode_nal_sei_suffix(GetBitContext *gb, void *logctx, HEVCSEI *s, int type, int size)
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
int anticlockwise_rotation
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it...
int current_frame_is_frame0_flag
This struct represents dynamic metadata for color volume transform - application 4 of SMPTE 2094-40:2...
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
static void skip_bits_long(GetBitContext *s, int n)
Skips the specified number of bits.
static int decode_nal_sei_display_orientation(HEVCSEIDisplayOrientation *s, GetBitContext *gb)
uint8_t clock_timestamp_flag[3]
static int more_rbsp_data(GetBitContext *gb)
HEVCSEIMasteringDisplay mastering_display
uint8_t discontinuity_flag[3]
uint8_t cnt_dropped_flag[3]
static int decode_nal_sei_message(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int nal_unit_type)
AVBufferRef * sps_list[HEVC_MAX_SPS_COUNT]
HEVCSEIContentLight content_light
static int decode_nal_sei_alternative_transfer(HEVCSEIAlternativeTransfer *s, GetBitContext *gb)
static av_cold int end(AVCodecContext *avctx)
int ff_parse_itu_t_t35_to_dynamic_hdr10_plus(AVDynamicHDRPlus *s, const uint8_t *data, int size)
Parse the user data registered ITU-T T.35 to AVbuffer (AVDynamicHDRPlus).
int active_seq_parameter_set_id
int frame_field_info_present_flag
int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size)
Parse a data array for ATSC A53 Part 4 Closed Captions and store them in an AVBufferRef.
HEVCSEIUnregistered unregistered
static int get_bits_count(const GetBitContext *s)
#define AV_LOG_VERBOSE
Detailed information.
HEVCSEIDynamicHDRPlus dynamic_hdr_plus
uint8_t time_offset_length[3]
static int decode_nal_sei_content_light_info(HEVCSEIContentLight *s, GetBitContext *gb)
void * av_realloc_array(void *ptr, size_t nmemb, size_t size)
static int decode_registered_user_data_closed_caption(HEVCSEIA53Caption *s, GetBitContext *gb, int size)
static int get_bits_left(GetBitContext *gb)
int32_t time_offset_value[3]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
int content_interpretation_type
static int decode_nal_sei_active_parameter_sets(HEVCSEI *s, GetBitContext *gb, void *logctx)
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
int preferred_transfer_characteristics
AVBufferRef * av_buffer_create(uint8_t *data, int size, void(*free)(void *opaque, uint8_t *data), void *opaque, int flags)
Create an AVBuffer from an existing array.
uint8_t units_field_based_flag[3]
static unsigned int show_bits(GetBitContext *s, int n)
Show 1-25 bits.
static int decode_nal_sei_user_data_unregistered(HEVCSEIUnregistered *s, GetBitContext *gb, int size)
uint8_t full_timestamp_flag[3]
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_registered_user_data_dynamic_hdr_plus(HEVCSEIDynamicHDRPlus *s, GetBitContext *gb, int size)
void ff_hevc_reset_sei(HEVCSEI *s)
Reset SEI values that are stored on the Context.
AVBufferRef * av_buffer_alloc(int size)
Allocate an AVBuffer of the given size using av_malloc().
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
uint8_t * data
The data buffer.
static int decode_nal_sei_timecode(HEVCSEITimeCode *s, GetBitContext *gb)
static int decode_nal_sei_frame_packing_arrangement(HEVCSEIFramePacking *s, GetBitContext *gb)
HEVCSEIFramePacking frame_packing
static unsigned int get_bits1(GetBitContext *s)
static void skip_bits1(GetBitContext *s)
static void skip_bits(GetBitContext *s, int n)
uint16_t max_pic_average_light_level
static int FUNC() sps(CodedBitstreamContext *ctx, RWContext *rw, H264RawSPS *current)
HEVCSEIPictureHash picture_hash
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
int size
Size of data in bytes.
static int decode_nal_sei_decoded_picture_hash(HEVCSEIPictureHash *s, GetBitContext *gb)
HEVCSEIPictureTiming picture_timing
static int decode_nal_sei_pic_timing(HEVCSEI *s, GetBitContext *gb, const HEVCParamSets *ps, void *logctx, int size)
A reference to a data buffer.
HEVCSEIAlternativeTransfer alternative_transfer
HEVCSEIDisplayOrientation display_orientation
uint16_t max_content_light_level
#define MKBETAG(a, b, c, d)
static int decode_nal_sei_prefix(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type, int size)
static int decode_nal_sei_mastering_display_info(HEVCSEIMasteringDisplay *s, GetBitContext *gb)
HEVCSEIA53Caption a53_caption
static int decode_nal_sei_user_data_registered_itu_t_t35(HEVCSEI *s, GetBitContext *gb, void *logctx, int size)
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 ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const HEVCParamSets *ps, int type)
uint16_t display_primaries[3][2]