diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-05-25 00:32:39 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-05-25 21:35:12 +0200 |
| commit | 71f3520ea315fb65ff151c99aa0b64fc8dccdb1d (patch) | |
| tree | a09a8200a7ca14cada2e4b72ff40a1adb0b44f32 /test | |
| parent | b26f4e4cfa0a3b6df794f3207b420a413c52e773 (diff) | |
Clamp results correctly when shifting video levels, and account for that in tests.
Diffstat (limited to 'test')
| -rw-r--r-- | test/video_level_test.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/video_level_test.cc b/test/video_level_test.cc index c7e255394..c974c938d 100644 --- a/test/video_level_test.cc +++ b/test/video_level_test.cc @@ -344,8 +344,11 @@ image_FoV (string name) content->video->set_range (VideoRange::VIDEO); auto range = pixel_range (film, content); - BOOST_CHECK_EQUAL (range.first, 11); - BOOST_CHECK_EQUAL (range.second, 250); + /* We are taking some full-range content and saying it should be read as video range, after which its + * pixels will still be full range. + */ + BOOST_CHECK_EQUAL (range.first, 0); + BOOST_CHECK_EQUAL (range.second, 255); return film; } @@ -451,7 +454,10 @@ BOOST_AUTO_TEST_CASE (image_F_to_dcp) BOOST_AUTO_TEST_CASE (image_FoV_to_dcp) { auto range = dcp_range (image_FoV("image_FoV_to_dcp")); - check_int_close (range, {430, 4012}, 2); + /* The nearly-full-range of the input has become even more full, and clipped. + * XXX: I'm not sure why this doesn't quite hit 4095. + */ + check_int_close (range, {0, 4095}, 16); } |
