diff options
author | Pierre Ossman <ossman@cendio.se> | 2014-02-28 11:54:34 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2014-07-07 13:21:35 +0200 |
commit | 6e5cd5db59b2ddd7dfa94248aa2631f63391d631 (patch) | |
tree | cf7c0a7c7e5aababa5feccc218ab2c923c143179 /common/rfb/PixelFormat.h | |
parent | 6655d96dc475942f91af38a879627fd254a37c2e (diff) | |
download | tigervnc-6e5cd5db59b2ddd7dfa94248aa2631f63391d631.tar.gz tigervnc-6e5cd5db59b2ddd7dfa94248aa2631f63391d631.zip |
Converting to RGB might involve a precision increase
Need to do more than a simple shift to get the appropriate
new value. This isn't quite as exact as a proper multiplication
and division, but the error is so small it's not worth the
extra cycles.
Diffstat (limited to 'common/rfb/PixelFormat.h')
-rw-r--r-- | common/rfb/PixelFormat.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/rfb/PixelFormat.h b/common/rfb/PixelFormat.h index aef309cf..dd414744 100644 --- a/common/rfb/PixelFormat.h +++ b/common/rfb/PixelFormat.h @@ -89,9 +89,9 @@ namespace rfb { int blueShift; protected: - int redConvShift; - int greenConvShift; - int blueConvShift; + /* Pre-computed values to keep algorithms simple */ + int redBits, greenBits, blueBits; + int maxBits, minBits; bool endianMismatch; }; } |