Chromium Code Reviews| 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 | |
|
minyue-webrtc
2016/01/26 14:30:23
not only the pcm files but also stats files, right
| |
| 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 = |
| 573 webrtc::test::ResourcePath("audio_coding/neteq4_opus_network_stats", | 575 webrtc::test::ResourcePath("audio_coding/neteq4_opus_network_stats", |
| 574 "dat"); | 576 "dat"); |
| 575 const std::string rtcp_stat_ref_file = | 577 const std::string rtcp_stat_ref_file = |
| 576 webrtc::test::ResourcePath("audio_coding/neteq4_opus_rtcp_stats", "dat"); | 578 webrtc::test::ResourcePath("audio_coding/neteq4_opus_rtcp_stats", "dat"); |
| 577 | 579 |
| 578 if (FLAGS_gen_ref) { | 580 if (FLAGS_gen_ref) { |
| 579 DecodeAndCompare(input_rtp_file, "", "", ""); | 581 DecodeAndCompare(input_rtp_file, "", "", ""); |
| 580 } else { | 582 } else { |
| (...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1653 // Pull audio once. | 1655 // Pull audio once. |
| 1654 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, | 1656 ASSERT_EQ(0, neteq_->GetAudio(kMaxBlockSize, out_data_, &out_len, |
| 1655 &num_channels, &type)); | 1657 &num_channels, &type)); |
| 1656 ASSERT_EQ(kBlockSize16kHz, out_len); | 1658 ASSERT_EQ(kBlockSize16kHz, out_len); |
| 1657 } | 1659 } |
| 1658 // Verify speech output. | 1660 // Verify speech output. |
| 1659 EXPECT_EQ(kOutputNormal, type); | 1661 EXPECT_EQ(kOutputNormal, type); |
| 1660 } | 1662 } |
| 1661 | 1663 |
| 1662 } // namespace webrtc | 1664 } // namespace webrtc |
| OLD | NEW |