summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-02-02 19:25:43 +0000
committerCarl Hetherington <cth@carlh.net>2015-02-02 19:25:43 +0000
commit0d7fe66361a40702cb97357955cf35256f1d2c26 (patch)
tree5cc44b13cbe6e257cb422ba9d79d1c385234495c /test
parent1dc082f3295f64a9fd4a103078a1dbb5121a865d (diff)
Rename XYZFrame -> XYZImage and ARGBFrame -> ARGBImage.
Diffstat (limited to 'test')
-rw-r--r--test/argb_image_test.cc (renamed from test/argb_frame_test.cc)8
-rw-r--r--test/decryption_test.cc10
-rw-r--r--test/rgb_xyz_test.cc8
-rw-r--r--test/round_trip_test.cc8
-rw-r--r--test/wscript2
5 files changed, 18 insertions, 18 deletions
diff --git a/test/argb_frame_test.cc b/test/argb_image_test.cc
index e5c881af..e88d208b 100644
--- a/test/argb_frame_test.cc
+++ b/test/argb_image_test.cc
@@ -17,13 +17,13 @@
*/
-#include "argb_frame.h"
+#include "argb_image.h"
#include <boost/test/unit_test.hpp>
-/** Very simple tests of ARGBFrame */
-BOOST_AUTO_TEST_CASE (argb_frame_test)
+/** Very simple tests of ARGBImage */
+BOOST_AUTO_TEST_CASE (argb_image_test)
{
- dcp::ARGBFrame f (dcp::Size (100, 200));
+ dcp::ARGBImage f (dcp::Size (100, 200));
BOOST_CHECK (f.data() != 0);
BOOST_CHECK_EQUAL (f.stride(), 100 * 4);
diff --git a/test/decryption_test.cc b/test/decryption_test.cc
index d9170daa..a28f3c64 100644
--- a/test/decryption_test.cc
+++ b/test/decryption_test.cc
@@ -23,7 +23,7 @@
#include "cpl.h"
#include "decrypted_kdm.h"
#include "encrypted_kdm.h"
-#include "argb_frame.h"
+#include "argb_image.h"
#include "mono_picture_mxf.h"
#include "reel_picture_asset.h"
#include "reel.h"
@@ -32,7 +32,7 @@
using boost::dynamic_pointer_cast;
using boost::shared_ptr;
-static shared_ptr<const dcp::ARGBFrame>
+static shared_ptr<const dcp::ARGBImage>
get_frame (dcp::DCP const & dcp)
{
shared_ptr<const dcp::Reel> reel = dcp.cpls().front()->reels().front ();
@@ -41,7 +41,7 @@ get_frame (dcp::DCP const & dcp)
shared_ptr<const dcp::MonoPictureMXF> mono_picture = dynamic_pointer_cast<const dcp::MonoPictureMXF> (picture);
shared_ptr<const dcp::MonoPictureFrame> j2k_frame = mono_picture->get_frame (0);
- return j2k_frame->argb_frame ();
+ return j2k_frame->argb_image ();
}
/** Decrypt an encrypted test DCP and check that its first frame is the same as the unencrypted version */
@@ -68,8 +68,8 @@ BOOST_AUTO_TEST_CASE (decryption_test)
encrypted.add (kdm);
- shared_ptr<const dcp::ARGBFrame> plaintext_frame = get_frame (plaintext);
- shared_ptr<const dcp::ARGBFrame> encrypted_frame = get_frame (encrypted);
+ shared_ptr<const dcp::ARGBImage> plaintext_frame = get_frame (plaintext);
+ shared_ptr<const dcp::ARGBImage> encrypted_frame = get_frame (encrypted);
/* Check that plaintext and encrypted are the same */
BOOST_CHECK_EQUAL (plaintext_frame->stride(), encrypted_frame->stride());
diff --git a/test/rgb_xyz_test.cc b/test/rgb_xyz_test.cc
index da897b9f..6ee62dbf 100644
--- a/test/rgb_xyz_test.cc
+++ b/test/rgb_xyz_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -19,7 +19,7 @@
#include "image.h"
#include "rgb_xyz.h"
-#include "xyz_frame.h"
+#include "xyz_image.h"
#include "colour_conversion.h"
#include <boost/test/unit_test.hpp>
#include <boost/bind.hpp>
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE (rgb_xyz_test)
}
}
- shared_ptr<dcp::XYZFrame> xyz = dcp::rgb_to_xyz (rgb, dcp::ColourConversion::srgb_to_xyz ());
+ shared_ptr<dcp::XYZImage> xyz = dcp::rgb_to_xyz (rgb, dcp::ColourConversion::srgb_to_xyz ());
for (int y = 0; y < size.height; ++y) {
uint16_t* p = reinterpret_cast<uint16_t*> (rgb->data()[0] + y * rgb->stride()[0]);
@@ -144,7 +144,7 @@ note_handler (dcp::NoteType n, string s)
/** Check that xyz_to_rgb clamps XYZ values correctly */
BOOST_AUTO_TEST_CASE (xyz_rgb_range_test)
{
- shared_ptr<dcp::XYZFrame> xyz (new dcp::XYZFrame (dcp::Size (2, 2)));
+ shared_ptr<dcp::XYZImage> xyz (new dcp::XYZImage (dcp::Size (2, 2)));
xyz->data(0)[0] = -4;
xyz->data(0)[1] = 6901;
diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc
index 94097e75..6f5372ec 100644
--- a/test/round_trip_test.cc
+++ b/test/round_trip_test.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2013 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2013-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@
#include "test.h"
#include "cpl.h"
#include "mono_picture_frame.h"
-#include "argb_frame.h"
+#include "argb_image.h"
#include "certificate_chain.h"
#include "mono_picture_mxf_writer.h"
#include "reel_picture_asset.h"
@@ -102,8 +102,8 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
BOOST_CHECK (!kdm_B.keys().empty ());
mxf_B->set_key (kdm_B.keys().front().key());
- shared_ptr<dcp::ARGBFrame> frame_A = mxf_A->get_frame(0)->argb_frame ();
- shared_ptr<dcp::ARGBFrame> frame_B = mxf_B->get_frame(0)->argb_frame ();
+ shared_ptr<dcp::ARGBImage> frame_A = mxf_A->get_frame(0)->argb_image ();
+ shared_ptr<dcp::ARGBImage> frame_B = mxf_B->get_frame(0)->argb_image ();
BOOST_CHECK_EQUAL (frame_A->size().width, frame_B->size().width);
BOOST_CHECK_EQUAL (frame_A->size().height, frame_B->size().height);
BOOST_CHECK_EQUAL (memcmp (frame_A->data(), frame_B->data(), frame_A->size().width * frame_A->size().height), 0);
diff --git a/test/wscript b/test/wscript
index f669c378..b723f54c 100644
--- a/test/wscript
+++ b/test/wscript
@@ -25,7 +25,7 @@ def build(bld):
else:
obj.use = 'libdcp%s' % bld.env.API_VERSION
obj.source = """
- argb_frame_test.cc
+ argb_image_test.cc
certificates_test.cc
colour_test.cc
colour_conversion_test.cc