From 93d44fb366673d8a7cb8470056f0cf33f679fc73 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Mon, 13 Mar 2017 10:55:02 -0700 Subject: [PATCH] Reduce size in FrameSizeTests for 32-bit arch BUG=aomedia:394 Change-Id: I7d9e413dcd0fe832aaec570bc6c1f0d2b644de09 --- test/frame_size_tests.cc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/frame_size_tests.cc b/test/frame_size_tests.cc index 1b58feced..73cc9c075 100644 --- a/test/frame_size_tests.cc +++ b/test/frame_size_tests.cc @@ -66,18 +66,18 @@ TEST_F(AV1FrameSizeTests, LargeValidSizes) { expected_res_ = AOM_CODEC_OK; ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); #else -// This test produces a pretty large single frame allocation, (roughly -// 25 megabits). The encoder allocates a good number of these frames -// one for each lag in frames (for 2 pass), and then one for each possible -// reference buffer (8) - we can end up with up to 30 buffers of roughly this -// size or almost 1 gig of memory. -// In total the allocations will exceed 2GiB which may cause a failure with -// mingw + wine, use a smaller size in that case. -#if defined(_WIN32) && !defined(_WIN64) || defined(__OS2__) - video.SetSize(2560, 1440); -#else - video.SetSize(4096, 4096); -#endif + // This test produces a pretty large single frame allocation, (roughly + // 25 megabits). The encoder allocates a good number of these frames + // one for each lag in frames (for 2 pass), and then one for each possible + // reference buffer (8) - we can end up with up to 30 buffers of roughly this + // size or almost 1 gig of memory. + // In total the allocations will exceed 2GiB which may cause a failure with + // non-64 bit platforms, use a smaller size in that case. + if (sizeof(void *) < 8) + video.SetSize(2560, 1440); + else + video.SetSize(4096, 4096); + video.set_limit(2); expected_res_ = AOM_CODEC_OK; ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); -- GitLab