aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2015-11-13 11:16:33 +0100
committerPierre Ossman <ossman@cendio.se>2015-11-27 11:11:03 +0100
commitbf431a6b980f80d74463afbc60a3de3ce95dd5b5 (patch)
tree72788f8112335d5ac4471c38b5eac42e9d8565a7 /common
parente6ad4456230799c1eac59010b5eaad83005fc0df (diff)
downloadtigervnc-bf431a6b980f80d74463afbc60a3de3ce95dd5b5.tar.gz
tigervnc-bf431a6b980f80d74463afbc60a3de3ce95dd5b5.zip
Allow parallel decoding of Tight JPEG rects
The cost is some more load on malloc(), but it should be small compared to the gains of spreading the CPU heavy JPEG decoding over multiple CPUs.
Diffstat (limited to 'common')
-rw-r--r--common/rfb/TightDecoder.cxx7
-rw-r--r--common/rfb/TightDecoder.h1
2 files changed, 2 insertions, 6 deletions
diff --git a/common/rfb/TightDecoder.cxx b/common/rfb/TightDecoder.cxx
index 86bb0069..3a1254a2 100644
--- a/common/rfb/TightDecoder.cxx
+++ b/common/rfb/TightDecoder.cxx
@@ -173,11 +173,6 @@ bool TightDecoder::doRectsConflict(const Rect& rectA,
if (((comp_ctl_a & 0x0f) & (comp_ctl_b & 0x0f)) != 0)
return true;
- // We have a shared JpegDecompressor, so one at a time
- if (((comp_ctl_a >> 4) == tightJpeg) &&
- ((comp_ctl_b >> 4) == tightJpeg))
- return true;
-
return false;
}
@@ -229,6 +224,8 @@ void TightDecoder::decodeRect(const Rect& r, const void* buffer,
int stride;
rdr::U8 *buf;
+ JpegDecompressor jd;
+
assert(buflen >= 4);
memcpy(&len, bufptr, 4);
diff --git a/common/rfb/TightDecoder.h b/common/rfb/TightDecoder.h
index a98788f6..6eb93d2a 100644
--- a/common/rfb/TightDecoder.h
+++ b/common/rfb/TightDecoder.h
@@ -67,7 +67,6 @@ namespace rfb {
private:
rdr::ZlibInStream zis[4];
- JpegDecompressor jd;
};
}