From 5159d389a38f805c3a4332f53c973cd0cddcacb3 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 9 Feb 2022 03:06:57 -0800 Subject: [PATCH] CInema: Fix writing 4-up where result and expected strides differ --- src/platform/test/cinema-main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/test/cinema-main.c b/src/platform/test/cinema-main.c index 88fcf2a66..28bb07693 100644 --- a/src/platform/test/cinema-main.c +++ b/src/platform/test/cinema-main.c @@ -883,7 +883,7 @@ static void _write4UpDiff(const struct CInemaImage* expected, const struct CInem size_t base = y * out.stride; size_t inbase = y * expected->stride; memcpy(&outdata[base], &((uint32_t*) expected->data)[inbase], expected->width * 4); - memcpy(&outdata[base + expected->width], &((uint32_t*) result->data)[inbase], expected->width * 4); + memcpy(&outdata[base + expected->width], &((uint32_t*) result->data)[y * result->stride], expected->width * 4); memcpy(&outdata[base + expected->height * out.stride], &diff[inbase * 4], expected->width * 4); for (x = 0; x < expected->width; ++x) { size_t pix = (expected->stride * y + x) * 4;