| 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 namespace { | 15 namespace { |
| 16 // Codec settings. | 16 // Codec settings. |
| 17 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; | 17 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; |
| 18 const int kFps[] = {30}; | 18 const int kFps[] = {30}; |
| 19 const bool kErrorConcealmentOn = false; | 19 const bool kErrorConcealmentOn = false; |
| 20 const bool kDenoisingOn = false; | 20 const bool kDenoisingOn = false; |
| 21 const bool kFrameDropperOn = true; | 21 const bool kFrameDropperOn = true; |
| 22 const bool kSpatialResizeOn = false; | 22 const bool kSpatialResizeOn = false; |
| 23 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; | 23 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; |
| 24 const bool kHwCodec = false; |
| 24 | 25 |
| 25 // Packet loss probability [0.0, 1.0]. | 26 // Packet loss probability [0.0, 1.0]. |
| 26 const float kPacketLoss = 0.0f; | 27 const float kPacketLoss = 0.0f; |
| 27 | 28 |
| 28 const bool kVerboseLogging = true; | 29 const bool kVerboseLogging = true; |
| 29 } // namespace | 30 } // namespace |
| 30 | 31 |
| 31 // Tests for plotting statistics from logs. | 32 // Tests for plotting statistics from logs. |
| 32 class PlotVideoProcessorIntegrationTest | 33 class PlotVideoProcessorIntegrationTest |
| 33 : public VideoProcessorIntegrationTest, | 34 : public VideoProcessorIntegrationTest, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 45 // Bitrate and frame rate profile. | 46 // Bitrate and frame rate profile. |
| 46 RateProfile rate_profile; | 47 RateProfile rate_profile; |
| 47 SetRateProfilePars(&rate_profile, | 48 SetRateProfilePars(&rate_profile, |
| 48 0, // update_index | 49 0, // update_index |
| 49 bitrate_, framerate_, | 50 bitrate_, framerate_, |
| 50 0); // frame_index_rate_update | 51 0); // frame_index_rate_update |
| 51 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; | 52 rate_profile.frame_index_rate_update[1] = kNbrFramesLong + 1; |
| 52 rate_profile.num_frames = kNbrFramesLong; | 53 rate_profile.num_frames = kNbrFramesLong; |
| 53 // Codec/network settings. | 54 // Codec/network settings. |
| 54 CodecConfigPars process_settings; | 55 CodecConfigPars process_settings; |
| 55 SetCodecParameters(&process_settings, codec_type_, kPacketLoss, | 56 SetCodecParameters(&process_settings, codec_type_, kHwCodec, kPacketLoss, |
| 56 -1, // key_frame_interval | 57 -1, // key_frame_interval |
| 57 1, // num_temporal_layers | 58 1, // num_temporal_layers |
| 58 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, | 59 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, |
| 59 kSpatialResizeOn, width, height, filename, | 60 kSpatialResizeOn, width, height, filename, |
| 60 kVerboseLogging); | 61 kVerboseLogging); |
| 61 // Metrics for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min). | 62 // Metrics for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min). |
| 62 QualityMetrics quality_metrics; | 63 QualityMetrics quality_metrics; |
| 63 SetQualityMetrics(&quality_metrics, 15.0, 10.0, 0.2, 0.1); | 64 SetQualityMetrics(&quality_metrics, 15.0, 10.0, 0.2, 0.1); |
| 64 // Metrics for rate control. | 65 // Metrics for rate control. |
| 65 RateControlMetrics rc_metrics[1]; | 66 RateControlMetrics rc_metrics[1]; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 TEST_P(PlotVideoProcessorIntegrationTest, ProcessQVga) { | 103 TEST_P(PlotVideoProcessorIntegrationTest, ProcessQVga) { |
| 103 RunTest(320, 240, "foreman_320x240"); | 104 RunTest(320, 240, "foreman_320x240"); |
| 104 } | 105 } |
| 105 | 106 |
| 106 TEST_P(PlotVideoProcessorIntegrationTest, ProcessCif) { | 107 TEST_P(PlotVideoProcessorIntegrationTest, ProcessCif) { |
| 107 RunTest(352, 288, "foreman_cif"); | 108 RunTest(352, 288, "foreman_cif"); |
| 108 } | 109 } |
| 109 | 110 |
| 110 } // namespace test | 111 } // namespace test |
| 111 } // namespace webrtc | 112 } // namespace webrtc |
| OLD | NEW |