summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJohann <johannkoenig@google.com>2015-05-13 19:47:23 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-05-13 19:47:24 +0000
commitcafae5b544fe19831e6e710056fb9eaa73e8b46b (patch)
tree01fb3416b5e2a8c0a30f5736d4743ac5bdc71393 /vp9
parent3007db0b456779cf0ab926f875c1723e77aeba20 (diff)
parent1d7ccd5325ec34244074419f6802640c8afafd31 (diff)
downloadlibvpx-cafae5b544fe19831e6e710056fb9eaa73e8b46b.tar
libvpx-cafae5b544fe19831e6e710056fb9eaa73e8b46b.tar.gz
libvpx-cafae5b544fe19831e6e710056fb9eaa73e8b46b.tar.bz2
libvpx-cafae5b544fe19831e6e710056fb9eaa73e8b46b.zip
Merge "Relocate memory operations for common code"
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/arm/neon/vp9_idct16x16_1_add_neon.c2
-rw-r--r--vp9/common/arm/neon/vp9_idct32x32_1_add_neon.c4
-rw-r--r--vp9/common/arm/neon/vp9_idct4x4_1_add_neon.c2
-rw-r--r--vp9/common/arm/neon/vp9_idct8x8_1_add_neon.c2
-rw-r--r--vp9/common/mips/dspr2/vp9_itrans16_dspr2.c1
-rw-r--r--vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c1
-rw-r--r--vp9/common/mips/dspr2/vp9_itrans4_dspr2.c1
-rw-r--r--vp9/common/mips/dspr2/vp9_itrans8_dspr2.c1
-rw-r--r--vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.h1
-rw-r--r--vp9/common/vp9_common.h9
-rw-r--r--vp9/common/vp9_idct.c1
-rw-r--r--vp9/common/vp9_idct.h1
-rw-r--r--vp9/common/vp9_loopfilter.c1
-rw-r--r--vp9/common/vp9_loopfilter_filters.c1
-rw-r--r--vp9/common/vp9_postproc.c4
-rw-r--r--vp9/common/vp9_reconintra.c1
-rw-r--r--vp9/common/x86/vp9_high_loopfilter_intrin_sse2.c1
-rw-r--r--vp9/common/x86/vp9_idct_intrin_sse2.c1
-rw-r--r--vp9/decoder/vp9_decodeframe.c1
-rw-r--r--vp9/encoder/vp9_aq_variance.c2
-rw-r--r--vp9/encoder/vp9_dct.c1
-rw-r--r--vp9/encoder/vp9_encodeframe.c1
-rw-r--r--vp9/encoder/vp9_encodemb.c1
-rw-r--r--vp9/encoder/vp9_encoder.c1
-rw-r--r--vp9/encoder/vp9_extend.c1
-rw-r--r--vp9/encoder/vp9_firstpass.c1
-rw-r--r--vp9/encoder/vp9_mcomp.c1
-rw-r--r--vp9/encoder/vp9_picklpf.c1
-rw-r--r--vp9/encoder/vp9_pickmode.c1
-rw-r--r--vp9/encoder/vp9_quantize.c1
-rw-r--r--vp9/encoder/vp9_ratectrl.c1
-rw-r--r--vp9/encoder/vp9_rd.c1
-rw-r--r--vp9/encoder/vp9_rdopt.c1
-rw-r--r--vp9/encoder/vp9_resize.c1
-rw-r--r--vp9/encoder/vp9_ssim.c1
-rw-r--r--vp9/encoder/vp9_temporal_filter.c1
-rw-r--r--vp9/encoder/x86/vp9_highbd_quantize_intrin_sse2.c1
-rw-r--r--vp9/vp9_iface_common.h2
38 files changed, 44 insertions, 13 deletions
diff --git a/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.c b/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.c
index 3c8c6a934..0233877dd 100644
--- a/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.c
+++ b/vp9/common/arm/neon/vp9_idct16x16_1_add_neon.c
@@ -9,6 +9,8 @@
*/
#include <arm_neon.h>
+
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_idct.h"
void vp9_idct16x16_1_add_neon(
diff --git a/vp9/common/arm/neon/vp9_idct32x32_1_add_neon.c b/vp9/common/arm/neon/vp9_idct32x32_1_add_neon.c
index d0e4b4f40..0ce45f2bf 100644
--- a/vp9/common/arm/neon/vp9_idct32x32_1_add_neon.c
+++ b/vp9/common/arm/neon/vp9_idct32x32_1_add_neon.c
@@ -9,10 +9,12 @@
*/
#include <arm_neon.h>
-#include "vp9/common/vp9_idct.h"
#include "./vpx_config.h"
+#include "vpx_ports/mem.h"
+#include "vp9/common/vp9_idct.h"
+
static INLINE void LD_16x8(
uint8_t *d,
int d_stride,
diff --git a/vp9/common/arm/neon/vp9_idct4x4_1_add_neon.c b/vp9/common/arm/neon/vp9_idct4x4_1_add_neon.c
index 7c8a930b6..f0457358e 100644
--- a/vp9/common/arm/neon/vp9_idct4x4_1_add_neon.c
+++ b/vp9/common/arm/neon/vp9_idct4x4_1_add_neon.c
@@ -9,6 +9,8 @@
*/
#include <arm_neon.h>
+
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_idct.h"
void vp9_idct4x4_1_add_neon(
diff --git a/vp9/common/arm/neon/vp9_idct8x8_1_add_neon.c b/vp9/common/arm/neon/vp9_idct8x8_1_add_neon.c
index 24c29fb77..5369697c7 100644
--- a/vp9/common/arm/neon/vp9_idct8x8_1_add_neon.c
+++ b/vp9/common/arm/neon/vp9_idct8x8_1_add_neon.c
@@ -9,6 +9,8 @@
*/
#include <arm_neon.h>
+
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_idct.h"
void vp9_idct8x8_1_add_neon(
diff --git a/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c
index 19c582fd1..202d91381 100644
--- a/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans16_dspr2.c
@@ -13,6 +13,7 @@
#include "./vpx_config.h"
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_idct.h"
diff --git a/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c
index 132d88ce5..7ceebb6d8 100644
--- a/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans32_cols_dspr2.c
@@ -12,6 +12,7 @@
#include "./vpx_config.h"
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_idct.h"
diff --git a/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
index 1990348b8..280190a39 100644
--- a/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans4_dspr2.c
@@ -13,6 +13,7 @@
#include "./vpx_config.h"
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_idct.h"
diff --git a/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c b/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c
index fc44ffa31..04d226663 100644
--- a/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c
+++ b/vp9/common/mips/dspr2/vp9_itrans8_dspr2.c
@@ -13,6 +13,7 @@
#include "./vpx_config.h"
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_idct.h"
diff --git a/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.h b/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.h
index 008cf8cac..675db654a 100644
--- a/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.h
+++ b/vp9/common/mips/dspr2/vp9_loopfilter_filters_dspr2.h
@@ -14,6 +14,7 @@
#include <stdlib.h>
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_onyxc_int.h"
diff --git a/vp9/common/vp9_common.h b/vp9/common/vp9_common.h
index d06b8e040..9c2d7791e 100644
--- a/vp9/common/vp9_common.h
+++ b/vp9/common/vp9_common.h
@@ -27,12 +27,6 @@ extern "C" {
#define MIN(x, y) (((x) < (y)) ? (x) : (y))
#define MAX(x, y) (((x) > (y)) ? (x) : (y))
-#define ROUND_POWER_OF_TWO(value, n) \
- (((value) + (1 << ((n) - 1))) >> (n))
-
-#define ALIGN_POWER_OF_TWO(value, n) \
- (((value) + ((1 << (n)) - 1)) & ~((1 << (n)) - 1))
-
// Only need this for fixed-size arrays, for structs just assign.
#define vp9_copy(dest, src) { \
assert(sizeof(dest) == sizeof(src)); \
@@ -83,9 +77,6 @@ static INLINE uint16_t clip_pixel_highbd(int val, int bd) {
typedef int64_t tran_high_t;
typedef int32_t tran_low_t;
-#define CONVERT_TO_SHORTPTR(x) ((uint16_t*)(((uintptr_t)x) << 1))
-#define CONVERT_TO_BYTEPTR(x) ((uint8_t*)(((uintptr_t)x) >> 1 ))
-
#else
// Note:
diff --git a/vp9/common/vp9_idct.c b/vp9/common/vp9_idct.c
index 3b214371c..174b96e21 100644
--- a/vp9/common/vp9_idct.c
+++ b/vp9/common/vp9_idct.c
@@ -11,6 +11,7 @@
#include <math.h>
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_idct.h"
#include "vp9/common/vp9_systemdependent.h"
diff --git a/vp9/common/vp9_idct.h b/vp9/common/vp9_idct.h
index 6e2551dd4..cee1682a6 100644
--- a/vp9/common/vp9_idct.h
+++ b/vp9/common/vp9_idct.h
@@ -14,6 +14,7 @@
#include <assert.h>
#include "./vpx_config.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_enums.h"
diff --git a/vp9/common/vp9_loopfilter.c b/vp9/common/vp9_loopfilter.c
index 69d393ef4..484e457df 100644
--- a/vp9/common/vp9_loopfilter.c
+++ b/vp9/common/vp9_loopfilter.c
@@ -13,6 +13,7 @@
#include "vp9/common/vp9_onyxc_int.h"
#include "vp9/common/vp9_reconinter.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_seg_common.h"
diff --git a/vp9/common/vp9_loopfilter_filters.c b/vp9/common/vp9_loopfilter_filters.c
index 2e32c40b8..3cf4c3225 100644
--- a/vp9/common/vp9_loopfilter_filters.c
+++ b/vp9/common/vp9_loopfilter_filters.c
@@ -9,6 +9,7 @@
*/
#include "./vpx_config.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_loopfilter.h"
#include "vp9/common/vp9_onyxc_int.h"
diff --git a/vp9/common/vp9_postproc.c b/vp9/common/vp9_postproc.c
index 983a4744d..d26a6eb5c 100644
--- a/vp9/common/vp9_postproc.c
+++ b/vp9/common/vp9_postproc.c
@@ -16,12 +16,10 @@
#include "./vpx_scale_rtcd.h"
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vpx_scale/vpx_scale.h"
#include "vpx_scale/yv12config.h"
-#if CONFIG_VP9_HIGHBITDEPTH
-#include "vp9/common/vp9_common.h"
-#endif
#include "vp9/common/vp9_onyxc_int.h"
#include "vp9/common/vp9_postproc.h"
#include "vp9/common/vp9_systemdependent.h"
diff --git a/vp9/common/vp9_reconintra.c b/vp9/common/vp9_reconintra.c
index d1a64749e..650310d7d 100644
--- a/vp9/common/vp9_reconintra.c
+++ b/vp9/common/vp9_reconintra.c
@@ -12,6 +12,7 @@
#include "./vp9_rtcd.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vpx_ports/vpx_once.h"
#include "vp9/common/vp9_reconintra.h"
diff --git a/vp9/common/x86/vp9_high_loopfilter_intrin_sse2.c b/vp9/common/x86/vp9_high_loopfilter_intrin_sse2.c
index 1637f0e54..b40669c63 100644
--- a/vp9/common/x86/vp9_high_loopfilter_intrin_sse2.c
+++ b/vp9/common/x86/vp9_high_loopfilter_intrin_sse2.c
@@ -11,6 +11,7 @@
#include <emmintrin.h> // SSE2
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_loopfilter.h"
#include "vpx_ports/emmintrin_compat.h"
diff --git a/vp9/common/x86/vp9_idct_intrin_sse2.c b/vp9/common/x86/vp9_idct_intrin_sse2.c
index 0385c7955..6ad7c6294 100644
--- a/vp9/common/x86/vp9_idct_intrin_sse2.c
+++ b/vp9/common/x86/vp9_idct_intrin_sse2.c
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "vpx_ports/mem.h"
#include "vp9/common/x86/vp9_idct_intrin_sse2.h"
#include "vp9/common/vp9_idct.h"
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index feea459a4..7391dc1f8 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -15,6 +15,7 @@
#include "./vpx_scale_rtcd.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vpx_ports/mem_ops.h"
#include "vpx_scale/vpx_scale.h"
diff --git a/vp9/encoder/vp9_aq_variance.c b/vp9/encoder/vp9_aq_variance.c
index be6f7e4ee..55c964903 100644
--- a/vp9/encoder/vp9_aq_variance.c
+++ b/vp9/encoder/vp9_aq_variance.c
@@ -10,6 +10,8 @@
#include <math.h>
+#include "vpx_ports/mem.h"
+
#include "vp9/encoder/vp9_aq_variance.h"
#include "vp9/common/vp9_seg_common.h"
diff --git a/vp9/encoder/vp9_dct.c b/vp9/encoder/vp9_dct.c
index 9e6ca3d59..414d2bb15 100644
--- a/vp9/encoder/vp9_dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -14,6 +14,7 @@
#include "./vpx_config.h"
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_idct.h"
#include "vp9/common/vp9_systemdependent.h"
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 0e74784e9..3c490f837 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -15,6 +15,7 @@
#include "./vp9_rtcd.h"
#include "./vpx_config.h"
+#include "vpx_ports/mem.h"
#include "vpx_ports/vpx_timer.h"
#include "vp9/common/vp9_common.h"
diff --git a/vp9/encoder/vp9_encodemb.c b/vp9/encoder/vp9_encodemb.c
index 9a4e61ec8..b115e0ef9 100644
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -13,6 +13,7 @@
#include "./vpx_config.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_idct.h"
#include "vp9/common/vp9_reconinter.h"
diff --git a/vp9/encoder/vp9_encoder.c b/vp9/encoder/vp9_encoder.c
index b22537185..8cc968c99 100644
--- a/vp9/encoder/vp9_encoder.c
+++ b/vp9/encoder/vp9_encoder.c
@@ -17,6 +17,7 @@
#include "./vpx_dsp_rtcd.h"
#include "./vpx_scale_rtcd.h"
#include "vpx/internal/vpx_psnr.h"
+#include "vpx_ports/mem.h"
#include "vpx_ports/vpx_timer.h"
#include "vp9/common/vp9_alloccommon.h"
diff --git a/vp9/encoder/vp9_extend.c b/vp9/encoder/vp9_extend.c
index 96f3598b1..6e1ed365d 100644
--- a/vp9/encoder/vp9_extend.c
+++ b/vp9/encoder/vp9_extend.c
@@ -9,6 +9,7 @@
*/
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/encoder/vp9_extend.h"
diff --git a/vp9/encoder/vp9_firstpass.c b/vp9/encoder/vp9_firstpass.c
index 9752668b1..9da4fc484 100644
--- a/vp9/encoder/vp9_firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -15,6 +15,7 @@
#include "./vpx_scale_rtcd.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vpx_scale/vpx_scale.h"
#include "vpx_scale/yv12config.h"
diff --git a/vp9/encoder/vp9_mcomp.c b/vp9/encoder/vp9_mcomp.c
index 80c509a1b..8bdd4286a 100644
--- a/vp9/encoder/vp9_mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -15,6 +15,7 @@
#include "./vpx_config.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
diff --git a/vp9/encoder/vp9_picklpf.c b/vp9/encoder/vp9_picklpf.c
index 5eb5d542b..8e1910385 100644
--- a/vp9/encoder/vp9_picklpf.c
+++ b/vp9/encoder/vp9_picklpf.c
@@ -14,6 +14,7 @@
#include "./vpx_scale_rtcd.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_loopfilter.h"
#include "vp9/common/vp9_onyxc_int.h"
diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c
index 94253be3f..1e917159f 100644
--- a/vp9/encoder/vp9_pickmode.c
+++ b/vp9/encoder/vp9_pickmode.c
@@ -16,6 +16,7 @@
#include "./vp9_rtcd.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_blockd.h"
#include "vp9/common/vp9_common.h"
diff --git a/vp9/encoder/vp9_quantize.c b/vp9/encoder/vp9_quantize.c
index 3c07e2c24..db5460b6c 100644
--- a/vp9/encoder/vp9_quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -11,6 +11,7 @@
#include <math.h>
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_quant_common.h"
#include "vp9/common/vp9_seg_common.h"
diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c
index 7ddb6356f..47932db20 100644
--- a/vp9/encoder/vp9_ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -16,6 +16,7 @@
#include <string.h>
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_alloccommon.h"
#include "vp9/encoder/vp9_aq_cyclicrefresh.h"
diff --git a/vp9/encoder/vp9_rd.c b/vp9/encoder/vp9_rd.c
index 194001c51..9fa7b9d67 100644
--- a/vp9/encoder/vp9_rd.c
+++ b/vp9/encoder/vp9_rd.c
@@ -15,6 +15,7 @@
#include "./vp9_rtcd.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_entropy.h"
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c
index 738256237..6eb8f6cb5 100644
--- a/vp9/encoder/vp9_rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -14,6 +14,7 @@
#include "./vp9_rtcd.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/common/vp9_entropy.h"
diff --git a/vp9/encoder/vp9_resize.c b/vp9/encoder/vp9_resize.c
index 2ebdff291..a3cf954e3 100644
--- a/vp9/encoder/vp9_resize.c
+++ b/vp9/encoder/vp9_resize.c
@@ -15,6 +15,7 @@
#include <stdlib.h>
#include <string.h>
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#include "vp9/encoder/vp9_resize.h"
diff --git a/vp9/encoder/vp9_ssim.c b/vp9/encoder/vp9_ssim.c
index 88db5dda0..172de5d1d 100644
--- a/vp9/encoder/vp9_ssim.c
+++ b/vp9/encoder/vp9_ssim.c
@@ -10,6 +10,7 @@
#include <math.h>
#include "./vp9_rtcd.h"
+#include "vpx_ports/mem.h"
#include "vp9/encoder/vp9_ssim.h"
void vp9_ssim_parms_16x16_c(uint8_t *s, int sp, uint8_t *r,
diff --git a/vp9/encoder/vp9_temporal_filter.c b/vp9/encoder/vp9_temporal_filter.c
index d7979ab53..0fe531217 100644
--- a/vp9/encoder/vp9_temporal_filter.c
+++ b/vp9/encoder/vp9_temporal_filter.c
@@ -24,6 +24,7 @@
#include "vp9/encoder/vp9_ratectrl.h"
#include "vp9/encoder/vp9_segmentation.h"
#include "vpx_mem/vpx_mem.h"
+#include "vpx_ports/mem.h"
#include "vpx_ports/vpx_timer.h"
#include "vpx_scale/vpx_scale.h"
diff --git a/vp9/encoder/x86/vp9_highbd_quantize_intrin_sse2.c b/vp9/encoder/x86/vp9_highbd_quantize_intrin_sse2.c
index ffa43b65a..cbdd1c93e 100644
--- a/vp9/encoder/x86/vp9_highbd_quantize_intrin_sse2.c
+++ b/vp9/encoder/x86/vp9_highbd_quantize_intrin_sse2.c
@@ -10,6 +10,7 @@
#include <emmintrin.h>
+#include "vpx_ports/mem.h"
#include "vp9/common/vp9_common.h"
#if CONFIG_VP9_HIGHBITDEPTH
diff --git a/vp9/vp9_iface_common.h b/vp9/vp9_iface_common.h
index e585aa147..58bb7d5d6 100644
--- a/vp9/vp9_iface_common.h
+++ b/vp9/vp9_iface_common.h
@@ -10,6 +10,8 @@
#ifndef VP9_VP9_IFACE_COMMON_H_
#define VP9_VP9_IFACE_COMMON_H_
+#include "vpx_ports/mem.h"
+
static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
void *user_priv) {
/** vpx_img_wrap() doesn't allow specifying independent strides for