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

Side by Side Diff: webrtc/modules/audio_coding/acm2/audio_coding_module_unittest_oldapi.cc

Issue 1547343002: Remove DISABLED_ON_ macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: win compile Created 4 years, 11 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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 23 matching lines...) Expand all
34 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h" 34 #include "webrtc/modules/audio_coding/neteq/tools/input_audio_file.h"
35 #include "webrtc/modules/audio_coding/neteq/tools/output_audio_file.h" 35 #include "webrtc/modules/audio_coding/neteq/tools/output_audio_file.h"
36 #include "webrtc/modules/audio_coding/neteq/tools/packet.h" 36 #include "webrtc/modules/audio_coding/neteq/tools/packet.h"
37 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h" 37 #include "webrtc/modules/audio_coding/neteq/tools/rtp_file_source.h"
38 #include "webrtc/modules/include/module_common_types.h" 38 #include "webrtc/modules/include/module_common_types.h"
39 #include "webrtc/system_wrappers/include/clock.h" 39 #include "webrtc/system_wrappers/include/clock.h"
40 #include "webrtc/system_wrappers/include/critical_section_wrapper.h" 40 #include "webrtc/system_wrappers/include/critical_section_wrapper.h"
41 #include "webrtc/system_wrappers/include/event_wrapper.h" 41 #include "webrtc/system_wrappers/include/event_wrapper.h"
42 #include "webrtc/system_wrappers/include/sleep.h" 42 #include "webrtc/system_wrappers/include/sleep.h"
43 #include "webrtc/test/testsupport/fileutils.h" 43 #include "webrtc/test/testsupport/fileutils.h"
44 #include "webrtc/test/testsupport/gtest_disable.h"
45 44
46 using ::testing::AtLeast; 45 using ::testing::AtLeast;
47 using ::testing::Invoke; 46 using ::testing::Invoke;
48 using ::testing::_; 47 using ::testing::_;
49 48
50 namespace webrtc { 49 namespace webrtc {
51 50
52 namespace { 51 namespace {
53 const int kSampleRateHz = 16000; 52 const int kSampleRateHz = 16000;
54 const int kNumSamples10ms = kSampleRateHz / 100; 53 const int kNumSamples10ms = kSampleRateHz / 100;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 rtc::scoped_ptr<AudioCodingModule> acm_; 230 rtc::scoped_ptr<AudioCodingModule> acm_;
232 PacketizationCallbackStubOldApi packet_cb_; 231 PacketizationCallbackStubOldApi packet_cb_;
233 WebRtcRTPHeader rtp_header_; 232 WebRtcRTPHeader rtp_header_;
234 AudioFrame input_frame_; 233 AudioFrame input_frame_;
235 CodecInst codec_; 234 CodecInst codec_;
236 Clock* clock_; 235 Clock* clock_;
237 }; 236 };
238 237
239 // Check if the statistics are initialized correctly. Before any call to ACM 238 // Check if the statistics are initialized correctly. Before any call to ACM
240 // all fields have to be zero. 239 // all fields have to be zero.
241 TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(InitializedToZero)) { 240 #if defined(WEBRTC_ANDROID)
241 TEST_F(AudioCodingModuleTestOldApi, DISABLED_InitializedToZero) {
242 #else
243 TEST_F(AudioCodingModuleTestOldApi, InitializedToZero) {
244 #endif
242 RegisterCodec(); 245 RegisterCodec();
243 AudioDecodingCallStats stats; 246 AudioDecodingCallStats stats;
244 acm_->GetDecodingCallStatistics(&stats); 247 acm_->GetDecodingCallStatistics(&stats);
245 EXPECT_EQ(0, stats.calls_to_neteq); 248 EXPECT_EQ(0, stats.calls_to_neteq);
246 EXPECT_EQ(0, stats.calls_to_silence_generator); 249 EXPECT_EQ(0, stats.calls_to_silence_generator);
247 EXPECT_EQ(0, stats.decoded_normal); 250 EXPECT_EQ(0, stats.decoded_normal);
248 EXPECT_EQ(0, stats.decoded_cng); 251 EXPECT_EQ(0, stats.decoded_cng);
249 EXPECT_EQ(0, stats.decoded_plc); 252 EXPECT_EQ(0, stats.decoded_plc);
250 EXPECT_EQ(0, stats.decoded_plc_cng); 253 EXPECT_EQ(0, stats.decoded_plc_cng);
251 } 254 }
252 255
253 // Insert some packets and pull audio. Check statistics are valid. Then, 256 // Insert some packets and pull audio. Check statistics are valid. Then,
254 // simulate packet loss and check if PLC and PLC-to-CNG statistics are 257 // simulate packet loss and check if PLC and PLC-to-CNG statistics are
255 // correctly updated. 258 // correctly updated.
256 TEST_F(AudioCodingModuleTestOldApi, DISABLED_ON_ANDROID(NetEqCalls)) { 259 #if defined(WEBRTC_ANDROID)
260 TEST_F(AudioCodingModuleTestOldApi, DISABLED_NetEqCalls) {
261 #else
262 TEST_F(AudioCodingModuleTestOldApi, NetEqCalls) {
263 #endif
257 RegisterCodec(); 264 RegisterCodec();
258 AudioDecodingCallStats stats; 265 AudioDecodingCallStats stats;
259 const int kNumNormalCalls = 10; 266 const int kNumNormalCalls = 10;
260 267
261 for (int num_calls = 0; num_calls < kNumNormalCalls; ++num_calls) { 268 for (int num_calls = 0; num_calls < kNumNormalCalls; ++num_calls) {
262 InsertPacketAndPullAudio(); 269 InsertPacketAndPullAudio();
263 } 270 }
264 acm_->GetDecodingCallStatistics(&stats); 271 acm_->GetDecodingCallStatistics(&stats);
265 EXPECT_EQ(kNumNormalCalls, stats.calls_to_neteq); 272 EXPECT_EQ(kNumNormalCalls, stats.calls_to_neteq);
266 EXPECT_EQ(0, stats.calls_to_silence_generator); 273 EXPECT_EQ(0, stats.calls_to_silence_generator);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 EXPECT_EQ(i / k10MsBlocksPerPacket, packet_cb_.num_calls()); 320 EXPECT_EQ(i / k10MsBlocksPerPacket, packet_cb_.num_calls());
314 if (packet_cb_.num_calls() > 0) 321 if (packet_cb_.num_calls() > 0)
315 EXPECT_EQ(kAudioFrameSpeech, packet_cb_.last_frame_type()); 322 EXPECT_EQ(kAudioFrameSpeech, packet_cb_.last_frame_type());
316 InsertAudioAndVerifyEncoding(); 323 InsertAudioAndVerifyEncoding();
317 } 324 }
318 EXPECT_EQ(kLoops / k10MsBlocksPerPacket, packet_cb_.num_calls()); 325 EXPECT_EQ(kLoops / k10MsBlocksPerPacket, packet_cb_.num_calls());
319 EXPECT_EQ(kAudioFrameSpeech, packet_cb_.last_frame_type()); 326 EXPECT_EQ(kAudioFrameSpeech, packet_cb_.last_frame_type());
320 } 327 }
321 328
322 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) 329 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
323 #define IF_ISAC(x) x
324 #else
325 #define IF_ISAC(x) DISABLED_##x
326 #endif
327
328 // Verifies that the RTP timestamp series is not reset when the codec is 330 // Verifies that the RTP timestamp series is not reset when the codec is
329 // changed. 331 // changed.
330 TEST_F(AudioCodingModuleTestOldApi, 332 TEST_F(AudioCodingModuleTestOldApi, TimestampSeriesContinuesWhenCodecChanges) {
331 IF_ISAC(TimestampSeriesContinuesWhenCodecChanges)) {
332 RegisterCodec(); // This registers the default codec. 333 RegisterCodec(); // This registers the default codec.
333 uint32_t expected_ts = input_frame_.timestamp_; 334 uint32_t expected_ts = input_frame_.timestamp_;
334 int blocks_per_packet = codec_.pacsize / (kSampleRateHz / 100); 335 int blocks_per_packet = codec_.pacsize / (kSampleRateHz / 100);
335 // Encode 5 packets of the first codec type. 336 // Encode 5 packets of the first codec type.
336 const int kNumPackets1 = 5; 337 const int kNumPackets1 = 5;
337 for (int j = 0; j < kNumPackets1; ++j) { 338 for (int j = 0; j < kNumPackets1; ++j) {
338 for (int i = 0; i < blocks_per_packet; ++i) { 339 for (int i = 0; i < blocks_per_packet; ++i) {
339 EXPECT_EQ(j, packet_cb_.num_calls()); 340 EXPECT_EQ(j, packet_cb_.num_calls());
340 InsertAudio(); 341 InsertAudio();
341 } 342 }
(...skipping 11 matching lines...) Expand all
353 for (int j = 0; j < kNumPackets2; ++j) { 354 for (int j = 0; j < kNumPackets2; ++j) {
354 for (int i = 0; i < blocks_per_packet; ++i) { 355 for (int i = 0; i < blocks_per_packet; ++i) {
355 EXPECT_EQ(kNumPackets1 + j, packet_cb_.num_calls()); 356 EXPECT_EQ(kNumPackets1 + j, packet_cb_.num_calls());
356 InsertAudio(); 357 InsertAudio();
357 } 358 }
358 EXPECT_EQ(kNumPackets1 + j + 1, packet_cb_.num_calls()); 359 EXPECT_EQ(kNumPackets1 + j + 1, packet_cb_.num_calls());
359 EXPECT_EQ(expected_ts, packet_cb_.last_timestamp()); 360 EXPECT_EQ(expected_ts, packet_cb_.last_timestamp());
360 expected_ts += codec_.pacsize; 361 expected_ts += codec_.pacsize;
361 } 362 }
362 } 363 }
364 #endif
363 365
364 // Introduce this class to set different expectations on the number of encoded 366 // Introduce this class to set different expectations on the number of encoded
365 // bytes. This class expects all encoded packets to be 9 bytes (matching one 367 // bytes. This class expects all encoded packets to be 9 bytes (matching one
366 // CNG SID frame) or 0 bytes. This test depends on |input_frame_| containing 368 // CNG SID frame) or 0 bytes. This test depends on |input_frame_| containing
367 // (near-)zero values. It also introduces a way to register comfort noise with 369 // (near-)zero values. It also introduces a way to register comfort noise with
368 // a custom payload type. 370 // a custom payload type.
369 class AudioCodingModuleTestWithComfortNoiseOldApi 371 class AudioCodingModuleTestWithComfortNoiseOldApi
370 : public AudioCodingModuleTestOldApi { 372 : public AudioCodingModuleTestOldApi {
371 protected: 373 protected:
372 void RegisterCngCodec(int rtp_payload_type) { 374 void RegisterCngCodec(int rtp_payload_type) {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 rtc::PlatformThread pull_audio_thread_; 577 rtc::PlatformThread pull_audio_thread_;
576 const rtc::scoped_ptr<EventWrapper> test_complete_; 578 const rtc::scoped_ptr<EventWrapper> test_complete_;
577 int send_count_; 579 int send_count_;
578 int insert_packet_count_; 580 int insert_packet_count_;
579 int pull_audio_count_ GUARDED_BY(crit_sect_); 581 int pull_audio_count_ GUARDED_BY(crit_sect_);
580 const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_; 582 const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
581 int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_); 583 int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
582 rtc::scoped_ptr<SimulatedClock> fake_clock_; 584 rtc::scoped_ptr<SimulatedClock> fake_clock_;
583 }; 585 };
584 586
585 TEST_F(AudioCodingModuleMtTestOldApi, DISABLED_ON_IOS(DoTest)) { 587 #if defined(WEBRTC_IOS)
588 TEST_F(AudioCodingModuleMtTestOldApi, DISABLED_DoTest) {
589 #else
590 TEST_F(AudioCodingModuleMtTestOldApi, DoTest) {
591 #endif
586 EXPECT_EQ(kEventSignaled, RunTest()); 592 EXPECT_EQ(kEventSignaled, RunTest());
587 } 593 }
588 594
589 // This is a multi-threaded ACM test using iSAC. The test encodes audio 595 // This is a multi-threaded ACM test using iSAC. The test encodes audio
590 // from a PCM file. The most recent encoded frame is used as input to the 596 // from a PCM file. The most recent encoded frame is used as input to the
591 // receiving part. Depending on timing, it may happen that the same RTP packet 597 // receiving part. Depending on timing, it may happen that the same RTP packet
592 // is inserted into the receiver multiple times, but this is a valid use-case, 598 // is inserted into the receiver multiple times, but this is a valid use-case,
593 // and simplifies the test code a lot. 599 // and simplifies the test code a lot.
594 class AcmIsacMtTestOldApi : public AudioCodingModuleMtTestOldApi { 600 class AcmIsacMtTestOldApi : public AudioCodingModuleMtTestOldApi {
595 protected: 601 protected:
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 } 685 }
680 } 686 }
681 return false; 687 return false;
682 } 688 }
683 689
684 int last_packet_number_; 690 int last_packet_number_;
685 std::vector<uint8_t> last_payload_vec_; 691 std::vector<uint8_t> last_payload_vec_;
686 test::AudioLoop audio_loop_; 692 test::AudioLoop audio_loop_;
687 }; 693 };
688 694
689 TEST_F(AcmIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) { 695 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
696 #if defined(WEBRTC_IOS)
697 TEST_F(AcmIsacMtTestOldApi, DISABLED_DoTest) {
698 #else
699 TEST_F(AcmIsacMtTestOldApi, DoTest) {
700 #endif
690 EXPECT_EQ(kEventSignaled, RunTest()); 701 EXPECT_EQ(kEventSignaled, RunTest());
691 } 702 }
703 #endif
692 704
693 class AcmReRegisterIsacMtTestOldApi : public AudioCodingModuleTestOldApi { 705 class AcmReRegisterIsacMtTestOldApi : public AudioCodingModuleTestOldApi {
694 protected: 706 protected:
695 static const int kRegisterAfterNumPackets = 5; 707 static const int kRegisterAfterNumPackets = 5;
696 static const int kNumPackets = 10; 708 static const int kNumPackets = 10;
697 static const int kPacketSizeMs = 30; 709 static const int kPacketSizeMs = 30;
698 static const int kPacketSizeSamples = kPacketSizeMs * 16; 710 static const int kPacketSizeSamples = kPacketSizeMs * 16;
699 711
700 AcmReRegisterIsacMtTestOldApi() 712 AcmReRegisterIsacMtTestOldApi()
701 : AudioCodingModuleTestOldApi(), 713 : AudioCodingModuleTestOldApi(),
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 const rtc::scoped_ptr<EventWrapper> test_complete_; 843 const rtc::scoped_ptr<EventWrapper> test_complete_;
832 const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_; 844 const rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_;
833 bool codec_registered_ GUARDED_BY(crit_sect_); 845 bool codec_registered_ GUARDED_BY(crit_sect_);
834 int receive_packet_count_ GUARDED_BY(crit_sect_); 846 int receive_packet_count_ GUARDED_BY(crit_sect_);
835 int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_); 847 int64_t next_insert_packet_time_ms_ GUARDED_BY(crit_sect_);
836 rtc::scoped_ptr<AudioEncoderIsac> isac_encoder_; 848 rtc::scoped_ptr<AudioEncoderIsac> isac_encoder_;
837 rtc::scoped_ptr<SimulatedClock> fake_clock_; 849 rtc::scoped_ptr<SimulatedClock> fake_clock_;
838 test::AudioLoop audio_loop_; 850 test::AudioLoop audio_loop_;
839 }; 851 };
840 852
841 TEST_F(AcmReRegisterIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) { 853 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
854 #if defined(WEBRTC_IOS)
855 TEST_F(AcmReRegisterIsacMtTestOldApi, DISABLED_DoTest) {
856 #else
857 TEST_F(AcmReRegisterIsacMtTestOldApi, DoTest) {
858 #endif
842 EXPECT_EQ(kEventSignaled, RunTest()); 859 EXPECT_EQ(kEventSignaled, RunTest());
843 } 860 }
861 #endif
844 862
845 // Disabling all of these tests on iOS until file support has been added. 863 // Disabling all of these tests on iOS until file support has been added.
846 // See https://code.google.com/p/webrtc/issues/detail?id=4752 for details. 864 // See https://code.google.com/p/webrtc/issues/detail?id=4752 for details.
847 #if !defined(WEBRTC_IOS) 865 #if !defined(WEBRTC_IOS)
848 866
849 class AcmReceiverBitExactnessOldApi : public ::testing::Test { 867 class AcmReceiverBitExactnessOldApi : public ::testing::Test {
850 public: 868 public:
851 static std::string PlatformChecksum(std::string others, 869 static std::string PlatformChecksum(std::string others,
852 std::string win64, 870 std::string win64,
853 std::string android_arm32, 871 std::string android_arm32,
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1187 rtc::scoped_ptr<test::AcmSendTestOldApi> send_test_; 1205 rtc::scoped_ptr<test::AcmSendTestOldApi> send_test_;
1188 rtc::scoped_ptr<test::InputAudioFile> audio_source_; 1206 rtc::scoped_ptr<test::InputAudioFile> audio_source_;
1189 uint32_t frame_size_rtp_timestamps_; 1207 uint32_t frame_size_rtp_timestamps_;
1190 int packet_count_; 1208 int packet_count_;
1191 uint8_t payload_type_; 1209 uint8_t payload_type_;
1192 uint16_t last_sequence_number_; 1210 uint16_t last_sequence_number_;
1193 uint32_t last_timestamp_; 1211 uint32_t last_timestamp_;
1194 rtc::Md5Digest payload_checksum_; 1212 rtc::Md5Digest payload_checksum_;
1195 }; 1213 };
1196 1214
1197 TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb30ms)) { 1215 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
1216 TEST_F(AcmSenderBitExactnessOldApi, IsacWb30ms) {
1198 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480)); 1217 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480));
1199 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1218 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1200 "0b58f9eeee43d5891f5f6c75e77984a3", 1219 "0b58f9eeee43d5891f5f6c75e77984a3",
1201 "c7e5bdadfa2871df95639fcc297cf23d", 1220 "c7e5bdadfa2871df95639fcc297cf23d",
1202 "0499ca260390769b3172136faad925b9", 1221 "0499ca260390769b3172136faad925b9",
1203 "866abf524acd2807efbe65e133c23f95"), 1222 "866abf524acd2807efbe65e133c23f95"),
1204 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1223 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1205 "3c79f16f34218271f3dca4e2b1dfe1bb", 1224 "3c79f16f34218271f3dca4e2b1dfe1bb",
1206 "d42cb5195463da26c8129bbfe73a22e6", 1225 "d42cb5195463da26c8129bbfe73a22e6",
1207 "83de248aea9c3c2bd680b6952401b4ca", 1226 "83de248aea9c3c2bd680b6952401b4ca",
1208 "3c79f16f34218271f3dca4e2b1dfe1bb"), 1227 "3c79f16f34218271f3dca4e2b1dfe1bb"),
1209 33, test::AcmReceiveTestOldApi::kMonoOutput); 1228 33, test::AcmReceiveTestOldApi::kMonoOutput);
1210 } 1229 }
1211 1230
1212 TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb60ms)) { 1231 TEST_F(AcmSenderBitExactnessOldApi, IsacWb60ms) {
1213 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960)); 1232 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960));
1214 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1233 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1215 "1ad29139a04782a33daad8c2b9b35875", 1234 "1ad29139a04782a33daad8c2b9b35875",
1216 "14d63c5f08127d280e722e3191b73bdd", 1235 "14d63c5f08127d280e722e3191b73bdd",
1217 "8da003e16c5371af2dc2be79a50f9076", 1236 "8da003e16c5371af2dc2be79a50f9076",
1218 "ef75e900e6f375e3061163c53fd09a63"), 1237 "ef75e900e6f375e3061163c53fd09a63"),
1219 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1238 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1220 "9e0a0ab743ad987b55b8e14802769c56", 1239 "9e0a0ab743ad987b55b8e14802769c56",
1221 "ebe04a819d3a9d83a83a17f271e1139a", 1240 "ebe04a819d3a9d83a83a17f271e1139a",
1222 "97aeef98553b5a4b5a68f8b716e8eaf0", 1241 "97aeef98553b5a4b5a68f8b716e8eaf0",
1223 "9e0a0ab743ad987b55b8e14802769c56"), 1242 "9e0a0ab743ad987b55b8e14802769c56"),
1224 16, test::AcmReceiveTestOldApi::kMonoOutput); 1243 16, test::AcmReceiveTestOldApi::kMonoOutput);
1225 } 1244 }
1226
1227 #ifdef WEBRTC_CODEC_ISAC
1228 #define IF_ISAC_FLOAT(x) x
1229 #else
1230 #define IF_ISAC_FLOAT(x) DISABLED_##x
1231 #endif 1245 #endif
1232 1246
1233 TEST_F(AcmSenderBitExactnessOldApi, 1247 #if defined(WEBRTC_CODEC_ISAC)
1234 DISABLED_ON_ANDROID(IF_ISAC_FLOAT(IsacSwb30ms))) { 1248 #if defined(WEBRTC_ANDROID)
1249 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_IsacSwb30ms) {
1250 #else
1251 TEST_F(AcmSenderBitExactnessOldApi, IsacSwb30ms) {
1252 #endif
1235 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 32000, 1, 104, 960, 960)); 1253 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 32000, 1, 104, 960, 960));
1236 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1254 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1237 "5683b58da0fbf2063c7adc2e6bfb3fb8", 1255 "5683b58da0fbf2063c7adc2e6bfb3fb8",
1238 "2b3c387d06f00b7b7aad4c9be56fb83d", "android_arm32_audio", 1256 "2b3c387d06f00b7b7aad4c9be56fb83d", "android_arm32_audio",
1239 "android_arm64_audio"), 1257 "android_arm64_audio"),
1240 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1258 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1241 "ce86106a93419aefb063097108ec94ab", 1259 "ce86106a93419aefb063097108ec94ab",
1242 "bcc2041e7744c7ebd9f701866856849c", "android_arm32_payload", 1260 "bcc2041e7744c7ebd9f701866856849c", "android_arm32_payload",
1243 "android_arm64_payload"), 1261 "android_arm64_payload"),
1244 33, test::AcmReceiveTestOldApi::kMonoOutput); 1262 33, test::AcmReceiveTestOldApi::kMonoOutput);
1245 } 1263 }
1264 #endif
1246 1265
1247 TEST_F(AcmSenderBitExactnessOldApi, Pcm16_8000khz_10ms) { 1266 TEST_F(AcmSenderBitExactnessOldApi, Pcm16_8000khz_10ms) {
1248 ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80)); 1267 ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80));
1249 Run("de4a98e1406f8b798d99cd0704e862e2", 1268 Run("de4a98e1406f8b798d99cd0704e862e2",
1250 "c1edd36339ce0326cc4550041ad719a0", 1269 "c1edd36339ce0326cc4550041ad719a0",
1251 100, 1270 100,
1252 test::AcmReceiveTestOldApi::kMonoOutput); 1271 test::AcmReceiveTestOldApi::kMonoOutput);
1253 } 1272 }
1254 1273
1255 TEST_F(AcmSenderBitExactnessOldApi, Pcm16_16000khz_10ms) { 1274 TEST_F(AcmSenderBitExactnessOldApi, Pcm16_16000khz_10ms) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 } 1336 }
1318 1337
1319 TEST_F(AcmSenderBitExactnessOldApi, Pcma_stereo_20ms) { 1338 TEST_F(AcmSenderBitExactnessOldApi, Pcma_stereo_20ms) {
1320 ASSERT_NO_FATAL_FAILURE(SetUpTest("PCMA", 8000, 2, 118, 160, 160)); 1339 ASSERT_NO_FATAL_FAILURE(SetUpTest("PCMA", 8000, 2, 118, 160, 160));
1321 Run("a5c6d83c5b7cedbeff734238220a4b0c", 1340 Run("a5c6d83c5b7cedbeff734238220a4b0c",
1322 "92b282c83efd20e7eeef52ba40842cf7", 1341 "92b282c83efd20e7eeef52ba40842cf7",
1323 50, 1342 50,
1324 test::AcmReceiveTestOldApi::kStereoOutput); 1343 test::AcmReceiveTestOldApi::kStereoOutput);
1325 } 1344 }
1326 1345
1327 #ifdef WEBRTC_CODEC_ILBC 1346 #if defined(WEBRTC_CODEC_ILBC)
1328 #define IF_ILBC(x) x 1347 #if defined(WEBRTC_ANDROID)
1348 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_Ilbc_30ms) {
1329 #else 1349 #else
1330 #define IF_ILBC(x) DISABLED_##x 1350 TEST_F(AcmSenderBitExactnessOldApi, Ilbc_30ms) {
1331 #endif 1351 #endif
1332
1333 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_ILBC(Ilbc_30ms))) {
1334 ASSERT_NO_FATAL_FAILURE(SetUpTest("ILBC", 8000, 1, 102, 240, 240)); 1352 ASSERT_NO_FATAL_FAILURE(SetUpTest("ILBC", 8000, 1, 102, 240, 240));
1335 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1353 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1336 "7b6ec10910debd9af08011d3ed5249f7", 1354 "7b6ec10910debd9af08011d3ed5249f7",
1337 "7b6ec10910debd9af08011d3ed5249f7", "android_arm32_audio", 1355 "7b6ec10910debd9af08011d3ed5249f7", "android_arm32_audio",
1338 "android_arm64_audio"), 1356 "android_arm64_audio"),
1339 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1357 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1340 "cfae2e9f6aba96e145f2bcdd5050ce78", 1358 "cfae2e9f6aba96e145f2bcdd5050ce78",
1341 "cfae2e9f6aba96e145f2bcdd5050ce78", "android_arm32_payload", 1359 "cfae2e9f6aba96e145f2bcdd5050ce78", "android_arm32_payload",
1342 "android_arm64_payload"), 1360 "android_arm64_payload"),
1343 33, test::AcmReceiveTestOldApi::kMonoOutput); 1361 33, test::AcmReceiveTestOldApi::kMonoOutput);
1344 } 1362 }
1345
1346 #ifdef WEBRTC_CODEC_G722
1347 #define IF_G722(x) x
1348 #else
1349 #define IF_G722(x) DISABLED_##x
1350 #endif 1363 #endif
1351 1364
1352 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_G722(G722_20ms))) { 1365 #if defined(WEBRTC_CODEC_G722)
1366 #if defined(WEBRTC_ANDROID)
1367 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_G722_20ms) {
1368 #else
1369 TEST_F(AcmSenderBitExactnessOldApi, G722_20ms) {
1370 #endif
1353 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160)); 1371 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160));
1354 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1372 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1355 "7d759436f2533582950d148b5161a36c", 1373 "7d759436f2533582950d148b5161a36c",
1356 "7d759436f2533582950d148b5161a36c", "android_arm32_audio", 1374 "7d759436f2533582950d148b5161a36c", "android_arm32_audio",
1357 "android_arm64_audio"), 1375 "android_arm64_audio"),
1358 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1376 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1359 "fc68a87e1380614e658087cb35d5ca10", 1377 "fc68a87e1380614e658087cb35d5ca10",
1360 "fc68a87e1380614e658087cb35d5ca10", "android_arm32_payload", 1378 "fc68a87e1380614e658087cb35d5ca10", "android_arm32_payload",
1361 "android_arm64_payload"), 1379 "android_arm64_payload"),
1362 50, test::AcmReceiveTestOldApi::kMonoOutput); 1380 50, test::AcmReceiveTestOldApi::kMonoOutput);
1363 } 1381 }
1364 1382
1365 TEST_F(AcmSenderBitExactnessOldApi, 1383 #if defined(WEBRTC_ANDROID)
1366 DISABLED_ON_ANDROID(IF_G722(G722_stereo_20ms))) { 1384 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_G722_stereo_20ms) {
1385 #else
1386 TEST_F(AcmSenderBitExactnessOldApi, G722_stereo_20ms) {
1387 #endif
1367 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160)); 1388 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160));
1368 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1389 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1369 "7190ee718ab3d80eca181e5f7140c210", 1390 "7190ee718ab3d80eca181e5f7140c210",
1370 "7190ee718ab3d80eca181e5f7140c210", "android_arm32_audio", 1391 "7190ee718ab3d80eca181e5f7140c210", "android_arm32_audio",
1371 "android_arm64_audio"), 1392 "android_arm64_audio"),
1372 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1393 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1373 "66516152eeaa1e650ad94ff85f668dac", 1394 "66516152eeaa1e650ad94ff85f668dac",
1374 "66516152eeaa1e650ad94ff85f668dac", "android_arm32_payload", 1395 "66516152eeaa1e650ad94ff85f668dac", "android_arm32_payload",
1375 "android_arm64_payload"), 1396 "android_arm64_payload"),
1376 50, test::AcmReceiveTestOldApi::kStereoOutput); 1397 50, test::AcmReceiveTestOldApi::kStereoOutput);
1377 } 1398 }
1399 #endif
1378 1400
1379 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) { 1401 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
1380 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); 1402 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
1381 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1403 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1382 "855041f2490b887302bce9d544731849", 1404 "855041f2490b887302bce9d544731849",
1383 "855041f2490b887302bce9d544731849", 1405 "855041f2490b887302bce9d544731849",
1384 "1e1a0fce893fef2d66886a7f09e2ebce", 1406 "1e1a0fce893fef2d66886a7f09e2ebce",
1385 "7417a66c28be42d5d9b2d64e0c191585"), 1407 "7417a66c28be42d5d9b2d64e0c191585"),
1386 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1408 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1387 "d781cce1ab986b618d0da87226cdde30", 1409 "d781cce1ab986b618d0da87226cdde30",
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
1483 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); 1505 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
1484 #if defined(WEBRTC_ANDROID) 1506 #if defined(WEBRTC_ANDROID)
1485 Run(50000, 47952); 1507 Run(50000, 47952);
1486 #else 1508 #else
1487 Run(50000, 49600); 1509 Run(50000, 49600);
1488 #endif // WEBRTC_ANDROID 1510 #endif // WEBRTC_ANDROID
1489 } 1511 }
1490 1512
1491 // The result on the Android platforms is inconsistent for this test case. 1513 // The result on the Android platforms is inconsistent for this test case.
1492 // On android_rel the result is different from android and android arm64 rel. 1514 // On android_rel the result is different from android and android arm64 rel.
1493 TEST_F(AcmSetBitRateOldApi, DISABLED_ON_ANDROID(Opus_48khz_20ms_100kbps)) { 1515 #if defined(WEBRTC_ANDROID)
1516 TEST_F(AcmSetBitRateOldApi, DISABLED_Opus_48khz_20ms_100kbps) {
1517 #else
1518 TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_100kbps) {
1519 #endif
1494 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); 1520 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
1495 Run(100000, 100888); 1521 Run(100000, 100888);
1496 } 1522 }
1497 1523
1498 // These next 2 tests ensure that the SetBitRate function has no effect on PCM 1524 // These next 2 tests ensure that the SetBitRate function has no effect on PCM
1499 TEST_F(AcmSetBitRateOldApi, Pcm16_8khz_10ms_8kbps) { 1525 TEST_F(AcmSetBitRateOldApi, Pcm16_8khz_10ms_8kbps) {
1500 ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80)); 1526 ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80));
1501 Run(8000, 128000); 1527 Run(8000, 128000);
1502 } 1528 }
1503 1529
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 Run(16000, 8000, 1000); 1773 Run(16000, 8000, 1000);
1748 } 1774 }
1749 1775
1750 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1776 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1751 Run(8000, 16000, 1000); 1777 Run(8000, 16000, 1000);
1752 } 1778 }
1753 1779
1754 #endif 1780 #endif
1755 1781
1756 } // namespace webrtc 1782 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698