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

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

Issue 2763273003: Changed OLA window for neteq. Old code didnt work well with 48khz (Closed)
Patch Set: updated hash values for Android and win64 Created 3 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 | « AUTHORS ('k') | webrtc/modules/audio_coding/neteq/neteq_unittest.cc » ('j') | 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 959 matching lines...) Expand 10 before | Expand all | Expand 10 after
970 EXPECT_EQ(checksum_ref, checksum_string); 970 EXPECT_EQ(checksum_ref, checksum_string);
971 971
972 // Delete the output file. 972 // Delete the output file.
973 remove(output_file_name.c_str()); 973 remove(output_file_name.c_str());
974 } 974 }
975 }; 975 };
976 976
977 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ 977 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \
978 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) 978 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722)
979 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) { 979 TEST_F(AcmReceiverBitExactnessOldApi, 8kHzOutput) {
980 Run(8000, PlatformChecksum("25cda36a1b967e75c0eb580924247681", 980 Run(8000, PlatformChecksum("2adede965c6f87de7142c51552111d08",
981 "bbfe6a07f8bca872b5370885825ee061", 981 "028c0fc414b1c9ab7e582dccdf381e98",
982 "d5b9ae44d03dbd7c921dd9c228e03cc5", 982 "36c95170c1393d4b765d1c17b61ef977",
983 "4d851d1f2e4b8a2f1727fac8fba4b1e1")); 983 "4598140b5e4f7ee66c5adad609e65a3e"));
984 } 984 }
985 985
986 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) { 986 TEST_F(AcmReceiverBitExactnessOldApi, 16kHzOutput) {
987 Run(16000, PlatformChecksum("9c7b6f586c4b9d6d0195372660991353", 987 Run(16000, PlatformChecksum("c2550a3db7632de409e8db0093df1c12",
988 "1ab45baa674e681ec394e0d3824d8605", 988 "edd31f4b6665cd5b9041fb93f2316594",
989 "dd4e7f2521b5f47c0016b12f06c08695", 989 "22128bca51650cb61c80bed63b595603",
990 "5401b64b6dbe7f090f846e89b0d858ce")); 990 "f2aad418af974a3b1694d5ae5cc2c3c7"));
991 } 991 }
992 992
993 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) { 993 TEST_F(AcmReceiverBitExactnessOldApi, 32kHzOutput) {
994 Run(32000, PlatformChecksum("599b9484ca89615641ebd767cccb149f", 994 Run(32000, PlatformChecksum("85e28d7950132d56f90b099c90f82153",
995 "9f7d51569647eff38026dd815d43ca91", 995 "7b903f5c89997f271b405e63c245ef45",
996 "78d00d2a3f8f307fc3835ca588a18f3a", 996 "8b8fc6c6fd1dcdcfb3dd90e1ce597f10",
997 "d335eebc72f4d087aa397a9cf8f4967b")); 997 "100869c8dcde51346c2073e52a272d98"));
998 } 998 }
999 999
1000 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) { 1000 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutput) {
1001 Run(48000, PlatformChecksum("5d3b4357c9044264bb4a601b6548bd55", 1001 Run(48000, PlatformChecksum("ab611510e8fd6d5210a23cc04d3f0e8e",
1002 "8607778183d7ad02b8ce37eeeba4f37c", 1002 "d8609bc9b495d81f29779344c68bcc47",
1003 "fd71398d336b88cbd4fb5002846e91c6", 1003 "ec5ebb90cda0ea5bb89e79d698af65de",
1004 "8ce7e0e1c381d920ee7b57751b257de8")); 1004 "bd44bf97e7899186532f91235cef444d"));
1005 } 1005 }
1006 1006
1007 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) { 1007 TEST_F(AcmReceiverBitExactnessOldApi, 48kHzOutputExternalDecoder) {
1008 class ADFactory : public AudioDecoderFactory { 1008 class ADFactory : public AudioDecoderFactory {
1009 public: 1009 public:
1010 ADFactory() 1010 ADFactory()
1011 : mock_decoder_(new MockAudioDecoder()), 1011 : mock_decoder_(new MockAudioDecoder()),
1012 pcmu_decoder_(1), 1012 pcmu_decoder_(1),
1013 decode_forwarder_(&pcmu_decoder_), 1013 decode_forwarder_(&pcmu_decoder_),
1014 fact_(CreateBuiltinAudioDecoderFactory()) { 1014 fact_(CreateBuiltinAudioDecoderFactory()) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1074 }; 1074 };
1075 1075
1076 std::unique_ptr<MockAudioDecoder> mock_decoder_; 1076 std::unique_ptr<MockAudioDecoder> mock_decoder_;
1077 AudioDecoderPcmU pcmu_decoder_; 1077 AudioDecoderPcmU pcmu_decoder_;
1078 DecodeForwarder decode_forwarder_; 1078 DecodeForwarder decode_forwarder_;
1079 rtc::scoped_refptr<AudioDecoderFactory> fact_; // Fallback factory. 1079 rtc::scoped_refptr<AudioDecoderFactory> fact_; // Fallback factory.
1080 }; 1080 };
1081 1081
1082 rtc::scoped_refptr<rtc::RefCountedObject<ADFactory>> factory( 1082 rtc::scoped_refptr<rtc::RefCountedObject<ADFactory>> factory(
1083 new rtc::RefCountedObject<ADFactory>); 1083 new rtc::RefCountedObject<ADFactory>);
1084 Run(48000, PlatformChecksum("5d3b4357c9044264bb4a601b6548bd55", 1084 Run(48000, PlatformChecksum("ab611510e8fd6d5210a23cc04d3f0e8e",
1085 "8607778183d7ad02b8ce37eeeba4f37c", 1085 "d8609bc9b495d81f29779344c68bcc47",
1086 "fd71398d336b88cbd4fb5002846e91c6", 1086 "ec5ebb90cda0ea5bb89e79d698af65de",
1087 "8ce7e0e1c381d920ee7b57751b257de8"), 1087 "bd44bf97e7899186532f91235cef444d"),
1088 factory, [](AudioCodingModule* acm) { 1088 factory, [](AudioCodingModule* acm) {
1089 acm->RegisterReceiveCodec(0, {"MockPCMu", 8000, 1}); 1089 acm->RegisterReceiveCodec(0, {"MockPCMu", 8000, 1});
1090 }); 1090 });
1091 } 1091 }
1092 #endif 1092 #endif
1093 1093
1094 // This test verifies bit exactness for the send-side of ACM. The test setup is 1094 // This test verifies bit exactness for the send-side of ACM. The test setup is
1095 // a chain of three different test classes: 1095 // a chain of three different test classes:
1096 // 1096 //
1097 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest 1097 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 uint8_t payload_type_; 1262 uint8_t payload_type_;
1263 uint16_t last_sequence_number_; 1263 uint16_t last_sequence_number_;
1264 uint32_t last_timestamp_; 1264 uint32_t last_timestamp_;
1265 rtc::Md5Digest payload_checksum_; 1265 rtc::Md5Digest payload_checksum_;
1266 }; 1266 };
1267 1267
1268 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX) 1268 #if defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)
1269 TEST_F(AcmSenderBitExactnessOldApi, IsacWb30ms) { 1269 TEST_F(AcmSenderBitExactnessOldApi, IsacWb30ms) {
1270 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480)); 1270 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480));
1271 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1271 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1272 "0b58f9eeee43d5891f5f6c75e77984a3", 1272 "2c9cb15d4ed55b5a0cadd04883bc73b0",
1273 "c7e5bdadfa2871df95639fcc297cf23d", 1273 "9336a9b993cbd8a751f0e8958e66c89c",
1274 "0499ca260390769b3172136faad925b9", 1274 "bd4682225f7c4ad5f2049f6769713ac2",
1275 "866abf524acd2807efbe65e133c23f95"), 1275 "343f1f42be0607c61e6516aece424609"),
1276 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1276 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1277 "3c79f16f34218271f3dca4e2b1dfe1bb", 1277 "3c79f16f34218271f3dca4e2b1dfe1bb",
1278 "d42cb5195463da26c8129bbfe73a22e6", 1278 "d42cb5195463da26c8129bbfe73a22e6",
1279 "83de248aea9c3c2bd680b6952401b4ca", 1279 "83de248aea9c3c2bd680b6952401b4ca",
1280 "3c79f16f34218271f3dca4e2b1dfe1bb"), 1280 "3c79f16f34218271f3dca4e2b1dfe1bb"),
1281 33, test::AcmReceiveTestOldApi::kMonoOutput); 1281 33, test::AcmReceiveTestOldApi::kMonoOutput);
1282 } 1282 }
1283 1283
1284 TEST_F(AcmSenderBitExactnessOldApi, IsacWb60ms) { 1284 TEST_F(AcmSenderBitExactnessOldApi, IsacWb60ms) {
1285 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960)); 1285 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960));
1286 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( 1286 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum(
1287 "1ad29139a04782a33daad8c2b9b35875", 1287 "1ad29139a04782a33daad8c2b9b35875",
1288 "14d63c5f08127d280e722e3191b73bdd", 1288 "14d63c5f08127d280e722e3191b73bdd",
1289 "8da003e16c5371af2dc2be79a50f9076", 1289 "edcf26694c289e3d9691faf79b74f09f",
1290 "ef75e900e6f375e3061163c53fd09a63"), 1290 "ef75e900e6f375e3061163c53fd09a63"),
1291 AcmReceiverBitExactnessOldApi::PlatformChecksum( 1291 AcmReceiverBitExactnessOldApi::PlatformChecksum(
1292 "9e0a0ab743ad987b55b8e14802769c56", 1292 "9e0a0ab743ad987b55b8e14802769c56",
1293 "ebe04a819d3a9d83a83a17f271e1139a", 1293 "ebe04a819d3a9d83a83a17f271e1139a",
1294 "97aeef98553b5a4b5a68f8b716e8eaf0", 1294 "97aeef98553b5a4b5a68f8b716e8eaf0",
1295 "9e0a0ab743ad987b55b8e14802769c56"), 1295 "9e0a0ab743ad987b55b8e14802769c56"),
1296 16, test::AcmReceiveTestOldApi::kMonoOutput); 1296 16, test::AcmReceiveTestOldApi::kMonoOutput);
1297 } 1297 }
1298 #endif 1298 #endif
1299 1299
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 Run(16000, 8000, 1000); 1875 Run(16000, 8000, 1000);
1876 } 1876 }
1877 1877
1878 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { 1878 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) {
1879 Run(8000, 16000, 1000); 1879 Run(8000, 16000, 1000);
1880 } 1880 }
1881 1881
1882 #endif 1882 #endif
1883 1883
1884 } // namespace webrtc 1884 } // namespace webrtc
OLDNEW
« no previous file with comments | « AUTHORS ('k') | webrtc/modules/audio_coding/neteq/neteq_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698