]> source.dussan.org Git - tigervnc.git/commitdiff
libjpeg-turbo produces about the same image quality with the fast integer DCT if...
authorDRC <dcommander@users.sourceforge.net>
Tue, 8 Feb 2011 18:10:24 +0000 (18:10 +0000)
committerDRC <dcommander@users.sourceforge.net>
Tue, 8 Feb 2011 18:10:24 +0000 (18:10 +0000)
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4259 3789f03b-4d11-0410-bbf8-ca57d06f2519

common/rfb/tightEncode.h

index 0c6b364c41cde49f1208562f81c13566220ff80c..2e6d0d8861ba85bdd35d948f9a943b0f4097c78a 100644 (file)
@@ -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: