diff options
author | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2011-01-25 06:52:31 +0000 |
---|---|---|
committer | dcommander <dcommander@3789f03b-4d11-0410-bbf8-ca57d06f2519> | 2011-01-25 06:52:31 +0000 |
commit | 78778357612a24d41acee4ec9b9bfd0b81a58aeb (patch) | |
tree | e2918c710b672942b63242a5e13191d5a7b8135b /trunk/turbojpegl.c | |
parent | 4d5be16a93cf44079e3cba253102c1c8da69ee29 (diff) |
The fast integer DCT degrades for qualities > 95, so use the slow integer DCT instead to ensure that perceptually lossless performance is maintained.
git-svn-id: https://libjpeg-turbo.svn.sourceforge.net/svnroot/libjpeg-turbo@320 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'trunk/turbojpegl.c')
-rw-r--r-- | trunk/turbojpegl.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/trunk/turbojpegl.c b/trunk/turbojpegl.c index 9dd6eb6..58f9627 100644 --- a/trunk/turbojpegl.c +++ b/trunk/turbojpegl.c @@ -193,7 +193,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; |