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

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

Issue 2962293002: Remove ProcessParams struct. (Closed)
Patch Set: rebase Created 3 years, 4 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.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 // Bitrate and frame rate profile. 60 // Bitrate and frame rate profile.
61 RateProfile rate_profile; 61 RateProfile rate_profile;
62 SetRateProfile(&rate_profile, 62 SetRateProfile(&rate_profile,
63 0, // update_index 63 0, // update_index
64 bitrate_, framerate_, 64 bitrate_, framerate_,
65 0); // frame_index_rate_update 65 0); // frame_index_rate_update
66 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1; 66 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1;
67 rate_profile.num_frames = kNumFramesLong; 67 rate_profile.num_frames = kNumFramesLong;
68 68
69 // Codec/network settings. 69 // Codec/network settings.
70 ProcessParams process_settings(kHwCodec, kUseSingleCore, kPacketLoss, 70 SetProcessParams(&config_, kHwCodec, kUseSingleCore, kPacketLoss,
71 kKeyFrameInterval, filename, kVerboseLogging, 71 kKeyFrameInterval, filename, kVerboseLogging, kBatchMode);
72 kBatchMode);
73 SetCodecSettings(&config_, &codec_settings_, codec_type_, 72 SetCodecSettings(&config_, &codec_settings_, codec_type_,
74 kNumTemporalLayers, kErrorConcealmentOn, kDenoisingOn, 73 kNumTemporalLayers, kErrorConcealmentOn, kDenoisingOn,
75 kFrameDropperOn, kSpatialResizeOn, kResilienceOn, width, 74 kFrameDropperOn, kSpatialResizeOn, kResilienceOn, width,
76 height); 75 height);
77 76
78 // Use default thresholds for quality (PSNR and SSIM). 77 // Use default thresholds for quality (PSNR and SSIM).
79 QualityThresholds quality_thresholds; 78 QualityThresholds quality_thresholds;
80 79
81 // Use very loose thresholds for rate control, so even poor HW codecs will 80 // Use very loose thresholds for rate control, so even poor HW codecs will
82 // pass the requirements. 81 // pass the requirements.
83 RateControlThresholds rc_thresholds[1]; 82 RateControlThresholds rc_thresholds[1];
84 // clang-format off 83 // clang-format off
85 SetRateControlThresholds( 84 SetRateControlThresholds(
86 rc_thresholds, 85 rc_thresholds,
87 0, // update_index 86 0, // update_index
88 kNumFramesLong + 1, // max_num_dropped_frames 87 kNumFramesLong + 1, // max_num_dropped_frames
89 10000, // max_key_frame_size_mismatch 88 10000, // max_key_frame_size_mismatch
90 10000, // max_delta_frame_size_mismatch 89 10000, // max_delta_frame_size_mismatch
91 10000, // max_encoding_rate_mismatch 90 10000, // max_encoding_rate_mismatch
92 kNumFramesLong + 1, // max_time_hit_target 91 kNumFramesLong + 1, // max_time_hit_target
93 0, // num_spatial_resizes 92 0, // num_spatial_resizes
94 1); // num_key_frames 93 1); // num_key_frames
95 // clang-format on 94 // clang-format on
96 95
97 ProcessFramesAndVerify(quality_thresholds, rate_profile, process_settings, 96 ProcessFramesAndVerify(quality_thresholds, rate_profile, rc_thresholds,
98 rc_thresholds, &kVisualizationParams); 97 &kVisualizationParams);
99 } 98 }
100 99
101 const int bitrate_; 100 const int bitrate_;
102 const int framerate_; 101 const int framerate_;
103 const VideoCodecType codec_type_; 102 const VideoCodecType codec_type_;
104 }; 103 };
105 104
106 INSTANTIATE_TEST_CASE_P( 105 INSTANTIATE_TEST_CASE_P(
107 CodecSettings, 106 CodecSettings,
108 PlotVideoProcessorIntegrationTest, 107 PlotVideoProcessorIntegrationTest,
(...skipping 16 matching lines...) Expand all
125 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) { 124 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) {
126 RunTest(320, 240, "foreman_320x240"); 125 RunTest(320, 240, "foreman_320x240");
127 } 126 }
128 127
129 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) { 128 TEST_P(PlotVideoProcessorIntegrationTest, Process352x288) {
130 RunTest(352, 288, "foreman_cif"); 129 RunTest(352, 288, "foreman_cif");
131 } 130 }
132 131
133 } // namespace test 132 } // namespace test
134 } // namespace webrtc 133 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/codecs/test/videoprocessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698