diff options
author | Mans Rullgard <mans@mansr.com> | 2011-05-17 14:48:28 +0400 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-05-17 16:57:23 +0400 |
commit | 6f2309ed2e0c5c02ab417f3f0acad23e86411079 (patch) | |
tree | 57844dca7f956adb188092118e91d558cd76f99d /libavcodec/dct32.c | |
parent | 1362a291c971ba2c46c08f0533265b294030de27 (diff) |
dct: build dct32 as separate object files
This builds the float and fixed-point versions of dct32 separately
instead of #including the file in dct.c and mpegaudiodec.c.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/dct32.c')
-rw-r--r-- | libavcodec/dct32.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libavcodec/dct32.c b/libavcodec/dct32.c index ae99d88996..272e0dbf95 100644 --- a/libavcodec/dct32.c +++ b/libavcodec/dct32.c @@ -19,10 +19,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifdef DCT32_FLOAT +#include "dct32.h" +#include "mathops.h" + +#if DCT32_FLOAT +# define dct32 ff_dct32_float # define FIXHR(x) ((float)(x)) # define MULH3(x, y, s) ((s)*(y)*(x)) # define INTFLOAT float +#else +# define dct32 ff_dct32_fixed +# define FIXHR(a) ((int)((a) * (1LL<<32) + 0.5)) +# define MULH3(x, y, s) MULH((s)*(x), y) +# define INTFLOAT int #endif @@ -103,7 +112,7 @@ #define ADD(a, b) val##a += val##b /* DCT32 without 1/sqrt(2) coef zero scaling. */ -static void dct32(INTFLOAT *out, const INTFLOAT *tab) +void dct32(INTFLOAT *out, const INTFLOAT *tab) { INTFLOAT tmp0, tmp1; |