summaryrefslogtreecommitdiffstats
path: root/rfb
diff options
context:
space:
mode:
authorChristian Beier <dontmind@freeshell.org>2012-04-25 12:55:03 +0200
committerChristian Beier <dontmind@freeshell.org>2012-04-25 12:55:03 +0200
commit413ca0dfef83b98f7b230e0596ac086d42eaad4e (patch)
treeb36ca82ac24402f3f0f5a7085f0561757e7b56f5 /rfb
parent2524573678fbdb195cbc9ba2f92e0f58c205ad10 (diff)
parent1df6bffd9e7ff5106ffb5f3bc1938a14ea1f72cf (diff)
downloadlibtdevnc-413ca0dfef83b98f7b230e0596ac086d42eaad4e.tar.gz
libtdevnc-413ca0dfef83b98f7b230e0596ac086d42eaad4e.zip
Merge branch 'turbovnc'
Conflicts, resolved manually: AUTHORS
Diffstat (limited to 'rfb')
-rw-r--r--rfb/rfb.h9
-rw-r--r--rfb/rfbproto.h30
2 files changed, 35 insertions, 4 deletions
diff --git a/rfb/rfb.h b/rfb/rfb.h
index bf4e011..a265746 100644
--- a/rfb/rfb.h
+++ b/rfb/rfb.h
@@ -681,6 +681,11 @@ typedef struct _rfbClientRec {
int afterEncBufLen;
#if defined(LIBVNCSERVER_HAVE_LIBZ) || defined(LIBVNCSERVER_HAVE_LIBPNG)
uint32_t tightEncoding; /* rfbEncodingTight or rfbEncodingTightPng */
+#ifdef LIBVNCSERVER_HAVE_LIBJPEG
+ /* TurboVNC Encoding support (extends TightVNC) */
+ int turboSubsampLevel;
+ int turboQualityLevel; // 1-100 scale
+#endif
#endif
#ifdef LIBVNCSERVER_WITH_WEBSOCKETS
@@ -880,6 +885,10 @@ extern rfbBool rfbSendRectEncodingZlib(rfbClientPtr cl, int x, int y, int w,
#define TIGHT_DEFAULT_COMPRESSION 6
+#ifdef LIBVNCSERVER_HAVE_LIBJPEG
+#define TURBO_DEFAULT_SUBSAMP 0
+#endif
+
extern rfbBool rfbTightDisableGradient;
extern int rfbNumCodedRectsTight(rfbClientPtr cl, int x,int y,int w,int h);
diff --git a/rfb/rfbproto.h b/rfb/rfbproto.h
index c6dfd2c..acb2e7b 100644
--- a/rfb/rfbproto.h
+++ b/rfb/rfbproto.h
@@ -13,7 +13,9 @@
*/
/*
+ * Copyright (C) 2009-2010 D. R. Commander. All Rights Reserved.
* Copyright (C) 2005 Rohit Kumar, Johannes E. Schindelin
+ * Copyright (C) 2004-2008 Sun Microsystems, Inc. All Rights Reserved.
* Copyright (C) 2000-2002 Constantin Kaplinsky. All Rights Reserved.
* Copyright (C) 2000 Tridia Corporation. All Rights Reserved.
* Copyright (C) 1999 AT&T Laboratories Cambridge. All Rights Reserved.
@@ -457,6 +459,8 @@ typedef struct {
/*
* Special encoding numbers:
+ * 0xFFFFFD00 .. 0xFFFFFD05 -- subsampling level
+ * 0xFFFFFE00 .. 0xFFFFFE64 -- fine-grained quality level (0-100 scale)
* 0xFFFFFF00 .. 0xFFFFFF0F -- encoding-specific compression levels;
* 0xFFFFFF10 .. 0xFFFFFF1F -- mouse cursor shape data;
* 0xFFFFFF20 .. 0xFFFFFF2F -- various protocol extensions;
@@ -465,6 +469,15 @@ typedef struct {
* 0xFFFFFFF0 .. 0xFFFFFFFF -- cross-encoding compression levels.
*/
+#define rfbEncodingFineQualityLevel0 0xFFFFFE00
+#define rfbEncodingFineQualityLevel100 0xFFFFFE64
+#define rfbEncodingSubsamp1X 0xFFFFFD00
+#define rfbEncodingSubsamp4X 0xFFFFFD01
+#define rfbEncodingSubsamp2X 0xFFFFFD02
+#define rfbEncodingSubsampGray 0xFFFFFD03
+#define rfbEncodingSubsamp8X 0xFFFFFD04
+#define rfbEncodingSubsamp16X 0xFFFFFD05
+
#define rfbEncodingCompressLevel0 0xFFFFFF00
#define rfbEncodingCompressLevel1 0xFFFFFF01
#define rfbEncodingCompressLevel2 0xFFFFFF02
@@ -719,12 +732,20 @@ typedef struct {
* bit 3: if 1, then compression stream 3 should be reset;
* bits 7-4: if 1000 (0x08), then the compression type is "fill",
* if 1001 (0x09), then the compression type is "jpeg",
- * if 1001 (0x0A), then the compression type is "png",
- * if 0xxx, then the compression type is "basic",
+ * (Tight only) if 1010 (0x0A), then the compression type is
+ * "basic" and no Zlib compression was used,
+ * (Tight only) if 1110 (0x0E), then the compression type is
+ * "basic", no Zlib compression was used, and a "filter id" byte
+ * follows this byte,
+ * (TightPng only) if 1010 (0x0A), then the compression type is
+ * "png",
+ * if 0xxx, then the compression type is "basic" and Zlib
+ * compression was used,
* values greater than 1010 are not valid.
*
- * If the compression type is "basic", then bits 6..4 of the
- * compression control byte (those xxx in 0xxx) specify the following:
+ * If the compression type is "basic" and Zlib compression was used, then bits
+ * 6..4 of the compression control byte (those xxx in 0xxx) specify the
+ * following:
*
* bits 5-4: decimal representation is the index of a particular zlib
* stream which should be used for decompressing the data;
@@ -836,6 +857,7 @@ typedef struct {
#define rfbTightExplicitFilter 0x04
#define rfbTightFill 0x08
#define rfbTightJpeg 0x09
+#define rfbTightNoZlib 0x0A
#define rfbTightPng 0x0A
#define rfbTightMaxSubencoding 0x0A