diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-07-12 17:12:49 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-07-12 17:12:49 +0100 |
| commit | ad6c0bbec4f354f29fb968099ff1a0ce2e57c43a (patch) | |
| tree | e5928a8f22bf9a3c2a18927b88dc8c3d382f64be /test | |
| parent | 0eee0c3adda726542a5f2b8fad68f54ebf701392 (diff) | |
Remove unused RGBPlusAlphaImage; merge Image/SimpleImage.
Diffstat (limited to 'test')
| -rw-r--r-- | test/client_server_test.cc | 4 | ||||
| -rw-r--r-- | test/image_test.cc | 16 | ||||
| -rw-r--r-- | test/make_black_test.cc | 2 | ||||
| -rw-r--r-- | test/pixel_formats_test.cc | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/test/client_server_test.cc b/test/client_server_test.cc index 232190286..50add352f 100644 --- a/test/client_server_test.cc +++ b/test/client_server_test.cc @@ -30,7 +30,7 @@ do_remote_encode (shared_ptr<DCPVideoFrame> frame, ServerDescription* descriptio BOOST_AUTO_TEST_CASE (client_server_test) { - shared_ptr<Image> image (new SimpleImage (PIX_FMT_RGB24, libdcp::Size (1998, 1080), true)); + shared_ptr<Image> image (new Image (PIX_FMT_RGB24, libdcp::Size (1998, 1080), true)); uint8_t* p = image->data()[0]; for (int y = 0; y < 1080; ++y) { @@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (client_server_test) p += image->stride()[0]; } - shared_ptr<Image> sub_image (new SimpleImage (PIX_FMT_RGBA, libdcp::Size (100, 200), true)); + shared_ptr<Image> sub_image (new Image (PIX_FMT_RGBA, libdcp::Size (100, 200), true)); p = sub_image->data()[0]; for (int y = 0; y < 200; ++y) { uint8_t* q = p; diff --git a/test/image_test.cc b/test/image_test.cc index b74531c46..8dc289602 100644 --- a/test/image_test.cc +++ b/test/image_test.cc @@ -1,7 +1,7 @@ BOOST_AUTO_TEST_CASE (aligned_image_test) { - SimpleImage* s = new SimpleImage (PIX_FMT_RGB24, libdcp::Size (50, 50), true); + Image* s = new Image (PIX_FMT_RGB24, libdcp::Size (50, 50), true); BOOST_CHECK_EQUAL (s->components(), 1); /* 160 is 150 aligned to the nearest 32 bytes */ BOOST_CHECK_EQUAL (s->stride()[0], 160); @@ -12,7 +12,7 @@ BOOST_AUTO_TEST_CASE (aligned_image_test) BOOST_CHECK (!s->data()[3]); /* copy constructor */ - SimpleImage* t = new SimpleImage (*s); + Image* t = new Image (*s); BOOST_CHECK_EQUAL (t->components(), 1); BOOST_CHECK_EQUAL (t->stride()[0], 160); BOOST_CHECK_EQUAL (t->line_size()[0], 150); @@ -28,7 +28,7 @@ BOOST_AUTO_TEST_CASE (aligned_image_test) BOOST_CHECK (t->stride()[0] == s->stride()[0]); /* assignment operator */ - SimpleImage* u = new SimpleImage (PIX_FMT_YUV422P, libdcp::Size (150, 150), false); + Image* u = new Image (PIX_FMT_YUV422P, libdcp::Size (150, 150), false); *u = *s; BOOST_CHECK_EQUAL (u->components(), 1); BOOST_CHECK_EQUAL (u->stride()[0], 160); @@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE (aligned_image_test) BOOST_AUTO_TEST_CASE (compact_image_test) { - SimpleImage* s = new SimpleImage (PIX_FMT_RGB24, libdcp::Size (50, 50), false); + Image* s = new Image (PIX_FMT_RGB24, libdcp::Size (50, 50), false); BOOST_CHECK_EQUAL (s->components(), 1); BOOST_CHECK_EQUAL (s->stride()[0], 50 * 3); BOOST_CHECK_EQUAL (s->line_size()[0], 50 * 3); @@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE (compact_image_test) BOOST_CHECK (!s->data()[3]); /* copy constructor */ - SimpleImage* t = new SimpleImage (*s); + Image* t = new Image (*s); BOOST_CHECK_EQUAL (t->components(), 1); BOOST_CHECK_EQUAL (t->stride()[0], 50 * 3); BOOST_CHECK_EQUAL (t->line_size()[0], 50 * 3); @@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE (compact_image_test) BOOST_CHECK (t->stride()[0] == s->stride()[0]); /* assignment operator */ - SimpleImage* u = new SimpleImage (PIX_FMT_YUV422P, libdcp::Size (150, 150), true); + Image* u = new Image (PIX_FMT_YUV422P, libdcp::Size (150, 150), true); *u = *s; BOOST_CHECK_EQUAL (u->components(), 1); BOOST_CHECK_EQUAL (u->stride()[0], 50 * 3); @@ -101,7 +101,7 @@ BOOST_AUTO_TEST_CASE (compact_image_test) BOOST_AUTO_TEST_CASE (crop_image_test) { /* This was to check out a bug with valgrind, and is probably not very useful */ - shared_ptr<SimpleImage> image (new SimpleImage (PIX_FMT_YUV420P, libdcp::Size (16, 16), true)); + shared_ptr<Image> image (new Image (PIX_FMT_YUV420P, libdcp::Size (16, 16), true)); image->make_black (); Crop crop; crop.top = 3; @@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE (crop_image_test) BOOST_AUTO_TEST_CASE (crop_image_test2) { /* Here's a 1998 x 1080 image which is black */ - shared_ptr<Image> image (new SimpleImage (PIX_FMT_YUV420P, libdcp::Size (1998, 1080), true)); + shared_ptr<Image> image (new Image (PIX_FMT_YUV420P, libdcp::Size (1998, 1080), true)); image->make_black (); /* Crop it by 1 pixel */ diff --git a/test/make_black_test.cc b/test/make_black_test.cc index 9bec00651..4c2822514 100644 --- a/test/make_black_test.cc +++ b/test/make_black_test.cc @@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE (make_black_test) int N = 0; for (list<AVPixelFormat>::const_iterator i = pix_fmts.begin(); i != pix_fmts.end(); ++i) { - boost::shared_ptr<Image> foo (new SimpleImage (*i, in_size, true)); + boost::shared_ptr<Image> foo (new Image (*i, in_size, true)); foo->make_black (); boost::shared_ptr<Image> bar = foo->scale_and_convert_to_rgb (out_size, Scaler::from_id ("bicubic"), true); diff --git a/test/pixel_formats_test.cc b/test/pixel_formats_test.cc index fb2278fdb..ccdda3317 100644 --- a/test/pixel_formats_test.cc +++ b/test/pixel_formats_test.cc @@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE (pixel_formats_test) f->height = 480; f->format = static_cast<int> (i->format); av_frame_get_buffer (f, true); - SimpleImage t (f); + Image t (f); BOOST_CHECK_EQUAL(t.components(), i->components); BOOST_CHECK_EQUAL(t.lines(0), i->lines[0]); BOOST_CHECK_EQUAL(t.lines(1), i->lines[1]); |
