OLD | NEW |
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 830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
841 TEST_F(AcmReRegisterIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) { | 841 TEST_F(AcmReRegisterIsacMtTestOldApi, DISABLED_ON_IOS(IF_ISAC(DoTest))) { |
842 EXPECT_EQ(kEventSignaled, RunTest()); | 842 EXPECT_EQ(kEventSignaled, RunTest()); |
843 } | 843 } |
844 | 844 |
845 // Disabling all of these tests on iOS until file support has been added. | 845 // Disabling all of these tests on iOS until file support has been added. |
846 // See https://code.google.com/p/webrtc/issues/detail?id=4752 for details. | 846 // See https://code.google.com/p/webrtc/issues/detail?id=4752 for details. |
847 #if !defined(WEBRTC_IOS) | 847 #if !defined(WEBRTC_IOS) |
848 | 848 |
849 class AcmReceiverBitExactnessOldApi : public ::testing::Test { | 849 class AcmReceiverBitExactnessOldApi : public ::testing::Test { |
850 public: | 850 public: |
851 static std::string PlatformChecksum(std::string win64, | 851 static std::string PlatformChecksum(std::string others, |
852 std::string android, | 852 std::string win64, |
853 std::string others) { | 853 std::string android_arm32, |
| 854 std::string android_arm64) { |
854 #if defined(_WIN32) && defined(WEBRTC_ARCH_64_BITS) | 855 #if defined(_WIN32) && defined(WEBRTC_ARCH_64_BITS) |
855 return win64; | 856 return win64; |
856 #elif defined(WEBRTC_ANDROID) | 857 #elif defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM) |
857 return android; | 858 return android_arm32; |
| 859 #elif defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) |
| 860 return android_arm64; |
858 #else | 861 #else |
859 return others; | 862 return others; |
860 #endif | 863 #endif |
861 } | 864 } |
862 | 865 |
863 protected: | 866 protected: |
864 struct ExternalDecoder { | 867 struct ExternalDecoder { |
865 int rtp_payload_type; | 868 int rtp_payload_type; |
866 AudioDecoder* external_decoder; | 869 AudioDecoder* external_decoder; |
867 int sample_rate_hz; | 870 int sample_rate_hz; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
914 } | 917 } |
915 }; | 918 }; |
916 | 919 |
917 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ | 920 #if (defined(WEBRTC_CODEC_ISAC) || defined(WEBRTC_CODEC_ISACFX)) && \ |
918 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) | 921 defined(WEBRTC_CODEC_ILBC) && defined(WEBRTC_CODEC_G722) |
919 #define IF_ALL_CODECS(x) x | 922 #define IF_ALL_CODECS(x) x |
920 #else | 923 #else |
921 #define IF_ALL_CODECS(x) DISABLED_##x | 924 #define IF_ALL_CODECS(x) DISABLED_##x |
922 #endif | 925 #endif |
923 | 926 |
924 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 927 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(8kHzOutput)) { |
925 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | 928 Run(8000, PlatformChecksum("908002dc01fc4eb1d2be24eb1d3f354b", |
926 #define MAYBE_8kHzOutput DISABLED_8kHzOutput | 929 "dcee98c623b147ebe1b40dd30efa896e", |
927 #else | |
928 #define MAYBE_8kHzOutput 8kHzOutput | |
929 #endif | |
930 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(MAYBE_8kHzOutput)) { | |
931 Run(8000, PlatformChecksum("dcee98c623b147ebe1b40dd30efa896e", | |
932 "adc92e173f908f93b96ba5844209815a", | 930 "adc92e173f908f93b96ba5844209815a", |
933 "908002dc01fc4eb1d2be24eb1d3f354b"), | 931 "ba16137d3a5a1e637252289c57522bfe"), |
934 std::vector<ExternalDecoder>()); | 932 std::vector<ExternalDecoder>()); |
935 } | 933 } |
936 | 934 |
937 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 935 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(16kHzOutput)) { |
938 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | 936 Run(16000, PlatformChecksum("a909560b5ca49fa472b17b7b277195e9", |
939 #define MAYBE_16kHzOutput DISABLED_16kHzOutput | 937 "f790e7a8cce4e2c8b7bb5e0e4c5dac0d", |
940 #else | |
941 #define MAYBE_16kHzOutput 16kHzOutput | |
942 #endif | |
943 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(MAYBE_16kHzOutput)) { | |
944 Run(16000, PlatformChecksum("f790e7a8cce4e2c8b7bb5e0e4c5dac0d", | |
945 "8cffa6abcb3e18e33b9d857666dff66a", | 938 "8cffa6abcb3e18e33b9d857666dff66a", |
946 "a909560b5ca49fa472b17b7b277195e9"), | 939 "66ee001e23534d4dcf5d0f81f916c93b"), |
947 std::vector<ExternalDecoder>()); | 940 std::vector<ExternalDecoder>()); |
948 } | 941 } |
949 | 942 |
950 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 943 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(32kHzOutput)) { |
951 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | 944 Run(32000, PlatformChecksum("441aab4b347fb3db4e9244337aca8d8e", |
952 #define MAYBE_32kHzOutput DISABLED_32kHzOutput | 945 "306e0d990ee6e92de3fbecc0123ece37", |
953 #else | |
954 #define MAYBE_32kHzOutput 32kHzOutput | |
955 #endif | |
956 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(MAYBE_32kHzOutput)) { | |
957 Run(32000, PlatformChecksum("306e0d990ee6e92de3fbecc0123ece37", | |
958 "3e126fe894720c3f85edadcc91964ba5", | 946 "3e126fe894720c3f85edadcc91964ba5", |
959 "441aab4b347fb3db4e9244337aca8d8e"), | 947 "9c6ff204b14152c48fe41d5ab757943b"), |
960 std::vector<ExternalDecoder>()); | 948 std::vector<ExternalDecoder>()); |
961 } | 949 } |
962 | 950 |
963 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 951 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(48kHzOutput)) { |
964 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | 952 Run(48000, PlatformChecksum("4ee2730fa1daae755e8a8fd3abd779ec", |
965 #define MAYBE_48kHzOutput DISABLED_48kHzOutput | 953 "aa7c232f63a67b2a72703593bdd172e0", |
966 #else | |
967 #define MAYBE_48kHzOutput 48kHzOutput | |
968 #endif | |
969 TEST_F(AcmReceiverBitExactnessOldApi, IF_ALL_CODECS(MAYBE_48kHzOutput)) { | |
970 Run(48000, PlatformChecksum("aa7c232f63a67b2a72703593bdd172e0", | |
971 "0155665e93067c4e89256b944dd11999", | 954 "0155665e93067c4e89256b944dd11999", |
972 "4ee2730fa1daae755e8a8fd3abd779ec"), | 955 "fc4f0da8844cd808d822bbddf3b9c285"), |
973 std::vector<ExternalDecoder>()); | 956 std::vector<ExternalDecoder>()); |
974 } | 957 } |
975 | 958 |
976 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | |
977 #if defined(WEBRTC_ANDROID) && defined(__aarch64__) | |
978 #define MAYBE_48kHzOutputExternalDecoder DISABLED_48kHzOutputExternalDecoder | |
979 #else | |
980 #define MAYBE_48kHzOutputExternalDecoder 48kHzOutputExternalDecoder | |
981 #endif | |
982 TEST_F(AcmReceiverBitExactnessOldApi, | 959 TEST_F(AcmReceiverBitExactnessOldApi, |
983 IF_ALL_CODECS(MAYBE_48kHzOutputExternalDecoder)) { | 960 IF_ALL_CODECS(48kHzOutputExternalDecoder)) { |
984 // Class intended to forward a call from a mock DecodeInternal to Decode on | 961 // Class intended to forward a call from a mock DecodeInternal to Decode on |
985 // the real decoder's Decode. DecodeInternal for the real decoder isn't | 962 // the real decoder's Decode. DecodeInternal for the real decoder isn't |
986 // public. | 963 // public. |
987 class DecodeForwarder { | 964 class DecodeForwarder { |
988 public: | 965 public: |
989 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} | 966 DecodeForwarder(AudioDecoder* decoder) : decoder_(decoder) {} |
990 int Decode(const uint8_t* encoded, | 967 int Decode(const uint8_t* encoded, |
991 size_t encoded_len, | 968 size_t encoded_len, |
992 int sample_rate_hz, | 969 int sample_rate_hz, |
993 int16_t* decoded, | 970 int16_t* decoded, |
(...skipping 30 matching lines...) Expand all Loading... |
1024 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); | 1001 .WillRepeatedly(Invoke(&decoder, &AudioDecoderPcmU::PacketDuration)); |
1025 ExternalDecoder ed; | 1002 ExternalDecoder ed; |
1026 ed.rtp_payload_type = 0; | 1003 ed.rtp_payload_type = 0; |
1027 ed.external_decoder = &mock_decoder; | 1004 ed.external_decoder = &mock_decoder; |
1028 ed.sample_rate_hz = 8000; | 1005 ed.sample_rate_hz = 8000; |
1029 ed.num_channels = 1; | 1006 ed.num_channels = 1; |
1030 ed.name = "MockPCMU"; | 1007 ed.name = "MockPCMU"; |
1031 std::vector<ExternalDecoder> external_decoders; | 1008 std::vector<ExternalDecoder> external_decoders; |
1032 external_decoders.push_back(ed); | 1009 external_decoders.push_back(ed); |
1033 | 1010 |
1034 Run(48000, PlatformChecksum("aa7c232f63a67b2a72703593bdd172e0", | 1011 Run(48000, PlatformChecksum("4ee2730fa1daae755e8a8fd3abd779ec", |
| 1012 "aa7c232f63a67b2a72703593bdd172e0", |
1035 "0155665e93067c4e89256b944dd11999", | 1013 "0155665e93067c4e89256b944dd11999", |
1036 "4ee2730fa1daae755e8a8fd3abd779ec"), | 1014 "fc4f0da8844cd808d822bbddf3b9c285"), |
1037 external_decoders); | 1015 external_decoders); |
1038 | 1016 |
1039 EXPECT_CALL(mock_decoder, Die()); | 1017 EXPECT_CALL(mock_decoder, Die()); |
1040 } | 1018 } |
1041 | 1019 |
1042 // This test verifies bit exactness for the send-side of ACM. The test setup is | 1020 // This test verifies bit exactness for the send-side of ACM. The test setup is |
1043 // a chain of three different test classes: | 1021 // a chain of three different test classes: |
1044 // | 1022 // |
1045 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest | 1023 // test::AcmSendTest -> AcmSenderBitExactness -> test::AcmReceiveTest |
1046 // | 1024 // |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 rtc::scoped_ptr<test::AcmSendTestOldApi> send_test_; | 1187 rtc::scoped_ptr<test::AcmSendTestOldApi> send_test_; |
1210 rtc::scoped_ptr<test::InputAudioFile> audio_source_; | 1188 rtc::scoped_ptr<test::InputAudioFile> audio_source_; |
1211 uint32_t frame_size_rtp_timestamps_; | 1189 uint32_t frame_size_rtp_timestamps_; |
1212 int packet_count_; | 1190 int packet_count_; |
1213 uint8_t payload_type_; | 1191 uint8_t payload_type_; |
1214 uint16_t last_sequence_number_; | 1192 uint16_t last_sequence_number_; |
1215 uint32_t last_timestamp_; | 1193 uint32_t last_timestamp_; |
1216 rtc::Md5Digest payload_checksum_; | 1194 rtc::Md5Digest payload_checksum_; |
1217 }; | 1195 }; |
1218 | 1196 |
1219 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 1197 TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb30ms)) { |
1220 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | |
1221 #define MAYBE_IsacWb30ms DISABLED_IsacWb30ms | |
1222 #else | |
1223 #define MAYBE_IsacWb30ms IsacWb30ms | |
1224 #endif | |
1225 TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(MAYBE_IsacWb30ms)) { | |
1226 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480)); | 1198 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 480, 480)); |
1227 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1199 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
| 1200 "0b58f9eeee43d5891f5f6c75e77984a3", |
1228 "c7e5bdadfa2871df95639fcc297cf23d", | 1201 "c7e5bdadfa2871df95639fcc297cf23d", |
1229 "0499ca260390769b3172136faad925b9", | 1202 "0499ca260390769b3172136faad925b9", |
1230 "0b58f9eeee43d5891f5f6c75e77984a3"), | 1203 "866abf524acd2807efbe65e133c23f95"), |
1231 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1204 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
| 1205 "3c79f16f34218271f3dca4e2b1dfe1bb", |
1232 "d42cb5195463da26c8129bbfe73a22e6", | 1206 "d42cb5195463da26c8129bbfe73a22e6", |
1233 "83de248aea9c3c2bd680b6952401b4ca", | 1207 "83de248aea9c3c2bd680b6952401b4ca", |
1234 "3c79f16f34218271f3dca4e2b1dfe1bb"), | 1208 "3c79f16f34218271f3dca4e2b1dfe1bb"), |
1235 33, | 1209 33, test::AcmReceiveTestOldApi::kMonoOutput); |
1236 test::AcmReceiveTestOldApi::kMonoOutput); | |
1237 } | 1210 } |
1238 | 1211 |
1239 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 1212 TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(IsacWb60ms)) { |
1240 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | |
1241 #define MAYBE_IsacWb60ms DISABLED_IsacWb60ms | |
1242 #else | |
1243 #define MAYBE_IsacWb60ms IsacWb60ms | |
1244 #endif | |
1245 TEST_F(AcmSenderBitExactnessOldApi, IF_ISAC(MAYBE_IsacWb60ms)) { | |
1246 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960)); | 1213 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 16000, 1, 103, 960, 960)); |
1247 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1214 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
| 1215 "1ad29139a04782a33daad8c2b9b35875", |
1248 "14d63c5f08127d280e722e3191b73bdd", | 1216 "14d63c5f08127d280e722e3191b73bdd", |
1249 "8da003e16c5371af2dc2be79a50f9076", | 1217 "8da003e16c5371af2dc2be79a50f9076", |
1250 "1ad29139a04782a33daad8c2b9b35875"), | 1218 "ef75e900e6f375e3061163c53fd09a63"), |
1251 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1219 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
| 1220 "9e0a0ab743ad987b55b8e14802769c56", |
1252 "ebe04a819d3a9d83a83a17f271e1139a", | 1221 "ebe04a819d3a9d83a83a17f271e1139a", |
1253 "97aeef98553b5a4b5a68f8b716e8eaf0", | 1222 "97aeef98553b5a4b5a68f8b716e8eaf0", |
1254 "9e0a0ab743ad987b55b8e14802769c56"), | 1223 "9e0a0ab743ad987b55b8e14802769c56"), |
1255 16, | 1224 16, test::AcmReceiveTestOldApi::kMonoOutput); |
1256 test::AcmReceiveTestOldApi::kMonoOutput); | |
1257 } | 1225 } |
1258 | 1226 |
1259 #ifdef WEBRTC_CODEC_ISAC | 1227 #ifdef WEBRTC_CODEC_ISAC |
1260 #define IF_ISAC_FLOAT(x) x | 1228 #define IF_ISAC_FLOAT(x) x |
1261 #else | 1229 #else |
1262 #define IF_ISAC_FLOAT(x) DISABLED_##x | 1230 #define IF_ISAC_FLOAT(x) DISABLED_##x |
1263 #endif | 1231 #endif |
1264 | 1232 |
1265 TEST_F(AcmSenderBitExactnessOldApi, | 1233 TEST_F(AcmSenderBitExactnessOldApi, |
1266 DISABLED_ON_ANDROID(IF_ISAC_FLOAT(IsacSwb30ms))) { | 1234 DISABLED_ON_ANDROID(IF_ISAC_FLOAT(IsacSwb30ms))) { |
1267 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 32000, 1, 104, 960, 960)); | 1235 ASSERT_NO_FATAL_FAILURE(SetUpTest("ISAC", 32000, 1, 104, 960, 960)); |
1268 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1236 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1269 "2b3c387d06f00b7b7aad4c9be56fb83d", | 1237 "5683b58da0fbf2063c7adc2e6bfb3fb8", |
1270 "", | 1238 "2b3c387d06f00b7b7aad4c9be56fb83d", "android_arm32_audio", |
1271 "5683b58da0fbf2063c7adc2e6bfb3fb8"), | 1239 "android_arm64_audio"), |
1272 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1240 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1273 "bcc2041e7744c7ebd9f701866856849c", | 1241 "ce86106a93419aefb063097108ec94ab", |
1274 "", | 1242 "bcc2041e7744c7ebd9f701866856849c", "android_arm32_payload", |
1275 "ce86106a93419aefb063097108ec94ab"), | 1243 "android_arm64_payload"), |
1276 33, test::AcmReceiveTestOldApi::kMonoOutput); | 1244 33, test::AcmReceiveTestOldApi::kMonoOutput); |
1277 } | 1245 } |
1278 | 1246 |
1279 TEST_F(AcmSenderBitExactnessOldApi, Pcm16_8000khz_10ms) { | 1247 TEST_F(AcmSenderBitExactnessOldApi, Pcm16_8000khz_10ms) { |
1280 ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80)); | 1248 ASSERT_NO_FATAL_FAILURE(SetUpTest("L16", 8000, 1, 107, 80, 80)); |
1281 Run("de4a98e1406f8b798d99cd0704e862e2", | 1249 Run("de4a98e1406f8b798d99cd0704e862e2", |
1282 "c1edd36339ce0326cc4550041ad719a0", | 1250 "c1edd36339ce0326cc4550041ad719a0", |
1283 100, | 1251 100, |
1284 test::AcmReceiveTestOldApi::kMonoOutput); | 1252 test::AcmReceiveTestOldApi::kMonoOutput); |
1285 } | 1253 } |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1359 #ifdef WEBRTC_CODEC_ILBC | 1327 #ifdef WEBRTC_CODEC_ILBC |
1360 #define IF_ILBC(x) x | 1328 #define IF_ILBC(x) x |
1361 #else | 1329 #else |
1362 #define IF_ILBC(x) DISABLED_##x | 1330 #define IF_ILBC(x) DISABLED_##x |
1363 #endif | 1331 #endif |
1364 | 1332 |
1365 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_ILBC(Ilbc_30ms))) { | 1333 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_ILBC(Ilbc_30ms))) { |
1366 ASSERT_NO_FATAL_FAILURE(SetUpTest("ILBC", 8000, 1, 102, 240, 240)); | 1334 ASSERT_NO_FATAL_FAILURE(SetUpTest("ILBC", 8000, 1, 102, 240, 240)); |
1367 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1335 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1368 "7b6ec10910debd9af08011d3ed5249f7", | 1336 "7b6ec10910debd9af08011d3ed5249f7", |
1369 "android_audio", | 1337 "7b6ec10910debd9af08011d3ed5249f7", "android_arm32_audio", |
1370 "7b6ec10910debd9af08011d3ed5249f7"), | 1338 "android_arm64_audio"), |
1371 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1339 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1372 "cfae2e9f6aba96e145f2bcdd5050ce78", | 1340 "cfae2e9f6aba96e145f2bcdd5050ce78", |
1373 "android_payload", | 1341 "cfae2e9f6aba96e145f2bcdd5050ce78", "android_arm32_payload", |
1374 "cfae2e9f6aba96e145f2bcdd5050ce78"), | 1342 "android_arm64_payload"), |
1375 33, | 1343 33, test::AcmReceiveTestOldApi::kMonoOutput); |
1376 test::AcmReceiveTestOldApi::kMonoOutput); | |
1377 } | 1344 } |
1378 | 1345 |
1379 #ifdef WEBRTC_CODEC_G722 | 1346 #ifdef WEBRTC_CODEC_G722 |
1380 #define IF_G722(x) x | 1347 #define IF_G722(x) x |
1381 #else | 1348 #else |
1382 #define IF_G722(x) DISABLED_##x | 1349 #define IF_G722(x) DISABLED_##x |
1383 #endif | 1350 #endif |
1384 | 1351 |
1385 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_G722(G722_20ms))) { | 1352 TEST_F(AcmSenderBitExactnessOldApi, DISABLED_ON_ANDROID(IF_G722(G722_20ms))) { |
1386 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160)); | 1353 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 1, 9, 320, 160)); |
1387 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1354 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1388 "7d759436f2533582950d148b5161a36c", | 1355 "7d759436f2533582950d148b5161a36c", |
1389 "android_audio", | 1356 "7d759436f2533582950d148b5161a36c", "android_arm32_audio", |
1390 "7d759436f2533582950d148b5161a36c"), | 1357 "android_arm64_audio"), |
1391 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1358 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1392 "fc68a87e1380614e658087cb35d5ca10", | 1359 "fc68a87e1380614e658087cb35d5ca10", |
1393 "android_payload", | 1360 "fc68a87e1380614e658087cb35d5ca10", "android_arm32_payload", |
1394 "fc68a87e1380614e658087cb35d5ca10"), | 1361 "android_arm64_payload"), |
1395 50, | 1362 50, test::AcmReceiveTestOldApi::kMonoOutput); |
1396 test::AcmReceiveTestOldApi::kMonoOutput); | |
1397 } | 1363 } |
1398 | 1364 |
1399 TEST_F(AcmSenderBitExactnessOldApi, | 1365 TEST_F(AcmSenderBitExactnessOldApi, |
1400 DISABLED_ON_ANDROID(IF_G722(G722_stereo_20ms))) { | 1366 DISABLED_ON_ANDROID(IF_G722(G722_stereo_20ms))) { |
1401 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160)); | 1367 ASSERT_NO_FATAL_FAILURE(SetUpTest("G722", 16000, 2, 119, 320, 160)); |
1402 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1368 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1403 "7190ee718ab3d80eca181e5f7140c210", | 1369 "7190ee718ab3d80eca181e5f7140c210", |
1404 "android_audio", | 1370 "7190ee718ab3d80eca181e5f7140c210", "android_arm32_audio", |
1405 "7190ee718ab3d80eca181e5f7140c210"), | 1371 "android_arm64_audio"), |
1406 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1372 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1407 "66516152eeaa1e650ad94ff85f668dac", | 1373 "66516152eeaa1e650ad94ff85f668dac", |
1408 "android_payload", | 1374 "66516152eeaa1e650ad94ff85f668dac", "android_arm32_payload", |
1409 "66516152eeaa1e650ad94ff85f668dac"), | 1375 "android_arm64_payload"), |
1410 50, | 1376 50, test::AcmReceiveTestOldApi::kStereoOutput); |
1411 test::AcmReceiveTestOldApi::kStereoOutput); | |
1412 } | 1377 } |
1413 | 1378 |
1414 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 1379 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms) { |
1415 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | |
1416 #define MAYBE_Opus_stereo_20ms DISABLED_Opus_stereo_20ms | |
1417 #else | |
1418 #define MAYBE_Opus_stereo_20ms Opus_stereo_20ms | |
1419 #endif | |
1420 TEST_F(AcmSenderBitExactnessOldApi, MAYBE_Opus_stereo_20ms) { | |
1421 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); | 1380 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); |
1422 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1381 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1423 "855041f2490b887302bce9d544731849", | 1382 "855041f2490b887302bce9d544731849", |
| 1383 "855041f2490b887302bce9d544731849", |
1424 "1e1a0fce893fef2d66886a7f09e2ebce", | 1384 "1e1a0fce893fef2d66886a7f09e2ebce", |
1425 "855041f2490b887302bce9d544731849"), | 1385 "7417a66c28be42d5d9b2d64e0c191585"), |
1426 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1386 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1427 "d781cce1ab986b618d0da87226cdde30", | 1387 "d781cce1ab986b618d0da87226cdde30", |
| 1388 "d781cce1ab986b618d0da87226cdde30", |
1428 "1a1fe04dd12e755949987c8d729fb3e0", | 1389 "1a1fe04dd12e755949987c8d729fb3e0", |
1429 "d781cce1ab986b618d0da87226cdde30"), | 1390 "47b0b04f1d03076b857c86c72c2c298b"), |
1430 50, | 1391 50, test::AcmReceiveTestOldApi::kStereoOutput); |
1431 test::AcmReceiveTestOldApi::kStereoOutput); | |
1432 } | 1392 } |
1433 | 1393 |
1434 // Fails Android ARM64. https://code.google.com/p/webrtc/issues/detail?id=4199 | 1394 TEST_F(AcmSenderBitExactnessOldApi, Opus_stereo_20ms_voip) { |
1435 #if defined(WEBRTC_ANDROID) && defined(WEBRTC_ARCH_ARM64) | |
1436 #define MAYBE_Opus_stereo_20ms_voip DISABLED_Opus_stereo_20ms_voip | |
1437 #else | |
1438 #define MAYBE_Opus_stereo_20ms_voip Opus_stereo_20ms_voip | |
1439 #endif | |
1440 TEST_F(AcmSenderBitExactnessOldApi, MAYBE_Opus_stereo_20ms_voip) { | |
1441 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); | 1395 ASSERT_NO_FATAL_FAILURE(SetUpTest("opus", 48000, 2, 120, 960, 960)); |
1442 // If not set, default will be kAudio in case of stereo. | 1396 // If not set, default will be kAudio in case of stereo. |
1443 EXPECT_EQ(0, send_test_->acm()->SetOpusApplication(kVoip)); | 1397 EXPECT_EQ(0, send_test_->acm()->SetOpusApplication(kVoip)); |
1444 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1398 Run(AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1445 "9b9e12bc3cc793740966e11cbfa8b35b", | 1399 "9b9e12bc3cc793740966e11cbfa8b35b", |
| 1400 "9b9e12bc3cc793740966e11cbfa8b35b", |
1446 "57412a4b5771d19ff03ec35deffe7067", | 1401 "57412a4b5771d19ff03ec35deffe7067", |
1447 "9b9e12bc3cc793740966e11cbfa8b35b"), | 1402 "7ad0bbefcaa87e23187bf4a56d2f3513"), |
1448 AcmReceiverBitExactnessOldApi::PlatformChecksum( | 1403 AcmReceiverBitExactnessOldApi::PlatformChecksum( |
1449 "c7340b1189652ab6b5e80dade7390cb4", | 1404 "c7340b1189652ab6b5e80dade7390cb4", |
| 1405 "c7340b1189652ab6b5e80dade7390cb4", |
1450 "cdfe85939c411d12b61701c566e22d26", | 1406 "cdfe85939c411d12b61701c566e22d26", |
1451 "c7340b1189652ab6b5e80dade7390cb4"), | 1407 "7a678fbe46df5bf0c67e88264a2d9275"), |
1452 50, | 1408 50, test::AcmReceiveTestOldApi::kStereoOutput); |
1453 test::AcmReceiveTestOldApi::kStereoOutput); | |
1454 } | 1409 } |
1455 | 1410 |
1456 // This test is for verifying the SetBitRate function. The bitrate is changed at | 1411 // This test is for verifying the SetBitRate function. The bitrate is changed at |
1457 // the beginning, and the number of generated bytes are checked. | 1412 // the beginning, and the number of generated bytes are checked. |
1458 class AcmSetBitRateOldApi : public ::testing::Test { | 1413 class AcmSetBitRateOldApi : public ::testing::Test { |
1459 protected: | 1414 protected: |
1460 static const int kTestDurationMs = 1000; | 1415 static const int kTestDurationMs = 1000; |
1461 | 1416 |
1462 // Sets up the test::AcmSendTest object. Returns true on success, otherwise | 1417 // Sets up the test::AcmSendTest object. Returns true on success, otherwise |
1463 // false. | 1418 // false. |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1796 Run(16000, 8000, 1000); | 1751 Run(16000, 8000, 1000); |
1797 } | 1752 } |
1798 | 1753 |
1799 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { | 1754 TEST_F(AcmSwitchingOutputFrequencyOldApi, Toggle8KhzTo16Khz) { |
1800 Run(8000, 16000, 1000); | 1755 Run(8000, 16000, 1000); |
1801 } | 1756 } |
1802 | 1757 |
1803 #endif | 1758 #endif |
1804 | 1759 |
1805 } // namespace webrtc | 1760 } // namespace webrtc |
OLD | NEW |