From 98a8023dd774fd82c144a68039e0ea3131fb9142 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 22 Jul 2025 00:48:42 +0200 Subject: 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. --- test/3042_regression_test.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'test') 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); +} + -- cgit v1.2.3