summaryrefslogtreecommitdiffstats
path: root/gst/speexresample/arch.h
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-10-30 12:43:44 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-10-30 12:43:44 +0000
commit12766882b5d6ffcb8c48f2fa0a1f19ab17c05077 (patch)
tree83a8473ea4c6dea91928397eb5bb871100d1e2e6 /gst/speexresample/arch.h
parent51262eeb4c2741369bcdd5440d8be4f618e99af2 (diff)
downloadgst-plugins-bad-12766882b5d6ffcb8c48f2fa0a1f19ab17c05077.tar.gz
gst-plugins-bad-12766882b5d6ffcb8c48f2fa0a1f19ab17c05077.tar.bz2
gst-plugins-bad-12766882b5d6ffcb8c48f2fa0a1f19ab17c05077.zip
Add support for double samples as input and refactor the usage of the different compilation flavors of the speex resa...
Original commit message from CVS: * gst/speexresample/Makefile.am: * gst/speexresample/arch.h: * gst/speexresample/gstspeexresample.c: (gst_speex_resample_stop), (gst_speex_resample_get_unit_size), (gst_speex_resample_get_funcs), (gst_speex_resample_init_state), (gst_speex_resample_update_state), (gst_speex_resample_reset_state), (gst_speex_resample_parse_caps), (_gcd), (gst_speex_resample_transform_size), (gst_speex_resample_set_caps), (gst_speex_resample_push_drain), (gst_speex_resample_process), (gst_speex_resample_transform), (gst_speex_resample_query), (gst_speex_resample_set_property): * gst/speexresample/gstspeexresample.h: * gst/speexresample/resample.c: * gst/speexresample/speex_resampler.h: * gst/speexresample/speex_resampler_double.c: * gst/speexresample/speex_resampler_wrapper.h: * tests/check/elements/speexresample.c: (setup_speexresample), (test_perfect_stream_instance), (GST_START_TEST), (test_discont_stream_instance): Add support for double samples as input and refactor the usage of the different compilation flavors of the speex resampler.
Diffstat (limited to 'gst/speexresample/arch.h')
-rw-r--r--gst/speexresample/arch.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/gst/speexresample/arch.h b/gst/speexresample/arch.h
index 168f28bd..86c9b351 100644
--- a/gst/speexresample/arch.h
+++ b/gst/speexresample/arch.h
@@ -137,6 +137,28 @@ typedef spx_word32_t spx_sig_t;
#else
+#ifdef DOUBLE_PRECISION
+typedef double spx_mem_t;
+typedef double spx_coef_t;
+typedef double spx_lsp_t;
+typedef double spx_sig_t;
+typedef double spx_word16_t;
+typedef double spx_word32_t;
+
+#define Q15ONE 1.0
+#define LPC_SCALING 1.
+#define SIG_SCALING 1.
+#define LSP_SCALING 1.
+#define GAMMA_SCALING 1.
+#define GAIN_SCALING 1.
+#define GAIN_SCALING_1 1.
+
+
+#define VERY_SMALL 1e-20
+#define VERY_LARGE32 1e20
+#define VERY_LARGE16 1e20
+#define Q15_ONE ((spx_word16_t)1.)
+#else /* !DOUBLE_PRECISION */
typedef float spx_mem_t;
typedef float spx_coef_t;
typedef float spx_lsp_t;
@@ -157,6 +179,7 @@ typedef float spx_word32_t;
#define VERY_LARGE32 1e15f
#define VERY_LARGE16 1e15f
#define Q15_ONE ((spx_word16_t)1.f)
+#endif /* DOUBLE_PRECISION */
#define QCONST16(x,bits) (x)
#define QCONST32(x,bits) (x)