summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-07-22 00:48:42 +0200
committerCarl Hetherington <cth@carlh.net>2025-08-12 17:16:07 +0200
commit98a8023dd774fd82c144a68039e0ea3131fb9142 (patch)
treef14a3fb3f6a095f36b88c2c0e1066002cfb7132a /test
parent9b73c143ce568bd8694e3a50f2fefc1ee3a03515 (diff)
New/improved pixel format decision when converting to XYZ.
For a long time we would keep XYZ12LE, if that's what we have, otherwise ask FFmpeg to switch to RGB48LE. Then in 1d5c211dadb9a9dc2318adce86ca9c31b367cabe I tried to fix the case of an XYZ source mis-tagged as YUV. I changed things so that with no colour conversion we'd always ask FFmpeg to convert to XYZ. This meant that RGB sources with no colour conversion would get treatment by FFmpeg due to the RGB -> XYZ switch. Here we're going back to the more-or-less the "long time" behaviour when there is a conversion (keep XYZ12LE but otherwise convert to RGB48). When there's no conversion, keep RGB (to avoid the FFmpeg conversion from RGB -> XYZ) but convert everything else to XYZ.
Diffstat (limited to 'test')
-rw-r--r--test/3042_regression_test.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/3042_regression_test.cc b/test/3042_regression_test.cc
index 000fb6001..3660a3590 100644
--- a/test/3042_regression_test.cc
+++ b/test/3042_regression_test.cc
@@ -37,3 +37,15 @@ BOOST_AUTO_TEST_CASE(encode_xyz_from_prores_test)
check_one_frame(film->dir(film->dcp_name()), 0, TestPaths::private_data() / "dcp-o-matic_test_20250521_p3d65_frame0.j2c", 18);
}
+
+BOOST_AUTO_TEST_CASE(encode_xyz_from_dpx_test)
+{
+ auto content = content_factory(TestPaths::private_data() / "count.dpx")[0];
+ auto film = new_test_film("encode_xyz_from_dpx_test", { content });
+ content->video->unset_colour_conversion();
+
+ make_and_verify_dcp(film);
+
+ check_one_frame(film->dir(film->dcp_name()), 0, TestPaths::private_data() / "count.j2c", 18);
+}
+