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

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

Issue 1908923002: Audio Coding Module: Use separate instances for 16 kHz and 32 kHz iSAC decoder (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: New test checksums for non-ARM platforms Created 4 years, 8 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
« no previous file with comments | « webrtc/modules/audio_coding/acm2/audio_coding_module_impl.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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("d9334a99c7f185860028e6f08e5b7390", 942 Run(8000, PlatformChecksum("f34e5c0e4dd4cd6c82b23f6ed006dad0",
943 "946803da293ef3fa39242d3059eac491", 943 "67a1471049dc87e7498bc19bf130dd35",
944 "efb5a07480bad8afb184c4150f4b3f3a", 944 "efb5a07480bad8afb184c4150f4b3f3a",
945 "51717ab374871cbfa2c6977ea2aa40f3"), 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("9ad7d5a5f3c9fac4e880a6fbfd9d3ac8", 950 Run(16000, PlatformChecksum("5066b412805f3050f65154d676006964",
951 "4fc1b82404ae33511c1cdb385774b2a4", 951 "887905a40d37f213b76f64296871473e",
952 "f580bfd4e5e29f0399b61b7512d4e3b4", 952 "f580bfd4e5e29f0399b61b7512d4e3b4",
953 "5b2ae32c590b41d0c601179e14eaae96"), 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("08e6085ccb96494b242f0ecc4c8a2dc8", 958 Run(32000, PlatformChecksum("2cb4784af507c45b9121e2315def36f2",
959 "d1f853b1e046c67c9ee186786eaf2124", 959 "d2392b3247095d894a49b74a1106f281",
960 "fdf5166b98c43235978685e40e28fea6", 960 "fdf5166b98c43235978685e40e28fea6",
961 "7f620312f2fa74a10048bbb7739d4bf3"), 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("31343887b7ef70772df733d072b0dd00", 966 Run(48000, PlatformChecksum("ce63f874a198621fa35398e412640fcf",
967 "f6893278d75dad42ac44bff77f674b33", 967 "2cf0b8fe9784e8c96db307e125beb723",
968 "71f89e87ee1bad594f529d6c036289ad", 968 "71f89e87ee1bad594f529d6c036289ad",
969 "b64c891e99eccc9ff45541ef67c9e9bf"), 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 {
(...skipping 36 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("31343887b7ef70772df733d072b0dd00", 1024 Run(48000, PlatformChecksum("ce63f874a198621fa35398e412640fcf",
1025 "f6893278d75dad42ac44bff77f674b33", 1025 "2cf0b8fe9784e8c96db307e125beb723",
1026 "71f89e87ee1bad594f529d6c036289ad", 1026 "71f89e87ee1bad594f529d6c036289ad",
1027 "b64c891e99eccc9ff45541ef67c9e9bf"), 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:
(...skipping 743 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/acm2/audio_coding_module_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698