aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/JpegCompressor.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Use nullptr in all C++ codePierre Ossman2024-06-241-2/+2
| | | | | It's more readable than 0, and a bit safer than NULL, so let's try to follow modern norms.
* Consistently use uint8_t for data buffersPierre Ossman2023-03-181-1/+1
| | | | | These will always be byte streams at heart, so let's try to keep them with a proper type. Should make it clearer how they will be used.
* Use operator overloading for comparisonPierre Ossman2023-02-041-4/+4
| | | | | It is much more natural than custom methods for this very common operation.
* Use stdint typesPierre Ossman2023-02-011-5/+5
| | | | | Avoid having our own custom stuff and instead use the modern, standard types, for familiarity.
* Protect key variables from setjmp()Pierre Ossman2023-01-051-5/+6
| | | | | If we don't mark these as volatile then they might get reset on longjmp() and the code will misbehave.
* Explicitly mark switch case fall throughPierre Ossman2023-01-051-0/+1
| | | | | This allows us to separate accidental fall through from explicit ones, which allows us to turn on such checks in the compiler.
* Explicitly mark unused parametersPierre Ossman2023-01-041-1/+1
| | | | | This allows us to separate accidentally unused, from explicitly unused parameters, which allows us to turn on such checks in the compiler.
* Be consistent in including config.hPierre Ossman2021-12-301-0/+4
| | | | | | The generally recommended way is to include it from source files, not headers. We had a mix of both. Let's try to be consistent and follow the recommended way.
* Make direct stream API a bit saferPierre Ossman2020-05-211-7/+7
| | | | | Provide some safety checks when directly accessing the underlying pointer of streams.
* Remove special functions from JPEG compressorPierre Ossman2020-05-211-1/+1
| | | | We can do what we want with the standard methods.
* Simplify stream availability handlingPierre Ossman2020-05-211-1/+1
| | | | | Just have a simply number of bytes argument to avoid a lot of complexity.
* Add stream avail() methodsPierre Ossman2020-05-211-2/+2
| | | | | Makes it more readable to write code that needs to know how much data/space is available in a stream.
* Rename ConnParams to ClientParamsPierre Ossman2018-11-011-1/+1
| | | | | | Now that we've split out server state to ServerParams, ConnParams only contains state for a client. Rename the class and variables to reflect this.
* spelling fixesklemens2017-01-281-1/+1
|
* Flush entire JPEG buffer, ignoring statePierre Ossman2015-10-161-1/+1
| | | | | | libjpeg doesn't update the buffer state before calling the empty_output_buffer() callback so we need to flush everything, not just the apparent size.
* Make sure Exceptions do not use unsafe format stringsPierre Ossman2015-03-031-2/+2
|
* Remove a lot of platform compatibilty stuffPierre Ossman2014-07-071-1/+0
| | | | It's either not used, or no longer relevant.
* Fix some offenders that poke around in the PixelFormat internalsPierre Ossman2014-07-071-27/+24
|
* Consistent use of stride vs pitchPierre Ossman2014-07-071-5/+6
| | | | | | | 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.
* Make the subsampling setting follow the common stylePierre Ossman2014-07-071-4/+8
|
* Support keeping libjpeg's default compression settingPierre Ossman2014-07-071-3/+8
|
* Be more liberal with const in places where write access isn't needed.Pierre Ossman2012-01-301-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4840 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Internalise the libjpeg stuff into the JpegCompressor class as the libjpegPierre Ossman2011-09-071-43/+69
| | | | | | | headers are a bit conflict prone. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4669 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Fix image corruption issues with, and add a few optimizations for, 16bpp clientsDRC2011-08-191-1/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4642 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Add support for TurboVNC pseudo-encodings and Grayscale JPEG compression so ↵DRC2011-08-191-0/+2
| | | | | | that, when a TurboVNC viewer is connected, the TigerVNC Server will behave exactly like the TurboVNC Server. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4641 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Need to include os/print.h to use snprintf on WindowsDRC2011-08-171-0/+1
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4634 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Further optimizations to the Tight encoder to eliminate getImage() overhead. ↵DRC2011-08-171-3/+6
| | | | | | 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
* Ported encoding optimizations from TurboVNC. The changes to the Tight ↵DRC2011-08-111-0/+216
| | | | | | parameters were determined through extensive low-level profiling (see http://www.virtualgl.org/pmwiki/uploads/About/turbototiger.pdf). The other enhancements involved: (1) porting the solid subrectangle pre-computation code from TightVNC/TurboVNC (it makes a pretty big difference-- see report), (2) encapsulating the JPEG encoder in its own class (this eliminates a buffer copy, and the JPEG buffer is now set to a decent size where it shouldn't ever need to be paged or re-allocated, except in rare corner cases), (3) adding support for last rect. encoding (necessary to support the solid rectangle pre-computation enhancements. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4626 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Remove the "video" feature and its associated custom JPEG handling.Pierre Ossman2009-03-051-193/+0
| | | | | | | | Having the client specifiy the video region is conceptually wrong and a problem like this should be handled by better encoding selection. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3635 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Changes in mapping of JPEG quality levels. Minor code cleanups.Constantin Kaplinsky2007-10-101-3/+3
| | | | git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2360 3789f03b-4d11-0410-bbf8-ca57d06f2519
* Added JpegCompressor abstract class and two implementations -- one ↵Constantin Kaplinsky2007-07-241-0/+193
cross-platform and another IRIX-specific. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@2320 3789f03b-4d11-0410-bbf8-ca57d06f2519