media/libvpx/vp8/common/common.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/media/libvpx/vp8/common/common.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +/*
     1.5 + *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
     1.6 + *
     1.7 + *  Use of this source code is governed by a BSD-style license
     1.8 + *  that can be found in the LICENSE file in the root of the source
     1.9 + *  tree. An additional intellectual property rights grant can be found
    1.10 + *  in the file PATENTS.  All contributing project authors may
    1.11 + *  be found in the AUTHORS file in the root of the source tree.
    1.12 + */
    1.13 +
    1.14 +
    1.15 +#ifndef common_h
    1.16 +#define common_h 1
    1.17 +
    1.18 +#include <assert.h>
    1.19 +
    1.20 +/* Interface header for common constant data structures and lookup tables */
    1.21 +
    1.22 +#include "vpx_mem/vpx_mem.h"
    1.23 +
    1.24 +/* Only need this for fixed-size arrays, for structs just assign. */
    1.25 +
    1.26 +#define vp8_copy( Dest, Src) { \
    1.27 +        assert( sizeof( Dest) == sizeof( Src)); \
    1.28 +        vpx_memcpy( Dest, Src, sizeof( Src)); \
    1.29 +    }
    1.30 +
    1.31 +/* Use this for variably-sized arrays. */
    1.32 +
    1.33 +#define vp8_copy_array( Dest, Src, N) { \
    1.34 +        assert( sizeof( *Dest) == sizeof( *Src)); \
    1.35 +        vpx_memcpy( Dest, Src, N * sizeof( *Src)); \
    1.36 +    }
    1.37 +
    1.38 +#define vp8_zero( Dest)  vpx_memset( &Dest, 0, sizeof( Dest));
    1.39 +
    1.40 +#define vp8_zero_array( Dest, N)  vpx_memset( Dest, 0, N * sizeof( *Dest));
    1.41 +
    1.42 +
    1.43 +#endif  /* common_h */

mercurial