49 if (
s->num_windows < 1 ||
s->num_windows > 3) {
56 for (
int w = 1;
w <
s->num_windows;
w++) {
81 s->targeted_system_display_maximum_luminance =
83 s->targeted_system_display_actual_peak_luminance_flag =
get_bits1(gb);
85 if (
s->targeted_system_display_actual_peak_luminance_flag) {
91 if (((rows < 2) || (rows > 25)) || ((cols < 2) || (cols > 25))) {
94 s->num_rows_targeted_system_display_actual_peak_luminance = rows;
95 s->num_cols_targeted_system_display_actual_peak_luminance = cols;
100 for (
int i = 0;
i < rows;
i++) {
101 for (
int j = 0; j < cols; j++) {
102 s->targeted_system_display_actual_peak_luminance[
i][j] =
107 for (
int w = 0;
w <
s->num_windows;
w++) {
112 for (
int i = 0;
i < 3;
i++) {
137 s->mastering_display_actual_peak_luminance_flag =
get_bits1(gb);
138 if (
s->mastering_display_actual_peak_luminance_flag) {
144 if (((rows < 2) || (rows > 25)) || ((cols < 2) || (cols > 25))) {
147 s->num_rows_mastering_display_actual_peak_luminance = rows;
148 s->num_cols_mastering_display_actual_peak_luminance = cols;
153 for (
int i = 0;
i < rows;
i++) {
154 for (
int j = 0; j < cols; j++) {
155 s->mastering_display_actual_peak_luminance[
i][j] =
161 for (
int w = 0;
w <
s->num_windows;
w++) {
static const int64_t rgb_den
static const int32_t peak_luminance_den
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).
static const int32_t bezier_anchor_den
static const int32_t fraction_pixel_den
static const int32_t knee_point_den
static const int32_t saturation_weight_den
static const int64_t luminance_den
bitstream reader API header.
static unsigned int get_bits_long(GetBitContext *s, int n)
Read 0-32 bits.
static int get_bits_left(GetBitContext *gb)
static unsigned int get_bits1(GetBitContext *s)
static int init_get_bits8(GetBitContext *s, const uint8_t *buffer, int byte_size)
Initialize GetBitContext.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AVERROR_INVALIDDATA
Invalid data found when processing input.
This struct represents dynamic metadata for color volume transform - application 4 of SMPTE 2094-40:2...
AVRational percentile
The linearized maxRGB value at a specific percentile in the processing window in the scene.
uint8_t percentage
The percentage value corresponding to a specific percentile linearized RGB value in the processing wi...
Rational number (pair of numerator and denominator).