diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-05-23 01:23:43 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-05-26 21:51:18 +0200 |
| commit | 1d5c211dadb9a9dc2318adce86ca9c31b367cabe (patch) | |
| tree | a0804622a7ceb6d9bcdc4f39732496361c53535d /test/test.cc | |
| parent | fd84c01c1c562093e99127a3a82f33d401a07655 (diff) | |
Fix incorrect colours with "no colourspace conversion" sources that are not AV_PIX_FMT_XYZ12LE.
Prepare the image for where it is going to next. I don't understand the difference
in this situation between XYZ12LE and RGB48LE (it seems they are both 16-bit-per-channel)
but there you go.
Diffstat (limited to 'test/test.cc')
| -rw-r--r-- | test/test.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test.cc b/test/test.cc index f518cdccc..c55025650 100644 --- a/test/test.cc +++ b/test/test.cc @@ -827,7 +827,7 @@ check_ffmpeg (boost::filesystem::path ref, boost::filesystem::path check, int au } void -check_one_frame (boost::filesystem::path dcp_dir, int64_t index, boost::filesystem::path ref) +check_one_frame(boost::filesystem::path dcp_dir, int64_t index, boost::filesystem::path ref, int tolerance) { dcp::DCP dcp (dcp_dir); dcp.read (); @@ -845,11 +845,11 @@ check_one_frame (boost::filesystem::path dcp_dir, int64_t index, boost::filesyst for (int y = 0; y < ref_image->size().height; ++y) { for (int x = 0; x < ref_image->size().width; ++x) { auto x_error = std::abs(ref_image->data(0)[off] - image->data(0)[off]); - BOOST_REQUIRE_MESSAGE(x_error == 0, "x component at " << x << "," << y << " differs by " << x_error); + BOOST_REQUIRE_MESSAGE(x_error <= tolerance, "x component at " << x << "," << y << " differs by " << x_error); auto y_error = std::abs(ref_image->data(1)[off] - image->data(1)[off]); - BOOST_REQUIRE_MESSAGE(y_error == 0, "y component at " << x << "," << y << " differs by " << y_error); + BOOST_REQUIRE_MESSAGE(y_error <= tolerance, "y component at " << x << "," << y << " differs by " << y_error); auto z_error = std::abs(ref_image->data(2)[off] - image->data(2)[off]); - BOOST_REQUIRE_MESSAGE(z_error == 0, "z component at " << x << "," << y << " differs by " << z_error); + BOOST_REQUIRE_MESSAGE(z_error <= tolerance, "z component at " << x << "," << y << " differs by " << z_error); ++off; } } |
