Commit cf0cdf6a by Nicolas Capens

Optimize R5G6B5 conversion.

Bug 20891368 Change-Id: I876e4dab9ab5ba7df5887d4b184e9750f9563edc Reviewed-on: https://swiftshader-review.googlesource.com/3261Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent e0308901
...@@ -326,9 +326,9 @@ namespace sw ...@@ -326,9 +326,9 @@ namespace sw
Int rgb = Int(*Pointer<Short>(s)); Int rgb = Int(*Pointer<Short>(s));
*Pointer<Int>(d) = 0xFF000000 | *Pointer<Int>(d) = 0xFF000000 |
((rgb & 0xF800) << 8) | ((rgb & 0xE000) << 3) | ((rgb & 0xF800) << 8) | ((rgb & 0xE01F) << 3) |
((rgb & 0x07E0) << 5) | ((rgb & 0x0600) >> 1) | ((rgb & 0x07E0) << 5) | ((rgb & 0x0600) >> 1) |
((rgb & 0x001F) << 3) | ((rgb & 0x001C) >> 2); ((rgb & 0x001C) >> 2);
s += sBytes; s += sBytes;
d += dBytes; d += dBytes;
...@@ -369,9 +369,9 @@ namespace sw ...@@ -369,9 +369,9 @@ namespace sw
Int rgb = Int(*Pointer<Short>(s)); Int rgb = Int(*Pointer<Short>(s));
*Pointer<Int>(d) = 0xFF000000 | *Pointer<Int>(d) = 0xFF000000 |
((rgb & 0xF800) << 8) | ((rgb & 0xE000) << 3) | ((rgb & 0xF800) << 8) | ((rgb & 0xE01F) << 3) |
((rgb & 0x07E0) << 5) | ((rgb & 0x0600) >> 1) | ((rgb & 0x07E0) << 5) | ((rgb & 0x0600) >> 1) |
((rgb & 0x001F) << 3) | ((rgb & 0x001C) >> 2); ((rgb & 0x001C) >> 2);
} }
break; break;
default: default:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment