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

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

Issue 2117763002: Removed LEGACY_BITEXACT from neteq_impl.cc and updated the ACM unit tests. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Updated checksums for arm64 Created 4 years, 5 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 EXPECT_EQ(checksum_ref, checksum_string); 951 EXPECT_EQ(checksum_ref, checksum_string);
952 952
953 // Delete the output file. 953 // Delete the output file.
954 remove(output_file_name.c_str()); 954 remove(output_file_name.c_str());
955 } 955 }
956 }; 956 };
957 957
958 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ 958 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
959 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) 959 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722)
960 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { 960 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) {
961 Run(8000, PlatformChecksum("90be25dd9505005aaadf91b77ee31624", 961 Run(8000, PlatformChecksum("86f0e58421dafe3471e1bcd62316174e",
962 "ac6dc4b5bf6d277f693889c4c916882e", 962 "e2c2176b822f109eab2c3317ff1f3a89",
963 "a607f7d0ba98683c9c236217f86aaa6b", 963 "9c1058831bef8836d5880f86f03f02cd",
964 "4a54f6ec712bda58484a388e1a332b42"), 964 "7294944a869a39085ae69278dca875ad"),
965 std::vector<ExternalDecoder>()); 965 std::vector<ExternalDecoder>());
966 } 966 }
967 967
968 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { 968 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) {
969 Run(16000, PlatformChecksum("2c713197d41becd52c1ceecbd2b9f687", 969 Run(16000, PlatformChecksum("0b895074ede8d93ff7d4b03e48ff4353",
970 "130cc2a43063c74197122e3760690e7d", 970 "9b92ee1731bc07e7a802c46883551029",
971 "cdc3d88f6d8e497d4e00c62c0e6dbb3c", 971 "1a29721666a594cc56688b442790d0f9",
972 "83edb67c157d0e3a0fb9f7d7b1ce5dc7"), 972 "c061a9486003d0c096504905521d0fe7"),
973 std::vector<ExternalDecoder>()); 973 std::vector<ExternalDecoder>());
974 } 974 }
975 975
976 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { 976 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) {
977 Run(32000, PlatformChecksum("fe5851d43c13df66a7ad30fdb124e62f", 977 Run(32000, PlatformChecksum("ed620557bab00d588db0af699dc05df9",
978 "309d24be4b287dc92c340f10a807a11e", 978 "9472cfaeba10282187a6376aeddba347",
979 "c4a0e0b2e031d62c693af2a9ff4337ac", 979 "0071b9962de77b1d71ecd0a0e5accf45",
980 "4cbfc6ab4d704f5d9b4f10406437fda9"), 980 "c6cca0a4dd27bb77505343a15ea13c77"),
981 std::vector<ExternalDecoder>()); 981 std::vector<ExternalDecoder>());
982 } 982 }
983 983
984 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { 984 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) {
985 Run(48000, PlatformChecksum("a9241f426b4bf2ac650b6d287469a550", 985 Run(48000, PlatformChecksum("e68904bd63da1bad4b00f4bd221f2325",
986 "30374fd4a932df942c1b1120e7b724ad", 986 "3418d41ee693f8fa6d5878de5a8c95d9",
987 "22242dd832824046d48db9ea8a01f84c", 987 "861e65072b1a10eec56ffde10c99bbce",
988 "c7f46bf165400b266d9b57aee02d2747"), 988 "244bafe12206b7e26276ff7c49fc1795"),
989 std::vector<ExternalDecoder>()); 989 std::vector<ExternalDecoder>());
990 } 990 }
991 991
992 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { 992 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) {
993 // Class intended to forward a call from a mock DecodeInternal to Decode on 993 // Class intended to forward a call from a mock DecodeInternal to Decode on
994 // the real decoder's Decode. DecodeInternal for the real decoder isn't 994 // the real decoder's Decode. DecodeInternal for the real decoder isn't
995 // public. 995 // public.
996 class DecodeForwarder { 996 class DecodeForwarder {
997 public: 997 public:
998 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} 998 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {}
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); 1036 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration));
1037 ExternalDecoder ed; 1037 ExternalDecoder ed;
1038 ed.rtp_payload_type = 0; 1038 ed.rtp_payload_type = 0;
1039 ed.external_decoder = &mock_decoder; 1039 ed.external_decoder = &mock_decoder;
1040 ed.sample_rate_hz = 8000; 1040 ed.sample_rate_hz = 8000;
1041 ed.num_channels = 1; 1041 ed.num_channels = 1;
1042 ed.name = "MockPCMU"; 1042 ed.name = "MockPCMU";
1043 std::vector<ExternalDecoder> external_decoders; 1043 std::vector<ExternalDecoder> external_decoders;
1044 external_decoders.push_back(ed); 1044 external_decoders.push_back(ed);
1045 1045
1046 Run(48000, PlatformChecksum("a9241f426b4bf2ac650b6d287469a550", 1046 Run(48000, PlatformChecksum("e68904bd63da1bad4b00f4bd221f2325",
1047 "30374fd4a932df942c1b1120e7b724ad", 1047 "3418d41ee693f8fa6d5878de5a8c95d9",
1048 "22242dd832824046d48db9ea8a01f84c", 1048 "861e65072b1a10eec56ffde10c99bbce",
1049 "c7f46bf165400b266d9b57aee02d2747"), 1049 "244bafe12206b7e26276ff7c49fc1795"),
1050 external_decoders); 1050 external_decoders);
1051 1051
1052 EXPECT_CALL(mock_decoder, Die()); 1052 EXPECT_CALL(mock_decoder, Die());
1053 } 1053 }
1054 #endif 1054 #endif
1055 1055
1056 // This test verifies bit exactness for the send-side of ACM. The test setup is 1056 // This test verifies bit exactness for the send-side of ACM. The test setup is
1057 // a chain of three different test classes: 1057 // a chain of three different test classes:
1058 // 1058 //
1059 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest 1059 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 Run(16000, 8000, 1000); 1797 Run(16000, 8000, 1000);
1798 } 1798 }
1799 1799
1800 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1800 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1801 Run(8000, 16000, 1000); 1801 Run(8000, 16000, 1000);
1802 } 1802 }
1803 1803
1804 #endif 1804 #endif
1805 1805
1806 } // namespace webrtc 1806 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/neteq/neteq_impl.cc » ('j') | webrtc/modules/audio_coding/neteq/neteq_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698