2
0

vpx_mem.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
  3. *
  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.
  9. */
  10. #ifndef VPX_VPX_MEM_VPX_MEM_H_
  11. #define VPX_VPX_MEM_VPX_MEM_H_
  12. #include "vpx_config.h"
  13. #if defined(__uClinux__)
  14. #include <lddk.h>
  15. #endif
  16. #include <stdlib.h>
  17. #include <stddef.h>
  18. #include "vpx/vpx_integer.h"
  19. #if defined(__cplusplus)
  20. extern "C" {
  21. #endif
  22. void *vpx_memalign(size_t align, size_t size);
  23. void *vpx_malloc(size_t size);
  24. void *vpx_calloc(size_t num, size_t size);
  25. void vpx_free(void *memblk);
  26. #if CONFIG_VP9_HIGHBITDEPTH
  27. static INLINE void *vpx_memset16(void *dest, int val, size_t length) {
  28. size_t i;
  29. uint16_t *dest16 = (uint16_t *)dest;
  30. for (i = 0; i < length; i++) *dest16++ = val;
  31. return dest;
  32. }
  33. #endif
  34. #include <string.h>
  35. #ifdef VPX_MEM_PLTFRM
  36. #include VPX_MEM_PLTFRM
  37. #endif
  38. #if defined(__cplusplus)
  39. }
  40. #endif
  41. #endif // VPX_VPX_MEM_VPX_MEM_H_