| 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 |
| 11 #include "webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest
.h" | 11 #include "webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest
.h" |
| 12 | 12 |
| 13 namespace webrtc { | 13 namespace webrtc { |
| 14 namespace test { | 14 namespace test { |
| 15 | 15 |
| 16 namespace { | 16 namespace { |
| 17 // Codec settings. | 17 // Codec settings. |
| 18 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; | 18 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; |
| 19 const int kFps[] = {30}; | 19 const int kFps[] = {30}; |
| 20 const bool kErrorConcealmentOn = false; | 20 const bool kErrorConcealmentOn = false; |
| 21 const bool kDenoisingOn = false; | 21 const bool kDenoisingOn = false; |
| 22 const bool kFrameDropperOn = true; | 22 const bool kFrameDropperOn = true; |
| 23 const bool kSpatialResizeOn = false; | 23 const bool kSpatialResizeOn = false; |
| 24 const bool kResilienceOn = false; |
| 24 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; | 25 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; |
| 25 const bool kHwCodec = false; | 26 const bool kHwCodec = false; |
| 26 const bool kUseSingleCore = true; | 27 const bool kUseSingleCore = true; |
| 27 | 28 |
| 28 // Test settings. | 29 // Test settings. |
| 29 const bool kBatchMode = true; | 30 const bool kBatchMode = true; |
| 30 | 31 |
| 31 // Packet loss probability [0.0, 1.0]. | 32 // Packet loss probability [0.0, 1.0]. |
| 32 const float kPacketLoss = 0.0f; | 33 const float kPacketLoss = 0.0f; |
| 33 | 34 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 63 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; | 64 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; |
| 64 rate_profile.num_frames = kNumFramesLong; | 65 rate_profile.num_frames = kNumFramesLong; |
| 65 | 66 |
| 66 // Codec/network settings. | 67 // Codec/network settings. |
| 67 CodecParams process_settings; | 68 CodecParams process_settings; |
| 68 SetCodecParams( | 69 SetCodecParams( |
| 69 &process_settings, codec_type_, kHwCodec, kUseSingleCore, kPacketLoss, | 70 &process_settings, codec_type_, kHwCodec, kUseSingleCore, kPacketLoss, |
| 70 -1, // key_frame_interval | 71 -1, // key_frame_interval |
| 71 1, // num_temporal_layers | 72 1, // num_temporal_layers |
| 72 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, kSpatialResizeOn, | 73 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, kSpatialResizeOn, |
| 73 width, height, filename, kVerboseLogging, kBatchMode); | 74 kResilienceOn, width, height, filename, kVerboseLogging, kBatchMode); |
| 74 | 75 |
| 75 // Use default thresholds for quality (PSNR and SSIM). | 76 // Use default thresholds for quality (PSNR and SSIM). |
| 76 QualityThresholds quality_thresholds; | 77 QualityThresholds quality_thresholds; |
| 77 | 78 |
| 78 // Use very loose thresholds for rate control, so even poor HW codecs will | 79 // Use very loose thresholds for rate control, so even poor HW codecs will |
| 79 // pass the requirements. | 80 // pass the requirements. |
| 80 RateControlThresholds rc_thresholds[1]; | 81 RateControlThresholds rc_thresholds[1]; |
| 81 // clang-format off | 82 // clang-format off |
| 82 SetRateControlThresholds( | 83 SetRateControlThresholds( |
| 83 rc_thresholds, | 84 rc_thresholds, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { | 123 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { |
| 123 RunTest(320, 240, "foreman_320x240"); | 124 RunTest(320, 240, "foreman_320x240"); |
| 124 } | 125 } |
| 125 | 126 |
| 126 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { | 127 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { |
| 127 RunTest(352, 288, "foreman_cif"); | 128 RunTest(352, 288, "foreman_cif"); |
| 128 } | 129 } |
| 129 | 130 |
| 130 } // namespace test | 131 } // namespace test |
| 131 } // namespace webrtc | 132 } // namespace webrtc |
| OLD | NEW |