diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-02-08 18:10:24 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-02-08 18:10:24 +0000 |
commit | 27198cecda2903a59d3a3c5e75682d14b1f35a05 (patch) | |
tree | a4b19a502c4b3064278f37d17970ca387ec3c973 | |
parent | 29640ea22d3b39853c1bfe691d70d2c446cea66a (diff) | |
download | tigervnc-27198cecda2903a59d3a3c5e75682d14b1f35a05.tar.gz tigervnc-27198cecda2903a59d3a3c5e75682d14b1f35a05.zip |
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
-rw-r--r-- | common/rfb/tightEncode.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/rfb/tightEncode.h b/common/rfb/tightEncode.h index 0c6b364c..2e6d0d88 100644 --- a/common/rfb/tightEncode.h +++ b/common/rfb/tightEncode.h @@ -574,6 +574,8 @@ static void ENCODE_JPEG_RECT (rdr::OutStream *os, PIXEL_T *buf, 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: |