summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/preprocess.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-11-22 01:29:14 +0000
committerThom Johansen <thomj@rockbox.org>2007-11-22 01:29:14 +0000
commit57a27c69a9f3b9b69aff9360c09f7298ffd7b670 (patch)
tree252dcf43c2ed5058047d1aac98c00ff24e97f067 /apps/codecs/libspeex/preprocess.c
parent14ac7cafc81940f5f389515cb5134e6c52f37813 (diff)
Sync Speex to SVN.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15750 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/preprocess.c')
-rw-r--r--apps/codecs/libspeex/preprocess.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/apps/codecs/libspeex/preprocess.c b/apps/codecs/libspeex/preprocess.c
index 5d5befe736..07a2ad3479 100644
--- a/apps/codecs/libspeex/preprocess.c
+++ b/apps/codecs/libspeex/preprocess.c
@@ -277,7 +277,7 @@ static void conj_window(spx_word16_t *w, int len)
x=QCONST16(2.f,13)-x+QCONST16(2.f,13); /* 4 - x */
}
x = MULT16_16_Q14(QCONST16(1.271903f,14), x);
- tmp = SQR16_Q15(QCONST16(.5f,15)-MULT16_16_P15(QCONST16(.5f,15),spx_cos_norm(QCONST32(x,2))));
+ tmp = SQR16_Q15(QCONST16(.5f,15)-MULT16_16_P15(QCONST16(.5f,15),spx_cos_norm(SHL32(EXTEND32(x),2))));
if (inv)
tmp=SUB16(Q15_ONE,tmp);
w[i]=spx_sqrt(SHL32(EXTEND32(tmp),15));
@@ -1065,7 +1065,7 @@ int speex_preprocess_ctl(SpeexPreprocessState *state, int request, void *ptr)
case SPEEX_PREPROCESS_GET_AGC:
(*(spx_int32_t*)ptr) = st->agc_enabled;
break;
-
+#ifndef DISABLE_FLOAT_API
case SPEEX_PREPROCESS_SET_AGC_LEVEL:
st->agc_level = (*(float*)ptr);
if (st->agc_level<1)
@@ -1076,6 +1076,7 @@ int speex_preprocess_ctl(SpeexPreprocessState *state, int request, void *ptr)
case SPEEX_PREPROCESS_GET_AGC_LEVEL:
(*(float*)ptr) = st->agc_level;
break;
+#endif /* #ifndef DISABLE_FLOAT_API */
case SPEEX_PREPROCESS_SET_AGC_INCREMENT:
st->max_increase_step = exp(0.11513f * (*(spx_int32_t*)ptr)*st->frame_size / st->sampling_rate);
break;
@@ -1113,17 +1114,21 @@ int speex_preprocess_ctl(SpeexPreprocessState *state, int request, void *ptr)
break;
case SPEEX_PREPROCESS_SET_DEREVERB_LEVEL:
- st->reverb_level = (*(float*)ptr);
+ /* FIXME: Re-enable when de-reverberation is actually enabled again */
+ /*st->reverb_level = (*(float*)ptr);*/
break;
case SPEEX_PREPROCESS_GET_DEREVERB_LEVEL:
- (*(float*)ptr) = st->reverb_level;
+ /* FIXME: Re-enable when de-reverberation is actually enabled again */
+ /*(*(float*)ptr) = st->reverb_level;*/
break;
case SPEEX_PREPROCESS_SET_DEREVERB_DECAY:
- st->reverb_decay = (*(float*)ptr);
+ /* FIXME: Re-enable when de-reverberation is actually enabled again */
+ /*st->reverb_decay = (*(float*)ptr);*/
break;
case SPEEX_PREPROCESS_GET_DEREVERB_DECAY:
- (*(float*)ptr) = st->reverb_decay;
+ /* FIXME: Re-enable when de-reverberation is actually enabled again */
+ /*(*(float*)ptr) = st->reverb_decay;*/
break;
case SPEEX_PREPROCESS_SET_PROB_START: