Displaying 20 results from an estimated 60 matches for "use_alloca".
2006 Jan 31
1
Simple fix for Win32 using USE_ALLOCA
In speex_alloc.h
The following code
#ifdef USE_ALLOCA
#include <alloca.h>
#endif
should be:
#ifdef USE_ALLOCA
#ifdef WIN32
#include <malloc.h>
#else
#include <alloca.h>
#endif
#endif
for visual studio at least. Not sure about mingw
Aron Rosenberg
www.sightspeed.com
2011 Apr 15
4
Can I use VBR option to change byte_per_packet dynamically ?
Hi,I have been trying some different sample rate and bitrate combinations to get a feel for how CELT behaves,too, like Andrew Lentvorski. But I want to use VBR option.I want to ask a question about VBR in CELT codec.Can we use VBR option in CELT ??? "byte_per_packet" variable in code means constant bit rate, does not it ?In this code : bytes_per_packet is constant.len =
2010 Dec 01
1
stack + heap sizes
...)?
?- rate = 128 kbit/s (stereo)
?- vbr_rate = 0
?- prediction = 2
?- complexity = 10
?
Why do we need additionally a GLOBAL_STACK_SIZE ?
Could these allocations also be redirected to a common method, like celt_alloc()
?
It is not really clear to me what is the idea behind the switches VAR_ARRAYS,
USE_ALLOCA, GLOBAL_STACK_SIZE and how much RAM must be allocated (how/where?)
for any (or at least for our) configuration ?
?
thanks a lot for your answers,
Marko.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/opus/attachments/20101201/9742e2f...
2017 Jun 05
3
Trying to use Opus in an STM32F429IIT6 embedded project
...which I'm developing in a
STM32F429IIT6 microcontroller. Currently, I'm playing wav files in it.
I ported all the files from OpusLib 1.1.4 needed to compile the project,
but when I try to create and OpusDecode state, it returns the error -7
(OPUS_ALLOC_FAIL).
I'm compiling it with the USE_ALLOCA flag. I also tried to compile it with
the flags OVERRIDE_OPUS_ALLOC OVERRIDE_OPUS_FREE 'opus_alloc(x)=NULL' and
'opus_free(x)=NULL', but still having no success.
The code I wrote is:
int size;
int error;
OpusDecoder* dec;
size = opus_decoder_get_size(1);
dec =...
2008 Nov 11
1
visual studio 2005 - help getting speex workin'
...er stuff, so I figure what the heck, I'll give it a shot.
Under the "quake3" project, I add a new filter called "speex" and shove
*.c from \libspeex into there. I try compiling but it wants a
preprocessor directive for FLOATING_POINT or FIXED_POINT. Someone else
mentioned USE_ALLOCA so I gave both a shot. I ended up with about 800
errors and 800 warnings related to speex files.
So, I know it's possible in theory, I'm just having a heck of a time
getting things to work. It just magically works using the mingw compiling
environment and linux tools, but Visual Studio w...
2018 Feb 20
2
[EXTERNAL] Re: Developing OPUS on TI CC3220
Jean-Marc,
Thanks for the response and the helpful info.
I am trying to get the library to build without using the pseudostack define, and use either VAR_ARRAYS or ALLOC, but it seems the global stack is not defined.
Where do can I define this in my example?
VR
-----Original Message-----
From: Jean-Marc Valin [mailto:jmvalin at jmvalin.ca]
Sent: Tuesday, February 20, 2018 5:40 PM
To:
2018 Jan 15
1
Ask for suggestions about optimizing opus on STM32F407
...922ms + 711ms = 1651ms
FIXED 12kHz 1 1150 1000ms 1296ms + 193ms = 1507ms
FIXED 8kHz 2 1150 1000ms 1014ms + 147ms = 1181ms
FIXED 8kHz 1 1150 1000ms 1086ms + 135ms = 1241ms
FIXED 8kHz 1 1150 10000ms 11206ms + 1318ms = 12544ms
H. Build Options
FLOAT: OPUS_BUILD,USE_ALLOCA,CUSTOM_SUPPORT
FIXED: OPUS_BUILD,USE_ALLOCA,CUSTOM_SUPPORT,FIXED_POINT,DISABLE_FLOAT_API
Note: the target bit rate is twice of the sampling frequency. That's to say,
the bit rate will be 96kbps, if the sampling frequency is 48kHz.
The CPU usage is about 91% (911ms/1000ms), when decode 48KHz...
2018 Feb 21
0
[EXTERNAL] Re: Developing OPUS on TI CC3220
...ine, and use either VAR_ARRAYS or ALLOC, but it seems the global
> stack is not defined.
Not sure what you mean here. If your compiler supports C99 VLAs, then by
all means just define VAR_ARRAYS and you're good to go. If not, the
second best option is alloca(), which you can use by defining
USE_ALLOCA. If your compiler supports alloca() and USE_ALLOCA doesn't
work, then you may need to make minor tweaks to celt/stack_alloc.h. Do
not use NONTHREADSAFE_PSEUDOSTACK unless all other options fail.
Cheers,
Jean-Marc
> -----Original Message----- From: Jean-Marc Valin
> [mailto:jmvalin at...
2007 Aug 07
1
Attempting to shrink speex: Are these functions necessary?
...s of char, so you're
probably wasting a lot of space from the fact that chars on C5x are
16-bit long. You might be able to pack the values in one 16-bit value
and unpack in the code. As for the memory allocation in the encoder, the
best is to use C99 variable-size arrays (VAR_ARRAYS) or alloca
(USE_ALLOCA). Otherwise, you can make the static array much smaller. For
8 kbps, the total RAM requirement (not counting code or static tables)
should be around 4 kB (2 kWords).
Jean-Marc
Michael Jacobson a ?crit :
> Hi,
>
> I am using speex 1.2beta2 on a narrowband 16-bit, 8khz system that ha...
2012 Aug 15
1
Visual Studio build of Opus-1.0.1-rc
..."static inline int function(...)" (combination of static and inline)
does not work with Visual Studio 2010. I defined a macro which
translates all "inline" to nothing.
2) I had to define some extra macros which probably are set in the
configure-process in Linux, in particular USE_ALLOCA and OPUS_BUILD
There is now one warning left which I am not sure about. The lines the
compiler complains about are in "opus_private.h"
> /* Make sure everything's aligned to sizeof(void *) bytes */
> static inline int align(int i)
> {
> return (i+sizeof(void *)-1)...
2010 Jun 02
1
C55xx Linking Error
...3.html> post.
However, I am getting several "undefined symbol" linking errors that do not
make sense to me. According to the error message, these all appear to be
part of mdct.obj. But looking at the code in mdct.c, there is no reference
to "alloca". Nor have I defined "USE_ALLOCA" since the TI complier does not
support it. Can anyone spot an error on my part, or is this yet another
quirk of the CCS4 suite (there have been many).
Here's a listing of the console error messages.
undefined first referenced
symbol in file
---------...
2013 Nov 27
2
non-standard alloca.h
...[[#ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
+ #endif
+ #include <malloc.h>]],
[[int foo=10; int *array = alloca(foo);]])],
[ use_alloca=yes;
AC_DEFINE([USE_ALLOCA], [], [Make use of alloca])
2017 Nov 03
1
[PATCH] Check for _WIN32 instead of WIN32 in preprocessor checks
...get_mode(mode) ((mode)==SPEEX_MODEID_NB ? &speex_nb_mode : speex_lib_get_mode (mode))
#endif
diff --git a/libspeex/stack_alloc.h b/libspeex/stack_alloc.h
index 5264e666..f6eb3f6e 100644
--- a/libspeex/stack_alloc.h
+++ b/libspeex/stack_alloc.h
@@ -36,7 +36,7 @@
#define STACK_ALLOC_H
#ifdef USE_ALLOCA
-# ifdef WIN32
+# ifdef _WIN32
# include <malloc.h>
# else
# ifdef HAVE_ALLOCA_H
diff --git a/src/skeleton.h b/src/skeleton.h
index f07d7a3e..1559f8f5 100644
--- a/src/skeleton.h
+++ b/src/skeleton.h
@@ -10,7 +10,7 @@
extern "C" {
#endif
-#ifdef WIN32
+#ifdef _WIN32
#defin...
2017 May 29
0
[PATCH] Add CMake build script
...ORDS_BIGENDIAN`
* `FLOATING_POINT`
* `FIXED_POINT`
* `FIXED_POINT_DEBUG`
* `DISABLE_FLOAT_API`
* `_USE_SSE`
* `ARM4_ASM`
* `ARM5E_ASM`
* `BFIN_ASM`
* `TI_C55X`
* `DISABLE_VBR`
* `USE_SPEEXDSP`
* `VORBIS_PSYCHO`
* `HAVE_GETOPT_H`
* `HAVE_GETOPT_LONG`
* `VAR_ARRAYS`
* `USE_ALLOCA`
* `HAVE_ALLOCA_H`
* `USE_SMALLFT`
* `USE_KISS_FFT`
* `USE_GPL_FFTW3`
* `EXPORT`
* Installation supported
* Package config mode supported
How to use
==========
Required tools and libraries:
* CMake >= 3.1
* Ogg, SpeexDSP packages (headers and import libraries), recommended
* FFTW3 p...
2007 Aug 07
0
Attempting to shrink speex: Are these functions necessary?
...; encode: stack winBuf excBuf swBuf lagWindow old_lsp old_qlsp mem_sp
> mem_sw mem_sw_whole mem_exc mem_exc2 pi_gain pitch
>
> decode: stack excBuf interp_qlpc old_qlsp mem_sp pi_gain
What I meant is that you can reduce the stack part (assuming you're not
already using VAR_ARRAYS or USE_ALLOCA). The other variables above still
require the same size they are currently using. For the stack, the
easiest way to measure (it's platform-dependent to some extent), the
easiest is to fill the memory with 0xdeadbeef and see how far gets
written. The amount of stack used is exactly the same ever...
2010 Jun 07
0
No subject
...drag in the source and header files from the libcelt directory into =
the project and define HAVE_CONFIG_H is the project's pre-processor definit=
ion.
The tricky part is to build a config.h file. To get it to work on VS some =
of the important settings include.
=20
#define CELT_BUILD
#define USE_ALLOCA
#undef VAR_ARRAYS
#undef restrict
#undef HAVE_STDINT_H
#undef inline
#define inline __inline
#define restrict
#undef HAVE_LRINT
#undef HAVE_LRINTF
I have also tested the windows version compiled as fixed point, again witho=
ut any problems.
I can supply a config.h and project file on request....
2006 Oct 04
2
Crash in cb_search.c, line 414
Ok, I got a strange case..
I got a bugreport from a user about my application crashing on him.
After a bit of trouble, I got him to report back the module and offset
it crashed at (win32). I always retain a copy of my symbol files for my
release builds, so tracking down the crash address leads to:
(gdb) list *0x6d5c2213
0x6d5c2213 is in split_cb_search_shape_sign (cb_search.c:414).
409
2007 Dec 12
2
Speex crashing on ARM with assembler optimization enabled.
...--enable-arm5e-asm" options. If I use just "--enable-fixed-point", then
it runs fine, but once I add "--enable-arm5e-asm" it start crashing
(I use testenc to test it).
Further investigation showed, that it does not crash, if I enable arm asm
but disable both VAR_ARRAYS and USE_ALLOCA in config.h.
This tested with speex svn rev13928 and with 1.2beta3 (svn rev14298).
gcc version is 4.2.0
I guess it may be some alignment problem or so, like with MS compilers?
Did anyone had same problems? Any good ideas and directions where to
look and debug are welcome.
--
Regards,
Alexander...
2005 May 24
2
Speex on TI C6x, Problem with TI C5x Patch
Skipped content of type multipart/alternative-------------- next part --------------
A non-text attachment was scrubbed...
Name: maleout12may.wav
Type: audio/wav
Size: 95884 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20050524/57112d0c/maleout12may-0001.bin
2013 May 27
2
Stack Overflow
Guys,
Program stack is getting overflowed when I create and destroy encoder instance continuously for around 30 times. How can I ensure stack is completely freed when I destroy the encoder instance? I tried with VAR_ARRAYS. But Its giving me errors while I try to compile. I suppose VAR_ARRAYS allocates local variables as arrays so that they could go on to stack and finally when we leave the