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

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

Issue 1925053002: Revert of Avoiding overflow in cross correlation in NetEq. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 EXPECT_EQ(checksum_ref, checksum_string); 932 EXPECT_EQ(checksum_ref, checksum_string);
933 933
934 // Delete the output file. 934 // Delete the output file.
935 remove(output_file_name.c_str()); 935 remove(output_file_name.c_str());
936 } 936 }
937 }; 937 };
938 938
939 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ 939 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
940 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) 940 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722)
941 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { 941 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) {
942 Run(8000, PlatformChecksum("39ef9b20cd8b58cad7e0a3d111635827", 942 Run(8000, PlatformChecksum("f34e5c0e4dd4cd6c82b23f6ed006dad0",
943 "09ef9ae4e8890a9a2f7850f7326836a0", 943 "67a1471049dc87e7498bc19bf130dd35",
944 "a607f7d0ba98683c9c236217f86aaa6b", 944 "efb5a07480bad8afb184c4150f4b3f3a",
945 "4a54f6ec712bda58484a388e1a332b42"), 945 "51717ab374871cbfa2c6977ea2aa40f3"),
946 std::vector<ExternalDecoder>()); 946 std::vector<ExternalDecoder>());
947 } 947 }
948 948
949 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { 949 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) {
950 Run(16000, PlatformChecksum("53763516a209220a209e2287f54ecae6", 950 Run(16000, PlatformChecksum("5066b412805f3050f65154d676006964",
951 "37a61e657affd80c2b8f07cea9879411", 951 "887905a40d37f213b76f64296871473e",
952 "cdc3d88f6d8e497d4e00c62c0e6dbb3c", 952 "f580bfd4e5e29f0399b61b7512d4e3b4",
953 "83edb67c157d0e3a0fb9f7d7b1ce5dc7"), 953 "5b2ae32c590b41d0c601179e14eaae96"),
954 std::vector<ExternalDecoder>()); 954 std::vector<ExternalDecoder>());
955 } 955 }
956 956
957 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { 957 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) {
958 Run(32000, PlatformChecksum("ef1a373c9d03e1832bf4eaf389b57fb7", 958 Run(32000, PlatformChecksum("2cb4784af507c45b9121e2315def36f2",
959 "c7f7372441ca69858cd56b9ef4d5dcf2", 959 "d2392b3247095d894a49b74a1106f281",
960 "c4a0e0b2e031d62c693af2a9ff4337ac", 960 "fdf5166b98c43235978685e40e28fea6",
961 "4cbfc6ab4d704f5d9b4f10406437fda9"), 961 "7f620312f2fa74a10048bbb7739d4bf3"),
962 std::vector<ExternalDecoder>()); 962 std::vector<ExternalDecoder>());
963 } 963 }
964 964
965 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { 965 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) {
966 Run(48000, PlatformChecksum("fa4bd7c1d040e710d8b93c1a1fdbd2bb", 966 Run(48000, PlatformChecksum("ce63f874a198621fa35398e412640fcf",
967 "41856a46d0604ad307df749598b6cdce", 967 "2cf0b8fe9784e8c96db307e125beb723",
968 "22242dd832824046d48db9ea8a01f84c", 968 "71f89e87ee1bad594f529d6c036289ad",
969 "c7f46bf165400b266d9b57aee02d2747"), 969 "b64c891e99eccc9ff45541ef67c9e9bf"),
970 std::vector<ExternalDecoder>()); 970 std::vector<ExternalDecoder>());
971 } 971 }
972 972
973 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { 973 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) {
974 // Class intended to forward a call from a mock DecodeInternal to Decode on 974 // Class intended to forward a call from a mock DecodeInternal to Decode on
975 // the real decoder's Decode. DecodeInternal for the real decoder isn't 975 // the real decoder's Decode. DecodeInternal for the real decoder isn't
976 // public. 976 // public.
977 class DecodeForwarder { 977 class DecodeForwarder {
978 public: 978 public:
979 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} 979 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {}
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); 1014 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration));
1015 ExternalDecoder ed; 1015 ExternalDecoder ed;
1016 ed.rtp_payload_type = 0; 1016 ed.rtp_payload_type = 0;
1017 ed.external_decoder = &mock_decoder; 1017 ed.external_decoder = &mock_decoder;
1018 ed.sample_rate_hz = 8000; 1018 ed.sample_rate_hz = 8000;
1019 ed.num_channels = 1; 1019 ed.num_channels = 1;
1020 ed.name = "MockPCMU"; 1020 ed.name = "MockPCMU";
1021 std::vector<ExternalDecoder> external_decoders; 1021 std::vector<ExternalDecoder> external_decoders;
1022 external_decoders.push_back(ed); 1022 external_decoders.push_back(ed);
1023 1023
1024 Run(48000, PlatformChecksum("fa4bd7c1d040e710d8b93c1a1fdbd2bb", 1024 Run(48000, PlatformChecksum("ce63f874a198621fa35398e412640fcf",
1025 "41856a46d0604ad307df749598b6cdce", 1025 "2cf0b8fe9784e8c96db307e125beb723",
1026 "22242dd832824046d48db9ea8a01f84c", 1026 "71f89e87ee1bad594f529d6c036289ad",
1027 "c7f46bf165400b266d9b57aee02d2747"), 1027 "b64c891e99eccc9ff45541ef67c9e9bf"),
1028 external_decoders); 1028 external_decoders);
1029 1029
1030 EXPECT_CALL(mock_decoder, Die()); 1030 EXPECT_CALL(mock_decoder, Die());
1031 } 1031 }
1032 #endif 1032 #endif
1033 1033
1034 // This test verifies bit exactness for the send-side of ACM. The test setup is 1034 // This test verifies bit exactness for the send-side of ACM. The test setup is
1035 // a chain of three different test classes: 1035 // a chain of three different test classes:
1036 // 1036 //
1037 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest 1037 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 Run(16000, 8000, 1000); 1779 Run(16000, 8000, 1000);
1780 } 1780 }
1781 1781
1782 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1782 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1783 Run(8000, 16000, 1000); 1783 Run(8000, 16000, 1000);
1784 } 1784 }
1785 1785
1786 #endif 1786 #endif
1787 1787
1788 } // namespace webrtc 1788 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/BUILD.gn ('k') | webrtc/modules/audio_coding/neteq/background_noise.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698