-
-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server: Don't use Tight w/o Zlib unless advertised
Since TurboVNC v0.5, the Lossless Tight encoding method has used an unofficial Tight encoding extension that bypasses zlib. That extension was innocuous when using the TurboVNC Viewer with a non-TurboVNC server, but when using the TurboVNC Server with a non-TurboVNC viewer, selecting Compression Level 0 without JPEG caused a fatal error in the viewer. The extension has been officially registered with IANA as an RFB pseudo-encoding (0xFFFFFEC3 or -317), so this commit modifies the server so that it no longer uses the extension unless a viewer advertises support for it. (The TurboVNC Viewer has been modified in the TurboVNC 3.1.x and prior code bases so that it advertises support for the extension.) This commit also disallows more than 4 Tight encoding threads. Since 9116e39 (TurboVNC 2.1.2), the TurboVNC Server hasn't enabled more than 4 Tight encoding threads by default, because doing so would reduce the compression ratio significantly and create compatibility issues with non-TurboVNC viewers (due to the unofficial use of the aforementioned extension.) Low-level tests show an incremental speedup (about 36% on my Dell Precision 5820) when using Tight + Perceptually Lossless JPEG with 8 threads vs. 4 threads. However, since Tight encoding is limited to 4 zlib streams, using more than 4 threads requires bypassing zlib. Thus, when using Tight + Perceptually Lossless JPEG, the compression ratio is about 15-20% worse with 8 threads vs. 4 threads. (The compression ratio is much worse when using Lossless Tight + Zlib with 8 threads vs. 4 threads.) Also, the speedup does not bear out in real-world tests, since the viewer or the network tends to be more of a bottleneck. In order to continue supporting more than 4 Tight encoding threads, it would be necessary to make the maximum thread count contingent upon whether the viewer supports the (now official) Tight Encoding Without Zlib extension, and that would be confusing to end users. My experience is that a feature that requires more than one apology is a feature that has probably outlived its usefulness.
- Loading branch information
1 parent
6d26cd1
commit 54cf82d
Showing
9 changed files
with
84 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters