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

github.com/mumble-voip/speexdsp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-09-06 03:05:21 +0400
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>2008-09-06 06:51:31 +0400
commit9c76b1f6cbb4e88c2b61fa3d6947fc04fd0a6178 (patch)
tree3c9c82b6e41823256307718d1f2152c25144b679 /libspeex
parentf4284aea8590d63baf818b4d6a3df13153949fc2 (diff)
Minor simplifications to lsp_to_lpc()
Diffstat (limited to 'libspeex')
-rw-r--r--libspeex/lsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libspeex/lsp.c b/libspeex/lsp.c
index 7e63dbc..69fb569 100644
--- a/libspeex/lsp.c
+++ b/libspeex/lsp.c
@@ -211,7 +211,7 @@ static float cheb_poly_eva(spx_word32_t *coef, spx_word16_t x, int m, char *stac
\*---------------------------------------------------------------------------*/
#ifdef FIXED_POINT
-#define SIGN_CHANGE(a,b) (((a)&0x70000000)^((b)&0x70000000)||(b==0))
+#define SIGN_CHANGE(a,b) ((((a)^(b))&0x80000000)||(b==0))
#else
#define SIGN_CHANGE(a,b) (((a)*(b))<0.0)
#endif
@@ -325,7 +325,7 @@ int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t del
psuml = cheb_poly_eva(pt,xl,m,stack); /* evals poly. at xl */
flag = 1;
- while(flag && (xr >= -FREQ_SCALE)){
+ while(xr >= -FREQ_SCALE){
spx_word16_t dd;
/* Modified by JMV to provide smaller steps around x=+-1 */
#ifdef FIXED_POINT
@@ -377,7 +377,7 @@ int lpc_to_lsp (spx_coef_t *a,int lpcrdr,spx_lsp_t *freq,int nb,spx_word16_t del
/* once zero is found, reset initial interval to xr */
freq[j] = X2ANGLE(xm);
xl = xm;
- flag = 0; /* reset flag for next search */
+ break; /* reset flag for next search */
}
else{
psuml=temp_psumr;