Displaying 20 results from an estimated 30 matches for "spx_sig_t".
2005 Jul 18
1
[PATCH] remove unused encoder buf in sb_celp.[hc]
...===============
--- 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 @@
speex_free(st->g0_mem);
speex_free(st->g1_mem);
- speex_free(st->buf);
speex_free(st->excBuf);
speex_free(st...
2005 Feb 28
4
memory usage
On Mon, 2005-02-28 at 19:42 -0500, Jean-Marc Valin wrote:
> > jean-marc: i think we can remove spx_sig_t *orig.
> > but am not sure about exc2Buf. is it for extension?
>
> orig is already removed in SVN (which you should probably use). As for
> exc2, it can be removed, but I'm not sure if you can just use exc
> instead (maybe yes).
>
when removing "spx_sig_t *orig;"...
2005 Feb 19
2
memory usage
...microcontroller with
very limited memory (<64Kbyte RAM).
what I found when initialising the encoder, a chunk of 32Kb was
attempted to be alloced, which failed:
src/nb_celp.c:
void *nb_encoder_init(const SpeexMode *m)
{
/* snip */
st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(spx_sig_t));
/* snip */
}
same goes for the decoder:
void *nb_decoder_init(const SpeexMode *m)
{
/* snip */
st = (DecState *)speex_alloc(sizeof(DecState)+4000*sizeof(spx_sig_t));
/* snip */
}
I tried to reduce the stacksize from 8000/4000 to say 2000/1000,
and reduce buffer size to 160 bytes:...
2006 Jan 02
2
Speex decode memory usage on an Arm processor (wideband)
...ines that control much of
the memory usage: MAX_CHARS_PER_FRAME , SB_DEC_STACK and NB_DEC_STACK.
I have tested lowering these values and then running the speexdec program
and looking for errors. By trial and error it appears that I can lower
MAX_CHARS_PER_FRAME = 750, SB_DEC_STACK = 750*sizeof(spx_sig_t) and
NB_DEC_STACK = 250*sizeof(spx_sig_t)
and not get any memory errors but have no idea if these are safe values or
not. I could not tell how much stack spaced was used but would guess 4 kb
would be enough. After making these changes it appears to Alloc less the
16kb.
So any pointers on what...
2005 Feb 28
2
memory usage
hi,
jean-marc: i think we can remove spx_sig_t *orig.
but am not sure about exc2Buf. is it for extension?
rgds,
tk
On Mon, 28 Feb 2005 12:42:38 -0500, Jean-Marc Valin
<Jean-Marc.Valin@usherbrooke.ca> wrote:
> Hi,
>
> I looked at the code I think there are still places where you can reduce
> memory. For example, I think bu...
2005 Jun 06
1
Bug from revision 9316: SB_ENC_STACK misdefined
...=======
--- sb_celp.c (revision 9379)
+++ sb_celp.c (working copy)
@@ -49,7 +49,7 @@
/* Default size for the encoder and decoder stack (can be changed at compile time).
This does not apply when using variable-size arrays or alloca. */
#ifndef SB_ENC_STACK
-#define SB_ENC_STACK (1000*sizeof(spx_sig_t))
+#define SB_ENC_STACK (10000*sizeof(spx_sig_t))
#endif
#ifndef SB_DEC_STACK
2014 Feb 07
1
[PATCH] arm: Remove a superfluous 's' suffix from the cmp instruction
...assembly enabled.
---
libspeex/filters_arm4.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libspeex/filters_arm4.h b/libspeex/filters_arm4.h
index 7a74042..2c64625 100644
--- a/libspeex/filters_arm4.h
+++ b/libspeex/filters_arm4.h
@@ -46,9 +46,9 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le
".normalize16loop1%=: \n"
"\tldr %4, [%0], #4 \n"
- "\tcmps %4, %1 \n"
+ "\tcmp %4, %1 \n"
"\tmovgt %1, %4 \n"
- "\tcmps %4, %3 \n"
+...
2005 May 25
3
Speex on TI C6x, Problem with TI C5x Patch
...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_SCALING 8192.
#define GAMMA_SCALING 32768.
#define GAIN_SCALING 64
#define GAIN_SCALING_1 0.015625
#define LPC_SHIFT 13
#define SIG_SHIFT 14
#define VERY_SMALL 0
#ifdef ARM5E_ASM
#include "fixed_arm5e.h"
#elif d...
2006 Jan 03
1
Speex decode memory usage on an Arm processor (wideband)
> > I have tested lowering these values and then running the speexdec
> > program and looking for errors. By trial and error it appears that I
> > can lower MAX_CHARS_PER_FRAME = 750, SB_DEC_STACK =
> > 750*sizeof(spx_sig_t) and NB_DEC_STACK = 250*sizeof(spx_sig_t)
> > and not get any memory errors but have no idea if these are safe
> > values or not. I could not tell how much stack spaced was used but
> > would guess 4 kb would be enough. After making these changes it
> > appears to Alloc...
2007 Jan 25
1
Minor fixed point scaling problem
...total encoder instructions.
It would probably make sense to have a NORM macro that maps to _norm() on TI
platforms or whatever the processor specific instruction is available.
In filters.c normalize16() searches for the largest value using the
following loop:
for (i=0;i<len;i++)
{
spx_sig_t tmp = x[i];
if (tmp<0)
tmp = NEG32(tmp);
if (tmp >= max_val)
max_val = tmp;
}
It should really use tmp=NEG32(tmp+1), since the range of negative fixed
point has one more number for a given number of bits. (and that's what all
the shifting is about) This s...
2007 Jan 25
3
SV: How to detect SpeexBits corruption
You might not be doing anything wrong. Speex is stateful and can
get into a bad state sometimes. It's happened to me too, but not
recently. And I've seen such bugs reported on this list and fixed.
I suggest several approaches to solving the problem:
1) Try compiling Speex without compiler optimizations and see if the
problem still occurs. Most likely it will, but this is an
2009 Apr 24
2
[PATCH] Blackfin: cleanup astat/cc/hardware loop asm clobbers
...ers_bfin.h b/libspeex/filters_bfin.h
index 1e433ee..ccd57b9 100644
--- a/libspeex/filters_bfin.h
+++ b/libspeex/filters_bfin.h
@@ -32,6 +32,8 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#include "bfin.h"
+
#define OVERRIDE_NORMALIZE16
int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int len)
{
@@ -50,7 +52,7 @@ int normalize16(const spx_sig_t *x, spx_word16_t *y, spx_sig_t max_scale, int le
"LOOP_END norm_max%=;\n\t"
: "=&d" (max_val)
: "a" (x), "a" (len)
- : "R1", &q...
2005 Feb 19
0
memory usage
...byte RAM).
>
> what I found when initialising the encoder, a chunk of 32Kb was
> attempted to be alloced, which failed:
>
> src/nb_celp.c:
>
> void *nb_encoder_init(const SpeexMode *m)
> {
> /* snip */
> st = (EncState*)speex_alloc(sizeof(EncState)+8000*sizeof(spx_sig_t));
> /* snip */
> }
>
>
> same goes for the decoder:
>
> void *nb_decoder_init(const SpeexMode *m)
> {
> /* snip */
> st = (DecState *)speex_alloc(sizeof(DecState)+4000*sizeof(spx_sig_t));
> /* snip */
> }
>
> I tried to reduce the stacksize...
2005 Mar 01
0
memory usage
Alfred E. Heggestad wrote:
>On Mon, 2005-02-28 at 19:42 -0500, Jean-Marc Valin wrote:
>
>
>>>jean-marc: i think we can remove spx_sig_t *orig.
>>>but am not sure about exc2Buf. is it for extension?
>>>
>>>
>>orig is already removed in SVN (which you should probably use). As for
>>exc2, it can be removed, but I'm not sure if you can just use exc
>>instead (maybe yes).
>>
&...
2006 Feb 04
0
Speex inner_prod(), normalize, C64 MIPS
...rm_shift() out of your normalize16(). This function can also be
used twice in pitch_gain_search_3tap(). Are there any other places that
would benefit from this optimized routine?
/*
Returns number of shifts to normalize a 32 bit vector to
[-16384,+16384).
*/
static inline int norm_shift(const spx_sig_t *x, spx_sig_t max_scale, int
len)
{
int sig_shift_ti;
int i;
#warn Using the optimized normalize16() function.
/*
Directly find the min(_norm(x[i]) rather than searching for
max(abs(x[i])) and taking _norm.
*/
#pragma MUST_ITERATE(24,184,4)
for (i=0;i<len;i++)...
2006 Jan 02
0
Speex decode memory usage on an Arm processor (wideband)
...ffer or can live with
realloc() calls, then you can ignore/reduce that one.
> I have tested lowering these values and then running the speexdec
> program and looking for errors. By trial and error it appears that I
> can lower MAX_CHARS_PER_FRAME = 750, SB_DEC_STACK =
> 750*sizeof(spx_sig_t) and NB_DEC_STACK = 250*sizeof(spx_sig_t)
> and not get any memory errors but have no idea if these are safe
> values or not. I could not tell how much stack spaced was used but
> would guess 4 kb would be enough. After making these changes it
> appears to Alloc less the 16kb.
>...
2005 Jan 25
1
"spx_word16_t *" is incompatible with parameter of type "float *"
...*" is incompatible with parameter of type "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 10...
2006 Feb 03
2
Speex inner_prod()
Hi,
Basically, inner_prod() can and should be adapted to the architecture it
will run on. It is not really sensitive to noise, so it's possible to
tweak it a lot. Also, in the current code, I saturate it to +-16384,
which is OK to prevent overflows. I'm not concerned with the case of a
constant -16384 value because it can't really happen in practice
(especially after filtering). BTW,
2004 Aug 06
0
[ANNOUNCE] PocketPC Port for speex-1.1.5 with sample code
...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 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_SCALING 8192.
#define GAMMA_SCALING 32768.
#define GAIN_SCALING 64
#define GAIN_SCALING_1 0.015625
#define LPC_SHIFT 13
#define SIG_SHIFT 14
#define VERY_SMALL 0
#ifdef ARM_ASM
#include "fixed_arm.h"
#elif defin...
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