diff options
| author | Nils Wallménius <nils@rockbox.org> | 2013-12-11 22:59:14 +0100 |
|---|---|---|
| committer | Nils Wallménius <nils@rockbox.org> | 2013-12-16 21:13:23 +0100 |
| commit | e3c2ed7a71f65dc721c7210f120259ecd4ff65cb (patch) | |
| tree | de593c1e927dcc036f1b6656f1f881995491b3b9 /lib/rbcodec/codecs/libopus/celt/stack_alloc.h | |
| parent | d0918b98fa0cfba21208a4fb5ed153687b8f02c3 (diff) | |
| download | rockbox-e3c2ed7a71f65dc721c7210f120259ecd4ff65cb.zip rockbox-e3c2ed7a71f65dc721c7210f120259ecd4ff65cb.tar.gz rockbox-e3c2ed7a71f65dc721c7210f120259ecd4ff65cb.tar.bz2 rockbox-e3c2ed7a71f65dc721c7210f120259ecd4ff65cb.tar.xz | |
Sync libopus to upstream release 1.1
Change-Id: I9fea7460fc33f60faff961b3389dd97b5191463c
Diffstat (limited to 'lib/rbcodec/codecs/libopus/celt/stack_alloc.h')
| -rw-r--r-- | lib/rbcodec/codecs/libopus/celt/stack_alloc.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/rbcodec/codecs/libopus/celt/stack_alloc.h b/lib/rbcodec/codecs/libopus/celt/stack_alloc.h index 1c093a8..316a6ce 100644 --- a/lib/rbcodec/codecs/libopus/celt/stack_alloc.h +++ b/lib/rbcodec/codecs/libopus/celt/stack_alloc.h @@ -32,6 +32,9 @@ #ifndef STACK_ALLOC_H #define STACK_ALLOC_H +#include "opus_types.h" +#include "opus_defines.h" + #if (!defined (VAR_ARRAYS) && !defined (USE_ALLOCA) && !defined (NONTHREADSAFE_PSEUDOSTACK)) #error "Opus requires one of VAR_ARRAYS, USE_ALLOCA, or NONTHREADSAFE_PSEUDOSTACK be defined to select the temporary allocation mode." #endif @@ -92,6 +95,8 @@ #define SAVE_STACK #define RESTORE_STACK #define ALLOC_STACK +/* C99 does not allow VLAs of size zero */ +#define ALLOC_NONE 1 #elif defined(USE_ALLOCA) @@ -106,6 +111,7 @@ #define SAVE_STACK #define RESTORE_STACK #define ALLOC_STACK +#define ALLOC_NONE 0 #else @@ -143,6 +149,7 @@ extern char *global_stack_top; #define VARDECL(type, var) type *var #define ALLOC(var, size, type) var = PUSH(global_stack, size, type) #define SAVE_STACK char *_saved_stack = global_stack; +#define ALLOC_NONE 0 #endif /* VAR_ARRAYS */ @@ -159,7 +166,7 @@ extern char *global_stack_top; #else -static inline int _opus_false(void) {return 0;} +static OPUS_INLINE int _opus_false(void) {return 0;} #define OPUS_CHECK_ARRAY(ptr, len) _opus_false() #define OPUS_CHECK_VALUE(value) _opus_false() #define OPUS_PRINT_INT(value) do{}while(0) |