Commit 9dfa76f9 authored by James Zern's avatar James Zern

vpx_mem: make vpx_memset16 inline

Change-Id: Ibb2cab930c95836e6d6e66300c33e7d08e4474d4
parent 5c95fd92
......@@ -82,12 +82,3 @@ void vpx_free(void *memblk) {
free(addr);
}
}
#if CONFIG_VP9_HIGHBITDEPTH
void *vpx_memset16(void *dest, int val, size_t length) {
size_t i;
uint16_t *dest16 = (uint16_t *)dest;
for (i = 0; i < length; i++) *dest16++ = val;
return dest;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
......@@ -19,6 +19,8 @@
#include <stdlib.h>
#include <stddef.h>
#include "vpx/vpx_integer.h"
#if defined(__cplusplus)
extern "C" {
#endif
......@@ -29,7 +31,12 @@ void *vpx_calloc(size_t num, size_t size);
void vpx_free(void *memblk);
#if CONFIG_VP9_HIGHBITDEPTH
void *vpx_memset16(void *dest, int val, size_t length);
static INLINE void *vpx_memset16(void *dest, int val, size_t length) {
size_t i;
uint16_t *dest16 = (uint16_t *)dest;
for (i = 0; i < length; i++) *dest16++ = val;
return dest;
}
#endif
#include <string.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment