Index: webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
diff --git a/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc b/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
index 5339cffdfc7ed31ba6d7a97cfa947b9bfd1eece1..0d57531debf96ff26dd0d7d72ae14db63d713404 100644 |
--- a/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
+++ b/webrtc/modules/audio_coding/codecs/opus/opus_complexity_unittest.cc |
@@ -49,14 +49,6 @@ int64_t RunComplexityTest(const AudioEncoderOpus::Config& config) { |
} |
} // namespace |
-#if defined(WEBRTC_ANDROID) |
-#define MAYBE_AudioEncoderOpusComplexityAdaptationTest \ |
- DISABLED_AudioEncoderOpusComplexityAdaptationTest |
-#else |
-#define MAYBE_AudioEncoderOpusComplexityAdaptationTest \ |
- AudioEncoderOpusComplexityAdaptationTest |
-#endif |
- |
// This test encodes an audio file using Opus twice with different bitrates |
// (12.5 kbps and 15.5 kbps). The runtime for each is measured, and the ratio |
// between the two is calculated and tracked. This test explicitly sets the |
@@ -67,10 +59,12 @@ int64_t RunComplexityTest(const AudioEncoderOpus::Config& config) { |
// mobiles, the regular complexity is 5, and we expect the resulting ratio to |
// be higher, since we have explicitly asked for a higher complexity setting at |
// the lower rate. |
-TEST(MAYBE_AudioEncoderOpusComplexityAdaptationTest, AdaptationOn) { |
+TEST(AudioEncoderOpusComplexityAdaptationTest, AdaptationOn) { |
// Create config. |
AudioEncoderOpus::Config config; |
- config.bitrate_bps = rtc::Optional<int>(12500); |
+ // The limit -- including the hysteresis window -- at which the complexity |
+ // shuold be increased. |
+ config.bitrate_bps = rtc::Optional<int>(11000 - 1); |
config.low_rate_complexity = 9; |
int64_t runtime_12500bps = RunComplexityTest(config); |
@@ -85,16 +79,20 @@ TEST(MAYBE_AudioEncoderOpusComplexityAdaptationTest, AdaptationOn) { |
// This test is identical to the one above, but without the complexity |
// adaptation enabled (neither on desktop, nor on mobile). The expectation is |
// that the resulting ratio is less than 100% at all times. |
-TEST(MAYBE_AudioEncoderOpusComplexityAdaptationTest, AdaptationOff) { |
+TEST(AudioEncoderOpusComplexityAdaptationTest, AdaptationOff) { |
// Create config. |
AudioEncoderOpus::Config config; |
- config.bitrate_bps = rtc::Optional<int>(12500); |
+ // The limit -- including the hysteresis window -- at which the complexity |
+ // shuold be increased (but not in this test since complexity adaptation is |
+ // disabled). |
+ config.bitrate_bps = rtc::Optional<int>(11000 - 1); |
int64_t runtime_12500bps = RunComplexityTest(config); |
minyue-webrtc
2016/12/19 13:50:35
still 12500?
hlundin-webrtc
2016/12/19 13:55:16
No. My bad. Changed the variable name to runtime_1
|
config.bitrate_bps = rtc::Optional<int>(15500); |
int64_t runtime_15500bps = RunComplexityTest(config); |
test::PrintResult("opus_encoding_complexity_ratio", "", "adaptation_off", |
- 100.0 * runtime_12500bps / runtime_15500bps, "", true); |
+ 100.0 * runtime_12500bps / runtime_15500bps, "percent", |
hlundin-webrtc
2016/12/19 12:54:15
This was missing; added now to match line 75.
|
+ true); |
} |
} // namespace webrtc |