From: DRC Date: Tue, 8 Feb 2011 18:10:24 +0000 (+0000) Subject: libjpeg-turbo produces about the same image quality with the fast integer DCT if... X-Git-Tag: v1.0.90~60 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=27198cecda2903a59d3a3c5e75682d14b1f35a05;p=tigervnc.git 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 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: