aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sinewin.h
diff options
context:
space:
mode:
authorJovan Zelincevic <jovan.zelincevic@imgtec.com>2015-06-30 11:53:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-07-09 14:41:19 +0200
commit08be74ac8154e4a8936b7023cc3a7f5396fb182c (patch)
tree525d36863acea79bb815a2ce3a28db565a952f6e /libavcodec/sinewin.h
parentf497a9e84edb24c99a9043e1b21c7e48f3908e87 (diff)
downloadffmpeg-08be74ac8154e4a8936b7023cc3a7f5396fb182c.tar.gz
libavcodec: Implementation of AAC_fixed_decoder (LC-module) [2/4]
Add fixed point implementation of functions for generating tables Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/sinewin.h')
-rw-r--r--libavcodec/sinewin.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/libavcodec/sinewin.h b/libavcodec/sinewin.h
index 2268fd52f4..5f0a74afa9 100644
--- a/libavcodec/sinewin.h
+++ b/libavcodec/sinewin.h
@@ -30,20 +30,32 @@
# define SINETABLE_CONST
#endif
+#ifndef USE_FIXED
+#define USE_FIXED 0
+#endif
+
+#if USE_FIXED
+#define SINEWIN_SUFFIX(a) a ## _fixed
+#define INTFLOAT int
+#else
+#define SINEWIN_SUFFIX(a) a
+#define INTFLOAT float
+#endif
+
#define SINETABLE(size) \
- SINETABLE_CONST DECLARE_ALIGNED(32, float, ff_sine_##size)[size]
+ SINETABLE_CONST DECLARE_ALIGNED(32, INTFLOAT, SINEWIN_SUFFIX(ff_sine_##size))[size]
/**
* Generate a sine window.
* @param window pointer to half window
* @param n size of half window
*/
-void ff_sine_window_init(float *window, int n);
+void SINEWIN_SUFFIX(ff_sine_window_init)(INTFLOAT *window, int n);
/**
* initialize the specified entry of ff_sine_windows
*/
-void ff_init_ff_sine_windows(int index);
+void SINEWIN_SUFFIX(ff_init_ff_sine_windows)(int index);
extern SINETABLE( 32);
extern SINETABLE( 64);
@@ -55,6 +67,6 @@ extern SINETABLE(2048);
extern SINETABLE(4096);
extern SINETABLE(8192);
-extern SINETABLE_CONST float * const ff_sine_windows[14];
+extern SINETABLE_CONST INTFLOAT * const SINEWIN_SUFFIX(ff_sine_windows)[14];
#endif /* AVCODEC_SINEWIN_H */