aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build/make/Android.mk3
-rw-r--r--test/android/Android.mk4
-rw-r--r--test/resize_test.cc5
-rw-r--r--vp9/encoder/vp9_encodeframe.c8
4 files changed, 15 insertions, 5 deletions
diff --git a/build/make/Android.mk b/build/make/Android.mk
index b8032e67a..ba24f541b 100644
--- a/build/make/Android.mk
+++ b/build/make/Android.mk
@@ -8,6 +8,8 @@
## be found in the AUTHORS file in the root of the source tree.
##
+# Ignore this file during non-NDK builds.
+ifdef NDK_ROOT
#
# This file is to be used for compiling libvpx for Android using the NDK.
# In an Android project place a libvpx checkout in the jni directory.
@@ -212,3 +214,4 @@ endif
ifeq ($(CONFIG_RUNTIME_CPU_DETECT),yes)
$(call import-module,android/cpufeatures)
endif
+endif # NDK_ROOT
diff --git a/test/android/Android.mk b/test/android/Android.mk
index 87155fcb5..9a7533ebb 100644
--- a/test/android/Android.mk
+++ b/test/android/Android.mk
@@ -10,6 +10,9 @@
# The test app itself runs on the command line through adb shell
# The paths are really messed up as the libvpx make file
# expects to be made from a parent directory.
+
+# Ignore this file during non-NDK builds.
+ifdef NDK_ROOT
CUR_WD := $(call my-dir)
BINDINGS_DIR := $(CUR_WD)/../../..
LOCAL_PATH := $(CUR_WD)/../../..
@@ -61,3 +64,4 @@ LOCAL_SRC_FILES := $(addprefix ./test/, $(FILTERED_SRC))
# some test files depend on *_rtcd.h, ensure they're generated first.
$(eval $(call rtcd_dep_template))
include $(BUILD_EXECUTABLE)
+endif # NDK_ROOT
diff --git a/test/resize_test.cc b/test/resize_test.cc
index e122a7474..715bb9d70 100644
--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -777,10 +777,7 @@ TEST_P(ResizeCspTest, TestResizeCspWorks) {
}
VP8_INSTANTIATE_TEST_SUITE(ResizeTest, ONE_PASS_TEST_MODES);
-// TODO(https://crbug.com/webm/1768): VP9 should use ONE_PASS_TEST_MODES for
-// the ResizeTest instantiation after segfault is fixed.
-VP9_INSTANTIATE_TEST_SUITE(ResizeTest,
- ::testing::Values(::libvpx_test::kRealTime));
+VP9_INSTANTIATE_TEST_SUITE(ResizeTest, ONE_PASS_TEST_MODES);
VP9_INSTANTIATE_TEST_SUITE(ResizeInternalTest,
::testing::Values(::libvpx_test::kOnePassBest));
VP9_INSTANTIATE_TEST_SUITE(ResizeRealtimeTest,
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index a1ee9c678..1483ac069 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3413,7 +3413,8 @@ static void simple_motion_search(const VP9_COMP *const cpi, MACROBLOCK *const x,
const VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &x->e_mbd;
MODE_INFO *const mi = xd->mi[0];
- const YV12_BUFFER_CONFIG *const yv12 = get_ref_frame_buffer(cpi, ref);
+ YV12_BUFFER_CONFIG *yv12;
+ YV12_BUFFER_CONFIG *scaled_ref_frame = vp9_get_scaled_ref_frame(cpi, ref);
const int step_param = 1;
const MvLimits tmp_mv_limits = x->mv_limits;
const SEARCH_METHODS search_method = NSTEP;
@@ -3422,6 +3423,11 @@ static void simple_motion_search(const VP9_COMP *const cpi, MACROBLOCK *const x,
MV best_mv = { 0, 0 };
int cost_list[5];
+ if (scaled_ref_frame)
+ yv12 = scaled_ref_frame;
+ else
+ yv12 = get_ref_frame_buffer(cpi, ref);
+
assert(yv12 != NULL);
if (!yv12) return;
vp9_setup_pre_planes(xd, 0, yv12, mi_row, mi_col,