From 215bddf324bac52795602489a5056ea9ac0eef18 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 16 Mar 2018 17:47:56 -0700 Subject: [PATCH] vpx_scale_test: reduce max size for 32-bit targets avoids potential OOM when allocating 3 buffers for 16383x16383; 3840 is used as a replacement Change-Id: I92116ab69b10db6820fc651d3626bd9699700208 --- test/vpx_scale_test.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/vpx_scale_test.cc b/test/vpx_scale_test.cc index ac75dceb2..df89b7c4a 100644 --- a/test/vpx_scale_test.cc +++ b/test/vpx_scale_test.cc @@ -37,13 +37,15 @@ class ExtendBorderTest void ExtendBorder() { ASM_REGISTER_STATE_CHECK(extend_fn_(&img_)); } void RunTest() { -#if ARCH_ARM - // Some arm devices OOM when trying to allocate the largest buffers. - static const int kNumSizesToTest = 6; -#else +#if ARCH_ARM || (ARCH_MIPS && !HAVE_MIPS64) || ARCH_X86 + // Avoid OOM failures on 32-bit platforms. static const int kNumSizesToTest = 7; +#else + static const int kNumSizesToTest = 8; #endif - static const int kSizesToTest[] = { 1, 15, 33, 145, 512, 1025, 16383 }; + static const int kSizesToTest[] = { + 1, 15, 33, 145, 512, 1025, 3840, 16383 + }; for (int h = 0; h < kNumSizesToTest; ++h) { for (int w = 0; w < kNumSizesToTest; ++w) { ASSERT_NO_FATAL_FAILURE(ResetImages(kSizesToTest[w], kSizesToTest[h])); -- 2.40.0