Be more tolerant with remake_with_subtitle_test.
authorCarl Hetherington <cth@carlh.net>
Wed, 18 Jul 2018 11:50:10 +0000 (12:50 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 18 Jul 2018 11:50:10 +0000 (12:50 +0100)
test/data
test/remake_with_subtitle_test.cc
test/test.cc
test/test.h

index e5472ceee4b68737cdf10157c6a5d2018c98e66d..70fc36f1155b9463ceac955ea9e376a0e6499652 160000 (submodule)
--- a/test/data
+++ b/test/data
@@ -1 +1 @@
-Subproject commit e5472ceee4b68737cdf10157c6a5d2018c98e66d
+Subproject commit 70fc36f1155b9463ceac955ea9e376a0e6499652
index 9cc57662c8aadb2ee6683cd85caab4ed72820faf..97645af3143e620b911d3cd266935bd696d38b08 100644 (file)
@@ -48,5 +48,5 @@ BOOST_AUTO_TEST_CASE (remake_with_subtitle_test)
        film->make_dcp ();
        BOOST_REQUIRE (!wait_for_jobs ());
 
-       check_one_frame (film->dir(film->dcp_name()), 325, dcp::Size(1998, 1080), private_data / "prophet_frame_325_no_subs.j2c", dcp::Size(1998, 1080));
+       check_one_frame (film->dir(film->dcp_name()), 325, dcp::Size(1998, 1080), private_data / "prophet_frame_325_no_subs.j2c", dcp::Size(1998, 1080), 0.04);
 }
index 158dc853cf6b61056b138798279c36c94eec1092..3aa72928e8c35b03d5fb0e19eace169df51ebb91 100644 (file)
@@ -447,7 +447,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, dcp::Size dcp_size, boost::filesystem::path ref, dcp::Size ref_size)
+check_one_frame (boost::filesystem::path dcp_dir, int64_t index, dcp::Size dcp_size, boost::filesystem::path ref, dcp::Size ref_size, double dist_tolerance)
 {
        dcp::DCP dcp (dcp_dir);
        dcp.read ();
@@ -475,7 +475,7 @@ check_one_frame (boost::filesystem::path dcp_dir, int64_t index, dcp::Size dcp_s
        */
 #ifdef DCPOMATIC_ADVANCED_MAGICK_COMPARE
        double const dist = ref_magick.compare(dcp_magick, Magick::RootMeanSquaredErrorMetric);
-       BOOST_CHECK_MESSAGE (dist < 0.001, ref << " differs from " << dcp_dir << ":" << index << " " << dist);
+       BOOST_CHECK_MESSAGE (dist < dist_tolerance, ref << " differs from " << dcp_dir << ":" << index << " " << dist);
 #else
        BOOST_CHECK_MESSAGE (!ref_magick.compare(dcp_magick), ref << " differs from " << dcp_dir << ":" << index);
 #endif
index 8ed7cf7e01fdec965f5ee14e3feb38d6f1eb04ef..f7b49e3371cfac73cf0d114caea588dec4662b14 100644 (file)
@@ -41,4 +41,4 @@ extern void check_image (boost::filesystem::path, boost::filesystem::path, doubl
 extern boost::filesystem::path test_film_dir (std::string);
 extern void write_image (boost::shared_ptr<const Image> image, boost::filesystem::path file, std::string format);
 boost::filesystem::path dcp_file (boost::shared_ptr<const Film> film, std::string prefix);
-void check_one_frame (boost::filesystem::path dcp, int64_t index, dcp::Size dcp_size, boost::filesystem::path ref, dcp::Size ref_size);
+void check_one_frame (boost::filesystem::path dcp, int64_t index, dcp::Size dcp_size, boost::filesystem::path ref, dcp::Size ref_size, double dist_tolerance);