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

Side by Side Diff: source/libvpx/vp8/common/common.h

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 3 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 | « source/libvpx/tools_common.c ('k') | source/libvpx/vp8/common/findnearmv.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 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 11
12 #ifndef VP8_COMMON_COMMON_H_ 12 #ifndef VP8_COMMON_COMMON_H_
13 #define VP8_COMMON_COMMON_H_ 13 #define VP8_COMMON_COMMON_H_
14 14
15 #include <assert.h> 15 #include <assert.h>
16 16
17 /* Interface header for common constant data structures and lookup tables */ 17 /* Interface header for common constant data structures and lookup tables */
18 18
19 #include "vpx_mem/vpx_mem.h" 19 #include "vpx_mem/vpx_mem.h"
20 20
21 #ifdef __cplusplus 21 #ifdef __cplusplus
22 extern "C" { 22 extern "C" {
23 #endif 23 #endif
24 24
25 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
26 #define MAX(x, y) (((x) > (y)) ? (x) : (y))
27
28 /* Only need this for fixed-size arrays, for structs just assign. */ 25 /* Only need this for fixed-size arrays, for structs just assign. */
29 26
30 #define vp8_copy( Dest, Src) { \ 27 #define vp8_copy( Dest, Src) { \
31 assert( sizeof( Dest) == sizeof( Src)); \ 28 assert( sizeof( Dest) == sizeof( Src)); \
32 memcpy( Dest, Src, sizeof( Src)); \ 29 memcpy( Dest, Src, sizeof( Src)); \
33 } 30 }
34 31
35 /* Use this for variably-sized arrays. */ 32 /* Use this for variably-sized arrays. */
36 33
37 #define vp8_copy_array( Dest, Src, N) { \ 34 #define vp8_copy_array( Dest, Src, N) { \
38 assert( sizeof( *Dest) == sizeof( *Src)); \ 35 assert( sizeof( *Dest) == sizeof( *Src)); \
39 memcpy( Dest, Src, N * sizeof( *Src)); \ 36 memcpy( Dest, Src, N * sizeof( *Src)); \
40 } 37 }
41 38
42 #define vp8_zero( Dest) memset( &Dest, 0, sizeof( Dest)); 39 #define vp8_zero( Dest) memset( &Dest, 0, sizeof( Dest));
43 40
44 #define vp8_zero_array( Dest, N) memset( Dest, 0, N * sizeof( *Dest)); 41 #define vp8_zero_array( Dest, N) memset( Dest, 0, N * sizeof( *Dest));
45 42
46 43
47 #ifdef __cplusplus 44 #ifdef __cplusplus
48 } // extern "C" 45 } // extern "C"
49 #endif 46 #endif
50 47
51 #endif // VP8_COMMON_COMMON_H_ 48 #endif // VP8_COMMON_COMMON_H_
OLDNEW
« no previous file with comments | « source/libvpx/tools_common.c ('k') | source/libvpx/vp8/common/findnearmv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698