| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 590 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 601 int tolerance = 6176; | 601 int tolerance = 6176; |
| 602 double mse = 238630.0; | 602 double mse = 238630.0; |
| 603 int delay = 22; // Delay from input to output. | 603 int delay = 22; // Delay from input to output. |
| 604 EncodeDecodeTest(0, tolerance, mse, delay); | 604 EncodeDecodeTest(0, tolerance, mse, delay); |
| 605 ReInitTest(); | 605 ReInitTest(); |
| 606 EXPECT_FALSE(decoder_->HasDecodePlc()); | 606 EXPECT_FALSE(decoder_->HasDecodePlc()); |
| 607 } | 607 } |
| 608 | 608 |
| 609 namespace { | 609 namespace { |
| 610 void TestOpusSetTargetBitrates(AudioEncoder* audio_encoder) { | 610 void TestOpusSetTargetBitrates(AudioEncoder* audio_encoder) { |
| 611 EXPECT_EQ(500, SetAndGetTargetBitrate(audio_encoder, 499)); | 611 EXPECT_EQ(6000, SetAndGetTargetBitrate(audio_encoder, 5999)); |
| 612 EXPECT_EQ(500, SetAndGetTargetBitrate(audio_encoder, 500)); | 612 EXPECT_EQ(6000, SetAndGetTargetBitrate(audio_encoder, 6000)); |
| 613 EXPECT_EQ(32000, SetAndGetTargetBitrate(audio_encoder, 32000)); | 613 EXPECT_EQ(32000, SetAndGetTargetBitrate(audio_encoder, 32000)); |
| 614 EXPECT_EQ(512000, SetAndGetTargetBitrate(audio_encoder, 512000)); | 614 EXPECT_EQ(512000, SetAndGetTargetBitrate(audio_encoder, 512000)); |
| 615 EXPECT_EQ(512000, SetAndGetTargetBitrate(audio_encoder, 513000)); | 615 EXPECT_EQ(512000, SetAndGetTargetBitrate(audio_encoder, 513000)); |
| 616 } | 616 } |
| 617 } // namespace | 617 } // namespace |
| 618 | 618 |
| 619 TEST_F(AudioDecoderOpusTest, SetTargetBitrate) { | 619 TEST_F(AudioDecoderOpusTest, SetTargetBitrate) { |
| 620 TestOpusSetTargetBitrates(audio_encoder_.get()); | 620 TestOpusSetTargetBitrates(audio_encoder_.get()); |
| 621 } | 621 } |
| 622 | 622 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); | 689 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); |
| 690 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); | 690 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); |
| 691 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); | 691 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); |
| 692 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); | 692 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); |
| 693 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); | 693 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); |
| 694 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); | 694 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); |
| 695 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); | 695 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); |
| 696 } | 696 } |
| 697 | 697 |
| 698 } // namespace webrtc | 698 } // namespace webrtc |
| OLD | NEW |