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

Side by Side Diff: webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc

Issue 2525603002: Disable Opus complexity tests on Android (Closed)
Patch Set: Created 4 years 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 | no next file » | 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 uint32_t rtp_timestamp = 0u; 42 uint32_t rtp_timestamp = 0u;
43 for (size_t i = 0; i < 10000; ++i) { 43 for (size_t i = 0; i < 10000; ++i) {
44 encoded.Clear(); 44 encoded.Clear();
45 info = encoder.Encode(rtp_timestamp, audio_loop.GetNextBlock(), &encoded); 45 info = encoder.Encode(rtp_timestamp, audio_loop.GetNextBlock(), &encoded);
46 rtp_timestamp += kInputBlockSizeSamples; 46 rtp_timestamp += kInputBlockSizeSamples;
47 } 47 }
48 return clock->TimeInMilliseconds() - start_time_ms; 48 return clock->TimeInMilliseconds() - start_time_ms;
49 } 49 }
50 } // namespace 50 } // namespace
51 51
52 #if defined(WEBRTC_ANDROID)
53 #define MAYBE_AudioEncoderOpusComplexityAdaptationTest \
54 DISABLED_AudioEncoderOpusComplexityAdaptationTest
55 #else
56 #define MAYBE_AudioEncoderOpusComplexityAdaptationTest \
57 AudioEncoderOpusComplexityAdaptationTest
58 #endif
59
52 // This test encodes an audio file using Opus twice with different bitrates 60 // This test encodes an audio file using Opus twice with different bitrates
53 // (12.5 kbps and 15.5 kbps). The runtime for each is measured, and the ratio 61 // (12.5 kbps and 15.5 kbps). The runtime for each is measured, and the ratio
54 // between the two is calculated and tracked. This test explicitly sets the 62 // between the two is calculated and tracked. This test explicitly sets the
55 // low_rate_complexity to 9. When running on desktop platforms, this is the same 63 // low_rate_complexity to 9. When running on desktop platforms, this is the same
56 // as the regular complexity, and the expectation is that the resulting ratio 64 // as the regular complexity, and the expectation is that the resulting ratio
57 // should be less than 100% (since the encoder runs faster at lower bitrates, 65 // should be less than 100% (since the encoder runs faster at lower bitrates,
58 // given a fixed complexity setting). On the other hand, when running on 66 // given a fixed complexity setting). On the other hand, when running on
59 // mobiles, the regular complexity is 5, and we expect the resulting ratio to 67 // mobiles, the regular complexity is 5, and we expect the resulting ratio to
60 // be higher, since we have explicitly asked for a higher complexity setting at 68 // be higher, since we have explicitly asked for a higher complexity setting at
61 // the lower rate. 69 // the lower rate.
(...skipping 21 matching lines...) Expand all
83 config.bitrate_bps = rtc::Optional<int>(12500); 91 config.bitrate_bps = rtc::Optional<int>(12500);
84 int64_t runtime_12500bps = RunComplexityTest(config); 92 int64_t runtime_12500bps = RunComplexityTest(config);
85 93
86 config.bitrate_bps = rtc::Optional<int>(15500); 94 config.bitrate_bps = rtc::Optional<int>(15500);
87 int64_t runtime_15500bps = RunComplexityTest(config); 95 int64_t runtime_15500bps = RunComplexityTest(config);
88 96
89 test::PrintResult("opus_encoding_complexity_ratio", "", "adaptation_off", 97 test::PrintResult("opus_encoding_complexity_ratio", "", "adaptation_off",
90 100.0 * runtime_12500bps / runtime_15500bps, "", true); 98 100.0 * runtime_12500bps / runtime_15500bps, "", true);
91 } 99 }
92 } // namespace webrtc 100 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698