| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 561 defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \ | 561 defined(WEBRTC_NETEQ_UNITTEST_BITEXACT) && \ |
| 562 defined(WEBRTC_CODEC_OPUS) | 562 defined(WEBRTC_CODEC_OPUS) |
| 563 #define MAYBE_TestOpusBitExactness TestOpusBitExactness | 563 #define MAYBE_TestOpusBitExactness TestOpusBitExactness |
| 564 #else | 564 #else |
| 565 #define MAYBE_TestOpusBitExactness DISABLED_TestOpusBitExactness | 565 #define MAYBE_TestOpusBitExactness DISABLED_TestOpusBitExactness |
| 566 #endif | 566 #endif |
| 567 TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) { | 567 TEST_F(NetEqDecodingTest, MAYBE_TestOpusBitExactness) { |
| 568 const std::string input_rtp_file = | 568 const std::string input_rtp_file = |
| 569 webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp"); | 569 webrtc::test::ResourcePath("audio_coding/neteq_opus", "rtp"); |
| 570 const std::string input_ref_file = | 570 const std::string input_ref_file = |
| 571 // The pcm files were generated by using Opus v1.1.2 to decode the RTC |
| 572 // file generated by Opus v1.1 |
| 571 webrtc::test::ResourcePath("audio_coding/neteq4_opus_ref", "pcm"); | 573 webrtc::test::ResourcePath("audio_coding/neteq4_opus_ref", "pcm"); |
| 572 const std::string network_stat_ref_file = | 574 const std::string network_stat_ref_file = |
| 575 // The network stats file was generated when using Opus v1.1.2 to decode |
| 576 // the RTC file generated by Opus v1.1 |
| 573 webrtc::test::ResourcePath("audio_coding/neteq4_opus_network_stats", | 577 webrtc::test::ResourcePath("audio_coding/neteq4_opus_network_stats", |
| 574 "dat"); | 578 "dat"); |
| 575 const std::string rtcp_stat_ref_file = | 579 const std::string rtcp_stat_ref_file = |
| 576 webrtc::test::ResourcePath("audio_coding/neteq4_opus_rtcp_stats", "dat"); | 580 webrtc::test::ResourcePath("audio_coding/neteq4_opus_rtcp_stats", "dat"); |
| 577 | 581 |
| 578 if (FLAGS_gen_ref) { | 582 if (FLAGS_gen_ref) { |
| 579 DecodeAndCompare(input_rtp_file, "", "", ""); | 583 DecodeAndCompare(input_rtp_file, "", "", ""); |
| 580 } else { | 584 } else { |
| 581 DecodeAndCompare(input_rtp_file, | 585 DecodeAndCompare(input_rtp_file, |
| 582 input_ref_file, | 586 input_ref_file, |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 // Pull audio once. | 1657 // Pull audio once. |
| 1654 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, | 1658 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, |
| 1655 &num_channels, &type)); | 1659 &num_channels, &type)); |
| 1656 ASSERT_EQ(kBlockSize16kHz, out_len); | 1660 ASSERT_EQ(kBlockSize16kHz, out_len); |
| 1657 } | 1661 } |
| 1658 // Verify speech output. | 1662 // Verify speech output. |
| 1659 EXPECT_EQ(kOutputNormal, type); | 1663 EXPECT_EQ(kOutputNormal, type); |
| 1660 } | 1664 } |
| 1661 | 1665 |
| 1662 } // namespace webrtc | 1666 } // namespace webrtc |
| OLD | NEW |