diff options
author | DRC <dcommander@users.sourceforge.net> | 2011-02-18 05:42:10 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2011-02-18 05:42:10 +0000 |
commit | fc97cfe4a795586ea5036ab38bae3227e37959d8 (patch) | |
tree | 5befc2fb3c0d2a4891a17490de054d5a56428460 /common/jpeg/turbojpegl.c | |
parent | af7caaabf01d5b91237925f286a523141b92e075 (diff) | |
download | tigervnc-fc97cfe4a795586ea5036ab38bae3227e37959d8.tar.gz tigervnc-fc97cfe4a795586ea5036ab38bae3227e37959d8.zip |
Merge from libjpeg-turbo 1.0.2, including fixes for errors in generation of grayscale and high-quality JPEGs
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4294 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'common/jpeg/turbojpegl.c')
-rw-r--r-- | common/jpeg/turbojpegl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/jpeg/turbojpegl.c b/common/jpeg/turbojpegl.c index 2150a2d3..eeaedd17 100644 --- a/common/jpeg/turbojpegl.c +++ b/common/jpeg/turbojpegl.c @@ -166,7 +166,8 @@ DLLEXPORT int DLLCALL tjCompress(tjhandle h, jpeg_set_colorspace(&j->cinfo, JCS_GRAYSCALE); else jpeg_set_colorspace(&j->cinfo, JCS_YCbCr); - j->cinfo.dct_method = JDCT_FASTEST; + if(qual>=96) j->cinfo.dct_method=JDCT_ISLOW; + else j->cinfo.dct_method=JDCT_FASTEST; j->cinfo.comp_info[0].h_samp_factor=hsampfactor[jpegsub]; j->cinfo.comp_info[1].h_samp_factor=1; |