summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-01-10 01:00:14 +0000
committerCarl Hetherington <cth@carlh.net>2018-01-10 01:00:14 +0000
commitf59ae2d9793699fd0e18f9e53ff362c26c2ef00c (patch)
tree5e4e1e0bf7872e1c5dd581b5b6cb255d9a20ebb1 /test
parent1d7a98b5c7537b4874645c56cd83ece9f78625f5 (diff)
Fix yet more pixel order confusions.
Diffstat (limited to 'test')
-rw-r--r--test/image_test.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/image_test.cc b/test/image_test.cc
index 67daaa509..b0bbe2594 100644
--- a/test/image_test.cc
+++ b/test/image_test.cc
@@ -142,13 +142,13 @@ alpha_blend_test_one (AVPixelFormat format, string suffix)
shared_ptr<Image> raw = proxy->image();
shared_ptr<Image> background = raw->convert_pixel_format (dcp::YUV_TO_RGB_REC709, format, true, false);
- shared_ptr<Image> overlay (new Image (AV_PIX_FMT_RGBA, raw->size(), true));
+ shared_ptr<Image> overlay (new Image (AV_PIX_FMT_BGRA, raw->size(), true));
overlay->make_transparent ();
for (int y = 0; y < 128; ++y) {
uint8_t* p = overlay->data()[0] + y * overlay->stride()[0];
for (int x = 0; x < 128; ++x) {
- p[x * 4] = 255;
+ p[x * 4 + 2] = 255;
p[x * 4 + 3] = 255;
}
}
@@ -164,7 +164,7 @@ alpha_blend_test_one (AVPixelFormat format, string suffix)
for (int y = 256; y < 384; ++y) {
uint8_t* p = overlay->data()[0] + y * overlay->stride()[0];
for (int x = 0; x < 128; ++x) {
- p[x * 4 + 2] = 255;
+ p[x * 4] = 255;
p[x * 4 + 3] = 255;
}
}