From: Carl Hetherington Date: Thu, 28 Jan 2021 22:13:15 +0000 (+0100) Subject: Don't use flat_red.j2c for the simple DCP test as it's only 8-bit. X-Git-Tag: v1.8.0~101 X-Git-Url: https://main.carlh.net/gitweb/?p=libdcp.git;a=commitdiff_plain;h=eac3cac07eb97a6bcf6accd1575af76cd6f59112 Don't use flat_red.j2c for the simple DCP test as it's only 8-bit. --- diff --git a/test/frame_info_hash_test.cc b/test/frame_info_hash_test.cc index e24ab5aa..82e0f3ac 100644 --- a/test/frame_info_hash_test.cc +++ b/test/frame_info_hash_test.cc @@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE (frame_info_hash_test) unsigned int seed = 42; /* Check a few random frames */ - check (&seed, writer, "c039c5a0e5d20bc646f7e9c10e2d5874"); - check (&seed, writer, "d9e694cfe84544c54a869c128ba39343"); - check (&seed, writer, "fafb05a0039cb9fc604279c90a13cb87"); + check (&seed, writer, "9da3d1d93a80683e65d996edae4101ed"); + check (&seed, writer, "ecd77b3fbf459591f24119d4118783fb"); + check (&seed, writer, "9f10303495b58ccb715c893d40127e22"); } diff --git a/test/ref/DCP/dcp_test1/ASSETMAP.xml b/test/ref/DCP/dcp_test1/ASSETMAP.xml index e0426fb1..1e5c909b 100644 --- a/test/ref/DCP/dcp_test1/ASSETMAP.xml +++ b/test/ref/DCP/dcp_test1/ASSETMAP.xml @@ -37,7 +37,7 @@ video.mxf 1 0 - 40144 + 49240 diff --git a/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml index 2ee11df5..fed09ab1 100644 --- a/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml +++ b/test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml @@ -41,7 +41,7 @@ 24 0 24 - XGhFVrqZqapOJx5Fh2SLjj48Yjg= + addO7je2lZSNQp55qjCWo5DLKFQ= 24 1 1998 1080 diff --git a/test/ref/DCP/dcp_test1/pkl_2b9b857f-ab4a-440e-a313-1ace0f1cfc95.xml b/test/ref/DCP/dcp_test1/pkl_2b9b857f-ab4a-440e-a313-1ace0f1cfc95.xml index 5038b8ed..e2a28329 100644 --- a/test/ref/DCP/dcp_test1/pkl_2b9b857f-ab4a-440e-a313-1ace0f1cfc95.xml +++ b/test/ref/DCP/dcp_test1/pkl_2b9b857f-ab4a-440e-a313-1ace0f1cfc95.xml @@ -9,15 +9,15 @@ urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 81fb54df-e1bf-4647-8788-ea7ba154375b - xz+gUPoPMdbFlAewvWIq8BRhBmA= + X3bMCBdXEOYEpYmsConNWrWUAGs= 5082 text/xml urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470 1fab8bb0-cfaf-4225-ad6d-01768bc10470 - XGhFVrqZqapOJx5Fh2SLjj48Yjg= - 40144 + addO7je2lZSNQp55qjCWo5DLKFQ= + 49240 application/mxf diff --git a/test/ref/DCP/dcp_test1/video.mxf b/test/ref/DCP/dcp_test1/video.mxf index 0a8fb0ca..7042a71a 100644 Binary files a/test/ref/DCP/dcp_test1/video.mxf and b/test/ref/DCP/dcp_test1/video.mxf differ diff --git a/test/ref/DCP/dcp_test7/ASSETMAP b/test/ref/DCP/dcp_test7/ASSETMAP index a0a42801..58ef1279 100644 --- a/test/ref/DCP/dcp_test7/ASSETMAP +++ b/test/ref/DCP/dcp_test7/ASSETMAP @@ -37,7 +37,7 @@ video.mxf 1 0 - 40144 + 49240 diff --git a/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml b/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml index a9ff202b..bb933d94 100644 --- a/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml +++ b/test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml @@ -41,7 +41,7 @@ 24 0 24 - XGhFVrqZqapOJx5Fh2SLjj48Yjg= + addO7je2lZSNQp55qjCWo5DLKFQ= 24 1 1.85 diff --git a/test/ref/DCP/dcp_test7/pkl_63c3aece-c581-4603-b612-75e43f0c0430.xml b/test/ref/DCP/dcp_test7/pkl_63c3aece-c581-4603-b612-75e43f0c0430.xml index 919fe206..ae197d21 100644 --- a/test/ref/DCP/dcp_test7/pkl_63c3aece-c581-4603-b612-75e43f0c0430.xml +++ b/test/ref/DCP/dcp_test7/pkl_63c3aece-c581-4603-b612-75e43f0c0430.xml @@ -9,15 +9,15 @@ urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b 81fb54df-e1bf-4647-8788-ea7ba154375b - JxqfjtwuLuimdPydOWGY/Vgrzek= + 4a5qu1Q918HGMSi/b5d30ZvlkIo= 2168 text/xml;asdcpKind=CPL urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470 1fab8bb0-cfaf-4225-ad6d-01768bc10470 - XGhFVrqZqapOJx5Fh2SLjj48Yjg= - 40144 + addO7je2lZSNQp55qjCWo5DLKFQ= + 49240 application/x-smpte-mxf;asdcpKind=Picture diff --git a/test/ref/DCP/dcp_test7/video.mxf b/test/ref/DCP/dcp_test7/video.mxf index 0a8fb0ca..7042a71a 100644 Binary files a/test/ref/DCP/dcp_test7/video.mxf and b/test/ref/DCP/dcp_test7/video.mxf differ diff --git a/test/ref/cpl_metadata_test1.xml b/test/ref/cpl_metadata_test1.xml index b0641ab9..9fac07ce 100644 --- a/test/ref/cpl_metadata_test1.xml +++ b/test/ref/cpl_metadata_test1.xml @@ -23,7 +23,7 @@ 24 0 24 - BM4qh04HOSGF5vop4mhJBE7C4M0= + AjCzoIG/11nYHsTmKGLJf/zWANI= 24 1 1998 1080 diff --git a/test/ref/cpl_metadata_test2.xml b/test/ref/cpl_metadata_test2.xml index f57dd06a..f7fe62a3 100644 --- a/test/ref/cpl_metadata_test2.xml +++ b/test/ref/cpl_metadata_test2.xml @@ -23,7 +23,7 @@ 24 0 24 - BM4qh04HOSGF5vop4mhJBE7C4M0= + AjCzoIG/11nYHsTmKGLJf/zWANI= 24 1 1998 1080 diff --git a/test/test.cc b/test/test.cc index dc18f190..7ee42cf8 100644 --- a/test/test.cc +++ b/test/test.cc @@ -267,9 +267,16 @@ simple_picture (boost::filesystem::path path, string suffix, int frames) shared_ptr mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::Standard::SMPTE)); mp->set_metadata (mxf_meta); shared_ptr picture_writer = mp->start_write (path / dcp::String::compose("video%1.mxf", suffix), false); - dcp::ArrayData j2c ("test/data/flat_red.j2c"); + + dcp::Size const size (1998, 1080); + auto image = make_shared(size); + for (int i = 0; i < 3; ++i) { + memset (image->data(i), 0, 2 * size.width * size.height); + } + auto j2c = dcp::compress_j2k (image, 100000000, 24, false, false); + for (int i = 0; i < frames; ++i) { - picture_writer->write (j2c.data (), j2c.size ()); + picture_writer->write (j2c.data(), j2c.size()); } picture_writer->finalize (); diff --git a/test/verify_test.cc b/test/verify_test.cc index fc2ed203..f5a012a6 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -332,8 +332,8 @@ BOOST_AUTO_TEST_CASE (verify_mismatched_picture_sound_hashes) { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_CPL_HASHES, dcp_test1_cpl_id, canonical(dir / dcp_test1_cpl) }, { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_PICTURE_HASHES, canonical(dir / "video.mxf") }, { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::MISMATCHED_SOUND_HASHES, canonical(dir / "audio.mxf") }, - { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xxz+gUPoPMdbFlAewvWIq8BRhBmA=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 12 }, - { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xXGhFVrqZqapOJx5Fh2SLjj48Yjg=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 19 }, + { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xX3bMCBdXEOYEpYmsConNWrWUAGs=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 12 }, + { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xaddO7je2lZSNQp55qjCWo5DLKFQ=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 19 }, { dcp::VerificationNote::Type::ERROR, dcp::VerificationNote::Code::INVALID_XML, "value 'xqtXbkcwhUj/yqquVLmV+wbzbxQ8=' is invalid Base64-encoded binary", canonical(dir / dcp_test1_pkl), 26 } }); } @@ -2187,7 +2187,7 @@ BOOST_AUTO_TEST_CASE (verify_missing_hash) { BOOST_REQUIRE (cpl->file()); Editor e(cpl->file().get()); - e.replace("XGhFVrqZqapOJx5Fh2SLjj48Yjg=", ""); + e.replace("addO7je2lZSNQp55qjCWo5DLKFQ=", ""); } check_verify_result (