diff options
author | ossman_ <ossman_@632fc199-4ca6-4c93-a231-07263d6284db> | 2009-03-09 13:23:04 +0000 |
---|---|---|
committer | ossman_ <ossman_@632fc199-4ca6-4c93-a231-07263d6284db> | 2009-03-09 13:23:04 +0000 |
commit | ddd9d54d5e181e76197c787220f3bc46e206deba (patch) | |
tree | b9347169fd704dc1062edf143293f085a1863fed /jdct.h | |
parent | c3e218c5f2f71866b815db1420f00bced10d3ae5 (diff) |
"Optimise" quantization step by replacing the division by a multiplication.
This has no measurable difference right now but makes it possible to do
SIMD implementations of this stage.
git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@16 632fc199-4ca6-4c93-a231-07263d6284db
Diffstat (limited to 'jdct.h')
-rw-r--r-- | jdct.h | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -23,13 +23,18 @@ * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This * convention improves accuracy in integer implementations and saves some * work in floating-point ones. - * Quantization of the output coefficients is done by jcdctmgr.c. + * Quantization of the output coefficients is done by jcdctmgr.c. This + * step requires an unsigned type and also one with twice the bits. */ #if BITS_IN_JSAMPLE == 8 typedef int DCTELEM; /* 16 or 32 bits is fine */ +typedef unsigned int UDCTELEM; +typedef unsigned long long UDCTELEM2; #else typedef INT32 DCTELEM; /* must have 32 bits */ +typedef UINT32 UDCTELEM; +typedef unsigned long long UDCTELEM2; #endif |