Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: celt/stack_alloc.h

Issue 107243004: Updating Opus to release 1.1 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/opus
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « celt/rate.c ('k') | celt/x86/pitch_sse.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: celt/stack_alloc.h
diff --git a/celt/stack_alloc.h b/celt/stack_alloc.h
index 1c093a8cdce619487ddecc20bf33936012e371a7..316a6ce12c08d019343cd04f96ebe59b988e7da6 100644
--- a/celt/stack_alloc.h
+++ b/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)
« no previous file with comments | « celt/rate.c ('k') | celt/x86/pitch_sse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698