FFmpeg
mastering_display_metadata.h
1 /*
2  * Copyright (c) 2016 Neil Birkbeck <neil.birkbeck@gmail.com>
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 AVUTIL_MASTERING_DISPLAY_METADATA_H
22 #define AVUTIL_MASTERING_DISPLAY_METADATA_H
23 
24 #include "frame.h"
25 #include "rational.h"
26 
27 
43 
48 
53 
58 
63 
68 
70 
78 AVMasteringDisplayMetadata *av_mastering_display_metadata_alloc(void);
79 
87 AVMasteringDisplayMetadata *av_mastering_display_metadata_create_side_data(AVFrame *frame);
88 
98 typedef struct AVContentLightMetadata {
102  unsigned MaxCLL;
103 
107  unsigned MaxFALL;
109 
117 AVContentLightMetadata *av_content_light_metadata_alloc(size_t *size);
118 
126 AVContentLightMetadata *av_content_light_metadata_create_side_data(AVFrame *frame);
127 
128 #endif /* AVUTIL_MASTERING_DISPLAY_METADATA_H */
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
unsigned MaxCLL
Max content light level (cd/m^2).
Definition: mastering_display_metadata.h:102
AVRational white_point[2]
CIE 1931 xy chromaticity coords of white point.
Definition: mastering_display_metadata.h:47
int has_primaries
Flag indicating whether the display primaries (and white point) are set.
Definition: mastering_display_metadata.h:62
int has_luminance
Flag indicating whether the luminance (min_ and max_) have been set.
Definition: mastering_display_metadata.h:67
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
Definition: mastering_display_metadata.h:98
AVRational max_luminance
Max luminance of mastering display (cd/m^2).
Definition: mastering_display_metadata.h:57
reference-counted frame API
AVRational min_luminance
Min luminance of mastering display (cd/m^2).
Definition: mastering_display_metadata.h:52
Rational number (pair of numerator and denominator).
Definition: rational.h:58
Mastering display metadata capable of representing the color volume of the display used to master the...
Definition: mastering_display_metadata.h:38
AVRational display_primaries[3][2]
CIE 1931 xy chromaticity coords of color primaries (r, g, b order).
Definition: mastering_display_metadata.h:42
Utilties for rational number calculation.
unsigned MaxFALL
Max average light level per frame (cd/m^2).
Definition: mastering_display_metadata.h:107