OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <string> | 10 #include <string> |
(...skipping 18 matching lines...) Expand all Loading... |
29 const size_t kOpusRateKhz = 48; | 29 const size_t kOpusRateKhz = 48; |
30 // Number of samples-per-channel in a 20 ms frame, sampled at 48 kHz. | 30 // Number of samples-per-channel in a 20 ms frame, sampled at 48 kHz. |
31 const size_t kOpus20msFrameSamples = kOpusRateKhz * 20; | 31 const size_t kOpus20msFrameSamples = kOpusRateKhz * 20; |
32 // Number of samples-per-channel in a 10 ms frame, sampled at 48 kHz. | 32 // Number of samples-per-channel in a 10 ms frame, sampled at 48 kHz. |
33 const size_t kOpus10msFrameSamples = kOpusRateKhz * 10; | 33 const size_t kOpus10msFrameSamples = kOpusRateKhz * 10; |
34 | 34 |
35 class OpusTest : public TestWithParam<::testing::tuple<int, int>> { | 35 class OpusTest : public TestWithParam<::testing::tuple<int, int>> { |
36 protected: | 36 protected: |
37 OpusTest(); | 37 OpusTest(); |
38 | 38 |
39 void TestDtxEffect(bool dtx, int block_length_ms); | 39 void TestDtxEffect(bool dtx); |
40 | 40 |
41 // Prepare |speech_data_| for encoding, read from a hard-coded file. | 41 // Prepare |speech_data_| for encoding, read from a hard-coded file. |
42 // After preparation, |speech_data_.GetNextBlock()| returns a pointer to a | 42 // After preparation, |speech_data_.GetNextBlock()| returns a pointer to a |
43 // block of |block_length_ms| milliseconds. The data is looped every | 43 // block of |block_length_ms| milliseconds. The data is looped every |
44 // |loop_length_ms| milliseconds. | 44 // |loop_length_ms| milliseconds. |
45 void PrepareSpeechData(int channel, int block_length_ms, int loop_length_ms); | 45 void PrepareSpeechData(int channel, int block_length_ms, int loop_length_ms); |
46 | 46 |
47 int EncodeDecode(WebRtcOpusEncInst* encoder, | 47 int EncodeDecode(WebRtcOpusEncInst* encoder, |
48 rtc::ArrayView<const int16_t> input_audio, | 48 rtc::ArrayView<const int16_t> input_audio, |
49 WebRtcOpusDecInst* decoder, | 49 WebRtcOpusDecInst* decoder, |
50 int16_t* output_audio, | 50 int16_t* output_audio, |
51 int16_t* audio_type); | 51 int16_t* audio_type); |
52 | 52 |
53 void SetMaxPlaybackRate(WebRtcOpusEncInst* encoder, | 53 void SetMaxPlaybackRate(WebRtcOpusEncInst* encoder, |
54 opus_int32 expect, int32_t set); | 54 opus_int32 expect, int32_t set); |
55 | 55 |
56 void CheckAudioBounded(const int16_t* audio, size_t samples, int channels, | |
57 uint16_t bound) const; | |
58 | |
59 WebRtcOpusEncInst* opus_encoder_; | 56 WebRtcOpusEncInst* opus_encoder_; |
60 WebRtcOpusDecInst* opus_decoder_; | 57 WebRtcOpusDecInst* opus_decoder_; |
61 | 58 |
62 AudioLoop speech_data_; | 59 AudioLoop speech_data_; |
63 uint8_t bitstream_[kMaxBytes]; | 60 uint8_t bitstream_[kMaxBytes]; |
64 size_t encoded_bytes_; | 61 size_t encoded_bytes_; |
65 int channels_; | 62 int channels_; |
66 int application_; | 63 int application_; |
67 }; | 64 }; |
68 | 65 |
(...skipping 22 matching lines...) Expand all Loading... |
91 void OpusTest::SetMaxPlaybackRate(WebRtcOpusEncInst* encoder, | 88 void OpusTest::SetMaxPlaybackRate(WebRtcOpusEncInst* encoder, |
92 opus_int32 expect, | 89 opus_int32 expect, |
93 int32_t set) { | 90 int32_t set) { |
94 opus_int32 bandwidth; | 91 opus_int32 bandwidth; |
95 EXPECT_EQ(0, WebRtcOpus_SetMaxPlaybackRate(opus_encoder_, set)); | 92 EXPECT_EQ(0, WebRtcOpus_SetMaxPlaybackRate(opus_encoder_, set)); |
96 opus_encoder_ctl(opus_encoder_->encoder, | 93 opus_encoder_ctl(opus_encoder_->encoder, |
97 OPUS_GET_MAX_BANDWIDTH(&bandwidth)); | 94 OPUS_GET_MAX_BANDWIDTH(&bandwidth)); |
98 EXPECT_EQ(expect, bandwidth); | 95 EXPECT_EQ(expect, bandwidth); |
99 } | 96 } |
100 | 97 |
101 void OpusTest::CheckAudioBounded(const int16_t* audio, size_t samples, | |
102 int channels, uint16_t bound) const { | |
103 for (size_t i = 0; i < samples; ++i) { | |
104 for (int c = 0; c < channels; ++c) { | |
105 ASSERT_GE(audio[i * channels + c], -bound); | |
106 ASSERT_LE(audio[i * channels + c], bound); | |
107 } | |
108 } | |
109 } | |
110 | |
111 int OpusTest::EncodeDecode(WebRtcOpusEncInst* encoder, | 98 int OpusTest::EncodeDecode(WebRtcOpusEncInst* encoder, |
112 rtc::ArrayView<const int16_t> input_audio, | 99 rtc::ArrayView<const int16_t> input_audio, |
113 WebRtcOpusDecInst* decoder, | 100 WebRtcOpusDecInst* decoder, |
114 int16_t* output_audio, | 101 int16_t* output_audio, |
115 int16_t* audio_type) { | 102 int16_t* audio_type) { |
116 int encoded_bytes_int = WebRtcOpus_Encode( | 103 int encoded_bytes_int = WebRtcOpus_Encode( |
117 encoder, input_audio.data(), | 104 encoder, input_audio.data(), |
118 rtc::CheckedDivExact(input_audio.size(), static_cast<size_t>(channels_)), | 105 rtc::CheckedDivExact(input_audio.size(), static_cast<size_t>(channels_)), |
119 kMaxBytes, bitstream_); | 106 kMaxBytes, bitstream_); |
120 EXPECT_GE(encoded_bytes_int, 0); | 107 EXPECT_GE(encoded_bytes_int, 0); |
121 encoded_bytes_ = static_cast<size_t>(encoded_bytes_int); | 108 encoded_bytes_ = static_cast<size_t>(encoded_bytes_int); |
122 int est_len = WebRtcOpus_DurationEst(decoder, bitstream_, encoded_bytes_); | 109 int est_len = WebRtcOpus_DurationEst(decoder, bitstream_, encoded_bytes_); |
123 int act_len = WebRtcOpus_Decode(decoder, bitstream_, | 110 int act_len = WebRtcOpus_Decode(decoder, bitstream_, |
124 encoded_bytes_, output_audio, | 111 encoded_bytes_, output_audio, |
125 audio_type); | 112 audio_type); |
126 EXPECT_EQ(est_len, act_len); | 113 EXPECT_EQ(est_len, act_len); |
127 return act_len; | 114 return act_len; |
128 } | 115 } |
129 | 116 |
130 // Test if encoder/decoder can enter DTX mode properly and do not enter DTX when | 117 // Test if encoder/decoder can enter DTX mode properly and do not enter DTX when |
131 // they should not. This test is signal dependent. | 118 // they should not. This test is signal dependent. |
132 void OpusTest::TestDtxEffect(bool dtx, int block_length_ms) { | 119 void OpusTest::TestDtxEffect(bool dtx) { |
133 PrepareSpeechData(channels_, block_length_ms, 2000); | 120 PrepareSpeechData(channels_, 20, 2000); |
134 const size_t samples = kOpusRateKhz * block_length_ms; | |
135 | 121 |
136 // Create encoder memory. | 122 // Create encoder memory. |
137 EXPECT_EQ(0, WebRtcOpus_EncoderCreate(&opus_encoder_, | 123 EXPECT_EQ(0, WebRtcOpus_EncoderCreate(&opus_encoder_, |
138 channels_, | 124 channels_, |
139 application_)); | 125 application_)); |
140 EXPECT_EQ(0, WebRtcOpus_DecoderCreate(&opus_decoder_, channels_)); | 126 EXPECT_EQ(0, WebRtcOpus_DecoderCreate(&opus_decoder_, channels_)); |
141 | 127 |
142 // Set bitrate. | 128 // Set bitrate. |
143 EXPECT_EQ(0, WebRtcOpus_SetBitRate(opus_encoder_, | 129 EXPECT_EQ(0, WebRtcOpus_SetBitRate(opus_encoder_, |
144 channels_ == 1 ? 32000 : 64000)); | 130 channels_ == 1 ? 32000 : 64000)); |
145 | 131 |
146 // Set input audio as silence. | 132 // Set input audio as silence. |
147 std::vector<int16_t> silence(samples * channels_, 0); | 133 std::vector<int16_t> silence(kOpus20msFrameSamples * channels_, 0); |
148 | 134 |
149 // Setting DTX. | 135 // Setting DTX. |
150 EXPECT_EQ(0, dtx ? WebRtcOpus_EnableDtx(opus_encoder_) : | 136 EXPECT_EQ(0, dtx ? WebRtcOpus_EnableDtx(opus_encoder_) : |
151 WebRtcOpus_DisableDtx(opus_encoder_)); | 137 WebRtcOpus_DisableDtx(opus_encoder_)); |
152 | 138 |
153 int16_t audio_type; | 139 int16_t audio_type; |
154 int16_t* output_data_decode = new int16_t[samples * channels_]; | 140 int16_t* output_data_decode = new int16_t[kOpus20msFrameSamples * channels_]; |
155 | 141 |
156 for (int i = 0; i < 100; ++i) { | 142 for (int i = 0; i < 100; ++i) { |
157 EXPECT_EQ(samples, | 143 EXPECT_EQ(kOpus20msFrameSamples, |
158 static_cast<size_t>(EncodeDecode( | 144 static_cast<size_t>(EncodeDecode( |
159 opus_encoder_, speech_data_.GetNextBlock(), opus_decoder_, | 145 opus_encoder_, speech_data_.GetNextBlock(), opus_decoder_, |
160 output_data_decode, &audio_type))); | 146 output_data_decode, &audio_type))); |
161 // If not DTX, it should never enter DTX mode. If DTX, we do not care since | 147 // If not DTX, it should never enter DTX mode. If DTX, we do not care since |
162 // whether it enters DTX depends on the signal type. | 148 // whether it enters DTX depends on the signal type. |
163 if (!dtx) { | 149 if (!dtx) { |
164 EXPECT_GT(encoded_bytes_, 1U); | 150 EXPECT_GT(encoded_bytes_, 1U); |
165 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); | 151 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); |
166 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); | 152 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); |
167 EXPECT_EQ(0, audio_type); // Speech. | 153 EXPECT_EQ(0, audio_type); // Speech. |
168 } | 154 } |
169 } | 155 } |
170 | 156 |
171 // We input some silent segments. In DTX mode, the encoder will stop sending. | 157 // We input some silent segments. In DTX mode, the encoder will stop sending. |
172 // However, DTX may happen after a while. | 158 // However, DTX may happen after a while. |
173 for (int i = 0; i < 30; ++i) { | 159 for (int i = 0; i < 30; ++i) { |
174 EXPECT_EQ(samples, | 160 EXPECT_EQ(kOpus20msFrameSamples, static_cast<size_t>(EncodeDecode( |
175 static_cast<size_t>(EncodeDecode( | 161 opus_encoder_, silence, opus_decoder_, |
176 opus_encoder_, silence, opus_decoder_, output_data_decode, | 162 output_data_decode, &audio_type))); |
177 &audio_type))); | |
178 if (!dtx) { | 163 if (!dtx) { |
179 EXPECT_GT(encoded_bytes_, 1U); | 164 EXPECT_GT(encoded_bytes_, 1U); |
180 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); | 165 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); |
181 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); | 166 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); |
182 EXPECT_EQ(0, audio_type); // Speech. | 167 EXPECT_EQ(0, audio_type); // Speech. |
183 } else if (encoded_bytes_ == 1) { | 168 } else if (encoded_bytes_ == 1) { |
184 EXPECT_EQ(1, opus_encoder_->in_dtx_mode); | 169 EXPECT_EQ(1, opus_encoder_->in_dtx_mode); |
185 EXPECT_EQ(1, opus_decoder_->in_dtx_mode); | 170 EXPECT_EQ(1, opus_decoder_->in_dtx_mode); |
186 EXPECT_EQ(2, audio_type); // Comfort noise. | 171 EXPECT_EQ(2, audio_type); // Comfort noise. |
187 break; | 172 break; |
188 } | 173 } |
189 } | 174 } |
190 | 175 |
191 // When Opus is in DTX, it wakes up in a regular basis. It sends two packets, | 176 // When Opus is in DTX, it wakes up in a regular basis. It sends two packets, |
192 // one with an arbitrary size and the other of 1-byte, then stops sending for | 177 // one with an arbitrary size and the other of 1-byte, then stops sending for |
193 // a certain number of frames. | 178 // 19 frames. |
194 | 179 const int cycles = 5; |
195 // |max_dtx_frames| is the maximum number of frames Opus can stay in DTX. | 180 for (int j = 0; j < cycles; ++j) { |
196 const int max_dtx_frames = 400 / block_length_ms + 1; | 181 // DTX mode is maintained 19 frames. |
197 | 182 for (int i = 0; i < 19; ++i) { |
198 // We run |kRunTimeMs| milliseconds of pure silence. | 183 EXPECT_EQ(kOpus20msFrameSamples, |
199 const int kRunTimeMs = 2000; | 184 static_cast<size_t>( |
200 | 185 EncodeDecode(opus_encoder_, silence, opus_decoder_, |
201 // We check that, after a |kCheckTimeMs| milliseconds (given that the CNG in | 186 output_data_decode, &audio_type))); |
202 // Opus needs time to adapt), the absolute values of DTX decoded signal are | |
203 // bounded by |kOutputValueBound|. | |
204 const int kCheckTimeMs = 1500; | |
205 | |
206 #if defined(OPUS_FIXED_POINT) | |
207 const uint16_t kOutputValueBound = 20; | |
208 #else | |
209 const uint16_t kOutputValueBound = 2; | |
210 #endif | |
211 | |
212 int time = 0; | |
213 while (time < kRunTimeMs) { | |
214 // DTX mode is maintained for maximum |max_dtx_frames| frames. | |
215 int i = 0; | |
216 for (; i < max_dtx_frames; ++i) { | |
217 time += block_length_ms; | |
218 EXPECT_EQ(samples, | |
219 static_cast<size_t>(EncodeDecode( | |
220 opus_encoder_, silence, opus_decoder_, output_data_decode, | |
221 &audio_type))); | |
222 if (dtx) { | 187 if (dtx) { |
223 if (encoded_bytes_ > 1) | |
224 break; | |
225 EXPECT_EQ(0U, encoded_bytes_) // Send 0 byte. | 188 EXPECT_EQ(0U, encoded_bytes_) // Send 0 byte. |
226 << "Opus should have entered DTX mode."; | 189 << "Opus should have entered DTX mode."; |
227 EXPECT_EQ(1, opus_encoder_->in_dtx_mode); | 190 EXPECT_EQ(1, opus_encoder_->in_dtx_mode); |
228 EXPECT_EQ(1, opus_decoder_->in_dtx_mode); | 191 EXPECT_EQ(1, opus_decoder_->in_dtx_mode); |
229 EXPECT_EQ(2, audio_type); // Comfort noise. | 192 EXPECT_EQ(2, audio_type); // Comfort noise. |
230 if (time >= kCheckTimeMs) { | |
231 CheckAudioBounded(output_data_decode, samples, channels_, | |
232 kOutputValueBound); | |
233 } | |
234 } else { | 193 } else { |
235 EXPECT_GT(encoded_bytes_, 1U); | 194 EXPECT_GT(encoded_bytes_, 1U); |
236 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); | 195 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); |
237 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); | 196 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); |
238 EXPECT_EQ(0, audio_type); // Speech. | 197 EXPECT_EQ(0, audio_type); // Speech. |
239 } | 198 } |
240 } | 199 } |
241 | 200 |
242 if (dtx) { | 201 // Quit DTX after 19 frames. |
243 // With DTX, Opus must stop transmission for some time. | 202 EXPECT_EQ(kOpus20msFrameSamples, static_cast<size_t>(EncodeDecode( |
244 EXPECT_GT(i, 1); | 203 opus_encoder_, silence, opus_decoder_, |
245 } | 204 output_data_decode, &audio_type))); |
246 | 205 |
247 // We expect a normal payload. | 206 EXPECT_GT(encoded_bytes_, 1U); |
248 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); | 207 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); |
249 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); | 208 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); |
250 EXPECT_EQ(0, audio_type); // Speech. | 209 EXPECT_EQ(0, audio_type); // Speech. |
251 | 210 |
252 // Enters DTX again immediately. | 211 // Enters DTX again immediately. |
253 time += block_length_ms; | 212 EXPECT_EQ(kOpus20msFrameSamples, static_cast<size_t>(EncodeDecode( |
254 EXPECT_EQ(samples, | 213 opus_encoder_, silence, opus_decoder_, |
255 static_cast<size_t>(EncodeDecode( | 214 output_data_decode, &audio_type))); |
256 opus_encoder_, silence, opus_decoder_, output_data_decode, | |
257 &audio_type))); | |
258 if (dtx) { | 215 if (dtx) { |
259 EXPECT_EQ(1U, encoded_bytes_); // Send 1 byte. | 216 EXPECT_EQ(1U, encoded_bytes_); // Send 1 byte. |
260 EXPECT_EQ(1, opus_encoder_->in_dtx_mode); | 217 EXPECT_EQ(1, opus_encoder_->in_dtx_mode); |
261 EXPECT_EQ(1, opus_decoder_->in_dtx_mode); | 218 EXPECT_EQ(1, opus_decoder_->in_dtx_mode); |
262 EXPECT_EQ(2, audio_type); // Comfort noise. | 219 EXPECT_EQ(2, audio_type); // Comfort noise. |
263 if (time >= kCheckTimeMs) { | |
264 CheckAudioBounded(output_data_decode, samples, channels_, | |
265 kOutputValueBound); | |
266 } | |
267 } else { | 220 } else { |
268 EXPECT_GT(encoded_bytes_, 1U); | 221 EXPECT_GT(encoded_bytes_, 1U); |
269 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); | 222 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); |
270 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); | 223 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); |
271 EXPECT_EQ(0, audio_type); // Speech. | 224 EXPECT_EQ(0, audio_type); // Speech. |
272 } | 225 } |
273 } | 226 } |
274 | 227 |
275 silence[0] = 10000; | 228 silence[0] = 10000; |
276 if (dtx) { | 229 if (dtx) { |
277 // Verify that encoder/decoder can jump out from DTX mode. | 230 // Verify that encoder/decoder can jump out from DTX mode. |
278 EXPECT_EQ(samples, | 231 EXPECT_EQ(kOpus20msFrameSamples, static_cast<size_t>(EncodeDecode( |
279 static_cast<size_t>(EncodeDecode( | 232 opus_encoder_, silence, opus_decoder_, |
280 opus_encoder_, silence, opus_decoder_, output_data_decode, | 233 output_data_decode, &audio_type))); |
281 &audio_type))); | |
282 EXPECT_GT(encoded_bytes_, 1U); | 234 EXPECT_GT(encoded_bytes_, 1U); |
283 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); | 235 EXPECT_EQ(0, opus_encoder_->in_dtx_mode); |
284 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); | 236 EXPECT_EQ(0, opus_decoder_->in_dtx_mode); |
285 EXPECT_EQ(0, audio_type); // Speech. | 237 EXPECT_EQ(0, audio_type); // Speech. |
286 } | 238 } |
287 | 239 |
288 // Free memory. | 240 // Free memory. |
289 delete[] output_data_decode; | 241 delete[] output_data_decode; |
290 EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_encoder_)); | 242 EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_encoder_)); |
291 EXPECT_EQ(0, WebRtcOpus_DecoderFree(opus_decoder_)); | 243 EXPECT_EQ(0, WebRtcOpus_DecoderFree(opus_decoder_)); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 opus_encoder_ctl(opus_encoder_->encoder, | 429 opus_encoder_ctl(opus_encoder_->encoder, |
478 OPUS_GET_DTX(&dtx)); | 430 OPUS_GET_DTX(&dtx)); |
479 EXPECT_EQ(0, dtx); | 431 EXPECT_EQ(0, dtx); |
480 | 432 |
481 | 433 |
482 // Free memory. | 434 // Free memory. |
483 EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_encoder_)); | 435 EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_encoder_)); |
484 } | 436 } |
485 | 437 |
486 TEST_P(OpusTest, OpusDtxOff) { | 438 TEST_P(OpusTest, OpusDtxOff) { |
487 TestDtxEffect(false, 10); | 439 TestDtxEffect(false); |
488 TestDtxEffect(false, 20); | |
489 TestDtxEffect(false, 40); | |
490 } | 440 } |
491 | 441 |
492 TEST_P(OpusTest, OpusDtxOn) { | 442 TEST_P(OpusTest, OpusDtxOn) { |
493 TestDtxEffect(true, 10); | 443 TestDtxEffect(true); |
494 TestDtxEffect(true, 20); | |
495 TestDtxEffect(true, 40); | |
496 } | 444 } |
497 | 445 |
498 TEST_P(OpusTest, OpusSetPacketLossRate) { | 446 TEST_P(OpusTest, OpusSetPacketLossRate) { |
499 // Test without creating encoder memory. | 447 // Test without creating encoder memory. |
500 EXPECT_EQ(-1, WebRtcOpus_SetPacketLossRate(opus_encoder_, 50)); | 448 EXPECT_EQ(-1, WebRtcOpus_SetPacketLossRate(opus_encoder_, 50)); |
501 | 449 |
502 // Create encoder memory. | 450 // Create encoder memory. |
503 EXPECT_EQ(0, WebRtcOpus_EncoderCreate(&opus_encoder_, | 451 EXPECT_EQ(0, WebRtcOpus_EncoderCreate(&opus_encoder_, |
504 channels_, | 452 channels_, |
505 application_)); | 453 application_)); |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
665 EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_encoder_)); | 613 EXPECT_EQ(0, WebRtcOpus_EncoderFree(opus_encoder_)); |
666 EXPECT_EQ(0, WebRtcOpus_DecoderFree(opus_decoder_)); | 614 EXPECT_EQ(0, WebRtcOpus_DecoderFree(opus_decoder_)); |
667 } | 615 } |
668 | 616 |
669 INSTANTIATE_TEST_CASE_P(VariousMode, | 617 INSTANTIATE_TEST_CASE_P(VariousMode, |
670 OpusTest, | 618 OpusTest, |
671 Combine(Values(1, 2), Values(0, 1))); | 619 Combine(Values(1, 2), Values(0, 1))); |
672 | 620 |
673 | 621 |
674 } // namespace webrtc | 622 } // namespace webrtc |
OLD | NEW |