summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-16 23:56:11 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-17 00:16:58 +0100
commitfcc0515087a0b2bf9af5043af1c324367f1c152c (patch)
tree2b4651e72eba63da753c6463fcc22319b0d242bb /test
parentd676cd5115d8c79a547742364f2037435c14a54a (diff)
Use 64-byte alignment for aligned image memory.
FFmpeg uses this values if AVX512 is available, and with only 32-byte alignment I am seeing strange scaling effects whereby crop_scale_window_test7 gives black bars down the right side of cropped images (when run on an i7 7700).
Diffstat (limited to 'test')
-rw-r--r--test/image_test.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/image_test.cc b/test/image_test.cc
index 6401db851..2f2c9a9b7 100644
--- a/test/image_test.cc
+++ b/test/image_test.cc
@@ -39,8 +39,8 @@ BOOST_AUTO_TEST_CASE (aligned_image_test)
{
Image* s = new Image (AV_PIX_FMT_RGB24, dcp::Size (50, 50), true);
BOOST_CHECK_EQUAL (s->planes(), 1);
- /* 160 is 150 aligned to the nearest 32 bytes */
- BOOST_CHECK_EQUAL (s->stride()[0], 160);
+ /* 192 is 150 aligned to the nearest 64 bytes */
+ BOOST_CHECK_EQUAL (s->stride()[0], 192);
BOOST_CHECK_EQUAL (s->line_size()[0], 150);
BOOST_CHECK (s->data()[0]);
BOOST_CHECK (!s->data()[1]);
@@ -50,7 +50,7 @@ BOOST_AUTO_TEST_CASE (aligned_image_test)
/* copy constructor */
Image* t = new Image (*s);
BOOST_CHECK_EQUAL (t->planes(), 1);
- BOOST_CHECK_EQUAL (t->stride()[0], 160);
+ BOOST_CHECK_EQUAL (t->stride()[0], 192);
BOOST_CHECK_EQUAL (t->line_size()[0], 150);
BOOST_CHECK (t->data()[0]);
BOOST_CHECK (!t->data()[1]);
@@ -67,7 +67,7 @@ BOOST_AUTO_TEST_CASE (aligned_image_test)
Image* u = new Image (AV_PIX_FMT_YUV422P, dcp::Size (150, 150), false);
*u = *s;
BOOST_CHECK_EQUAL (u->planes(), 1);
- BOOST_CHECK_EQUAL (u->stride()[0], 160);
+ BOOST_CHECK_EQUAL (u->stride()[0], 192);
BOOST_CHECK_EQUAL (u->line_size()[0], 150);
BOOST_CHECK (u->data()[0]);
BOOST_CHECK (!u->data()[1]);