search for: alloc_stack

Displaying 20 results from an estimated 21 matches for "alloc_stack".

2011 Mar 25
1
Another Error For TI C55x C Compiler
...e of the issue. The errors: "celt.c", line 957: error: declaration may not appear after executable statement in block as well as "celt.c", line 2303: error: declaration may not appear after executable statement in block Both of these instances are pointing to the code: "ALLOC_STACK; SAVE_STACK;" this has to do with the not using VAR_ARRAYS nor USE_ALLOCA, in this scenario the #define's for ALLOC_STACK and SAVE_STACK are: #define ALLOC_STACK (global_stack = (global_stack==0) ? celt_alloc_scratch(GLOBAL_STACK_SIZE) : global_stack) #define SAVE_STACK char *_saved_stac...
2010 Jun 07
1
GLOBAL_STACK_SIZE
I am having trouble understanding the stack allocation scheme when using a C55xx device. From what I can tell, the GLOBAL_STACK_SIZE is set in arch.h to 100,000 bytes (when using FIXED_POINT), which is then used in the ALLOC_STACK macro found in stack_alloc.h. This macro seems to say, if global_stack==0, then call celt_alloc_scratch, found in os_support.h, which in turn attempts to allocate (using calloc) 100,000 bytes for the global stack. However, the *celt_alloc_scratch expects an "int", which in C55x lingo is 1...
2011 May 09
1
V11.1 Problem
...==== ==================== #ifdef FIXED_POINT #ifndef DISABLE_FLOAT_API CELT_STATIC int celt_encode_with_ec_float(CELTEncoder * restrict st, const float * pcm, int frame_size, unsigned char *compressed, int nbCompressedBytes, ec_enc *enc) { int j, ret, C, N; VARDECL(celt_int16, in); ALLOC_STACK; SAVE_STACK;<<<<<<<<<<<<<<<ERROR Here "declaration may not appear after executable statement in block" ============================================================================ ==================== .and =========================...
2017 Oct 18
4
Global stack on Cortex-M4
...E  \          -D'opus_alloc(x)=NULL' -D'opus_free(x)=NULL' Secondly; With the "overide" directives above no dynamic memory allocation is supposed to happen. However, the following call chain (obviously)  cause a crash: opus_encode(..)-> opus_encode_native(..)->ALLOC_STACK->opus_alloc_scratch(..)->opus_alloc(..) Is this a bug or what am I missing here ? Any advise on how to get a basic encode/decode example working would be most appriciated. Thanks ! \Eric
2017 Oct 18
0
Global stack on Cortex-M4
On 10/18/2017 01:40 PM, Eric wrote: > Secondly; With the "overide" directives above no dynamic memory > allocation is supposed to happen. However, the following call chain > (obviously)  cause a crash: > > opus_encode(..)-> > opus_encode_native(..)->ALLOC_STACK->opus_alloc_scratch(..)->opus_alloc(..) NONTHREADSAFE_PSEUDOSTACK requires a working allocator. You should select either vararrays or alloca(). Both should work on any gcc-based Cortex-M toolchain. (For that matter, malloc() and free() should work fine too, unless you have other reasons to a...
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 =
2015 Feb 04
0
[RFC PATCH v2] armv7(float): Optimize encode usecase using NE10 library
...eband5ms[] = { /*0 200 400 600 800 1k 1.2 1.4 1.6 2k 2.4 2.8 3.2 4k 4.8 5.6 6.8 8k 9.6 12k 15.6 */ @@ -229,6 +230,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) opus_val16 *window; opus_int16 *logN; int LM; + int arch = opus_select_arch(); ALLOC_STACK; #if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA) if (global_stack==NULL) @@ -389,7 +391,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) compute_pulse_cache(mode, mode->maxLM); if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize...
2015 Mar 03
0
[RFC PATCHv3] armv7(float): Optimize encode usecase using NE10 library
...eband5ms[] = { /*0 200 400 600 800 1k 1.2 1.4 1.6 2k 2.4 2.8 3.2 4k 4.8 5.6 6.8 8k 9.6 12k 15.6 */ @@ -229,6 +230,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) opus_val16 *window; opus_int16 *logN; int LM; + int arch = opus_select_arch(); ALLOC_STACK; #if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA) if (global_stack==NULL) @@ -389,7 +391,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) compute_pulse_cache(mode, mode->maxLM); if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize...
2015 May 08
0
[[RFC PATCH v2]: Ne10 fft fixed and previous 1/8] armv7(float): Optimize encode usecase using NE10 library
...eband5ms[] = { /*0 200 400 600 800 1k 1.2 1.4 1.6 2k 2.4 2.8 3.2 4k 4.8 5.6 6.8 8k 9.6 12k 15.6 */ @@ -229,6 +230,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) opus_val16 *window; opus_int16 *logN; int LM; + int arch = opus_select_arch(); ALLOC_STACK; #if !defined(VAR_ARRAYS) && !defined(USE_ALLOCA) if (global_stack==NULL) @@ -389,7 +391,7 @@ CELTMode *opus_custom_mode_create(opus_int32 Fs, int frame_size, int *error) compute_pulse_cache(mode, mode->maxLM); if (clt_mdct_init(&mode->mdct, 2*mode->shortMdctSize...
2015 Mar 03
1
[RFC PATCH v4] Enable optimize using libNe10
Changes from RFC PATCH v3 - Just rebased on tip - For all else, please see notes from RFC PATCH v3 at http://lists.xiph.org/pipermail/opus/2015-March/002902.html - latest wip opus tree/branch https://git.linaro.org/people/viswanath.puttagunta/Ne10.git branch: rfcv4_final_fft_ne10 Viswanath Puttagunta (1): armv7(float): Optimize encode usecase using NE10 library Makefile.am
2015 Feb 04
4
[RFC PATCH v2] Encode optimize using libNe10
Changes from RFC PATCH v1: - passing arch parameter explicitly - reduced stack usage by ~3.5K by using scaled NE10 fft version - moved all optimization array functions to arm_celt_map.c - Other cleanups pointed out by Timothy Phil, As you mentioned earlier, could you please address all compile and linker errors/warnings coming out of Ne10 library? You can find my working Ne10 repo at [1] You
2015 Mar 03
2
[RFC PATCHv3] Encode optimize using libNe10
Changes from RFC PATCH v2 - fixed compile issue when just compiling for --enable-intrinsics for ARMv7 without NE10 - Notes for NE10: - All compile/link warnings are now in upstream NE10 - Only patch pending upstream in NE10 is the one that needs to add -funsafe-math-optimizations for ARMv7 targets. - Phil Wang @ ARM is working on getting this fixed. - Note that even without
2016 Jul 01
1
silk_warped_autocorrelation_FIX() NEON optimization
Hi all, I'm sending patch "Optimize silk_warped_autocorrelation_FIX() for ARM NEON" in an separate email. It is based on Tim’s aarch64v8 branch https://git.xiph.org/?p=users/tterribe/opus.git;a=shortlog;h=refs/heads/aarch64v8 Thanks for your comments. Linfeng
2016 Jul 14
0
[PATCH 2/5] Optimize fixed-point celt_fir_c() for ARM NEON
...stdio.h> +#include "stack_alloc.h" + +#define SKIP_CONFIG_H + +#ifndef CUSTOM_MODES +#define CUSTOM_MODES +#endif + +#ifdef FIXED_POINT + +# include "celt/tests/test_unit_optimization_lpc.c" + +#endif + +int main(void) +{ + int result = 0; /* 0: passed; other: failed */ + ALLOC_STACK; +#ifdef FIXED_POINT + int arch = opus_select_arch(); +#endif /* FIXED_POINT */ + int count = 10; + + while (!result && count--) { + printf("\n--------------------------- Testing optimization ---------------------------\n"); +#ifdef FIXED_POINT + result |= test_fir...
2016 Jun 17
5
ARM NEON optimization -- celt_fir()
Hi all, This is Linfeng Zhang from Google. I'll work on ARM NEON optimization in the next few months. I'm submitting 2 patches in the following couple of emails, which have the new created celt_fir_neon(). I revised celt_fir_c() to not pass in argument "mem" in Patch 1. If there are concerns to this change, please let me know. Many thanks to your comments. Linfeng Zhang
2015 Mar 18
5
[RFC PATCH v1 0/4] Enable aarch64 intrinsics/Ne10
Hi All, Since I continue to base my work on top of Jonathan's patch, and my previous Ne10 fft/ifft/mdct_forward/backward patches, I thought it would be better to just post all new patches as a patch series. Please let me know if anyone disagrees with this approach. You can see wip branch of all latest patches at https://git.linaro.org/people/viswanath.puttagunta/opus.git Branch:
2015 Mar 31
6
[RFC PATCH v1 0/5] aarch64: celt_pitch_xcorr: Fixed point series
Hi Timothy, As I mentioned earlier [1], I now fixed compile issues with fixed point and resubmitting the patch. I also have new patch that does intrinsics optimizations for celt_pitch_xcorr targetting aarch64. You can find my latest work-in-progress branch at [2] For reference, you can use the Ne10 pre-built libraries at [3] Note that I am working with Phil at ARM to get my patch at [4]
2016 Jul 14
6
Several patches of ARM NEON optimization
I rebased my previous 3 patches to the current master with minor changes. Patches 1 to 3 replace all my previous submitted patches. Patches 4 and 5 are new. Thanks, Linfeng Zhang
2015 May 08
8
[RFC PATCH v2]: Ne10 fft fixed and previous 0/8]
Hi All, As per Timothy's suggestion, disabling mdct_forward for fixed point. Only effects armv7,armv8: Extend fixed fft NE10 optimizations to mdct Rest of patches are same as in [1] For reference, latest wip code for opus is at [2] Still working with NE10 team at ARM to get corner cases of mdct_forward. Will update with another patch when issue in NE10 gets fixed. Regards, Vish [1]:
2015 May 15
11
[RFC V3 0/8] Ne10 fft fixed and previous
Hi All, Changes from RFC v2 [1] armv7,armv8: Extend fixed fft NE10 optimizations to mdct - Overflow issue fixed by Phil at ARM. Ne10 wip at [2]. Should be upstream soon. - So, re-enabled using fixed fft for mdct_forward which was disabled in RFCv2 armv7,armv8: Optimize fixed point fft using NE10 library - Thanks to Jonathan Lennox, fixed some build fixes on iOS and some copy-paste errors Rest