Fix copy/zero macros.
Change-Id: I2df3b6ecd35406ee05c2aa4e49be779e73e1bdc6
This commit is contained in:
Родитель
429d304bc1
Коммит
a301f5e03d
|
@ -33,12 +33,12 @@ extern "C" {
|
|||
|
||||
// Use this for variably-sized arrays.
|
||||
#define vp10_copy_array(dest, src, n) { \
|
||||
assert(sizeof(*dest) == sizeof(*src)); \
|
||||
memcpy(dest, src, n * sizeof(*src)); \
|
||||
assert(sizeof(*(dest)) == sizeof(*(src))); \
|
||||
memcpy(dest, src, n * sizeof(*(src))); \
|
||||
}
|
||||
|
||||
#define vp10_zero(dest) memset(&(dest), 0, sizeof(dest))
|
||||
#define vp10_zero_array(dest, n) memset(dest, 0, n * sizeof(*dest))
|
||||
#define vp10_zero_array(dest, n) memset(dest, 0, n * sizeof(*(dest)))
|
||||
|
||||
static INLINE int get_unsigned_bits(unsigned int num_values) {
|
||||
return num_values > 0 ? get_msb(num_values) + 1 : 0;
|
||||
|
|
|
@ -32,13 +32,13 @@ extern "C" {
|
|||
/* Use this for variably-sized arrays. */
|
||||
|
||||
#define vp8_copy_array( Dest, Src, N) { \
|
||||
assert( sizeof( *Dest) == sizeof( *Src)); \
|
||||
memcpy( Dest, Src, N * sizeof( *Src)); \
|
||||
assert( sizeof( *(Dest)) == sizeof( *(Src))); \
|
||||
memcpy( Dest, Src, N * sizeof( *(Src))); \
|
||||
}
|
||||
|
||||
#define vp8_zero( Dest) memset( &Dest, 0, sizeof( Dest));
|
||||
#define vp8_zero( Dest) memset( &(Dest), 0, sizeof( Dest));
|
||||
|
||||
#define vp8_zero_array( Dest, N) memset( Dest, 0, N * sizeof( *Dest));
|
||||
#define vp8_zero_array( Dest, N) memset( Dest, 0, N * sizeof( *(Dest)));
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -33,12 +33,12 @@ extern "C" {
|
|||
|
||||
// Use this for variably-sized arrays.
|
||||
#define vp9_copy_array(dest, src, n) { \
|
||||
assert(sizeof(*dest) == sizeof(*src)); \
|
||||
memcpy(dest, src, n * sizeof(*src)); \
|
||||
assert(sizeof(*(dest)) == sizeof(*(src))); \
|
||||
memcpy(dest, src, n * sizeof(*(src))); \
|
||||
}
|
||||
|
||||
#define vp9_zero(dest) memset(&(dest), 0, sizeof(dest))
|
||||
#define vp9_zero_array(dest, n) memset(dest, 0, n * sizeof(*dest))
|
||||
#define vp9_zero_array(dest, n) memset(dest, 0, n * sizeof(*(dest)))
|
||||
|
||||
static INLINE int get_unsigned_bits(unsigned int num_values) {
|
||||
return num_values > 0 ? get_msb(num_values) + 1 : 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче