FFmpeg
hevc_sei.h
Go to the documentation of this file.
1 /*
2  * HEVC Supplementary Enhancement Information messages
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_HEVC_SEI_H
22 #define AVCODEC_HEVC_SEI_H
23 
24 #include <stdint.h>
25 
26 #include "get_bits.h"
27 
28 /**
29  * SEI message types
30  */
31 typedef enum {
61 
62 typedef enum {
66 
67 typedef struct HEVCSEIPictureHash {
68  uint8_t md5[3][16];
71 
72 typedef struct HEVCSEIFramePacking {
73  int present;
79 
80 typedef struct HEVCSEIDisplayOrientation {
81  int present;
83  int hflip, vflip;
85 
86 typedef struct HEVCSEIPictureTiming {
89 
90 typedef struct HEVCSEIA53Caption {
93 
94 typedef struct HEVCSEIMasteringDisplay {
95  int present;
96  uint16_t display_primaries[3][2];
97  uint16_t white_point[2];
98  uint32_t max_luminance;
99  uint32_t min_luminance;
101 
102 typedef struct HEVCSEIContentLight {
103  int present;
107 
109  int present;
112 
113 typedef struct HEVCSEI {
123 } HEVCSEI;
124 
125 struct HEVCParamSets;
126 
127 int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s,
128  const struct HEVCParamSets *ps, int type);
129 
130 /**
131  * Reset SEI values that are stored on the Context.
132  * e.g. Caption data that was extracted during NAL
133  * parsing.
134  *
135  * @param s HEVCContext.
136  */
138 
139 #endif /* AVCODEC_HEVC_SEI_H */
HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO
@ HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO
Definition: hevc_sei.h:57
HEVCSEI::active_seq_parameter_set_id
int active_seq_parameter_set_id
Definition: hevc_sei.h:121
HEVCSEIAlternativeTransfer
Definition: hevc_sei.h:108
HEVCSEI::picture_timing
HEVCSEIPictureTiming picture_timing
Definition: hevc_sei.h:117
HEVC_SEI_TYPE_DISPLAY_ORIENTATION
@ HEVC_SEI_TYPE_DISPLAY_ORIENTATION
Definition: hevc_sei.h:47
HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START
@ HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START
Definition: hevc_sei.h:41
HEVCSEIDisplayOrientation::vflip
int vflip
Definition: hevc_sei.h:83
HEVCSEIPictureHash::is_md5
uint8_t is_md5
Definition: hevc_sei.h:69
HEVCSEI::display_orientation
HEVCSEIDisplayOrientation display_orientation
Definition: hevc_sei.h:116
HEVC_SEI_Type
HEVC_SEI_Type
SEI message types.
Definition: hevc_sei.h:31
HEVCSEIFramePacking::current_frame_is_frame0_flag
int current_frame_is_frame0_flag
Definition: hevc_sei.h:77
HEVC_SEI_TYPE_DECODING_UNIT_INFO
@ HEVC_SEI_TYPE_DECODING_UNIT_INFO
Definition: hevc_sei.h:50
HEVC_SEI_TYPE_SCALABLE_NESTING
@ HEVC_SEI_TYPE_SCALABLE_NESTING
Definition: hevc_sei.h:53
HEVCSEIAlternativeTransfer::present
int present
Definition: hevc_sei.h:109
ff_hevc_reset_sei
void ff_hevc_reset_sei(HEVCSEI *s)
Reset SEI values that are stored on the Context.
Definition: hevc_sei.c:373
HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS
@ HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS
Definition: hevc_sei.h:58
HEVCSEIMasteringDisplay::display_primaries
uint16_t display_primaries[3][2]
Definition: hevc_sei.h:96
ff_hevc_decode_nal_sei
int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s, const struct HEVCParamSets *ps, int type)
HEVCSEIA53Caption
Definition: hevc_sei.h:90
GetBitContext
Definition: get_bits.h:61
HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS
@ HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS
Definition: hevc_sei.h:43
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
Definition: writing_filters.txt:86
HEVC_SEI_TYPE_TIME_CODE
@ HEVC_SEI_TYPE_TIME_CODE
Definition: hevc_sei.h:55
HEVCSEIMasteringDisplay::min_luminance
uint32_t min_luminance
Definition: hevc_sei.h:99
HEVC_SEI_TYPE_REGION_REFRESH_INFO
@ HEVC_SEI_TYPE_REGION_REFRESH_INFO
Definition: hevc_sei.h:54
s
#define s(width, name)
Definition: cbs_vp9.c:257
HEVCSEI::mastering_display
HEVCSEIMasteringDisplay mastering_display
Definition: hevc_sei.h:119
HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35
@ HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35
Definition: hevc_sei.h:36
HEVCSEI
Definition: hevc_sei.h:113
HEVCSEIMasteringDisplay
Definition: hevc_sei.h:94
HEVCSEIPictureHash
Definition: hevc_sei.h:67
get_bits.h
HEVC_SEI_TYPE_PAN_SCAN_RECT
@ HEVC_SEI_TYPE_PAN_SCAN_RECT
Definition: hevc_sei.h:34
HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END
@ HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END
Definition: hevc_sei.h:42
HEVCSEIFramePacking
Definition: hevc_sei.h:72
HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
@ HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING
Definition: hevc_sei.h:64
HEVCSEIMasteringDisplay::white_point
uint16_t white_point[2]
Definition: hevc_sei.h:97
HEVC_SEI_TYPE_RECOVERY_POINT
@ HEVC_SEI_TYPE_RECOVERY_POINT
Definition: hevc_sei.h:38
HEVCSEIMasteringDisplay::present
int present
Definition: hevc_sei.h:95
HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX
@ HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX
Definition: hevc_sei.h:51
HEVCSEIDisplayOrientation
Definition: hevc_sei.h:80
HEVC_SEI_PicStructType
HEVC_SEI_PicStructType
Definition: hevc_sei.h:62
HEVCSEI::content_light
HEVCSEIContentLight content_light
Definition: hevc_sei.h:120
HEVCSEIPictureHash::md5
uint8_t md5[3][16]
Definition: hevc_sei.h:68
HEVC_SEI_TYPE_SOP_DESCRIPTION
@ HEVC_SEI_TYPE_SOP_DESCRIPTION
Definition: hevc_sei.h:48
HEVCSEIContentLight::present
int present
Definition: hevc_sei.h:103
HEVCSEIDisplayOrientation::anticlockwise_rotation
int anticlockwise_rotation
Definition: hevc_sei.h:82
HEVC_SEI_TYPE_ALPHA_CHANNEL_INFO
@ HEVC_SEI_TYPE_ALPHA_CHANNEL_INFO
Definition: hevc_sei.h:59
HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
@ HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING
Definition: hevc_sei.h:63
HEVC_SEI_TYPE_PICTURE_TIMING
@ HEVC_SEI_TYPE_PICTURE_TIMING
Definition: hevc_sei.h:33
HEVCSEIFramePacking::quincunx_subsampling
int quincunx_subsampling
Definition: hevc_sei.h:76
HEVC_SEI_TYPE_BUFFERING_PERIOD
@ HEVC_SEI_TYPE_BUFFERING_PERIOD
Definition: hevc_sei.h:32
HEVCSEIDisplayOrientation::hflip
int hflip
Definition: hevc_sei.h:83
HEVC_SEI_TYPE_SCENE_INFO
@ HEVC_SEI_TYPE_SCENE_INFO
Definition: hevc_sei.h:39
HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO
@ HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO
Definition: hevc_sei.h:56
HEVC_SEI_TYPE_FRAME_PACKING
@ HEVC_SEI_TYPE_FRAME_PACKING
Definition: hevc_sei.h:46
uint8_t
uint8_t
Definition: audio_convert.c:194
HEVCSEIA53Caption::buf_ref
AVBufferRef * buf_ref
Definition: hevc_sei.h:91
HEVCSEIPictureTiming::picture_struct
int picture_struct
Definition: hevc_sei.h:87
HEVC_SEI_TYPE_FILLER_PAYLOAD
@ HEVC_SEI_TYPE_FILLER_PAYLOAD
Definition: hevc_sei.h:35
HEVCSEI::picture_hash
HEVCSEIPictureHash picture_hash
Definition: hevc_sei.h:114
HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT
@ HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT
Definition: hevc_sei.h:40
HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS
@ HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS
Definition: hevc_sei.h:49
HEVC_SEI_TYPE_POST_FILTER_HINT
@ HEVC_SEI_TYPE_POST_FILTER_HINT
Definition: hevc_sei.h:44
HEVCSEIFramePacking::present
int present
Definition: hevc_sei.h:73
HEVCSEIMasteringDisplay::max_luminance
uint32_t max_luminance
Definition: hevc_sei.h:98
HEVCSEI::frame_packing
HEVCSEIFramePacking frame_packing
Definition: hevc_sei.h:115
HEVC_SEI_TYPE_TONE_MAPPING_INFO
@ HEVC_SEI_TYPE_TONE_MAPPING_INFO
Definition: hevc_sei.h:45
HEVCSEIContentLight::max_pic_average_light_level
uint16_t max_pic_average_light_level
Definition: hevc_sei.h:105
AVBufferRef
A reference to a data buffer.
Definition: buffer.h:81
HEVCSEI::a53_caption
HEVCSEIA53Caption a53_caption
Definition: hevc_sei.h:118
HEVCSEIContentLight
Definition: hevc_sei.h:102
HEVCSEIDisplayOrientation::present
int present
Definition: hevc_sei.h:81
HEVCSEIContentLight::max_content_light_level
uint16_t max_content_light_level
Definition: hevc_sei.h:104
HEVCSEIAlternativeTransfer::preferred_transfer_characteristics
int preferred_transfer_characteristics
Definition: hevc_sei.h:110
HEVCSEIFramePacking::arrangement_type
int arrangement_type
Definition: hevc_sei.h:74
HEVC_SEI_TYPE_DECODED_PICTURE_HASH
@ HEVC_SEI_TYPE_DECODED_PICTURE_HASH
Definition: hevc_sei.h:52
HEVCSEIPictureTiming
Definition: hevc_sei.h:86
HEVCSEIFramePacking::content_interpretation_type
int content_interpretation_type
Definition: hevc_sei.h:75
HEVCSEI::alternative_transfer
HEVCSEIAlternativeTransfer alternative_transfer
Definition: hevc_sei.h:122
HEVC_SEI_TYPE_USER_DATA_UNREGISTERED
@ HEVC_SEI_TYPE_USER_DATA_UNREGISTERED
Definition: hevc_sei.h:37
HEVCParamSets
Definition: hevc_ps.h:327