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

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

Issue 2695653002: Add support for creating HW codecs in VideoProcessor tests. (Closed)
Patch Set: Don't forget the mac! 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
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
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
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] = kNumFramesLong + 1; 52 rate_profile.frame_index_rate_update[1] = kNumFramesLong + 1;
52 rate_profile.num_frames = kNumFramesLong; 53 rate_profile.num_frames = kNumFramesLong;
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 14 matching lines...) Expand all
80 const VideoCodecType codec_type_; 81 const VideoCodecType codec_type_;
81 }; 82 };
82 83
83 INSTANTIATE_TEST_CASE_P( 84 INSTANTIATE_TEST_CASE_P(
84 CodecSettings, 85 CodecSettings,
85 PlotVideoProcessorIntegrationTest, 86 PlotVideoProcessorIntegrationTest,
86 ::testing::Combine(::testing::ValuesIn(kBitrates), 87 ::testing::Combine(::testing::ValuesIn(kBitrates),
87 ::testing::ValuesIn(kFps), 88 ::testing::ValuesIn(kFps),
88 ::testing::ValuesIn(kVideoCodecType))); 89 ::testing::ValuesIn(kVideoCodecType)));
89 90
90 TEST_P(PlotVideoProcessorIntegrationTest, ProcessSQCif) { 91 TEST_P(PlotVideoProcessorIntegrationTest, Process128x96) {
91 RunTest(128, 96, "foreman_128x96"); 92 RunTest(128, 96, "foreman_128x96");
92 } 93 }
93 94
94 TEST_P(PlotVideoProcessorIntegrationTest, ProcessQQVga) { 95 TEST_P(PlotVideoProcessorIntegrationTest, Process160x120) {
95 RunTest(160, 120, "foreman_160x120"); 96 RunTest(160, 120, "foreman_160x120");
96 } 97 }
97 98
98 TEST_P(PlotVideoProcessorIntegrationTest, ProcessQCif) { 99 TEST_P(PlotVideoProcessorIntegrationTest, Process176x144) {
99 RunTest(176, 144, "foreman_176x144"); 100 RunTest(176, 144, "foreman_176x144");
100 } 101 }
101 102
102 TEST_P(PlotVideoProcessorIntegrationTest, ProcessQVga) { 103 TEST_P(PlotVideoProcessorIntegrationTest, Process320x240) {
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, Process352x288) {
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698