diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-01-28 23:13:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-02-06 22:48:30 +0100 |
| commit | eac3cac07eb97a6bcf6accd1575af76cd6f59112 (patch) | |
| tree | a4fa1dfb9130ddcdfec37a48eea8110c981520d8 | |
| parent | 9b1b653f1a169dae3e939c58d73356ff02e5835c (diff) | |
Don't use flat_red.j2c for the simple DCP test as it's only 8-bit.
| -rw-r--r-- | test/frame_info_hash_test.cc | 6 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test1/ASSETMAP.xml | 2 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test1/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml | 2 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test1/pkl_2b9b857f-ab4a-440e-a313-1ace0f1cfc95.xml | 6 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test1/video.mxf | bin | 40144 -> 49240 bytes | |||
| -rw-r--r-- | test/ref/DCP/dcp_test7/ASSETMAP | 2 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test7/cpl_81fb54df-e1bf-4647-8788-ea7ba154375b.xml | 2 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test7/pkl_63c3aece-c581-4603-b612-75e43f0c0430.xml | 6 | ||||
| -rw-r--r-- | test/ref/DCP/dcp_test7/video.mxf | bin | 40144 -> 49240 bytes | |||
| -rw-r--r-- | test/ref/cpl_metadata_test1.xml | 2 | ||||
| -rw-r--r-- | test/ref/cpl_metadata_test2.xml | 2 | ||||
| -rw-r--r-- | test/test.cc | 11 | ||||
| -rw-r--r-- | test/verify_test.cc | 6 |
13 files changed, 27 insertions, 20 deletions
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 @@ <Path>video.mxf</Path> <VolumeIndex>1</VolumeIndex> <Offset>0</Offset> - <Length>40144</Length> + <Length>49240</Length> </Chunk> </ChunkList> </Asset> 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 @@ <IntrinsicDuration>24</IntrinsicDuration> <EntryPoint>0</EntryPoint> <Duration>24</Duration> - <Hash>XGhFVrqZqapOJx5Fh2SLjj48Yjg=</Hash> + <Hash>addO7je2lZSNQp55qjCWo5DLKFQ=</Hash> <FrameRate>24 1</FrameRate> <ScreenAspectRatio>1998 1080</ScreenAspectRatio> </MainPicture> 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 @@ <Asset> <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id> <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText> - <Hash>xz+gUPoPMdbFlAewvWIq8BRhBmA=</Hash> + <Hash>X3bMCBdXEOYEpYmsConNWrWUAGs=</Hash> <Size>5082</Size> <Type>text/xml</Type> </Asset> <Asset> <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id> <AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText> - <Hash>XGhFVrqZqapOJx5Fh2SLjj48Yjg=</Hash> - <Size>40144</Size> + <Hash>addO7je2lZSNQp55qjCWo5DLKFQ=</Hash> + <Size>49240</Size> <Type>application/mxf</Type> </Asset> <Asset> diff --git a/test/ref/DCP/dcp_test1/video.mxf b/test/ref/DCP/dcp_test1/video.mxf Binary files differindex 0a8fb0ca..7042a71a 100644 --- a/test/ref/DCP/dcp_test1/video.mxf +++ b/test/ref/DCP/dcp_test1/video.mxf 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 @@ <Path>video.mxf</Path> <VolumeIndex>1</VolumeIndex> <Offset>0</Offset> - <Length>40144</Length> + <Length>49240</Length> </Chunk> </ChunkList> </Asset> 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 @@ <IntrinsicDuration>24</IntrinsicDuration> <EntryPoint>0</EntryPoint> <Duration>24</Duration> - <Hash>XGhFVrqZqapOJx5Fh2SLjj48Yjg=</Hash> + <Hash>addO7je2lZSNQp55qjCWo5DLKFQ=</Hash> <FrameRate>24 1</FrameRate> <ScreenAspectRatio>1.85</ScreenAspectRatio> </MainPicture> 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 @@ <Asset> <Id>urn:uuid:81fb54df-e1bf-4647-8788-ea7ba154375b</Id> <AnnotationText>81fb54df-e1bf-4647-8788-ea7ba154375b</AnnotationText> - <Hash>JxqfjtwuLuimdPydOWGY/Vgrzek=</Hash> + <Hash>4a5qu1Q918HGMSi/b5d30ZvlkIo=</Hash> <Size>2168</Size> <Type>text/xml;asdcpKind=CPL</Type> </Asset> <Asset> <Id>urn:uuid:1fab8bb0-cfaf-4225-ad6d-01768bc10470</Id> <AnnotationText>1fab8bb0-cfaf-4225-ad6d-01768bc10470</AnnotationText> - <Hash>XGhFVrqZqapOJx5Fh2SLjj48Yjg=</Hash> - <Size>40144</Size> + <Hash>addO7je2lZSNQp55qjCWo5DLKFQ=</Hash> + <Size>49240</Size> <Type>application/x-smpte-mxf;asdcpKind=Picture</Type> </Asset> <Asset> diff --git a/test/ref/DCP/dcp_test7/video.mxf b/test/ref/DCP/dcp_test7/video.mxf Binary files differindex 0a8fb0ca..7042a71a 100644 --- a/test/ref/DCP/dcp_test7/video.mxf +++ b/test/ref/DCP/dcp_test7/video.mxf 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 @@ <IntrinsicDuration>24</IntrinsicDuration> <EntryPoint>0</EntryPoint> <Duration>24</Duration> - <Hash>BM4qh04HOSGF5vop4mhJBE7C4M0=</Hash> + <Hash>AjCzoIG/11nYHsTmKGLJf/zWANI=</Hash> <FrameRate>24 1</FrameRate> <ScreenAspectRatio>1998 1080</ScreenAspectRatio> </MainPicture> 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 @@ <IntrinsicDuration>24</IntrinsicDuration> <EntryPoint>0</EntryPoint> <Duration>24</Duration> - <Hash>BM4qh04HOSGF5vop4mhJBE7C4M0=</Hash> + <Hash>AjCzoIG/11nYHsTmKGLJf/zWANI=</Hash> <FrameRate>24 1</FrameRate> <ScreenAspectRatio>1998 1080</ScreenAspectRatio> </MainPicture> 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<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::Standard::SMPTE)); mp->set_metadata (mxf_meta); shared_ptr<dcp::PictureAssetWriter> 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<dcp::OpenJPEGImage>(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("<Hash>XGhFVrqZqapOJx5Fh2SLjj48Yjg=</Hash>", ""); + e.replace("<Hash>addO7je2lZSNQp55qjCWo5DLKFQ=</Hash>", ""); } check_verify_result ( |
