summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2023-01-18 20:30:50 +0000
committerMark Thompson <sw@jkqxz.net>2023-01-24 21:41:55 +0000
commitaaa49a7a425ce3dc6ca8edc0e17ed16c98f699a6 (patch)
tree8bda0985c1df611c59de7e6b5f33d6f89eb509cb
parent20b96494de5a76fd932d4231d4afde2e5c2c6e59 (diff)
cbs_av1: Remove constraint on MDCV luminance values
While desiring min to be less than max feels entirely sensible, unfortunately the standard does not actually have this requirement.
-rw-r--r--libavcodec/cbs_av1_syntax_template.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/libavcodec/cbs_av1_syntax_template.c b/libavcodec/cbs_av1_syntax_template.c
index d98d3d42de..e95925a493 100644
--- a/libavcodec/cbs_av1_syntax_template.c
+++ b/libavcodec/cbs_av1_syntax_template.c
@@ -1862,11 +1862,8 @@ static int FUNC(metadata_hdr_mdcv)(CodedBitstreamContext *ctx, RWContext *rw,
fb(16, white_point_chromaticity_x);
fb(16, white_point_chromaticity_y);
- fc(32, luminance_max, 1, MAX_UINT_BITS(32));
- // luminance_min must be lower than luminance_max. Convert luminance_max from
- // 24.8 fixed point to 18.14 fixed point in order to compare them.
- fc(32, luminance_min, 0, FFMIN(((uint64_t)current->luminance_max << 6) - 1,
- MAX_UINT_BITS(32)));
+ fb(32, luminance_max);
+ fb(32, luminance_min);
return 0;
}