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 18 matching lines...) Expand all Loading... |
29 size_t max_bytes, size_t* encoded_bytes) override; | 29 size_t max_bytes, size_t* encoded_bytes) override; |
30 float DecodeABlock(const uint8_t* bit_stream, size_t encoded_bytes, | 30 float DecodeABlock(const uint8_t* bit_stream, size_t encoded_bytes, |
31 int16_t* out_data) override; | 31 int16_t* out_data) override; |
32 ISACFIX_MainStruct *ISACFIX_main_inst_; | 32 ISACFIX_MainStruct *ISACFIX_main_inst_; |
33 }; | 33 }; |
34 | 34 |
35 IsacSpeedTest::IsacSpeedTest() | 35 IsacSpeedTest::IsacSpeedTest() |
36 : AudioCodecSpeedTest(kIsacBlockDurationMs, | 36 : AudioCodecSpeedTest(kIsacBlockDurationMs, |
37 kIsacInputSamplingKhz, | 37 kIsacInputSamplingKhz, |
38 kIsacOutputSamplingKhz), | 38 kIsacOutputSamplingKhz), |
39 ISACFIX_main_inst_(NULL) { | 39 ISACFIX_main_inst_(nullptr) {} |
40 } | |
41 | 40 |
42 void IsacSpeedTest::SetUp() { | 41 void IsacSpeedTest::SetUp() { |
43 AudioCodecSpeedTest::SetUp(); | 42 AudioCodecSpeedTest::SetUp(); |
44 | 43 |
45 // Check whether the allocated buffer for the bit stream is large enough. | 44 // Check whether the allocated buffer for the bit stream is large enough. |
46 EXPECT_GE(max_bytes_, static_cast<size_t>(STREAM_MAXW16_60MS)); | 45 EXPECT_GE(max_bytes_, static_cast<size_t>(STREAM_MAXW16_60MS)); |
47 | 46 |
48 // Create encoder memory. | 47 // Create encoder memory. |
49 EXPECT_EQ(0, WebRtcIsacfix_Create(&ISACFIX_main_inst_)); | 48 EXPECT_EQ(0, WebRtcIsacfix_Create(&ISACFIX_main_inst_)); |
50 EXPECT_EQ(0, WebRtcIsacfix_EncoderInit(ISACFIX_main_inst_, 1)); | 49 EXPECT_EQ(0, WebRtcIsacfix_EncoderInit(ISACFIX_main_inst_, 1)); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 } | 101 } |
103 | 102 |
104 const coding_param param_set[] = | 103 const coding_param param_set[] = |
105 {::std::tr1::make_tuple(1, 32000, string("audio_coding/speech_mono_16kHz"), | 104 {::std::tr1::make_tuple(1, 32000, string("audio_coding/speech_mono_16kHz"), |
106 string("pcm"), true)}; | 105 string("pcm"), true)}; |
107 | 106 |
108 INSTANTIATE_TEST_CASE_P(AllTest, IsacSpeedTest, | 107 INSTANTIATE_TEST_CASE_P(AllTest, IsacSpeedTest, |
109 ::testing::ValuesIn(param_set)); | 108 ::testing::ValuesIn(param_set)); |
110 | 109 |
111 } // namespace webrtc | 110 } // namespace webrtc |
OLD | NEW |