2 * HEVC Supplementary Enhancement Information messages
4 * This file is part of FFmpeg.
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.
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.
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
21 #ifndef AVCODEC_HEVC_SEI_H
22 #define AVCODEC_HEVC_SEI_H
32 HEVC_SEI_TYPE_BUFFERING_PERIOD = 0,
33 HEVC_SEI_TYPE_PICTURE_TIMING = 1,
34 HEVC_SEI_TYPE_PAN_SCAN_RECT = 2,
35 HEVC_SEI_TYPE_FILLER_PAYLOAD = 3,
36 HEVC_SEI_TYPE_USER_DATA_REGISTERED_ITU_T_T35 = 4,
37 HEVC_SEI_TYPE_USER_DATA_UNREGISTERED = 5,
38 HEVC_SEI_TYPE_RECOVERY_POINT = 6,
39 HEVC_SEI_TYPE_SCENE_INFO = 9,
40 HEVC_SEI_TYPE_FULL_FRAME_SNAPSHOT = 15,
41 HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_START = 16,
42 HEVC_SEI_TYPE_PROGRESSIVE_REFINEMENT_SEGMENT_END = 17,
43 HEVC_SEI_TYPE_FILM_GRAIN_CHARACTERISTICS = 19,
44 HEVC_SEI_TYPE_POST_FILTER_HINT = 22,
45 HEVC_SEI_TYPE_TONE_MAPPING_INFO = 23,
46 HEVC_SEI_TYPE_FRAME_PACKING = 45,
47 HEVC_SEI_TYPE_DISPLAY_ORIENTATION = 47,
48 HEVC_SEI_TYPE_SOP_DESCRIPTION = 128,
49 HEVC_SEI_TYPE_ACTIVE_PARAMETER_SETS = 129,
50 HEVC_SEI_TYPE_DECODING_UNIT_INFO = 130,
51 HEVC_SEI_TYPE_TEMPORAL_LEVEL0_INDEX = 131,
52 HEVC_SEI_TYPE_DECODED_PICTURE_HASH = 132,
53 HEVC_SEI_TYPE_SCALABLE_NESTING = 133,
54 HEVC_SEI_TYPE_REGION_REFRESH_INFO = 134,
55 HEVC_SEI_TYPE_TIME_CODE = 136,
56 HEVC_SEI_TYPE_MASTERING_DISPLAY_INFO = 137,
57 HEVC_SEI_TYPE_CONTENT_LIGHT_LEVEL_INFO = 144,
58 HEVC_SEI_TYPE_ALTERNATIVE_TRANSFER_CHARACTERISTICS = 147,
59 HEVC_SEI_TYPE_ALPHA_CHANNEL_INFO = 165,
63 HEVC_SEI_PIC_STRUCT_FRAME_DOUBLING = 7,
64 HEVC_SEI_PIC_STRUCT_FRAME_TRIPLING = 8
65 } HEVC_SEI_PicStructType;
67 typedef struct HEVCSEIPictureHash {
72 typedef struct HEVCSEIFramePacking {
75 int content_interpretation_type;
76 int quincunx_subsampling;
77 int current_frame_is_frame0_flag;
78 } HEVCSEIFramePacking;
80 typedef struct HEVCSEIDisplayOrientation {
82 int anticlockwise_rotation;
84 } HEVCSEIDisplayOrientation;
86 typedef struct HEVCSEIPictureTiming {
88 } HEVCSEIPictureTiming;
90 typedef struct HEVCSEIA53Caption {
94 typedef struct HEVCSEIMasteringDisplay {
96 uint16_t display_primaries[3][2];
97 uint16_t white_point[2];
98 uint32_t max_luminance;
99 uint32_t min_luminance;
100 } HEVCSEIMasteringDisplay;
102 typedef struct HEVCSEIContentLight {
104 uint16_t max_content_light_level;
105 uint16_t max_pic_average_light_level;
106 } HEVCSEIContentLight;
108 typedef struct HEVCSEIAlternativeTransfer {
110 int preferred_transfer_characteristics;
111 } HEVCSEIAlternativeTransfer;
113 typedef struct HEVCSEI {
114 HEVCSEIPictureHash picture_hash;
115 HEVCSEIFramePacking frame_packing;
116 HEVCSEIDisplayOrientation display_orientation;
117 HEVCSEIPictureTiming picture_timing;
118 HEVCSEIA53Caption a53_caption;
119 HEVCSEIMasteringDisplay mastering_display;
120 HEVCSEIContentLight content_light;
121 int active_seq_parameter_set_id;
122 HEVCSEIAlternativeTransfer alternative_transfer;
125 struct HEVCParamSets;
127 int ff_hevc_decode_nal_sei(GetBitContext *gb, void *logctx, HEVCSEI *s,
128 const struct HEVCParamSets *ps, int type);
131 * Reset SEI values that are stored on the Context.
132 * e.g. Caption data that was extracted during NAL
135 * @param s HEVCContext.
137 void ff_hevc_reset_sei(HEVCSEI *s);
139 #endif /* AVCODEC_HEVC_SEI_H */