From: cristy Date: Mon, 10 May 2010 19:57:14 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~9501 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd891c506875e4756f6e87bba5705ea42513d2f3;p=imagemagick --- diff --git a/magick/magick-type.h b/magick/magick-type.h index 423eb6159..8877ce14c 100644 --- a/magick/magick-type.h +++ b/magick/magick-type.h @@ -91,16 +91,10 @@ typedef unsigned int Quantum; #define MaxMap 65535UL typedef long double MagickRealType; -#if defined(MAGICKCORE_HDRI_SUPPORT) typedef double Quantum; #define QuantumRange 18446744073709551615.0 #define QuantumFormat "%g" #else -typedef unsigned long long Quantum; -#define QuantumRange MagickULLConstant(18446744073709551615) -#define QuantumFormat "%llu" -#endif -#else #if !defined(_CH_) # error "Specified value of MAGICKCORE_QUANTUM_DEPTH is not supported" #endif diff --git a/magick/quantum-private.h b/magick/quantum-private.h index da714f569..d033117a1 100644 --- a/magick/quantum-private.h +++ b/magick/quantum-private.h @@ -525,20 +525,12 @@ static inline Quantum ScaleShortToQuantum(const unsigned short value) #elif (MAGICKCORE_QUANTUM_DEPTH == 64) static inline Quantum ScaleCharToQuantum(const unsigned char value) { -#if !defined(MAGICKCORE_HDRI_SUPPORT) - return((Quantum) (MagickULLConstant(72340172838076673)*value)); -#else return((Quantum) (72340172838076673.0*value)); -#endif } static inline Quantum ScaleLongToQuantum(const unsigned long value) { -#if !defined(MAGICKCORE_HDRI_SUPPORT) - return((Quantum) (MagickULLConstant(4294967295)*value)); -#else return((Quantum) (4294967295.0*value)); -#endif } static inline Quantum ScaleMapToQuantum(const MagickRealType value) @@ -547,11 +539,7 @@ static inline Quantum ScaleMapToQuantum(const MagickRealType value) return((Quantum) 0); if (value >= MaxMap) return(QuantumRange); -#if !defined(MAGICKCORE_HDRI_SUPPORT) - return((Quantum) (281479271743489.0*value+0.5)); -#else return((Quantum) (281479271743489.0*value)); -#endif } static inline unsigned long ScaleQuantumToLong(const Quantum quantum) @@ -561,15 +549,11 @@ static inline unsigned long ScaleQuantumToLong(const Quantum quantum) static inline unsigned long ScaleQuantumToMap(const Quantum quantum) { - if ((quantum/281479271743489.0) >= MaxMap) - return((unsigned long) MaxMap); -#if !defined(MAGICKCORE_HDRI_SUPPORT) - return((unsigned long) (quantum/281479271743489.0+0.5)); -#else if (quantum <= 0.0) return(0UL); + if ((quantum/281479271743489.0) >= MaxMap) + return((unsigned long) MaxMap); return((unsigned long) (quantum/281479271743489.0+0.5)); -#endif } static inline unsigned short ScaleQuantumToShort(const Quantum quantum) @@ -579,11 +563,7 @@ static inline unsigned short ScaleQuantumToShort(const Quantum quantum) static inline Quantum ScaleShortToQuantum(const unsigned short value) { -#if !defined(MAGICKCORE_HDRI_SUPPORT) - return((Quantum) (MagickULLConstant(281479271743489)*value)); -#else return((Quantum) (281479271743489.0*value)); -#endif } #endif