Use lookup tables for pixel upconversion
You have to loop many times when converting e.g. 2 bits to 8,
so have a couple of lookup tables to speed things up. We still
use bit replication to get from 8 bits to 16 bits though.
diff --git a/common/rfb/PixelFormat.h b/common/rfb/PixelFormat.h
index c3db878..db12988 100644
--- a/common/rfb/PixelFormat.h
+++ b/common/rfb/PixelFormat.h
@@ -105,6 +105,12 @@
int redBits, greenBits, blueBits;
int maxBits, minBits;
bool endianMismatch;
+
+ static rdr::U8 upconvTable[256*8];
+
+ class Init;
+ friend class Init;
+ static Init _init;
};
}