Commit Graph

60 Commits (90abc79efa3d7ca6ac10c5f3bc329ec128008523)

Author SHA1 Message Date
Slávek Banko f3f392caec
Merge tag 'LibVNCServer-0.9.12'
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
6 years ago
Remi Gacogne 716bd27235
Fix -Wmisleading-indentation warnings 6 years ago
Michele Calgaro 8c081c8888
Removed _BSD_SOURCE, _SVID_SOURCE, _GNU_SOURCE, _XOPEN_SOURCE.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
6 years ago
Andreas Weigel 5d9d6a8712
add decode support for continuation frames
use FIN bit and implement opcode 0x00

make consistent use of uint64_t for big frame sizes
8 years ago
Andreas Weigel 8fefdcde27
fix problems in test and requests for cmake build
add missing stdarg header

fix hardcoded errno integer values in tests

add dependency to wstestdata and rename to prevent building it as c
source
8 years ago
Andreas Weigel 826e0f9e39
add generation wstest to cmake
add wstestdata.c, because the python data generation script has too many
dependencies

remove some redundance from jpeg test creation

add support for decoding close messages
8 years ago
Andreas Weigel f19d6ee225
add ws_decode tests
modify automake to include ws_decode test

add python frame generator for decode tests

modify configure to only include ws_decode test if preconditions are
fulfilled
8 years ago
Christian Beier 90220264f5
test: tell MSVC to use math defines 8 years ago
Bert van Hall fe94339587 drop autotools
Since autotools officially is no longer supported (see various github
issues), drop the related infrastructure to stop tempting people to use
it for building.

Signed-off-by: Bert van Hall <bert.vanhall@gmx.de>
8 years ago
Mike Frysinger 0c68f37c43 test/Makefile: use check_PROGRAMS
The new jpeg tests were added to noinst when they should have been
under check like all the other programs in here.
8 years ago
Brian Bidulock 57b0e4f4fe Rename obsolete INCLUDES to AM_CPPFLAGS 11 years ago
Johannes Schindelin bd811bdee9 After free()ing clientData, set it to NULL
We will change rfbClientCleanup() to free the data.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
11 years ago
Raphael Kubo da Costa 3cbef1a976 Use C-style comments in rfbconfig.h.cmake and C source code.
Using C++-style comments when building the code with -ansi does not
work, so be more conservative with the comment style.
13 years ago
Luca Falavigna a6fedf258a Encodingstest: Use format string argument with fprintf. 13 years ago
Christian Beier c58213846e Only build libjpeg test programs if libjpeg is actually available. 13 years ago
Christian Beier 6f9a9160c4 Fix some compiler warnings thrown with newer gcc. 13 years ago
Christian Beier 1df6bffd9e Fix turbojpeg tests compilation. 13 years ago
DRC 7124b5fbcf Replace TightVNC encoder with TurboVNC encoder. This patch is the result of further research and discussion that revealed the following:
-- TightPng encoding and the rfbTightNoZlib extension need not conflict.  Since
   TightPng is a separate encoding type, not supported by TurboVNC-compatible
   viewers, then the rfbTightNoZlib extension can be used solely whenever the
   encoding type is Tight and disabled with the encoding type is TightPng.

-- In the TightVNC encoder, compression levels above 5 are basically useless.
   On the set of 20 low-level datasets that were used to design the TurboVNC
   encoder (these include the eight 2D application captures that were also used
   when designing the TightVNC encoder, as well as 12 3D application captures
   provided by the VirtualGL Project--
   see http://www.virtualgl.org/pmwiki/uploads/About/tighttoturbo.pdf), moving
   from Compression Level (CL) 5 to CL 9 in the TightVNC encoder did not
   increase the compression ratio of any datasets more than 10%, and the
   compression ratio only increased by more than 5% on four of them.  The
   compression ratio actually decreased a few percent on five of them.  In
   exchange for this paltry increase in compression ratio, the CPU usage, on
   average, went up by a factor of 5.  Thus, for all intents and purposes,
   TightVNC CL 5 provides the "best useful compression" for that encoder.

-- TurboVNC's best compression level (CL 2) compresses 3D and video workloads
   significantly more "tightly" than TightVNC CL 5 (~70% better, in the
   aggregate) but does not quite achieve the same level of compression with 2D
   workloads (~20% worse, in the aggregate.) This decrease in compression ratio
   may or may not be noticeable, since many of the datasets it affects are not
   performance-critical (such as the console output of a compilation, etc.)
   However, for peace of mind, it was still desirable to have a mode that
   compressed with equal "tightness" to TightVNC CL 5, since we proposed to
   replace that encoder entirely.

-- A new mode was discovered in the TurboVNC encoder that produces, in the
   aggregate, similar compression ratios on 2D datasets as TightVNC CL 5.  That
   new mode involves using Zlib level 7 (the same level used by TightVNC CL 5)
   but setting the "palette threshold" to 256, so that indexed color encoding
   is used whenever possible.  This mode reduces bandwidth only marginally
   (typically 10-20%) relative to TurboVNC CL 2 on low-color workloads, in
   exchange for nearly doubling CPU usage, and it does not benefit high-color
   workloads at all (since those are usually encoded with JPEG.)  However, it
   provides a means of reproducing the same "tightness" as the TightVNC
   encoder on 2D workloads without sacrificing any compression for 3D/video
   workloads, and without using any more CPU time than necessary.

-- The TurboVNC encoder still performs as well or better than the TightVNC
   encoder when plain libjpeg is used instead of libjpeg-turbo.

Specific notes follow:

common/turbojpeg.c common/turbojpeg.h:
Added code to emulate the libjpeg-turbo colorspace extensions, so that the
TurboJPEG wrapper can be used with plain libjpeg as well.  This required
updating the TurboJPEG wrapper to the latest code from libjpeg-turbo 1.2.0,
mainly because the TurboJPEG 1.2 API handles pixel formats in a much cleaner
way, which made the conversion code easier to write.  It also eases the
maintenance to have the wrapper synced as much as possible with the upstream
code base (so I can merge any relevant bug fixes that are discovered upstream.)
The libvncserver version of the TurboJPEG wrapper is a "lite" version,
containing only the JPEG compression/decompression code and not the lossless
transform, YUV encoding/decoding, and dynamic buffer allocation features from
TurboJPEG 1.2.

configure.ac:
Removed the --with-turbovnc option.  configure still checks for the presence of
libjpeg-turbo, but only for the purposes of printing a performance warning if
it isn't available.

rfb/rfb.h:
Fix a bug introduced with the initial TurboVNC encoder patch.  We cannot use
tightQualityLevel for the TurboVNC 1-100 quality level, because
tightQualityLevel is also used by ZRLE.  Thus, a new parameter
(turboQualityLevel) was created.

rfb/rfbproto.h:
Remove TurboVNC-specific #ifdefs and language

libvncserver/rfbserver.c:
Remove TurboVNC-specific #ifdefs.  Fix afore-mentioned tightQualityLevel bug.

libvncserver/tight.c:
Replaced the TightVNC encoder with the TurboVNC encoder.  Relative to the
initial TurboVNC encoder patch, this patch also:
-- Adds TightPng support to the TurboVNC encoder
-- Adds the afore-mentioned low-bandwidth mode, which is mapped externally to
   Compression Level 9

test/*:
Included TJUnitTest (a regression test for the TurboJPEG wrapper) as well as
TJBench (a benchmark for same.)  These are useful for ensuring that the wrapper
still functions correctly and performantly if it needs to be modified for
whatever reason.  Both of these programs are derived from libjpeg-turbo 1.2.0.
As with the TurboJPEG wrapper, they do not contain the more advanced features
of TurboJPEG 1.2, such as YUV encoding/decoding and lossless transforms.
13 years ago
Christian Beier ab9fc40aab Update encodingstest.
* Fixed segfault on shutdown.
* Updated to test all encodings.
* Fixed to operate with encodings that split up rects into
  smaller rects.
14 years ago
Christian Beier bf2470cec6 Check rfbGetScreen() return value everywhere.
This fixes a segfault when a server is invoked with the
'-help' commandline argument.
14 years ago
Christian Beier e832999a58 Set proper file permissions for source files. 14 years ago
Christian Beier 558a58e039 Remove unneeded files concerning CVS.
We have a git repo nowadays and I guess we won't go back to CVS.

Signed-off-by: Christian Beier <dontmind@freeshell.org>
14 years ago
Johannes Schindelin 0c061f2a27 encodingstest: fix multi-threading issue
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
Johannes Schindelin 2a2a60b007 encodingstest: fix whitespace
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
dscho 3998c18e26 test/Makefile: use check_PROGRAMS
Rather than use noinst_PROGRAMS, check_PROGRAMS will define programs that
are only compiled when someone actually runs `make check`.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
dscho 3d2eab575e clean up build flags
The flag handling (both compiler options and include paths) are a mess at
the moment.  There is no point in forcing "-O2 -g" when these are already
the defaults, and if someone changes the defaults, chances are good they
don't want you clobbering their choices.

The -Wall flag should be handled in configure and thrown into CFLAGS once
rather than every Makefile.am.  Plus, this way we can control which
compilers the flag actually gets used with.

Finally, the INCLUDES variable is for -I paths, not AM_CFLAGS.  Nor should
it contain -I. as this is already in the default includes setup.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
16 years ago
dscho ca805667e6 Build shared libraries per default
Thanks to Guillaume Rousse, we now use libtool to build shared libraries.
18 years ago
runge 3c80351a1c Make VPATH building work with -I $(top_srcdir) for rfb/rfb.h 19 years ago
dscho 808b6a0b23 do it right: it is not DEFINES, but AM_CFLAGS 20 years ago
dscho b225ee993a implement ZRLE decoding 20 years ago
dscho ee52441372 hide strict ansi stuff if not explicitely turned on; actually use the socklen_t test from configure.ac 20 years ago
dscho 8bee4eb990 ANSIfy, fix some warnings from Linus' sparse 20 years ago
dscho 320edc794f more files to ignore 20 years ago
dscho 34f714bcdc socketInitDone -> socketState 20 years ago
dscho 4ff783f579 fix compilation when no libz is available 20 years ago
dscho 6fb3752bf2 test Floyd-Steinberg dither for alpha masks 20 years ago
dscho 80ca7cf1d3 no need to strdup for MakeXCursor 20 years ago
dscho d354bb6015 fix test (don't show cursor...); correctly set the encodings in the client;
really test 20 seconds
20 years ago
dscho 9cc78e5460 add a cursor test (interactive for now) 20 years ago
dscho 094c01bdce fix for MinGW 20 years ago
runge 3a84b0ccc8 x11vnc: XFIXES cursorshape, XRANDR resize, remote control, gui 20 years ago
dscho 658b65ad0c support MinGW32! 21 years ago
dscho ca96ef26d2 tight-1 -> encodingstest 21 years ago
dscho 5a3e352fba rename tight-1.c into encodingstest.c, fixing it in the process. It now
passes all encodings except corre (broken) and zrle (not yet implemented
in libvncclient)
21 years ago
dscho 8715a8ab42 compiles, 1st run is okay, 2nd and subsequent give errors. Evidently,
libvncclient is not yet reentrant (or threadsafe).
21 years ago
dscho 7ea0d024cb compiling, non functional version of a unit test for encodings 21 years ago
dscho 97299606da global structures/functions should have "rfb", "sra" or "zrle" as prefix,
while structure members should not
21 years ago
dscho 2a4a0f487e convert c++ comments to c comments 21 years ago
dscho 35236477c4 all this moving and renaming needs changes in the cvsignores, too! 21 years ago
dscho 2b8c2a5c3a add client_examples/, add SDLvncviewer, libvncclient API changes, suppress automake CFLAGS nagging 21 years ago