From 305fa7aff92b30b3d048e5e78f10769a142074a8 Mon Sep 17 00:00:00 2001 From: Matthias Kupfer Date: Tue, 5 Aug 2008 16:40:24 +0000 Subject: [PATCH] Short version of average16 added. svn path=/trunk/; revision=35130 --- reactos/subsystems/win32/win32k/dib/dib16bpp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reactos/subsystems/win32/win32k/dib/dib16bpp.c b/reactos/subsystems/win32/win32k/dib/dib16bpp.c index c0a19c54182..7d4417cd0d1 100644 --- a/reactos/subsystems/win32/win32k/dib/dib16bpp.c +++ b/reactos/subsystems/win32/win32k/dib/dib16bpp.c @@ -499,7 +499,8 @@ __inline PIXEL average16(PIXEL a, PIXEL b) return res; */ - return a; // FIXME: Depend on SetStretchMode + // This one is the short form of the correct one ;-) + return (((a ^ b) & 0xf7deU) >> 1) + (a & b); } //NOTE: If you change something here, please do the same in other dibXXbpp.c files!