summaryrefslogtreecommitdiffstats
path: root/pico
diff options
context:
space:
mode:
authorJean-Michel Trivi <jmtrivi@google.com>2010-03-14 14:22:51 -0700
committerJean-Michel Trivi <jmtrivi@google.com>2010-03-14 14:22:51 -0700
commitdf387f9c2d4cb129ad311dbda30b7fd52f274cb1 (patch)
treebd9c2afdaea5c24a03f25ec4751e9f4f0176711d /pico
parent87b9054f1dd4a4d728e6313edcb036a85b7ed06e (diff)
downloadexternal_svox-df387f9c2d4cb129ad311dbda30b7fd52f274cb1.zip
external_svox-df387f9c2d4cb129ad311dbda30b7fd52f274cb1.tar.gz
external_svox-df387f9c2d4cb129ad311dbda30b7fd52f274cb1.tar.bz2
Revert energy distribution update introduced in Pico engine 1.1.0.2
as it sounds more muffled, particularly with eng-USA Change-Id: I77c366afb1926f045ef931d0d66ce6a0bb377893
Diffstat (limited to 'pico')
-rw-r--r--pico/lib/picosig2.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/pico/lib/picosig2.c b/pico/lib/picosig2.c
index 509c33a..11a606a 100644
--- a/pico/lib/picosig2.c
+++ b/pico/lib/picosig2.c
@@ -779,8 +779,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;
@@ -816,45 +814,6 @@ void impulse_response(sig_innerobj_t *sig_inObj)
/*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 */
/**