OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2017 The WebRTC 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 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 | 71 |
72 VideoProcessorIntegrationTest::VideoProcessorIntegrationTest() { | 72 VideoProcessorIntegrationTest::VideoProcessorIntegrationTest() { |
73 #if defined(WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED) && \ | 73 #if defined(WEBRTC_VIDEOPROCESSOR_INTEGRATIONTEST_HW_CODECS_ENABLED) && \ |
74 defined(WEBRTC_ANDROID) | 74 defined(WEBRTC_ANDROID) |
75 InitializeAndroidObjects(); | 75 InitializeAndroidObjects(); |
76 #endif | 76 #endif |
77 } | 77 } |
78 | 78 |
79 VideoProcessorIntegrationTest::~VideoProcessorIntegrationTest() = default; | 79 VideoProcessorIntegrationTest::~VideoProcessorIntegrationTest() = default; |
80 | 80 |
81 void VideoProcessorIntegrationTest::SetTestConfig(TestConfig* config, | |
82 bool hw_codec, | |
83 bool use_single_core, | |
84 float packet_loss_probability, | |
85 std::string filename, | |
86 bool verbose_logging) { | |
87 config->filename = filename; | |
88 config->input_filename = ResourcePath(filename, "yuv"); | |
89 // Generate an output filename in a safe way. | |
90 config->output_filename = | |
91 TempFilename(OutputPath(), "videoprocessor_integrationtest"); | |
92 config->networking_config.packet_loss_probability = packet_loss_probability; | |
93 config->use_single_core = use_single_core; | |
94 config->verbose = verbose_logging; | |
95 config->hw_codec = hw_codec; | |
96 } | |
97 | |
98 void VideoProcessorIntegrationTest::SetCodecSettings(TestConfig* config, | 81 void VideoProcessorIntegrationTest::SetCodecSettings(TestConfig* config, |
99 VideoCodecType codec_type, | 82 VideoCodecType codec_type, |
100 int num_temporal_layers, | 83 int num_temporal_layers, |
101 bool error_concealment_on, | 84 bool error_concealment_on, |
102 bool denoising_on, | 85 bool denoising_on, |
103 bool frame_dropper_on, | 86 bool frame_dropper_on, |
104 bool spatial_resize_on, | 87 bool spatial_resize_on, |
105 bool resilience_on, | 88 bool resilience_on, |
106 int width, | 89 int width, |
107 int height) { | 90 int height) { |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
641 perc_encoding_rate_mismatch_ = 0.0f; | 624 perc_encoding_rate_mismatch_ = 0.0f; |
642 num_frames_to_hit_target_ = | 625 num_frames_to_hit_target_ = |
643 rate_profile.frame_index_rate_update[rate_update_index + 1]; | 626 rate_profile.frame_index_rate_update[rate_update_index + 1]; |
644 encoding_rate_within_target_ = false; | 627 encoding_rate_within_target_ = false; |
645 sum_key_frame_size_mismatch_ = 0.0; | 628 sum_key_frame_size_mismatch_ = 0.0; |
646 num_key_frames_ = 0; | 629 num_key_frames_ = 0; |
647 } | 630 } |
648 | 631 |
649 } // namespace test | 632 } // namespace test |
650 } // namespace webrtc | 633 } // namespace webrtc |
OLD | NEW |