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

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

Issue 3004983002: Remove VideoProcessorIntegrationTest::SetTestConfig. (Closed)
Patch Set: asapersson comments 1. Created 3 years, 3 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
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 #include "webrtc/test/testsupport/fileutils.h"
14
13 namespace webrtc { 15 namespace webrtc {
14 namespace test { 16 namespace test {
15 17
16 namespace { 18 namespace {
17 19
18 // Loop variables. 20 // Loop variables.
19 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000}; 21 const int kBitrates[] = {30, 50, 100, 200, 300, 500, 1000};
20 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8}; 22 const VideoCodecType kVideoCodecType[] = {kVideoCodecVP8};
21 const bool kHwCodec[] = {false}; 23 const bool kHwCodec[] = {false};
22 24
23 // Codec settings. 25 // Codec settings.
24 const bool kUseSingleCore = false;
25 const bool kResilienceOn = false; 26 const bool kResilienceOn = false;
26 const int kNumTemporalLayers = 1; 27 const int kNumTemporalLayers = 1;
27 const bool kDenoisingOn = false; 28 const bool kDenoisingOn = false;
28 const bool kErrorConcealmentOn = false; 29 const bool kErrorConcealmentOn = false;
29 const bool kSpatialResizeOn = false; 30 const bool kSpatialResizeOn = false;
30 const bool kFrameDropperOn = false; 31 const bool kFrameDropperOn = false;
31 32
32 // Test settings. 33 // Test settings.
33 const bool kVerboseLogging = true; 34 const bool kUseSingleCore = false;
34 const float kPacketLoss = 0.0f;
35 const VisualizationParams kVisualizationParams = { 35 const VisualizationParams kVisualizationParams = {
36 false, // save_encoded_ivf 36 false, // save_encoded_ivf
37 false, // save_decoded_y4m 37 false, // save_decoded_y4m
38 }; 38 };
39 39
40 const int kNumFrames = 300; 40 const int kNumFrames = 300;
41 41
42 } // namespace 42 } // namespace
43 43
44 // Tests for plotting statistics from logs. 44 // Tests for plotting statistics from logs.
45 class PlotVideoProcessorIntegrationTest 45 class PlotVideoProcessorIntegrationTest
46 : public VideoProcessorIntegrationTest, 46 : public VideoProcessorIntegrationTest,
47 public ::testing::WithParamInterface< 47 public ::testing::WithParamInterface<
48 ::testing::tuple<int, VideoCodecType, bool>> { 48 ::testing::tuple<int, VideoCodecType, bool>> {
49 protected: 49 protected:
50 PlotVideoProcessorIntegrationTest() 50 PlotVideoProcessorIntegrationTest()
51 : bitrate_(::testing::get<0>(GetParam())), 51 : bitrate_(::testing::get<0>(GetParam())),
52 codec_type_(::testing::get<1>(GetParam())), 52 codec_type_(::testing::get<1>(GetParam())),
53 hw_codec_(::testing::get<2>(GetParam())) {} 53 hw_codec_(::testing::get<2>(GetParam())) {}
54 ~PlotVideoProcessorIntegrationTest() override = default; 54 ~PlotVideoProcessorIntegrationTest() override = default;
55 55
56 void RunTest(int width, 56 void RunTest(int width,
57 int height, 57 int height,
58 int framerate, 58 int framerate,
59 const std::string& filename) { 59 const std::string& filename) {
60 SetTestConfig(&config_, hw_codec_, kUseSingleCore, kPacketLoss, filename, 60 config_.filename = filename;
61 kVerboseLogging); 61 config_.input_filename = ResourcePath(filename, "yuv");
62 config_.output_filename =
63 TempFilename(OutputPath(), "plot_videoprocessor_integrationtest");
64 config_.use_single_core = kUseSingleCore;
65 config_.verbose = true;
66 config_.hw_codec = hw_codec_;
62 SetCodecSettings(&config_, codec_type_, kNumTemporalLayers, 67 SetCodecSettings(&config_, codec_type_, kNumTemporalLayers,
63 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn, 68 kErrorConcealmentOn, kDenoisingOn, kFrameDropperOn,
64 kSpatialResizeOn, kResilienceOn, width, height); 69 kSpatialResizeOn, kResilienceOn, width, height);
65 70
66 RateProfile rate_profile; 71 RateProfile rate_profile;
67 SetRateProfile(&rate_profile, 72 SetRateProfile(&rate_profile,
68 0, // update_index 73 0, // update_index
69 bitrate_, framerate, 74 bitrate_, framerate,
70 0); // frame_index_rate_update 75 0); // frame_index_rate_update
71 rate_profile.frame_index_rate_update[1] = kNumFrames + 1; 76 rate_profile.frame_index_rate_update[1] = kNumFrames + 1;
(...skipping 30 matching lines...) Expand all
102 TEST_P(PlotVideoProcessorIntegrationTest, Process_320x240_30fps) { 107 TEST_P(PlotVideoProcessorIntegrationTest, Process_320x240_30fps) {
103 RunTest(320, 240, 30, "foreman_320x240"); 108 RunTest(320, 240, 30, "foreman_320x240");
104 } 109 }
105 110
106 TEST_P(PlotVideoProcessorIntegrationTest, Process_352x288_30fps) { 111 TEST_P(PlotVideoProcessorIntegrationTest, Process_352x288_30fps) {
107 RunTest(352, 288, 30, "foreman_cif"); 112 RunTest(352, 288, 30, "foreman_cif");
108 } 113 }
109 114
110 } // namespace test 115 } // namespace test
111 } // namespace webrtc 116 } // 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