FFmpeg
9.0.2
Toggle main menu visibility
Loading...
Searching...
No Matches
libavutil
mastering_display_metadata.h
Go to the documentation of this file.
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
28
/**
29
* Mastering display metadata capable of representing the color volume of
30
* the display used to master the content (SMPTE 2086:2014).
31
*
32
* To be used as payload of a AVFrameSideData or AVPacketSideData with the
33
* appropriate type.
34
*
35
* @note The struct should be allocated with av_mastering_display_metadata_alloc()
36
* and its size is not a part of the public ABI.
37
*/
38
typedef
struct
AVMasteringDisplayMetadata
{
39
/**
40
* CIE 1931 xy chromaticity coords of color primaries (r, g, b order).
41
*/
42
AVRational
display_primaries
[3][2];
43
44
/**
45
* CIE 1931 xy chromaticity coords of white point.
46
*/
47
AVRational
white_point
[2];
48
49
/**
50
* Min luminance of mastering display (cd/m^2).
51
*/
52
AVRational
min_luminance
;
53
54
/**
55
* Max luminance of mastering display (cd/m^2).
56
*/
57
AVRational
max_luminance
;
58
59
/**
60
* Flag indicating whether the display primaries (and white point) are set.
61
*/
62
int
has_primaries
;
63
64
/**
65
* Flag indicating whether the luminance (min_ and max_) have been set.
66
*/
67
int
has_luminance
;
68
69
}
AVMasteringDisplayMetadata
;
70
71
/**
72
* Allocate an AVMasteringDisplayMetadata structure and set its fields to
73
* default values. The resulting struct can be freed using av_freep().
74
*
75
* @return An AVMasteringDisplayMetadata filled with default values or NULL
76
* on failure.
77
*/
78
AVMasteringDisplayMetadata
*
av_mastering_display_metadata_alloc
(
void
);
79
80
/**
81
* Allocate an AVMasteringDisplayMetadata structure and set its fields to
82
* default values. The resulting struct can be freed using av_freep().
83
*
84
* @return An AVMasteringDisplayMetadata filled with default values or NULL
85
* on failure.
86
*/
87
AVMasteringDisplayMetadata
*
av_mastering_display_metadata_alloc_size
(
size_t
*size);
88
89
/**
90
* Allocate a complete AVMasteringDisplayMetadata and add it to the frame.
91
*
92
* @param frame The frame which side data is added to.
93
*
94
* @return The AVMasteringDisplayMetadata structure to be filled by caller.
95
*/
96
AVMasteringDisplayMetadata
*
av_mastering_display_metadata_create_side_data
(
AVFrame
*
frame
);
97
98
/**
99
* Content light level needed by to transmit HDR over HDMI (CTA-861.3).
100
*
101
* To be used as payload of a AVFrameSideData or AVPacketSideData with the
102
* appropriate type.
103
*
104
* @note The struct should be allocated with av_content_light_metadata_alloc()
105
* and its size is not a part of the public ABI.
106
*/
107
typedef
struct
AVContentLightMetadata
{
108
/**
109
* Max content light level (cd/m^2).
110
*/
111
unsigned
MaxCLL
;
112
113
/**
114
* Max average light level per frame (cd/m^2).
115
*/
116
unsigned
MaxFALL
;
117
}
AVContentLightMetadata
;
118
119
/**
120
* Allocate an AVContentLightMetadata structure and set its fields to
121
* default values. The resulting struct can be freed using av_freep().
122
*
123
* @return An AVContentLightMetadata filled with default values or NULL
124
* on failure.
125
*/
126
AVContentLightMetadata
*
av_content_light_metadata_alloc
(
size_t
*size);
127
128
/**
129
* Allocate a complete AVContentLightMetadata and add it to the frame.
130
*
131
* @param frame The frame which side data is added to.
132
*
133
* @return The AVContentLightMetadata structure to be filled by caller.
134
*/
135
AVContentLightMetadata
*
av_content_light_metadata_create_side_data
(
AVFrame
*
frame
);
136
137
#endif
/* AVUTIL_MASTERING_DISPLAY_METADATA_H */
frame
static AVFrame * frame
Definition
demux_decode.c:54
frame.h
reference-counted frame API
av_mastering_display_metadata_alloc
AVMasteringDisplayMetadata * av_mastering_display_metadata_alloc(void)
Allocate an AVMasteringDisplayMetadata structure and set its fields to default values.
av_content_light_metadata_alloc
AVContentLightMetadata * av_content_light_metadata_alloc(size_t *size)
Allocate an AVContentLightMetadata structure and set its fields to default values.
av_content_light_metadata_create_side_data
AVContentLightMetadata * av_content_light_metadata_create_side_data(AVFrame *frame)
Allocate a complete AVContentLightMetadata and add it to the frame.
av_mastering_display_metadata_alloc_size
AVMasteringDisplayMetadata * av_mastering_display_metadata_alloc_size(size_t *size)
Allocate an AVMasteringDisplayMetadata structure and set its fields to default values.
av_mastering_display_metadata_create_side_data
AVMasteringDisplayMetadata * av_mastering_display_metadata_create_side_data(AVFrame *frame)
Allocate a complete AVMasteringDisplayMetadata and add it to the frame.
rational.h
Utilities for rational number calculation.
AVContentLightMetadata
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
Definition
mastering_display_metadata.h:107
AVContentLightMetadata::MaxFALL
unsigned MaxFALL
Max average light level per frame (cd/m^2).
Definition
mastering_display_metadata.h:116
AVContentLightMetadata::MaxCLL
unsigned MaxCLL
Max content light level (cd/m^2).
Definition
mastering_display_metadata.h:111
AVFrame
This structure describes decoded (raw) audio or video data.
Definition
frame.h:466
AVMasteringDisplayMetadata
Mastering display metadata capable of representing the color volume of the display used to master the...
Definition
mastering_display_metadata.h:38
AVMasteringDisplayMetadata::has_primaries
int has_primaries
Flag indicating whether the display primaries (and white point) are set.
Definition
mastering_display_metadata.h:62
AVMasteringDisplayMetadata::max_luminance
AVRational max_luminance
Max luminance of mastering display (cd/m^2).
Definition
mastering_display_metadata.h:57
AVMasteringDisplayMetadata::min_luminance
AVRational min_luminance
Min luminance of mastering display (cd/m^2).
Definition
mastering_display_metadata.h:52
AVMasteringDisplayMetadata::display_primaries
AVRational display_primaries[3][2]
CIE 1931 xy chromaticity coords of color primaries (r, g, b order).
Definition
mastering_display_metadata.h:42
AVMasteringDisplayMetadata::white_point
AVRational white_point[2]
CIE 1931 xy chromaticity coords of white point.
Definition
mastering_display_metadata.h:47
AVMasteringDisplayMetadata::has_luminance
int has_luminance
Flag indicating whether the luminance (min_ and max_) have been set.
Definition
mastering_display_metadata.h:67
AVRational
Rational number (pair of numerator and denominator).
Definition
rational.h:58
Generated by
1.17.0