diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-07-18 12:50:10 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-07-18 12:50:10 +0100 |
| commit | 87ba3241141cd80844007aac0bc9a37cd3f08f46 (patch) | |
| tree | 130ddd836f6776347152f575ca8881fc6e18f472 | |
| parent | f46a8121ae7a9527726c00741c9230888e1a2fa6 (diff) | |
Be more tolerant with remake_with_subtitle_test.
| m--------- | test/data | 0 | ||||
| -rw-r--r-- | test/remake_with_subtitle_test.cc | 2 | ||||
| -rw-r--r-- | test/test.cc | 4 | ||||
| -rw-r--r-- | test/test.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/test/data b/test/data -Subproject e5472ceee4b68737cdf10157c6a5d2018c98e66 +Subproject 70fc36f1155b9463ceac955ea9e376a0e649965 diff --git a/test/remake_with_subtitle_test.cc b/test/remake_with_subtitle_test.cc index 9cc57662c..97645af31 100644 --- a/test/remake_with_subtitle_test.cc +++ b/test/remake_with_subtitle_test.cc @@ -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); } diff --git a/test/test.cc b/test/test.cc index 158dc853c..3aa72928e 100644 --- a/test/test.cc +++ b/test/test.cc @@ -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 diff --git a/test/test.h b/test/test.h index 8ed7cf7e0..f7b49e337 100644 --- a/test/test.h +++ b/test/test.h @@ -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); |
