Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xiph/speex.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2002-10-22 23:29:29 +0400
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>2002-10-22 23:29:29 +0400
commit567ebeac2312fc721ea732c8af1cdf8033e2760e (patch)
tree41e729fdb954fdd2f3a4753ac2fe3ff7c78dba7b
parent5a2b3bf4a44c65615caa23a415173cef7f1ae084 (diff)
Prevents useless calculation of perceptually-weighted frameSpeex-1.0beta2
git-svn-id: http://svn.xiph.org/trunk/speex@4034 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--libspeex/nb_celp.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libspeex/nb_celp.c b/libspeex/nb_celp.c
index a500116..284b0f7 100644
--- a/libspeex/nb_celp.c
+++ b/libspeex/nb_celp.c
@@ -299,15 +299,17 @@ void nb_encode(void *state, float *in, SpeexBits *bits)
st->interp_lsp[i] = cos(st->interp_lsp[i]);
lsp_to_lpc(st->interp_lsp, st->interp_lpc, st->lpcSize,stack);
- bw_lpc(st->gamma1, st->interp_lpc, st->bw_lpc1, st->lpcSize);
- bw_lpc(st->gamma2, st->interp_lpc, st->bw_lpc2, st->lpcSize);
-
- filter_mem2(st->frame, st->bw_lpc1, st->bw_lpc2, st->sw, st->frameSize, st->lpcSize, st->mem_sw_whole);
/*Open-loop pitch*/
if (SUBMODE(lbr_pitch) != -1 || st->vbr_enabled || SUBMODE(forced_pitch_gain)) {
int nol_pitch[4];
float nol_pitch_coef[4];
+
+ bw_lpc(st->gamma1, st->interp_lpc, st->bw_lpc1, st->lpcSize);
+ bw_lpc(st->gamma2, st->interp_lpc, st->bw_lpc2, st->lpcSize);
+
+ filter_mem2(st->frame, st->bw_lpc1, st->bw_lpc2, st->sw, st->frameSize, st->lpcSize, st->mem_sw_whole);
+
open_loop_nbest_pitch(st->sw, st->min_pitch, st->max_pitch, st->frameSize,
nol_pitch, nol_pitch_coef, 4, stack);
ol_pitch=nol_pitch[0];