| 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 VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; | 24 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; |
| 25 const bool kHwCodec = false; | 25 const bool kHwCodec = false; |
| 26 const bool kUseSingleCore = true; | 26 const bool kUseSingleCore = true; |
| 27 | 27 |
| 28 // Test settings. |
| 29 const bool kBatchMode = true; |
| 30 |
| 28 // Packet loss probability [0.0, 1.0]. | 31 // Packet loss probability [0.0, 1.0]. |
| 29 const float kPacketLoss = 0.0f; | 32 const float kPacketLoss = 0.0f; |
| 30 | 33 |
| 31 const VisualizationParams kVisualizationParams = { | 34 const VisualizationParams kVisualizationParams = { |
| 32 false, // save_source_y4m | 35 false, // save_source_y4m |
| 33 false, // save_encoded_ivf | 36 false, // save_encoded_ivf |
| 34 false, // save_decoded_y4m | 37 false, // save_decoded_y4m |
| 35 }; | 38 }; |
| 36 | 39 |
| 37 const bool kVerboseLogging = true; | 40 const bool kVerboseLogging = true; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 54 // Bitrate and frame rate profile. | 57 // Bitrate and frame rate profile. |
| 55 RateProfile rate_profile; | 58 RateProfile rate_profile; |
| 56 SetRateProfile(&rate_profile, | 59 SetRateProfile(&rate_profile, |
| 57 0, // update_index | 60 0, // update_index |
| 58 bitrate_, framerate_, | 61 bitrate_, framerate_, |
| 59 0); // frame_index_rate_update | 62 0); // frame_index_rate_update |
| 60 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; | 63 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; |
| 61 rate_profile.num_frames = kNumFramesLong; | 64 rate_profile.num_frames = kNumFramesLong; |
| 62 // Codec/network settings. | 65 // Codec/network settings. |
| 63 CodecParams process_settings; | 66 CodecParams process_settings; |
| 64 SetCodecParams(&process_settings, codec_type_, kHwCodec, kUseSingleCore, | 67 SetCodecParams( |
| 65 kPacketLoss, | 68 &process_settings, codec_type_, kHwCodec, kUseSingleCore, kPacketLoss, |
| 66 -1, // key_frame_interval | 69 -1, // key_frame_interval |
| 67 1, // num_temporal_layers | 70 1, // num_temporal_layers |
| 68 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, | 71 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, kSpatialResizeOn, |
| 69 kSpatialResizeOn, width, height, filename, kVerboseLogging); | 72 width, height, filename, kVerboseLogging, kBatchMode); |
| 70 // Thresholds for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min). | 73 // Thresholds for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min). |
| 71 QualityThresholds quality_thresholds; | 74 QualityThresholds quality_thresholds; |
| 72 SetQualityThresholds(&quality_thresholds, 15.0, 10.0, 0.2, 0.1); | 75 SetQualityThresholds(&quality_thresholds, 15.0, 10.0, 0.2, 0.1); |
| 73 // Thresholds for rate control. | 76 // Thresholds for rate control. |
| 74 RateControlThresholds rc_thresholds[1]; | 77 RateControlThresholds rc_thresholds[1]; |
| 75 SetRateControlThresholds(rc_thresholds, | 78 SetRateControlThresholds(rc_thresholds, |
| 76 0, // update_index | 79 0, // update_index |
| 77 300, // max_num_dropped_frames, | 80 300, // max_num_dropped_frames, |
| 78 400, // max_key_frame_size_mismatch | 81 400, // max_key_frame_size_mismatch |
| 79 200, // max_delta_frame_size_mismatch | 82 200, // max_delta_frame_size_mismatch |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { | 114 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { |
| 112 RunTest(320, 240, "foreman_320x240"); | 115 RunTest(320, 240, "foreman_320x240"); |
| 113 } | 116 } |
| 114 | 117 |
| 115 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { | 118 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { |
| 116 RunTest(352, 288, "foreman_cif"); | 119 RunTest(352, 288, "foreman_cif"); |
| 117 } | 120 } |
| 118 | 121 |
| 119 } // namespace test | 122 } // namespace test |
| 120 } // namespace webrtc | 123 } // namespace webrtc |
| OLD | NEW |