Added flags to the TurboJPEG API that allow the caller to force the use of either the fast or the accurate DCT/IDCT algorithms in the underlying codec.

git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/branches/1.2.x@849 632fc199-4ca6-4c93-a231-07263d6284db
This commit is contained in:
DRC
2012-06-29 23:14:48 +00:00
parent 112a0bb968
commit fd3aba3590
38 changed files with 415 additions and 174 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C)2011 D. R. Commander. All Rights Reserved.
* Copyright (C)2011-2012 D. R. Commander. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -272,29 +272,51 @@ final public class TJ {
final public static int FLAG_BOTTOMUP = 2;
/**
* Turn off CPU auto-detection and force TurboJPEG to use MMX code
* (IPP and 32-bit libjpeg-turbo versions only.)
* (if the underlying codec supports it.)
*/
final public static int FLAG_FORCEMMX = 8;
/**
* Turn off CPU auto-detection and force TurboJPEG to use SSE code
* (32-bit IPP and 32-bit libjpeg-turbo versions only.)
* (if the underlying codec supports it.)
*/
final public static int FLAG_FORCESSE = 16;
/**
* Turn off CPU auto-detection and force TurboJPEG to use SSE2 code
* (32-bit IPP and 32-bit libjpeg-turbo versions only.)
* (if the underlying codec supports it.)
*/
final public static int FLAG_FORCESSE2 = 32;
/**
* Turn off CPU auto-detection and force TurboJPEG to use SSE3 code
*(64-bit IPP version only.)
* (if the underlying codec supports it.)
*/
final public static int FLAG_FORCESSE3 = 128;
/**
* Use fast, inaccurate chrominance upsampling routines in the JPEG
* decompressor (libjpeg and libjpeg-turbo versions only.)
* When decompressing, use the fastest chrominance upsampling algorithm
* available in the underlying codec. The default is to use smooth
* upsampling, which creates a smooth transition between neighboring
* chrominance components in order to reduce upsampling artifacts in the
* decompressed image.
*/
final public static int FLAG_FASTUPSAMPLE = 256;
/**
* Use the fastest DCT/IDCT algorithm available in the underlying codec. The
* default if this flag is not specified is implementation-specific. The
* libjpeg implementation, for example, uses the fast algorithm by default
* when compressing, because this has been shown to have only a very slight
* effect on accuracy, but it uses the accurate algorithm when decompressing,
* because this has been shown to have a larger effect.
*/
final public static int FLAG_FASTDCT = 2048;
/**
* Use the most accurate DCT/IDCT algorithm available in the underlying
* codec. The default if this flag is not specified is
* implementation-specific. The libjpeg implementation, for example, uses
* the fast algorithm by default when compressing, because this has been
* shown to have only a very slight effect on accuracy, but it uses the
* accurate algorithm when decompressing, because this has been shown to have
* a larger effect.
*/
final public static int FLAG_ACCURATEDCT = 4096;
/**