comparison jfdctfst.c @ 1064:b32afefe7d33 libavcodec

* UINTX -> uintx_t INTX -> intx_t
author kabi
date Tue, 11 Feb 2003 16:35:48 +0000
parents 11dbd00682fc
children 1e39f273ecd6
comparison
equal deleted inserted replaced
1063:fdeac9642346 1064:b32afefe7d33
76 * If you change CONST_BITS you may want to add appropriate values. 76 * If you change CONST_BITS you may want to add appropriate values.
77 * (With a reasonable C compiler, you can just rely on the FIX() macro...) 77 * (With a reasonable C compiler, you can just rely on the FIX() macro...)
78 */ 78 */
79 79
80 #if CONST_BITS == 8 80 #if CONST_BITS == 8
81 #define FIX_0_382683433 ((INT32) 98) /* FIX(0.382683433) */ 81 #define FIX_0_382683433 ((int32_t) 98) /* FIX(0.382683433) */
82 #define FIX_0_541196100 ((INT32) 139) /* FIX(0.541196100) */ 82 #define FIX_0_541196100 ((int32_t) 139) /* FIX(0.541196100) */
83 #define FIX_0_707106781 ((INT32) 181) /* FIX(0.707106781) */ 83 #define FIX_0_707106781 ((int32_t) 181) /* FIX(0.707106781) */
84 #define FIX_1_306562965 ((INT32) 334) /* FIX(1.306562965) */ 84 #define FIX_1_306562965 ((int32_t) 334) /* FIX(1.306562965) */
85 #else 85 #else
86 #define FIX_0_382683433 FIX(0.382683433) 86 #define FIX_0_382683433 FIX(0.382683433)
87 #define FIX_0_541196100 FIX(0.541196100) 87 #define FIX_0_541196100 FIX(0.541196100)
88 #define FIX_0_707106781 FIX(0.707106781) 88 #define FIX_0_707106781 FIX(0.707106781)
89 #define FIX_1_306562965 FIX(1.306562965) 89 #define FIX_1_306562965 FIX(1.306562965)
99 #undef DESCALE 99 #undef DESCALE
100 #define DESCALE(x,n) RIGHT_SHIFT(x, n) 100 #define DESCALE(x,n) RIGHT_SHIFT(x, n)
101 #endif 101 #endif
102 102
103 103
104 /* Multiply a DCTELEM variable by an INT32 constant, and immediately 104 /* Multiply a DCTELEM variable by an int32_t constant, and immediately
105 * descale to yield a DCTELEM result. 105 * descale to yield a DCTELEM result.
106 */ 106 */
107 107
108 #define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) 108 #define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS))
109 109