vpx_mem: make vpx_memset16 inline
Change-Id: Ibb2cab930c95836e6d6e66300c33e7d08e4474d4
This commit is contained in:
parent
5c95fd921e
commit
9dfa76f948
@ -82,12 +82,3 @@ void vpx_free(void *memblk) {
|
|||||||
free(addr);
|
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 <stdlib.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#include "vpx/vpx_integer.h"
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
#if defined(__cplusplus)
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
@ -29,7 +31,12 @@ void *vpx_calloc(size_t num, size_t size);
|
|||||||
void vpx_free(void *memblk);
|
void vpx_free(void *memblk);
|
||||||
|
|
||||||
#if CONFIG_VP9_HIGHBITDEPTH
|
#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
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user