aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/PixelFormat.h
Commit message (Collapse)AuthorAgeFilesLines
* Use stdint typesPierre Ossman2023-02-011-20/+20
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Use templates for optimized codePierre Ossman2023-02-011-18/+6
| | | | | Avoid preprocessor magic and instead rely on templating to generate optimized functions for performance critical code.
* Fix rounding error in pixel down conversionPierre Ossman2018-03-011-0/+1
| | | | | | 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.
* Add pixel conversion correctness testPierre Ossman2014-09-251-0/+6
|
* PixelTransformer is gone so we can protect these nowPierre Ossman2014-09-251-2/+1
|
* Add optimised buffer conversionPierre Ossman2014-07-091-0/+23
| | | | | | | | | Handles the common cases when the target or source are in the preferred 888 format. If one of the buffers is not 888, then it must also be properly aligned (which is commonly the case). Performance is now in many cases on par with PixelTransformer.
* Add ability to directly convert between two pixel formatsPierre Ossman2014-07-091-0/+8
| | | | | This is a lot easier and cheaper than having to set up a complete PixelTransformer object.
* Use lookup tables for pixel upconversionPierre Ossman2014-07-091-0/+6
| | | | | | 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-13/+17
| | | | | | | | | 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.
* Consistent use of stride vs pitchPierre Ossman2014-07-071-2/+2
| | | | | | | Consistently use the term stride rather than pitch. Also consistently represent the stride in number of pixels rather than number of bytes. There is so much code that assumes proper alignment already that we do not need the extra resolution.
* Optimise the RGB to pixel conversion to simple shiftsPierre Ossman2014-07-071-2/+2
| | | | | 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.
* Document the different pixel representations that we deal withPierre Ossman2014-07-071-1/+10
|
* Remove unused pixel conversion methodPierre Ossman2014-07-071-1/+0
|
* Converting to RGB might involve a precision increasePierre Ossman2014-07-071-3/+3
| | | | | | | 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.
* Make sure we check that PixelFormats we get are actually valid.Pierre Ossman2014-07-031-0/+2
|
* If the client and server are using identical pixel formats, then perform ↵DRC2011-11-031-0/+2
| | | | | | Tight decoding directly into the viewer's back buffer, rather than going through the slow fillRect/imageRect routines. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4757 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Further optimizations to the Tight encoder to eliminate getImage() overhead. ↵DRC2011-08-171-0/+3
| | | | | | The encoder now directly accesses the framebuffer for solid rectangle computation, JPEG encoding, and color counting (if pixel translation is not required.) Also moved everything in tightEncode.h into the TightEncoder class to eliminate all of the static mess (this will be important later on if we decide to multi-thread the encoder.) git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4631 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Make sure we handle endian problems in the conversion code.Pierre Ossman2009-04-211-1/+2
| | | | 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/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3730 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Consolidate pixel conversion into the PixelFormat class and optimise thePierre Ossman2009-03-061-1/+33
| | | | | | | common cases. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3636 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Migrating to new directory structure adopted from the RealVNC's source tree. ↵Constantin Kaplinsky2006-05-251-0/+58
More changes will follow. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@589 3789f03b-4d11-0410-bbf8-ca57d06f2519