vpx_mem: make vpx_memset16 inline

Change-Id: Ibb2cab930c95836e6d6e66300c33e7d08e4474d4
This commit is contained in:
James Zern 2017-09-08 18:57:08 -07:00
parent 5c95fd921e
commit 9dfa76f948
2 changed files with 8 additions and 10 deletions

View File

@ -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

View File

@ -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>