2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
11 #ifndef VPX_MEM_VPX_MEM_H_
12 #define VPX_MEM_VPX_MEM_H_
14 #include "vpx_config.h"
15 #if defined(__uClinux__)
22 #include "vpx/vpx_integer.h"
24 #if defined(__cplusplus)
28 void *vpx_memalign(size_t align, size_t size);
29 void *vpx_malloc(size_t size);
30 void *vpx_calloc(size_t num, size_t size);
31 void vpx_free(void *memblk);
33 #if CONFIG_VP9_HIGHBITDEPTH
34 static INLINE void *vpx_memset16(void *dest, int val, size_t length) {
36 uint16_t *dest16 = (uint16_t *)dest;
37 for (i = 0; i < length; i++) *dest16++ = val;
45 #include VPX_MEM_PLTFRM
48 #if defined(__cplusplus)
52 #endif // VPX_MEM_VPX_MEM_H_