| 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 int kNumTemporalLayers = 1; |
| 21 const int kKeyFrameInterval = -1; |
| 20 const bool kErrorConcealmentOn = false; | 22 const bool kErrorConcealmentOn = false; |
| 21 const bool kDenoisingOn = false; | 23 const bool kDenoisingOn = false; |
| 22 const bool kFrameDropperOn = true; | 24 const bool kFrameDropperOn = true; |
| 23 const bool kSpatialResizeOn = false; | 25 const bool kSpatialResizeOn = false; |
| 24 const bool kResilienceOn = false; | 26 const bool kResilienceOn = false; |
| 25 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; | 27 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; |
| 26 const bool kHwCodec = false; | 28 const bool kHwCodec = false; |
| 27 const bool kUseSingleCore = true; | 29 const bool kUseSingleCore = true; |
| 28 | 30 |
| 29 // Test settings. | 31 // Test settings. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 58 // Bitrate and frame rate profile. | 60 // Bitrate and frame rate profile. |
| 59 RateProfile rate_profile; | 61 RateProfile rate_profile; |
| 60 SetRateProfile(&rate_profile, | 62 SetRateProfile(&rate_profile, |
| 61 0, // update_index | 63 0, // update_index |
| 62 bitrate_, framerate_, | 64 bitrate_, framerate_, |
| 63 0); // frame_index_rate_update | 65 0); // frame_index_rate_update |
| 64 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; | 66 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; |
| 65 rate_profile.num_frames = kNumFramesLong; | 67 rate_profile.num_frames = kNumFramesLong; |
| 66 | 68 |
| 67 // Codec/network settings. | 69 // Codec/network settings. |
| 68 CodecParams process_settings; | 70 ProcessParams process_settings(kHwCodec, kUseSingleCore, kPacketLoss, |
| 69 SetCodecParams( | 71 kKeyFrameInterval, filename, kVerboseLogging, |
| 70 &process_settings, codec_type_, kHwCodec, kUseSingleCore, kPacketLoss, | 72 kBatchMode); |
| 71 -1, // key_frame_interval | 73 SetCodecSettings(&config_, &codec_settings_, codec_type_, |
| 72 1, // num_temporal_layers | 74 kNumTemporalLayers, kErrorConcealmentOn, kDenoisingOn, |
| 73 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, kSpatialResizeOn, | 75 kFrameDropperOn, kSpatialResizeOn, kResilienceOn, width, |
| 74 kResilienceOn, width, height, filename, kVerboseLogging, kBatchMode); | 76 height); |
| 75 | 77 |
| 76 // Use default thresholds for quality (PSNR and SSIM). | 78 // Use default thresholds for quality (PSNR and SSIM). |
| 77 QualityThresholds quality_thresholds; | 79 QualityThresholds quality_thresholds; |
| 78 | 80 |
| 79 // Use very loose thresholds for rate control, so even poor HW codecs will | 81 // Use very loose thresholds for rate control, so even poor HW codecs will |
| 80 // pass the requirements. | 82 // pass the requirements. |
| 81 RateControlThresholds rc_thresholds[1]; | 83 RateControlThresholds rc_thresholds[1]; |
| 82 // clang-format off | 84 // clang-format off |
| 83 SetRateControlThresholds( | 85 SetRateControlThresholds( |
| 84 rc_thresholds, | 86 rc_thresholds, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { | 125 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { |
| 124 RunTest(320, 240, "foreman_320x240"); | 126 RunTest(320, 240, "foreman_320x240"); |
| 125 } | 127 } |
| 126 | 128 |
| 127 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { | 129 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { |
| 128 RunTest(352, 288, "foreman_cif"); | 130 RunTest(352, 288, "foreman_cif"); |
| 129 } | 131 } |
| 130 | 132 |
| 131 } // namespace test | 133 } // namespace test |
| 132 } // namespace webrtc | 134 } // namespace webrtc |
| OLD | NEW |