diff options
author | Peter Åstrand <astrand@cendio.se> | 2004-12-09 20:01:00 +0000 |
---|---|---|
committer | Peter Åstrand <astrand@cendio.se> | 2004-12-09 20:01:00 +0000 |
commit | 0af24d4282f7afb0cf97f89b93107ede4b60468d (patch) | |
tree | 4952dc308a5b91030b4b62ae5ae88819fa60be19 /rfb/TightDecoder.cxx | |
parent | 5bbd61b0a2180b73bfb32dc1b1981ea04e70c471 (diff) | |
download | tigervnc-0af24d4282f7afb0cf97f89b93107ede4b60468d.tar.gz tigervnc-0af24d4282f7afb0cf97f89b93107ede4b60468d.zip |
Implemented client side gradient filter. Only tested with 16 bpp, though.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@35 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'rfb/TightDecoder.cxx')
-rw-r--r-- | rfb/TightDecoder.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/rfb/TightDecoder.cxx b/rfb/TightDecoder.cxx index d634acb1..e51558fe 100644 --- a/rfb/TightDecoder.cxx +++ b/rfb/TightDecoder.cxx @@ -26,7 +26,12 @@ extern "C" { using namespace rfb; -#define RGB24_TO_PIXEL(bpp,r,g,b) \ +#define RGB_TO_PIXEL(r,g,b) \ + (((PIXEL_T)(r) & myFormat.redMax) << myFormat.redShift | \ + ((PIXEL_T)(g) & myFormat.greenMax) << myFormat.greenShift | \ + ((PIXEL_T)(b) & myFormat.blueMax) << myFormat.blueShift) + +#define RGB24_TO_PIXEL(r,g,b) \ ((((PIXEL_T)(r) & 0xFF) * myFormat.redMax + 127) / 255 \ << myFormat.redShift | \ (((PIXEL_T)(g) & 0xFF) * myFormat.greenMax + 127) / 255 \ |