Fix flipped red and blue with rgba64_onto_* tests.
authorCarl Hetherington <cth@carlh.net>
Mon, 29 Jan 2024 11:41:29 +0000 (12:41 +0100)
committerCarl Hetherington <cth@carlh.net>
Sat, 3 Feb 2024 08:57:25 +0000 (09:57 +0100)
test/image_test.cc

index 899961f50cd8869cad3cc6cf75a2e43391aea3a9..4f4520a51c599866dfa1428f17a2fde2c4cd8df1 100644 (file)
@@ -203,7 +203,7 @@ alpha_blend_test_rgba64be_onto(AVPixelFormat format, string suffix)
        for (int y = 0; y < 128; ++y) {
                auto p = reinterpret_cast<uint16_t*>(overlay->data()[0] + y * overlay->stride()[0]);
                for (int x = 0; x < 128; ++x) {
-                       p[x * 4 + 2] = 65535;
+                       p[x * 4 + 0] = 65535;
                        p[x * 4 + 3] = 65535;
                }
        }
@@ -219,7 +219,7 @@ alpha_blend_test_rgba64be_onto(AVPixelFormat format, string suffix)
        for (int y = 256; y < 384; ++y) {
                auto p = reinterpret_cast<uint16_t*>(overlay->data()[0] + y * overlay->stride()[0]);
                for (int x = 0; x < 128; ++x) {
-                       p[x * 4] = 65535;
+                       p[x * 4 + 2] = 65535;
                        p[x * 4 + 3] = 65535;
                }
        }