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

Side by Side Diff: celt/os_support.h

Issue 882843002: Update to opus-HEAD-66611f1. (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/opus.git@master
Patch Set: Add the contents of Makefile.mips back. Created 5 years, 10 months 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 unified diff | Download patch
« no previous file with comments | « celt/modes.h ('k') | celt/pitch.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (C) 2007 Jean-Marc Valin 1 /* Copyright (C) 2007 Jean-Marc Valin
2 2
3 File: os_support.h 3 File: os_support.h
4 This is the (tiny) OS abstraction layer. Aside from math.h, this is the 4 This is the (tiny) OS abstraction layer. Aside from math.h, this is the
5 only place where system headers are allowed. 5 only place where system headers are allowed.
6 6
7 Redistribution and use in source and binary forms, with or without 7 Redistribution and use in source and binary forms, with or without
8 modification, are permitted provided that the following conditions are 8 modification, are permitted provided that the following conditions are
9 met: 9 met:
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #endif 60 #endif
61 61
62 /** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */ 62 /** Opus wrapper for free(). To do your own dynamic allocation, all you need to do is replace this function and opus_alloc */
63 #ifndef OVERRIDE_OPUS_FREE 63 #ifndef OVERRIDE_OPUS_FREE
64 static OPUS_INLINE void opus_free (void *ptr) 64 static OPUS_INLINE void opus_free (void *ptr)
65 { 65 {
66 free(ptr); 66 free(ptr);
67 } 67 }
68 #endif 68 #endif
69 69
70 /** Copy n bytes of memory from src to dst. The 0* term provides compile-time ty pe checking */ 70 /** Copy n elements from src to dst. The 0* term provides compile-time type chec king */
71 #ifndef OVERRIDE_OPUS_COPY 71 #ifndef OVERRIDE_OPUS_COPY
72 #define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((ds t)-(src)) )) 72 #define OPUS_COPY(dst, src, n) (memcpy((dst), (src), (n)*sizeof(*(dst)) + 0*((ds t)-(src)) ))
73 #endif 73 #endif
74 74
75 /** Copy n bytes of memory from src to dst, allowing overlapping regions. The 0* term 75 /** Copy n elements from src to dst, allowing overlapping regions. The 0* term
76 provides compile-time type checking */ 76 provides compile-time type checking */
77 #ifndef OVERRIDE_OPUS_MOVE 77 #ifndef OVERRIDE_OPUS_MOVE
78 #define OPUS_MOVE(dst, src, n) (memmove((dst), (src), (n)*sizeof(*(dst)) + 0*((d st)-(src)) )) 78 #define OPUS_MOVE(dst, src, n) (memmove((dst), (src), (n)*sizeof(*(dst)) + 0*((d st)-(src)) ))
79 #endif 79 #endif
80 80
81 /** Set n elements of dst to zero, starting at address s */ 81 /** Set n elements of dst to zero */
82 #ifndef OVERRIDE_OPUS_CLEAR 82 #ifndef OVERRIDE_OPUS_CLEAR
83 #define OPUS_CLEAR(dst, n) (memset((dst), 0, (n)*sizeof(*(dst)))) 83 #define OPUS_CLEAR(dst, n) (memset((dst), 0, (n)*sizeof(*(dst))))
84 #endif 84 #endif
85 85
86 /*#ifdef __GNUC__ 86 /*#ifdef __GNUC__
87 #pragma GCC poison printf sprintf 87 #pragma GCC poison printf sprintf
88 #pragma GCC poison malloc free realloc calloc 88 #pragma GCC poison malloc free realloc calloc
89 #endif*/ 89 #endif*/
90 90
91 #endif /* OS_SUPPORT_H */ 91 #endif /* OS_SUPPORT_H */
92 92
OLDNEW
« no previous file with comments | « celt/modes.h ('k') | celt/pitch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698