libjpeg-turbo produces about the same image quality with the fast integer DCT if the JPEG quality is <= 95, and it's a lot faster. Slow integer DCT is retained for quality >= 96, because fast integer degrades at those quality levels.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4259 3789f03b-4d11-0410-bbf8-ca57d06f2519
diff --git a/common/rfb/tightEncode.h b/common/rfb/tightEncode.h
index 0c6b364..2e6d0d8 100644
--- a/common/rfb/tightEncode.h
+++ b/common/rfb/tightEncode.h
@@ -574,6 +574,8 @@
jpeg_set_defaults(&cinfo);
jpeg_set_quality(&cinfo, s_pjconf->jpegQuality, TRUE);
+ if(s_pjconf->jpegQuality >= 96) cinfo.dct_method = JDCT_ISLOW;
+ else cinfo.dct_method = JDCT_FASTEST;
switch (s_pjconf->jpegSubSample) {
case SUBSAMP_420: