aboutsummaryrefslogtreecommitdiffstats
path: root/common/rfb/TightDecoder.h
diff options
context:
space:
mode:
authorDRC <dcommander@users.sourceforge.net>2011-11-03 18:49:21 +0000
committerDRC <dcommander@users.sourceforge.net>2011-11-03 18:49:21 +0000
commit33c15e3a3a1db376feae90ef7521a107dd957752 (patch)
tree07a01bd47e977a94b2ead9d406fec736e0b613b4 /common/rfb/TightDecoder.h
parent3004cb640aba2ed81d31444064aa8087990c7212 (diff)
downloadtigervnc-33c15e3a3a1db376feae90ef7521a107dd957752.tar.gz
tigervnc-33c15e3a3a1db376feae90ef7521a107dd957752.zip
If the client and server are using identical pixel formats, then perform Tight decoding directly into the viewer's back buffer, rather than going through the slow fillRect/imageRect routines.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4757 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/rfb/TightDecoder.h')
-rw-r--r--common/rfb/TightDecoder.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/common/rfb/TightDecoder.h b/common/rfb/TightDecoder.h
index 1047b374..9a28fb9b 100644
--- a/common/rfb/TightDecoder.h
+++ b/common/rfb/TightDecoder.h
@@ -1,4 +1,5 @@
/* Copyright (C) 2000-2003 Constantin Kaplinsky. All Rights Reserved.
+ * Copyright (C) 2011 D. R. Commander. All Rights Reserved.
*
* This is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,18 +21,49 @@
#include <rdr/ZlibInStream.h>
#include <rfb/Decoder.h>
+#include <rfb/JpegDecompressor.h>
namespace rfb {
class TightDecoder : public Decoder {
+
public:
static Decoder* create(CMsgReader* reader);
virtual void readRect(const Rect& r, CMsgHandler* handler);
virtual ~TightDecoder();
+
private:
+ void tightDecode8(const Rect& r);
+ void tightDecode16(const Rect& r);
+ void tightDecode32(const Rect& r);
+
+ void DecompressJpegRect8(const Rect& r);
+ void DecompressJpegRect16(const Rect& r);
+ void DecompressJpegRect32(const Rect& r);
+
+ void FilterGradient8(rdr::InStream* is, rdr::U8* buf, int stride,
+ const Rect& r, int dataSize);
+ void FilterGradient16(rdr::InStream* is, rdr::U16* buf, int stride,
+ const Rect& r, int dataSize);
+ void FilterGradient24(rdr::InStream* is, rdr::U32* buf, int stride,
+ const Rect& r, int dataSize);
+ void FilterGradient32(rdr::InStream* is, rdr::U32* buf, int stride,
+ const Rect& r, int dataSize);
+
+ void directFillRect8(const Rect& r, Pixel pix);
+ void directFillRect16(const Rect& r, Pixel pix);
+ void directFillRect32(const Rect& r, Pixel pix);
+
TightDecoder(CMsgReader* reader);
+
CMsgReader* reader;
+ CMsgHandler* handler;
+ rdr::InStream* is;
rdr::ZlibInStream zis[4];
+ JpegDecompressor jd;
+ PixelFormat clientpf;
+ PixelFormat serverpf;
+ bool directDecode;
};
// Compression control