Pierre Ossman
ae9b042df1
Change rQslice() to rQpeekBytes()
...
We don't need any full slice functionality, so let's change this to
better march rQpeek8() and rQshiftBytes().
2023-06-04 19:00:33 +02:00
Pierre Ossman
87143b361e
Reduce kept state in JPEG decoder
...
We don't have to keep track of this much data between rects, so
restructure things to make it more simple. This allows the JPEG parsing
code to be a pure function which only depends on the input.
2023-06-04 19:00:33 +02:00
Pierre Ossman
98664c7887
Handle correct data offset in raw decoder
...
There is often buffered data ahead of the pixel data so we need to take
this in account when making sure pixels are opaque.
2022-03-28 08:45:40 +02:00
pdlan
7f84160147
Add RealVNC's JPEG encoding
...
Add support for RealVNC's JPEG encoding.
Add tests for JPEGDecoder. Fix the corner case of caching Huffman or quantization tables.
2021-11-26 03:59:19 -05:00
Paul Dumais
d4c887e23f
Added support for ZRLE encoding
...
Fixed eslint warnings
Improved memory usage of zrle decoding. Added unit tests for zrle decoding.
Added support for ZRLE encoding
Fixed eslint warnings
Reverted allowIncomplete changes to Inflator
Fixed failing tests for zrle decoder.
2021-11-23 12:02:42 -05:00
Pierre Ossman
b91b1e8edc
Handle empty rects in RAW decoder as well
...
It was overlooked in the previous commit because we couldn't feed
empty data messages through the test framework.
2020-09-07 12:58:52 +02:00
Pierre Ossman
113fa27ebc
Handle empty rects from the server
...
These are very pointless for the server to send, but not a violation of
the protocol so we need to be able to handle them. We've seen this
happen in real world scenarios a few times.
2020-09-04 16:16:44 +02:00
Pierre Ossman
6a19390baa
Switch to RGBx pixel format
...
This is what the browser wants so it avoids having to spend time
converting everything. Unfortunately it usually means the server instead
needs to convert it for us, but we assume it has more power than we do.
2020-06-08 07:57:17 +02:00
Pierre Ossman
f5b5767c98
Standardise on a single blit function
...
Keep everything simpler by always blitting in the same pixel format.
It's up to the decoders to convert if they need to.
2020-06-08 07:53:41 +02:00
Pierre Ossman
34f52a8f41
Fix bad BasicCompression check in Tight decoder
2020-06-08 07:53:41 +02:00
Pierre Ossman
224f95f997
Move tile handling to Hextile decoder
...
It is only used there so no need for it to be in the general
Display class.
2020-06-06 13:23:05 +02:00
Samuel Mannehed
164bf50fda
Standardize on camelCase in Decoders
2020-05-31 23:37:29 +02:00
Niko Lehto
2cee106eee
Split api of inflate
...
Added ability to read data chunk wise.
2020-02-17 11:29:41 +01:00
Niko Lehto
f6669ff7b2
Move error handling to Inflate class
...
Every call wants this check so this should be done inside the class.
2020-02-17 11:29:41 +01:00
Niko Lehto
183cab0eca
Remove unused inflate argument
...
The value true was an invalid flush argument so it was in practice
unused.
2020-02-17 11:29:40 +01:00
Pierre Ossman
4babdf33bd
Validate decoded image dimensions
...
They are expected to be a certain size, so verify this so no server
tries to do something broken.
2019-12-23 15:42:02 +01:00
Samuel Mannehed
412d93060d
Update copyright to 2019 for modified files
2019-09-30 15:35:33 +02:00
Pierre Ossman
17eea9574d
Consume data properly in Hextile decoder
...
We accidentally removed the code updating the data index in 8a189a6
,
resulting in the decoder newer consuming any data. So the data would
be parsed as the next rect, causing weird errors.
2019-02-14 16:57:26 +01:00
Juanjo Diaz
8a189a6291
Add getters/setter to websock
2018-12-08 17:31:20 +02:00
Juanjo Diaz
d3ed883a8f
Use `new` when constructing errors
2018-11-24 21:44:11 +02:00
Pierre Ossman
9881899e7b
Merge branch 'style' of https://github.com/CendioOssman/noVNC
2018-09-17 13:54:04 +02:00
Pierre Ossman
923cd22083
Move decoders to separate classes
...
Makes things a lot clearer by letting each encoding handle its own
details and state.
2018-08-22 15:12:34 +02:00