| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #include "third_party/googletest/src/include/gtest/gtest.h" | 10 #include "third_party/googletest/src/include/gtest/gtest.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 expected_res_ = VPX_CODEC_OK; | 67 expected_res_ = VPX_CODEC_OK; |
| 68 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); | 68 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); |
| 69 #else | 69 #else |
| 70 // This test produces a pretty large single frame allocation, (roughly | 70 // This test produces a pretty large single frame allocation, (roughly |
| 71 // 25 megabits). The encoder allocates a good number of these frames | 71 // 25 megabits). The encoder allocates a good number of these frames |
| 72 // one for each lag in frames (for 2 pass), and then one for each possible | 72 // one for each lag in frames (for 2 pass), and then one for each possible |
| 73 // reference buffer (8) - we can end up with up to 30 buffers of roughly this | 73 // reference buffer (8) - we can end up with up to 30 buffers of roughly this |
| 74 // size or almost 1 gig of memory. | 74 // size or almost 1 gig of memory. |
| 75 // In total the allocations will exceed 2GiB which may cause a failure with | 75 // In total the allocations will exceed 2GiB which may cause a failure with |
| 76 // mingw + wine, use a smaller size in that case. | 76 // mingw + wine, use a smaller size in that case. |
| 77 #if defined(_WIN32) && !defined(_WIN64) | 77 #if defined(_WIN32) && !defined(_WIN64) || defined(__OS2__) |
| 78 video.SetSize(4096, 3072); | 78 video.SetSize(4096, 3072); |
| 79 #else | 79 #else |
| 80 video.SetSize(4096, 4096); | 80 video.SetSize(4096, 4096); |
| 81 #endif | 81 #endif |
| 82 video.set_limit(2); | 82 video.set_limit(2); |
| 83 expected_res_ = VPX_CODEC_OK; | 83 expected_res_ = VPX_CODEC_OK; |
| 84 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); | 84 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); |
| 85 #endif | 85 #endif |
| 86 } | 86 } |
| 87 | 87 |
| 88 TEST_F(VP9FrameSizeTestsLarge, OneByOneVideo) { | 88 TEST_F(VP9FrameSizeTestsLarge, OneByOneVideo) { |
| 89 ::libvpx_test::RandomVideoSource video; | 89 ::libvpx_test::RandomVideoSource video; |
| 90 | 90 |
| 91 video.SetSize(1, 1); | 91 video.SetSize(1, 1); |
| 92 video.set_limit(2); | 92 video.set_limit(2); |
| 93 expected_res_ = VPX_CODEC_OK; | 93 expected_res_ = VPX_CODEC_OK; |
| 94 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); | 94 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); |
| 95 } | 95 } |
| 96 } // namespace | 96 } // namespace |
| OLD | NEW |