| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <inttypes.h> | 5 #include <inttypes.h> |
| 6 #include <stddef.h> | 6 #include <stddef.h> |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 1509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 if (test_perf_) | 1520 if (test_perf_) |
| 1521 EXPECT_GE(frames_per_second(), kMinPerfFPS); | 1521 EXPECT_GE(frames_per_second(), kMinPerfFPS); |
| 1522 } | 1522 } |
| 1523 | 1523 |
| 1524 void VEAClient::VerifyStreamProperties() { | 1524 void VEAClient::VerifyStreamProperties() { |
| 1525 LOG_ASSERT(num_frames_since_last_check_ > 0UL); | 1525 LOG_ASSERT(num_frames_since_last_check_ > 0UL); |
| 1526 LOG_ASSERT(encoded_stream_size_since_last_check_ > 0UL); | 1526 LOG_ASSERT(encoded_stream_size_since_last_check_ > 0UL); |
| 1527 unsigned int bitrate = encoded_stream_size_since_last_check_ * 8 * | 1527 unsigned int bitrate = encoded_stream_size_since_last_check_ * 8 * |
| 1528 current_framerate_ / num_frames_since_last_check_; | 1528 current_framerate_ / num_frames_since_last_check_; |
| 1529 DVLOG(1) << "Current chunk's bitrate: " << bitrate | 1529 DVLOG(1) << "Current chunk's bitrate: " << bitrate |
| 1530 << " (expected: " << current_requested_bitrate_ << " @ " | 1530 << " (expected: " << current_requested_bitrate_ |
| 1531 << current_framerate_ << " FPS," | 1531 << " @ " << current_framerate_ << " FPS," |
| 1532 << " num frames in chunk: " << num_frames_since_last_check_; | 1532 << " num frames in chunk: " << num_frames_since_last_check_; |
| 1533 | 1533 |
| 1534 num_frames_since_last_check_ = 0; | 1534 num_frames_since_last_check_ = 0; |
| 1535 encoded_stream_size_since_last_check_ = 0; | 1535 encoded_stream_size_since_last_check_ = 0; |
| 1536 | 1536 |
| 1537 if (force_bitrate_) { | 1537 if (force_bitrate_) { |
| 1538 EXPECT_NEAR(bitrate, current_requested_bitrate_, | 1538 EXPECT_NEAR(bitrate, current_requested_bitrate_, |
| 1539 kBitrateTolerance * current_requested_bitrate_); | 1539 kBitrateTolerance * current_requested_bitrate_); |
| 1540 } | 1540 } |
| 1541 | 1541 |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1816 | 1816 |
| 1817 media::g_env = | 1817 media::g_env = |
| 1818 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>( | 1818 reinterpret_cast<media::VideoEncodeAcceleratorTestEnvironment*>( |
| 1819 testing::AddGlobalTestEnvironment( | 1819 testing::AddGlobalTestEnvironment( |
| 1820 new media::VideoEncodeAcceleratorTestEnvironment( | 1820 new media::VideoEncodeAcceleratorTestEnvironment( |
| 1821 std::move(test_stream_data), log_path, run_at_fps, | 1821 std::move(test_stream_data), log_path, run_at_fps, |
| 1822 needs_encode_latency, verify_all_output))); | 1822 needs_encode_latency, verify_all_output))); |
| 1823 | 1823 |
| 1824 return RUN_ALL_TESTS(); | 1824 return RUN_ALL_TESTS(); |
| 1825 } | 1825 } |
| OLD | NEW |