primitives: Respect alpha values in YUV444 SSE pixel routine
authorMartin Fleisz <martin.fleisz@thincast.com>
Mon, 11 Jan 2021 12:22:28 +0000 (13:22 +0100)
committerakallabeth <akallabeth@users.noreply.github.com>
Thu, 25 Feb 2021 08:51:41 +0000 (09:51 +0100)
(cherry picked from commit 9eaa820818571d23bd8604fbbc1ff9fa7c634967)

libfreerdp/primitives/prim_YUV_ssse3.c

index 8dc39dc..45c8209 100644 (file)
@@ -87,7 +87,8 @@ static __m128i* ssse3_YUV444Pixel(__m128i* dst, __m128i Yraw, __m128i Uraw, __m1
                                       0x80, 0x03, 0x80, 0x80, 0x80 } };
 #endif
        const __m128i c128 = _mm_set1_epi16(128);
-       __m128i BGRX = _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000);
+       __m128i BGRX = _mm_and_si128(_mm_loadu_si128(dst),
+                                    _mm_set_epi32(0xFF000000, 0xFF000000, 0xFF000000, 0xFF000000));
        {
                __m128i C, D, E;
                /* Load Y values and expand to 32 bit */