Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(404)

Side by Side Diff: webrtc/modules/video_coding/codecs/test/plot_videoprocessor_integrationtest.cc

Issue 2703333004: Rename config structs in VideoProcessor tests. (Closed)
Patch Set: sprang comments 1. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 PlotVideoProcessorIntegrationTest() 46 PlotVideoProcessorIntegrationTest()
47 : bitrate_(::testing::get<0>(GetParam())), 47 : bitrate_(::testing::get<0>(GetParam())),
48 framerate_(::testing::get<1>(GetParam())), 48 framerate_(::testing::get<1>(GetParam())),
49 codec_type_(::testing::get<2>(GetParam())) {} 49 codec_type_(::testing::get<2>(GetParam())) {}
50 50
51 virtual ~PlotVideoProcessorIntegrationTest() {} 51 virtual ~PlotVideoProcessorIntegrationTest() {}
52 52
53 void RunTest(int width, int height, const std::string& filename) { 53 void RunTest(int width, int height, const std::string& filename) {
54 // Bitrate and frame rate profile. 54 // Bitrate and frame rate profile.
55 RateProfile rate_profile; 55 RateProfile rate_profile;
56 SetRateProfilePars(&rate_profile, 56 SetRateProfile(&rate_profile,
57 0, // update_index 57 0, // update_index
58 bitrate_, framerate_, 58 bitrate_, framerate_,
59 0); // frame_index_rate_update 59 0); // frame_index_rate_update
60 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; 60 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1;
61 rate_profile.num_frames = kNumFramesLong; 61 rate_profile.num_frames = kNumFramesLong;
62 // Codec/network settings. 62 // Codec/network settings.
63 CodecConfigPars process_settings; 63 CodecParams process_settings;
64 SetCodecParameters( 64 SetCodecParams(&process_settings, codec_type_, kHwCodec, kUseSingleCore,
65 &process_settings, codec_type_, kHwCodec, kUseSingleCore, kPacketLoss, 65 kPacketLoss,
66 -1, // key_frame_interval 66 -1, // key_frame_interval
67 1, // num_temporal_layers 67 1, // num_temporal_layers
68 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, kSpatialResizeOn, 68 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn,
69 width, height, filename, kVerboseLogging); 69 kSpatialResizeOn, width, height, filename, kVerboseLogging);
70 // Metrics for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min). 70 // Thresholds for expected quality (PSNR avg, PSNR min, SSIM avg, SSIM min).
71 QualityMetrics quality_metrics; 71 QualityThresholds quality_thresholds;
72 SetQualityMetrics(&quality_metrics, 15.0, 10.0, 0.2, 0.1); 72 SetQualityThresholds(&quality_thresholds, 15.0, 10.0, 0.2, 0.1);
73 // Metrics for rate control. 73 // Thresholds for rate control.
74 RateControlMetrics rc_metrics[1]; 74 RateControlThresholds rc_thresholds[1];
75 SetRateControlMetrics(rc_metrics, 75 SetRateControlThresholds(rc_thresholds,
76 0, // update_index 76 0, // update_index
77 300, // max_num_dropped_frames, 77 300, // max_num_dropped_frames,
78 400, // max_key_frame_size_mismatch 78 400, // max_key_frame_size_mismatch
79 200, // max_delta_frame_size_mismatch 79 200, // max_delta_frame_size_mismatch
80 100, // max_encoding_rate_mismatch 80 100, // max_encoding_rate_mismatch
81 300, // max_time_hit_target 81 300, // max_time_hit_target
82 0, // num_spatial_resizes 82 0, // num_spatial_resizes
83 1); // num_key_frames 83 1); // num_key_frames
84 ProcessFramesAndVerify(quality_metrics, rate_profile, process_settings, 84 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings,
85 rc_metrics, &kVisualizationParams); 85 rc_thresholds, &kVisualizationParams);
86 } 86 }
87 const int bitrate_; 87 const int bitrate_;
88 const int framerate_; 88 const int framerate_;
89 const VideoCodecType codec_type_; 89 const VideoCodecType codec_type_;
90 }; 90 };
91 91
92 INSTANTIATE_TEST_CASE_P( 92 INSTANTIATE_TEST_CASE_P(
93 CodecSettings, 93 CodecSettings,
94 PlotVideoProcessorIntegrationTest, 94 PlotVideoProcessorIntegrationTest,
95 ::testing::Combine(::testing::ValuesIn(kBitrates), 95 ::testing::Combine(::testing::ValuesIn(kBitrates),
(...skipping 15 matching lines...) Expand all
111 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { 111 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) {
112 RunTest(320, 240, "foreman_320x240"); 112 RunTest(320, 240, "foreman_320x240");
113 } 113 }
114 114
115 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { 115 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) {
116 RunTest(352, 288, "foreman_cif"); 116 RunTest(352, 288, "foreman_cif");
117 } 117 }
118 118
119 } // namespace test 119 } // namespace test
120 } // namespace webrtc 120 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/test/videoprocessor_integrationtest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698