[FFmpeg-devel] [PATCH] avcodec/cbs_av1: fix range of values for Mastering Display Color Volume Metadata OBUs
James Almer
jamrial at gmail.com
Thu Mar 21 20:37:26 EET 2019
Signed-off-by: James Almer <jamrial at gmail.com>
---
libavcodec/cbs_av1_syntax_template.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index 48f4fab514..93bba1e5ad 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -1637,15 +1637,15 @@ static int FUNC(metadata_hdr_mdcv)(CodedBitstreamContext *ctx, RWContext *rw,
int err, i;
for (i = 0; i < 3; i++) {
- fcs(16, primary_chromaticity_x[i], 0, 50000, 1, i);
- fcs(16, primary_chromaticity_y[i], 0, 50000, 1, i);
+ fbs(16, primary_chromaticity_x[i], 1, i);
+ fbs(16, primary_chromaticity_y[i], 1, i);
}
- fc(16, white_point_chromaticity_x, 0, 50000);
- fc(16, white_point_chromaticity_y, 0, 50000);
+ fb(16, white_point_chromaticity_x);
+ fb(16, white_point_chromaticity_y);
fc(32, luminance_max, 1, MAX_UINT_BITS(32));
- fc(32, luminance_min, 0, current->luminance_max >> 6);
+ fc(32, luminance_min, 0, (current->luminance_max << 6) - 1);
return 0;
}
--
2.21.0
More information about the ffmpeg-devel
mailing list