aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/PixelFormat.inl
Commit message (Collapse)AuthorAgeFilesLines
* Use stdint typesPierre Ossman2023-02-011-8/+8
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Explicitly mark switch case fall throughPierre Ossman2023-01-051-0/+4
| | | | | This allows us to separate accidental fall through from explicit ones, which allows us to turn on such checks in the compiler.
* Fix rounding error in pixel down conversionPierre Ossman2018-03-011-7/+6
| | | | | | Simple shifting can give noticable rounding errors if there is a large difference in the number of bits between the formats. Do the proper thing via a lookup table, the same way things are done for up conversion.
* Use lookup tables for pixel upconversionPierre Ossman2014-07-091-44/+22
| | | | | | 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.
* Remove full support for colour mapsPierre Ossman2014-07-071-109/+59
| | | | | | | | | Gets rid of a loooot of code and complexity. Colour map clients are still supported through an automatically generated map, but we lose the ability to develop a client or server that uses colour maps internally.
* Optimise the RGB to pixel conversion to simple shiftsPierre Ossman2014-07-071-0/+52
| | | | | Might as well make it inline at this point as well as it is used heavily in other routines that convert entire blocks of pixels.
* Converting to RGB might involve a precision increasePierre Ossman2014-07-071-8/+45
| | | | | | | 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.
* Revert commit 3784 as it was incorrect. A "Pixel" is always expected to be inPierre Ossman2010-09-301-9/+0
| | | | | | | | | native endian, and hence requires no swapping. The code in tightEncode.h however is working on pixel buffers, not Pixel arrays, so that's where the real bug was and is hereby properly fixed. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4151 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Make sure we handle endian problems in the conversion code.Pierre Ossman2009-04-211-0/+9
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3784 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Optimise the common pixel format conversion RGB24 to RGB32.Pierre Ossman2009-03-311-0/+25
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3730 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Don't forget the highest byte when reading out pixels.Pierre Ossman2009-03-091-1/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3641 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Consolidate pixel conversion into the PixelFormat class and optimise thePierre Ossman2009-03-061-0/+92
common cases. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3636 3789f03b-4d11-0410-bbf8-ca57d06f2519