| OLD | NEW |
| 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 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 extern "C" { | 22 extern "C" { |
| 23 #endif | 23 #endif |
| 24 | 24 |
| 25 #define MIN(x, y) (((x) < (y)) ? (x) : (y)) | 25 #define MIN(x, y) (((x) < (y)) ? (x) : (y)) |
| 26 #define MAX(x, y) (((x) > (y)) ? (x) : (y)) | 26 #define MAX(x, y) (((x) > (y)) ? (x) : (y)) |
| 27 | 27 |
| 28 /* Only need this for fixed-size arrays, for structs just assign. */ | 28 /* Only need this for fixed-size arrays, for structs just assign. */ |
| 29 | 29 |
| 30 #define vp8_copy( Dest, Src) { \ | 30 #define vp8_copy( Dest, Src) { \ |
| 31 assert( sizeof( Dest) == sizeof( Src)); \ | 31 assert( sizeof( Dest) == sizeof( Src)); \ |
| 32 vpx_memcpy( Dest, Src, sizeof( Src)); \ | 32 memcpy( Dest, Src, sizeof( Src)); \ |
| 33 } | 33 } |
| 34 | 34 |
| 35 /* Use this for variably-sized arrays. */ | 35 /* Use this for variably-sized arrays. */ |
| 36 | 36 |
| 37 #define vp8_copy_array( Dest, Src, N) { \ | 37 #define vp8_copy_array( Dest, Src, N) { \ |
| 38 assert( sizeof( *Dest) == sizeof( *Src)); \ | 38 assert( sizeof( *Dest) == sizeof( *Src)); \ |
| 39 vpx_memcpy( Dest, Src, N * sizeof( *Src)); \ | 39 memcpy( Dest, Src, N * sizeof( *Src)); \ |
| 40 } | 40 } |
| 41 | 41 |
| 42 #define vp8_zero( Dest) vpx_memset( &Dest, 0, sizeof( Dest)); | 42 #define vp8_zero( Dest) memset( &Dest, 0, sizeof( Dest)); |
| 43 | 43 |
| 44 #define vp8_zero_array( Dest, N) vpx_memset( Dest, 0, N * sizeof( *Dest)); | 44 #define vp8_zero_array( Dest, N) memset( Dest, 0, N * sizeof( *Dest)); |
| 45 | 45 |
| 46 | 46 |
| 47 #ifdef __cplusplus | 47 #ifdef __cplusplus |
| 48 } // extern "C" | 48 } // extern "C" |
| 49 #endif | 49 #endif |
| 50 | 50 |
| 51 #endif // VP8_COMMON_COMMON_H_ | 51 #endif // VP8_COMMON_COMMON_H_ |
| OLD | NEW |