summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2009-08-19 14:59:39 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2009-08-19 14:59:39 -0700
commit9d89502b0283f84d51bd9d4f263cb46df513b8bd (patch)
tree7137ea83baf8fcfb4dd39cffaa6ca9d86f2f9dfb
parent3b9e0eec58f1b6d99418eb6365d7b8ae1c2082a2 (diff)
downloadexternal_svox-9d89502b0283f84d51bd9d4f263cb46df513b8bd.zip
external_svox-9d89502b0283f84d51bd9d4f263cb46df513b8bd.tar.gz
external_svox-9d89502b0283f84d51bd9d4f263cb46df513b8bd.tar.bz2
Revert "Integrate latest SVOX code drop that affects output signal generation"
This reverts commit 3b9e0eec58f1b6d99418eb6365d7b8ae1c2082a2. After more testing, this change seems to poorly coexist with CL 21226.
-rw-r--r--pico/lib/picosig2.c69
1 files changed, 19 insertions, 50 deletions
diff --git a/pico/lib/picosig2.c b/pico/lib/picosig2.c
index 5fb6f1d..52943e6 100644
--- a/pico/lib/picosig2.c
+++ b/pico/lib/picosig2.c
@@ -412,14 +412,29 @@ void sigDeallocate(picoos_MemoryManager mm, sig_innerobj_t *sig_inObj)
* @callgraph
* @callergraph
*/
-void sigDspInitialize(sig_innerobj_t *sig_inObj, picoos_int32 resetMode)
+void sigDspInitialize(sig_innerobj_t *sig_inObj, picoos_int32 r_mode)
{
picoos_int32 i, j;
picoos_int32 *pnt;
- if (resetMode == PICO_RESET_SOFT) {
+ if (r_mode == PICO_RESET_SOFT) {
/*minimal initialization when receiving a soft reset */
return;
+ /*
+ sig_inObj->voxbnd_p = (picoos_int32) ((picoos_single) sig_inObj->hfftsize_p
+ / ((picoos_single) sig_inObj->Fs_p / (picoos_single) 2)
+ * (picoos_single) sig_inObj->VCutoff_p);
+ sig_inObj->voxbnd2_p
+ = (picoos_int32) ((picoos_single) sig_inObj->hfftsize_p
+ / ((picoos_single) sig_inObj->Fs_p / (picoos_single) 2)
+ * (picoos_single) sig_inObj->UVCutoff_p);
+ sig_inObj->nextPeak_p = (((int) (PICODSP_FFTSIZE))
+ / ((int) PICODSP_DISPLACE) - 1) * sig_inObj->hop_p;
+ for (i = 0; i < 2 * PICODSP_FFTSIZE; i++) {
+ sig_inObj->int_vec26[i] = 0;
+ }
+ return;
+ */
}
/*-----------------------------------------------------------------
* Initialization
@@ -779,8 +794,6 @@ void impulse_response(sig_innerobj_t *sig_inObj)
picoos_int32 *norm_window; /* - fixed point */
picoos_int32 *fr, *Fr, *Fi, *t1, ff; /* - fixed point */
- picoos_int32 mx,mn, rat;
-
/*Link local variables with sig object*/
m2 = sig_inObj->m2_p;
m4 = m2 >> 1;
@@ -805,56 +818,16 @@ void impulse_response(sig_innerobj_t *sig_inObj)
/*window, normalize and differentiate*/
*E = norm_result(m2, fr, norm_window);
- if (*E > 0) {
+ if (*E > 0)
f = *E * PICODSP_FIXRESP_NORM;
- } else {
+ else
f = 20; /*PICODSP_FIXRESP_NORM*/
- }
ff = (picoos_int32) f;
if (ff < 1)
ff = 1;
/*normalize impulse response*/
t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,*(t1++) /= ff;); /* - fixed point */
-
- mx = mn = 0;
- t1 = fr;
- FAST_DEVICE(PICODSP_FFTSIZE,if (*t1>mx) mx=*t1; if (*t1<mn) mn=*t1; t1++;);
- mn = -mn;
- if (mx>mn) {
- rat = mx / (mn>>5); /* ratio * 32*/
- if (rat > 40) rat = 40; /* 1.25 * 32 */
- /* now rat is between 32 and 40 */
- switch (rat) {
- case 32: /* do nothing */
- break;
- case 33:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(-*t1)>>5; t1++;);
- break;
- case 34:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(-*t1)>>4; t1++;);
- break;
- case 35:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(((-*t1)>>5)+((-*t1)>>4)); t1++;);
- break;
- case 36:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(-*t1)>>3; t1++;);
- break;
- case 37:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(((-*t1)>>5)+((-*t1)>>3)); t1++;);
- break;
- case 38:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(((-*t1)>>4)+((-*t1)>>3)); t1++;);
- break;
- case 39:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(((-*t1)>>5)+((-*t1)>>4) + ((-*t1)>>3)); t1++;);
- break;
- case 40:
- t1 = fr;FAST_DEVICE(PICODSP_FFTSIZE,if (*t1<0) *t1-=(-*t1)>>2; t1++;);
- break;
- }
- }
-
} /* impulse_response */
/**
@@ -4064,10 +4037,6 @@ static void get_simple_excitation(sig_innerobj_t *sig_inObj,
F0 = sig_inObj->F0_p;
voiced = sig_inObj->voiced_p;
- if (E>5) E = 4;
- if (E>1) E *= 2;
-
-
/* shift previous excitation window by hop samples*/
for (nI = 0; nI < sig_inObj->nV; nI++) {
sig_inObj->LocV[nI] = sig_inObj->LocV[nI] - hop;