Displaying 20 results from an estimated 47 matches for "spx_word32_t".
Did you mean:
spx_word16_t
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...SING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ARCH_H
#define ARCH_H
#include "speex/speex_types.h"
#define ABS(x) ((x) < 0 ? (-(x)) : (x))
#ifdef FIXED_POINT
typedef spx_int16_t spx_word16_t;
typedef spx_int32_t spx_word32_t;
#ifdef _MSC_VER
typedef __int64 spx_word64_t;
#else
typedef long long spx_word64_t;
#endif
typedef spx_word32_t spx_mem_t;
typedef spx_word16_t spx_coef_t;
typedef spx_word16_t spx_lsp_t;
typedef spx_word32_t spx_sig_t;
#define LPC_SCALING 8192
#define SIG_SCALING 16384
#define LSP_SCAL...
2009 Apr 24
2
[PATCH] Blackfin: cleanup astat/cc/hardware loop asm clobbers
...ch_bfin.h
@@ -33,6 +33,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "bfin.h"
+
#define OVERRIDE_COMPUTE_WEIGHTED_CODEBOOK
void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *r, spx_word16_t *resp, spx_word16_t *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
{
@@ -73,10 +75,7 @@ void compute_weighted_codebook(const signed char *shape_cb, const spx_word16_t *
:
: "m" (subvect_size), "m" (shape_cb), "m" (r), "m" (resp), "m" (E)...
2008 Feb 19
4
Patch for Analog Devices compiler & fixed-point AGC
...ane Lesage
ATEIS International
-------------- next part --------------
--- C:/Documents and Settings/Stephane/Local Settings/Temp/filterbank-HEAD.2.h Tue Feb 19 19:58:52 2008
+++ c:/Dev/Speex/libspeex/filterbank.h Thu Nov 22 14:18:38 2007
@@ -51,15 +51,15 @@
FilterBank *filterbank_new(int banks, spx_word32_t sampling, int len, int type);
-void filterbank_destroy(FilterBank *bank);
+void filterbank_destroy(FilterBank *bnk);
-void filterbank_compute_bank32(FilterBank *bank, spx_word32_t *ps, spx_word32_t *mel);
+void filterbank_compute_bank32(FilterBank *bnk, spx_word32_t *ps, spx_word32_t *mel);
-...
2007 Aug 24
1
Speex on ARM7
Hello
I'm testing SPEEX on embedded board using ARM7 (Atmel). ARM7 don't have
floating point so I'm using FIXED_POINT. Unfortunately the encoding speed is
about 5 times slower then necessary for real time.
ARM7 is slow for 16/8 bits operations.
The sequence:
static inline spx_word32_t compute_pitch_error(spx_word16_t *C, spx_word16_t
*g, spx_word16_t pitch_control)
{
spx_word32_t sum = 0;
sum = ADD32(sum,MULT16_16(MULT16_16_16(g[0],pitch_control),C[0]));
sum = ADD32(sum,MULT16_16(MULT16_16_16(g[1],pitch_control),C[1]));
sum = ADD32(sum,MULT16_16(MULT16_16_16(g[2...
2007 Aug 29
2
high-pass filter issues
...0.96723f, -1.93445f, 0.96723f},
{0.98645f, -1.97277f, 0.98645f}, {0.88000f, -1.76000f, 0.88000f}};
#endif
const spx_word16_t *den, *num;
if (filtID>4)
filtID=4;
den = Pcoef[filtID]; num = Zcoef[filtID];
/*return;*/
for (i=0;i<len;i++)
{
spx_word16_t yi;
spx_word32_t vout = ADD32(MULT16_16(num[0], x[i]),mem[0]);
yi = EXTRACT16(SATURATE(PSHR32(vout,14),32767));
mem[0] = ADD32(MAC16_16(mem[1], num[1],x[i]),
SHL32(MULT16_32_Q15(-den[1],vout),1));
mem[1] = ADD32(MULT16_16(num[2],x[i]),
SHL32(MULT16_32_Q15(-den[2],vout),1));
y[i] = yi;
}
}...
2005 Jul 18
1
[PATCH] remove unused encoder buf in sb_celp.[hc]
diffed against http://svn.xiph.org/trunk/speex r9583
Index: libspeex/sb_celp.c
===================================================================
--- libspeex/sb_celp.c (revision 9583)
+++ libspeex/sb_celp.c (working copy)
@@ -272,7 +272,6 @@
st->g0_mem=speex_alloc((QMF_ORDER)*sizeof(spx_word32_t));
st->g1_mem=speex_alloc((QMF_ORDER)*sizeof(spx_word32_t));
- st->buf=speex_alloc((st->windowSize)*sizeof(spx_sig_t));
st->excBuf=speex_alloc((st->bufSize)*sizeof(spx_sig_t));
st->exc = st->excBuf + st->bufSize - st->windowSize;
@@ -349,7 +348,6 @@
sp...
2005 Jan 25
1
"spx_word16_t *" is incompatible with parameter of type "float *"
..."float *"
compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack);
The function definition defines resp2 as a float in line 47:
static void compute_weighted_codebook(const signed char *shape_cb, const spx_sig_t *r, spx_word16_t *resp, float *resp2, spx_word32_t *E, int shape_cb_size, int subvect_size, char *stack)
But then calls it with resp2 being defined as type spx_word16_t * in line 185:
compute_weighted_codebook(shape_cb, r, resp, resp2, E, shape_cb_size, subvect_size, stack);
Defined on line 103:
#ifdef _USE_SSE
__m128 *resp2;
__m128 *E;...
2004 Aug 06
0
[ANNOUNCE] PocketPC Port for speex-1.1.5 with sample code
...INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef ARCH_H
#define ARCH_H
#define ABS(x) ((x) < 0 ? (-(x)) : (x))
#ifdef FIXED_POINT
typedef signed short spx_word16_t;
typedef signed int spx_word32_t;
/*long long is not recognized by
eMbedded Visual C++ compiler;
so use MS's __int64 instead of long long,
if compiling on that compiler
*/
#if defined(_WIN32_WCE) && defined(_MSC_VER)
typedef __int64 spx_word64_t;
#else
typedef long long spx_word64_t;
#endif
typedef spx_word32_t...
2008 Jan 22
2
Shift count warning messages
...n (no room for it). It is very likely
> that you are seeing the same issue, and the fix should be the same
> also. The trickier problems are the ones that the compiler does not
> find. EXTEND32 is usually the cure there also.
>
> Now that I look at mdf.c, though, W is declares as spx_word32_t, so
> there should not be a problem, unless spx_word32_t is being mapped to
> 16-bits. That should not happen if you compile with CONFIG_TI_C54X
> defined. This is odd.
In both cases, what I'm seeing is that the code does a shift right by
more than 16 bits. Is it possible that the C...
2008 Jan 22
2
Shift count warning messages
yes, our DSP is 16 bit based, and if those bits of code aren't using 32 bit variables then yes that is what the warnings would be. Does this mean that the preprocessor and echo canceller won't work as well because of this?
-Mike
>>> Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> 01/18/08 8:42 PM >>>
I think these warnings are due to your DSP being 16-bit and
2004 Aug 06
2
[ANNOUNCE] PocketPC Port for speex-1.1.5 with sample code
Hi Jean-Marc,
Based on the wonderful Speex project, I've created SpeexOutLoud, essentially a Speex codec port for Windows Mobile 2003 devices.
I've included a sample project intended to show the usage of SpeexOutLoud codec in a Pocket PC application based on .NET Compact Framework.
I'd request you to please go through the attached build, and include it as a contribution to the
2008 Jan 23
2
Shift count warning messages
...>>> that you are seeing the same issue, and the fix should be the same
>>> also. The trickier problems are the ones that the compiler does not
>>> find. EXTEND32 is usually the cure there also.
>>>
>>> Now that I look at mdf.c, though, W is declares as spx_word32_t, so
>>> there should not be a problem, unless spx_word32_t is being mapped to
>>> 16-bits. That should not happen if you compile with CONFIG_TI_C54X
>>> defined. This is odd.
>>
>> In both cases, what I'm seeing is that the code does a shift right by
>...
2008 May 03
2
Resampler (no api)
...mem + channel_index * st->mem_alloc_size;
+ const spx_word16_t *sinc_table = st->sinc_table;
+ const int out_stride = st->out_stride;
+ const int int_advance = st->int_advance;
+ const int frac_advance = st->frac_advance;
+ const spx_uint32_t den_rate = st->den_rate;
+ spx_word32_t sum;
+ int j;
+
while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len))
{
- int j;
- spx_word32_t sum=0;
-
- /* We already have all the filter coefficients pre-computed in the table */
- const spx_word16_t *ptr;
- /* Do th...
2008 May 03
0
Resampler, memory only variant
...mem + channel_index * st->mem_alloc_size;
+ const spx_word16_t *sinc_table = st->sinc_table;
+ const int out_stride = st->out_stride;
+ const int int_advance = st->int_advance;
+ const int frac_advance = st->frac_advance;
+ const spx_uint32_t den_rate = st->den_rate;
+ spx_word32_t sum;
+ int j;
+
while (!(last_sample >= (spx_int32_t)*in_len || out_sample >= (spx_int32_t)*out_len))
{
- int j;
- spx_word32_t sum=0;
-
- /* We already have all the filter coefficients pre-computed in the table */
- const spx_word16_t *ptr;
- /* Do th...
2004 Oct 22
1
FIXED_POINT warns on compute_weighted_codebook
hi,
i am trying to compile a fixed point version of lipspeex on desktop
windows environment. a short reason for the complicated story is that
we need to keep the 'engine' part of our project same across the various
ports of our voip project (blame the pointy haired boss).
now, when i compile with FIXED_POINT defined in the Visual C++ 6.0, i get
these errors:
2008 Jan 22
0
Shift count warning messages
...echo canceller since then (no room for it). It is very likely that you are seeing the same issue, and the fix should be the same also. The trickier problems are the ones that the compiler does not find. EXTEND32 is usually the cure there also.
Now that I look at mdf.c, though, W is declares as spx_word32_t, so there should not be a problem, unless spx_word32_t is being mapped to 16-bits. That should not happen if you compile with CONFIG_TI_C54X defined. This is odd.
- Jim
----- Original Message -----
From: Michael Jacobson
To: Jean-Marc Valin
Cc: speex-dev@xiph.org
Sent: Tuesday, J...
2005 Nov 12
2
Noisy sound quality with Blackfin in WB-mode
...asm version and the fixed point.
I don't have my setup working at the moment, but could you test the
following patch:
Index: lpc_bfin.h
===================================================================
--- lpc_bfin.h (r?vision 10333)
+++ lpc_bfin.h (copie de travail)
@@ -47,7 +47,7 @@
spx_word32_t ac0=1;
spx_word32_t ac32[11], *ac32top;
int shift, ac_shift;
- ac32top = ac32+10;
+ ac32top = ac32+lag-1;
int lag_1, N_lag;
int nshift;
lag_1 = lag-1;
Let me know if it works.
Jean-Marc
Le mercredi 09 novembre 2005 ? 14:02 +0100, Bernhard Gerlach a ?crit :
> Hello Jea...
2008 Jan 26
1
Shift count warning messages
...the same issue, and the fix should be the same
>>>>> also. The trickier problems are the ones that the compiler does not
>>>>> find. EXTEND32 is usually the cure there also.
>>>>>
>>>>> Now that I look at mdf.c, though, W is declares as spx_word32_t, so
>>>>> there should not be a problem, unless spx_word32_t is being mapped to
>>>>> 16-bits. That should not happen if you compile with CONFIG_TI_C54X
>>>>> defined. This is odd.
>>>>
>>>> In both cases, what I'm seeing is...
2005 Nov 29
2
cheb_poly_eva using Clenshaw's recurrence formula
...omials", P. Kabal and R.
Ramachandran, IEEE Trans. on ASSP, Vol. 34, No. 6, December 1986, I
rewrite the function cheb_poly_eva in lsp.c using the Clenshaw's
recurrence formula, as described, for example, in Numerical Recipes in
C, Second Edition (5.5 and 5.8) :
static float cheb_poly_eva(spx_word32_t *coef, float x, int m, char *stack)
{
int k;
float b0, b1, tmp;
int m2=m>>1;
/* Initial conditions */
b0=0; /* b_(m+1) */
b1=0; /* b_(m+2) */
x*=2;
/* Calculate the b_(k) */
for(k=m2;k>0;k--)
{
tmp=b0; /* tmp holds the previous value of b0 */...
2007 Sep 17
1
Possible fixed point overflow/div 0 preprocess.c
...t;min_count++;
beta = MAX16(QCONST16(.03,15),DIV32_16(Q15_ONE,st->nb_adapt));
beta_1 = Q15_ONE-beta;
...
</>
On my architecture(x86) at least the DIV32_16 is defined as follows.
typedef short spx_int16_t;
typedef spx_int16_t spx_word16_t;
#define DIV32_16(a,b)
((spx_word16_t)(((spx_word32_t)(a))/((spx_word16_t)(b))))
The nb_adapt overflow occurred when its value reached 0x00010000 when
the cast is
performed to a short the value 0x0000 is given and hence the divide by
zero exception.
Proposed resolution:
The SpeexPreprocessState_ member 'nb_adapt' is only checked in a couple...