summaryrefslogtreecommitdiffstats
path: root/sbc/sbc.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-02-22 13:41:02 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2008-02-22 13:41:02 +0000
commit4170955ad1f97eb8b7bf4f96025a654dab531571 (patch)
treeb77899724cce4a9391a33f3f95d095f6ad485809 /sbc/sbc.c
parente814491d3ecb0049db3c50a9e6583e7e0ee4e3dc (diff)
Replace 64bits multiplies by 32bits to further optimize the code
Diffstat (limited to 'sbc/sbc.c')
-rw-r--r--sbc/sbc.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sbc/sbc.c b/sbc/sbc.c
index 0b0bbc94..21a68063 100644
--- a/sbc/sbc.c
+++ b/sbc/sbc.c
@@ -551,7 +551,7 @@ static inline void sbc_synthesize_four(struct sbc_decoder_state *state,
struct sbc_frame *frame, int ch, int blk)
{
int i, j, k, idx;
- sbc_extended_t res;
+ sbc_fixed_t res;
for (i = 0; i < 8; i++) {
/* Shifting */
@@ -592,7 +592,7 @@ static inline void sbc_synthesize_eight(struct sbc_decoder_state *state,
struct sbc_frame *frame, int ch, int blk)
{
int i, j, k, idx;
- sbc_extended_t res;
+ sbc_fixed_t res;
for (i = 0; i < 16; i++) {
/* Shifting */
@@ -667,8 +667,7 @@ static void sbc_encoder_init(struct sbc_encoder_state *state,
static inline void _sbc_analyze_four(const int32_t *in, int32_t *out)
{
- sbc_fixed_t t[8];
- sbc_extended_t s[5];
+ sbc_fixed_t t[8], s[5];
t[0] = SCALE4_STAGE1( /* Q8 */
MULA(_sbc_proto_4[0], in[8] - in[32], /* Q18 */
@@ -752,8 +751,7 @@ static inline void sbc_analyze_four(struct sbc_encoder_state *state,
static inline void _sbc_analyze_eight(const int32_t *in, int32_t *out)
{
- sbc_fixed_t t[8];
- sbc_extended_t s[8];
+ sbc_fixed_t t[8], s[8];
t[0] = SCALE8_STAGE1( /* Q10 */
MULA(_sbc_proto_8[0], (in[16] - in[64]), /* Q18 = Q18 * Q0 */