[xiph-commits] r12291 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Tue Jan 2 05:49:40 PST 2007
Author: jm
Date: 2007-01-02 05:49:38 -0800 (Tue, 02 Jan 2007)
New Revision: 12291
Modified:
trunk/speex/libspeex/sb_celp.c
Log:
minor double-codebook simplification for wideband.
Modified: trunk/speex/libspeex/sb_celp.c
===================================================================
--- trunk/speex/libspeex/sb_celp.c 2007-01-02 13:37:37 UTC (rev 12290)
+++ trunk/speex/libspeex/sb_celp.c 2007-01-02 13:49:38 UTC (rev 12291)
@@ -683,9 +683,6 @@
for (i=0;i<st->subframeSize;i++)
target[i]=SUB16(sw[i],res[i]);
- for (i=0;i<st->subframeSize;i++)
- exc[i]=0;
-
signal_div(target, target, scale, st->subframeSize);
/* Reset excitation */
@@ -700,15 +697,6 @@
signal_mul(innov, innov, scale, st->subframeSize);
- for (i=0;i<st->subframeSize;i++)
- exc[i] = ADD32(exc[i], PSHR32(innov[i],SIG_SHIFT));
-
- if (st->innov_save)
- {
- for (i=0;i<st->subframeSize;i++)
- innov_save[2*i]=EXTRACT16(SHR32(innov[i],SIG_SHIFT));
- }
-
if (SUBMODE(double_codebook)) {
char *tmp_stack=stack;
VARDECL(spx_sig_t *innov2);
@@ -724,9 +712,19 @@
signal_mul(innov2, innov2, MULT16_32_P15(QCONST16(0.4f,15),scale), st->subframeSize);
for (i=0;i<st->subframeSize;i++)
- exc[i] = ADD32(exc[i],PSHR32(innov2[i], SIG_SHIFT));
+ innov[i] = ADD32(innov[i],innov2[i]);
stack = tmp_stack;
}
+ for (i=0;i<st->subframeSize;i++)
+ exc[i] = PSHR32(innov[i],SIG_SHIFT);
+
+ if (st->innov_save)
+ {
+ for (i=0;i<st->subframeSize;i++)
+ innov_save[2*i]=EXTRACT16(SHR32(innov[i],SIG_SHIFT));
+ }
+
+
}
st->exc_rms[sub] = compute_rms16(exc, st->subframeSize);
More information about the commits
mailing list