summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/speex
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-11-14 00:46:49 +0000
committerThom Johansen <thomj@rockbox.org>2007-11-14 00:46:49 +0000
commitd75a5486e60d10a74049712d8bdf1fa2816038f8 (patch)
tree85734ec703eb600faa001859a67138e215566bd7 /apps/codecs/libspeex/speex
parentf554e00b61a2ecfdbf72314414947de57912fe02 (diff)
downloadrockbox-d75a5486e60d10a74049712d8bdf1fa2816038f8.tar.gz
rockbox-d75a5486e60d10a74049712d8bdf1fa2816038f8.zip
New Speex stereo code in libspeex and speex.c, stereo should be more robust now. Remove last floating point code in speex.c and remove some unused stuff.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15611 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/speex')
-rw-r--r--apps/codecs/libspeex/speex/speex_stereo.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/apps/codecs/libspeex/speex/speex_stereo.h b/apps/codecs/libspeex/speex/speex_stereo.h
index 904e9b092e..b817a5535e 100644
--- a/apps/codecs/libspeex/speex/speex_stereo.h
+++ b/apps/codecs/libspeex/speex/speex_stereo.h
@@ -46,31 +46,28 @@
46extern "C" { 46extern "C" {
47#endif 47#endif
48 48
49/** State used for decoding (intensity) stereo information */ 49/** If you access any of these fields directly, I'll personally come and bite you */
50typedef struct SpeexStereoState { 50typedef struct SpeexStereoState {
51#ifndef FIXED_POINT
52 float balance; /**< Left/right balance info */ 51 float balance; /**< Left/right balance info */
53 float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ 52 float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */
54 float smooth_left; /**< Smoothed left channel gain */ 53 float smooth_left; /**< Smoothed left channel gain */
55 float smooth_right; /**< Smoothed right channel gain */ 54 float smooth_right; /**< Smoothed right channel gain */
56 float reserved1; /**< Reserved for future use */ 55 float reserved1; /**< Reserved for future use */
57 float reserved2; /**< Reserved for future use */ 56 float reserved2; /**< Reserved for future use */
58#else
59 spx_int32_t balance; /**< Left/right balance info */
60 spx_int16_t e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */
61 spx_int16_t smooth_left; /**< Smoothed left channel gain */
62 spx_int16_t smooth_right; /**< Smoothed right channel gain */
63 spx_int32_t reserved1; /**< Reserved for future use */
64 spx_int32_t reserved2; /**< Reserved for future use */
65#endif
66} SpeexStereoState; 57} SpeexStereoState;
67 58
68/** Initialization value for a stereo state */ 59/** Deprecated. Use speex_stereo_state_init() instead. */
69#ifndef FIXED_POINT
70#define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0} 60#define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0}
71#else 61
72#define SPEEX_STEREO_STATE_INIT {65536,16384,16384,16384,0,0} 62/** Initialise/create a stereo stereo state */
73#endif 63SpeexStereoState *speex_stereo_state_init();
64
65/** Reset/re-initialise an already allocated stereo state */
66void speex_stereo_state_reset(SpeexStereoState *stereo);
67
68/** Destroy a stereo stereo state */
69void speex_stereo_state_destroy(SpeexStereoState *stereo);
70
74/** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */ 71/** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
75void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits); 72void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits);
76 73