From 79dd7d91ebd7052a4b7d235dc73900a9ebaf78d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Du=C5=A1an=20Poizl?= Date: Sun, 25 Aug 2024 17:55:59 +0200 Subject: [PATCH] Fix fromPlanaerSSE --- rawimage_sse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/rawimage_sse.cpp b/rawimage_sse.cpp index 87ef938..cf9c8dd 100644 --- a/rawimage_sse.cpp +++ b/rawimage_sse.cpp @@ -84,15 +84,15 @@ void fromPlanarSSE(const void *in, void *out, size_t count) switch(sizeof(T)) { case 1: - for(uint32_t o=0; o(out)[i + o] = static_cast(in)[i + o + s2]; + for(uint32_t o=0; o(out)[i*4 + o] = static_cast(in)[i + o*s2]; if(ch==3)static_cast(out)[i*4 + 3] = 0xff; break; case 2: - for(uint32_t o=0; o(out)[i + o] = static_cast(in)[i + o + s2]; + for(uint32_t o=0; o(out)[i*4 + o] = static_cast(in)[i + o*s2]; if(ch==3)static_cast(out)[i*4 + 3] = 0xffff; break; case 4: - for(uint32_t o=0; o(out)[i + o] = static_cast(in)[i + o + s2]; + for(uint32_t o=0; o(out)[i*4 + o] = static_cast(in)[i + o*s2]; if(ch==3) { if(!std::numeric_limits::is_integer)static_cast(out)[i*4 + 3] = 1.0;