diff options
author | Thom Johansen <thomj@rockbox.org> | 2007-11-10 14:57:49 +0000 |
---|---|---|
committer | Thom Johansen <thomj@rockbox.org> | 2007-11-10 14:57:49 +0000 |
commit | 1730e406ed8f1db32e9755bbfedcb192ff153cb7 (patch) | |
tree | a49cb4371cb94031126b401136451bd8103cecfd /apps/codecs/libspeex/speex/speex_stereo.h | |
parent | ec6569ed22d27eb6eb5a3902502eecc59d83de7a (diff) |
Strip out a large unneeded portion of the Speex stereo decoding function, and port the rest of it to fixed point. Disable the unneeded stereo float decoding function. Correct the output buffer size and change some minor syntactic stuff in speex.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15554 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/speex/speex_stereo.h')
-rw-r--r-- | apps/codecs/libspeex/speex/speex_stereo.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/apps/codecs/libspeex/speex/speex_stereo.h b/apps/codecs/libspeex/speex/speex_stereo.h index ea2f976a26..904e9b092e 100644 --- a/apps/codecs/libspeex/speex/speex_stereo.h +++ b/apps/codecs/libspeex/speex/speex_stereo.h @@ -48,17 +48,29 @@ extern "C" { /** State used for decoding (intensity) stereo information */ typedef struct SpeexStereoState { +#ifndef FIXED_POINT float balance; /**< Left/right balance info */ float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ float smooth_left; /**< Smoothed left channel gain */ float smooth_right; /**< Smoothed right channel gain */ float reserved1; /**< Reserved for future use */ float reserved2; /**< Reserved for future use */ +#else + spx_int32_t balance; /**< Left/right balance info */ + spx_int16_t e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(right)] */ + spx_int16_t smooth_left; /**< Smoothed left channel gain */ + spx_int16_t smooth_right; /**< Smoothed right channel gain */ + spx_int32_t reserved1; /**< Reserved for future use */ + spx_int32_t reserved2; /**< Reserved for future use */ +#endif } SpeexStereoState; /** Initialization value for a stereo state */ +#ifndef FIXED_POINT #define SPEEX_STEREO_STATE_INIT {1,.5,1,1,0,0} - +#else +#define SPEEX_STEREO_STATE_INIT {65536,16384,16384,16384,0,0} +#endif /** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */ void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits); |