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

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

Issue 1629413002: Update sha1 files and unittests for Opus v1.1.2 (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comment about Opus network stats file for neteq tests 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 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1399 "android_arm64_payload"), 1399 "android_arm64_payload"),
1400 50, test::AcmReceiveTestOldApi::kStereoOutput); 1400 50, test::AcmReceiveTestOldApi::kStereoOutput);
1401 } 1401 }
1402 #endif 1402 #endif
1403 1403
1404 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) { 1404 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) {
1405 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); 1405 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
1406 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1406 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1407 "855041f2490b887302bce9d544731849", 1407 "855041f2490b887302bce9d544731849",
1408 "855041f2490b887302bce9d544731849", 1408 "855041f2490b887302bce9d544731849",
1409 "1e1a0fce893fef2d66886a7f09e2ebce", 1409 "9692eede45638eb425e0daf9c75b5c7a",
1410 "7417a66c28be42d5d9b2d64e0c191585"), 1410 "c4faa472fbb0730370aaf34920381a09"),
1411 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1411 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1412 "d781cce1ab986b618d0da87226cdde30", 1412 "d781cce1ab986b618d0da87226cdde30",
1413 "d781cce1ab986b618d0da87226cdde30", 1413 "d781cce1ab986b618d0da87226cdde30",
1414 "1a1fe04dd12e755949987c8d729fb3e0", 1414 "8d6782b905c3230d4b0e3e83e1fc3439",
1415 "47b0b04f1d03076b857c86c72c2c298b"), 1415 "8b0126eab82d9e4e367ab33ded2f1a8e"),
1416 50, test::AcmReceiveTestOldApi::kStereoOutput); 1416 50, test::AcmReceiveTestOldApi::kStereoOutput);
1417 } 1417 }
1418 1418
1419 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms_voip) { 1419 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms_voip) {
1420 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); 1420 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960));
1421 // If not set, default will be kAudio in case of stereo. 1421 // If not set, default will be kAudio in case of stereo.
1422 EXPECT_EQ(0, send_test_->acm()->SetOpusApplication(kVoip)); 1422 EXPECT_EQ(0, send_test_->acm()->SetOpusApplication(kVoip));
1423 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1423 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1424 "9b9e12bc3cc793740966e11cbfa8b35b", 1424 "9b9e12bc3cc793740966e11cbfa8b35b",
1425 "9b9e12bc3cc793740966e11cbfa8b35b", 1425 "9b9e12bc3cc793740966e11cbfa8b35b",
1426 "57412a4b5771d19ff03ec35deffe7067", 1426 "0de6249018fdd316c21086db84e10610",
1427 "7ad0bbefcaa87e23187bf4a56d2f3513"), 1427 "fd21a19b6b1e891f5daea6c4a299c254"),
1428 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1428 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1429 "c7340b1189652ab6b5e80dade7390cb4", 1429 "c7340b1189652ab6b5e80dade7390cb4",
1430 "c7340b1189652ab6b5e80dade7390cb4", 1430 "c7340b1189652ab6b5e80dade7390cb4",
1431 "cdfe85939c411d12b61701c566e22d26", 1431 "95612864c954ee63e28cc6eebad56626",
1432 "7a678fbe46df5bf0c67e88264a2d9275"), 1432 "49954b0d5a5f705a8798e7071b0c6f36"),
1433 50, test::AcmReceiveTestOldApi::kStereoOutput); 1433 50, test::AcmReceiveTestOldApi::kStereoOutput);
1434 } 1434 }
1435 1435
1436 // This test is for verifying the SetBitRate function. The bitrate is changed at 1436 // This test is for verifying the SetBitRate function. The bitrate is changed at
1437 // the beginning, and the number of generated bytes are checked. 1437 // the beginning, and the number of generated bytes are checked.
1438 class AcmSetBitRateOldApi : public ::testing::Test { 1438 class AcmSetBitRateOldApi : public ::testing::Test {
1439 protected: 1439 protected:
1440 static const int kTestDurationMs = 1000; 1440 static const int kTestDurationMs = 1000;
1441 1441
1442 // Sets up the test::AcmSendTest object. Returns true on success, otherwise 1442 // Sets up the test::AcmSendTest object. Returns true on success, otherwise
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1490 codec_frame_size_rtp_timestamps)); 1490 codec_frame_size_rtp_timestamps));
1491 } 1491 }
1492 1492
1493 rtc::scoped_ptr<test::AcmSendTestOldApi> send_test_; 1493 rtc::scoped_ptr<test::AcmSendTestOldApi> send_test_;
1494 rtc::scoped_ptr<test::InputAudioFile> audio_source_; 1494 rtc::scoped_ptr<test::InputAudioFile> audio_source_;
1495 }; 1495 };
1496 1496
1497 TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_10kbps) { 1497 TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_10kbps) {
1498 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); 1498 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
1499 #if defined(WEBRTC_ANDROID) 1499 #if defined(WEBRTC_ANDROID)
1500 Run(10000, 9328); 1500 Run(10000, 9288);
1501 #else 1501 #else
1502 Run(10000, 9072); 1502 Run(10000, 9024);
1503 #endif // WEBRTC_ANDROID 1503 #endif // WEBRTC_ANDROID
1504 1504
1505 } 1505 }
1506 1506
1507 TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_50kbps) { 1507 TEST_F(AcmSetBitRateOldApi, Opus_48khz_20ms_50kbps) {
1508 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); 1508 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
1509 #if defined(WEBRTC_ANDROID) 1509 #if defined(WEBRTC_ANDROID)
1510 Run(50000, 47952); 1510 Run(50000, 47960);
1511 #else 1511 #else
1512 Run(50000, 49600); 1512 Run(50000, 49544);
1513 #endif // WEBRTC_ANDROID 1513 #endif // WEBRTC_ANDROID
1514 } 1514 }
1515 1515
1516 // The result on the Android platforms is inconsistent for this test case. 1516 // The result on the Android platforms is inconsistent for this test case.
1517 // On android_rel the result is different from android and android arm64 rel. 1517 // On android_rel the result is different from android and android arm64 rel.
1518 #if defined(WEBRTC_ANDROID) 1518 #if defined(WEBRTC_ANDROID)
1519 #define MAYBE_Opus_48khz_20ms_100kbps DISABLED_Opus_48khz_20ms_100kbps 1519 #define MAYBE_Opus_48khz_20ms_100kbps DISABLED_Opus_48khz_20ms_100kbps
1520 #else 1520 #else
1521 #define MAYBE_Opus_48khz_20ms_100kbps Opus_48khz_20ms_100kbps 1521 #define MAYBE_Opus_48khz_20ms_100kbps Opus_48khz_20ms_100kbps
1522 #endif 1522 #endif
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1582 EXPECT_EQ(expected_after_switch_bits, nr_bytes_after * 8); 1582 EXPECT_EQ(expected_after_switch_bits, nr_bytes_after * 8);
1583 } 1583 }
1584 1584
1585 uint32_t sampling_freq_hz_; 1585 uint32_t sampling_freq_hz_;
1586 uint32_t frame_size_samples_; 1586 uint32_t frame_size_samples_;
1587 }; 1587 };
1588 1588
1589 TEST_F(AcmChangeBitRateOldApi, Opus_48khz_20ms_10kbps) { 1589 TEST_F(AcmChangeBitRateOldApi, Opus_48khz_20ms_10kbps) {
1590 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); 1590 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
1591 #if defined(WEBRTC_ANDROID) 1591 #if defined(WEBRTC_ANDROID)
1592 Run(10000, 32200, 5496); 1592 Run(10000, 32200, 5176);
1593 #else 1593 #else
1594 Run(10000, 32200, 5432); 1594 Run(10000, 32200, 5456);
1595 #endif // WEBRTC_ANDROID 1595 #endif // WEBRTC_ANDROID
1596 } 1596 }
1597 1597
1598 TEST_F(AcmChangeBitRateOldApi, Opus_48khz_20ms_50kbps) { 1598 TEST_F(AcmChangeBitRateOldApi, Opus_48khz_20ms_50kbps) {
1599 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); 1599 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
1600 #if defined(WEBRTC_ANDROID) 1600 #if defined(WEBRTC_ANDROID)
1601 Run(50000, 32200, 24912); 1601 Run(50000, 32200, 24768);
1602 #else 1602 #else
1603 Run(50000, 32200, 24792); 1603 Run(50000, 32200, 24848);
1604 #endif // WEBRTC_ANDROID 1604 #endif // WEBRTC_ANDROID
1605 } 1605 }
1606 1606
1607 TEST_F(AcmChangeBitRateOldApi, Opus_48khz_20ms_100kbps) { 1607 TEST_F(AcmChangeBitRateOldApi, Opus_48khz_20ms_100kbps) {
1608 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960)); 1608 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 1, 107, 960, 960));
1609 #if defined(WEBRTC_ANDROID) 1609 #if defined(WEBRTC_ANDROID)
1610 Run(100000, 32200, 51480); 1610 Run(100000, 32200, 51480);
1611 #else 1611 #else
1612 Run(100000, 32200, 50584); 1612 Run(100000, 32200, 50584);
1613 #endif // WEBRTC_ANDROID 1613 #endif // WEBRTC_ANDROID
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1777 Run(16000, 8000, 1000); 1777 Run(16000, 8000, 1000);
1778 } 1778 }
1779 1779
1780 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1780 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1781 Run(8000, 16000, 1000); 1781 Run(8000, 16000, 1000);
1782 } 1782 }
1783 1783
1784 #endif 1784 #endif
1785 1785
1786 } // namespace webrtc 1786 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698