Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Side by Side Diff: webrtc/modules/audio_coding/neteq/audio_decoder_unittest.cc

Issue 2996593002: Give Audio{De,En}coderIsac* an "Impl" suffix, to free up the original names (Closed)
Patch Set: rebase Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 EXPECT_EQ(0U, decoder_->DecodePlc(1, output.get())); 343 EXPECT_EQ(0U, decoder_->DecodePlc(1, output.get()));
344 } 344 }
345 }; 345 };
346 346
347 class AudioDecoderIsacFloatTest : public AudioDecoderTest { 347 class AudioDecoderIsacFloatTest : public AudioDecoderTest {
348 protected: 348 protected:
349 AudioDecoderIsacFloatTest() : AudioDecoderTest() { 349 AudioDecoderIsacFloatTest() : AudioDecoderTest() {
350 codec_input_rate_hz_ = 16000; 350 codec_input_rate_hz_ = 16000;
351 frame_size_ = 480; 351 frame_size_ = 480;
352 data_length_ = 10 * frame_size_; 352 data_length_ = 10 * frame_size_;
353 AudioEncoderIsac::Config config; 353 AudioEncoderIsacFloatImpl::Config config;
354 config.payload_type = payload_type_; 354 config.payload_type = payload_type_;
355 config.sample_rate_hz = codec_input_rate_hz_; 355 config.sample_rate_hz = codec_input_rate_hz_;
356 config.adaptive_mode = false; 356 config.adaptive_mode = false;
357 config.frame_size_ms = 357 config.frame_size_ms =
358 1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_; 358 1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_;
359 audio_encoder_.reset(new AudioEncoderIsac(config)); 359 audio_encoder_.reset(new AudioEncoderIsacFloatImpl(config));
360 decoder_ = new AudioDecoderIsac(codec_input_rate_hz_); 360 decoder_ = new AudioDecoderIsacFloatImpl(codec_input_rate_hz_);
361 } 361 }
362 }; 362 };
363 363
364 class AudioDecoderIsacSwbTest : public AudioDecoderTest { 364 class AudioDecoderIsacSwbTest : public AudioDecoderTest {
365 protected: 365 protected:
366 AudioDecoderIsacSwbTest() : AudioDecoderTest() { 366 AudioDecoderIsacSwbTest() : AudioDecoderTest() {
367 codec_input_rate_hz_ = 32000; 367 codec_input_rate_hz_ = 32000;
368 frame_size_ = 960; 368 frame_size_ = 960;
369 data_length_ = 10 * frame_size_; 369 data_length_ = 10 * frame_size_;
370 AudioEncoderIsac::Config config; 370 AudioEncoderIsacFloatImpl::Config config;
371 config.payload_type = payload_type_; 371 config.payload_type = payload_type_;
372 config.sample_rate_hz = codec_input_rate_hz_; 372 config.sample_rate_hz = codec_input_rate_hz_;
373 config.adaptive_mode = false; 373 config.adaptive_mode = false;
374 config.frame_size_ms = 374 config.frame_size_ms =
375 1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_; 375 1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_;
376 audio_encoder_.reset(new AudioEncoderIsac(config)); 376 audio_encoder_.reset(new AudioEncoderIsacFloatImpl(config));
377 decoder_ = new AudioDecoderIsac(codec_input_rate_hz_); 377 decoder_ = new AudioDecoderIsacFloatImpl(codec_input_rate_hz_);
378 } 378 }
379 }; 379 };
380 380
381 class AudioDecoderIsacFixTest : public AudioDecoderTest { 381 class AudioDecoderIsacFixTest : public AudioDecoderTest {
382 protected: 382 protected:
383 AudioDecoderIsacFixTest() : AudioDecoderTest() { 383 AudioDecoderIsacFixTest() : AudioDecoderTest() {
384 codec_input_rate_hz_ = 16000; 384 codec_input_rate_hz_ = 16000;
385 frame_size_ = 480; 385 frame_size_ = 480;
386 data_length_ = 10 * frame_size_; 386 data_length_ = 10 * frame_size_;
387 AudioEncoderIsacFix::Config config; 387 AudioEncoderIsacFixImpl::Config config;
388 config.payload_type = payload_type_; 388 config.payload_type = payload_type_;
389 config.sample_rate_hz = codec_input_rate_hz_; 389 config.sample_rate_hz = codec_input_rate_hz_;
390 config.adaptive_mode = false; 390 config.adaptive_mode = false;
391 config.frame_size_ms = 391 config.frame_size_ms =
392 1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_; 392 1000 * static_cast<int>(frame_size_) / codec_input_rate_hz_;
393 audio_encoder_.reset(new AudioEncoderIsacFix(config)); 393 audio_encoder_.reset(new AudioEncoderIsacFixImpl(config));
394 decoder_ = new AudioDecoderIsacFix(codec_input_rate_hz_); 394 decoder_ = new AudioDecoderIsacFixImpl(codec_input_rate_hz_);
395 } 395 }
396 }; 396 };
397 397
398 class AudioDecoderG722Test : public AudioDecoderTest { 398 class AudioDecoderG722Test : public AudioDecoderTest {
399 protected: 399 protected:
400 AudioDecoderG722Test() : AudioDecoderTest() { 400 AudioDecoderG722Test() : AudioDecoderTest() {
401 codec_input_rate_hz_ = 16000; 401 codec_input_rate_hz_ = 16000;
402 frame_size_ = 160; 402 frame_size_ = 160;
403 data_length_ = 10 * frame_size_; 403 data_length_ = 10 * frame_size_;
404 decoder_ = new AudioDecoderG722Impl; 404 decoder_ = new AudioDecoderG722Impl;
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb)); 684 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGnb));
685 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb)); 685 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGwb));
686 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz)); 686 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb32kHz));
687 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz)); 687 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderCNGswb48kHz));
688 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary)); 688 EXPECT_TRUE(CodecSupported(NetEqDecoder::kDecoderArbitrary));
689 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus)); 689 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus));
690 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch)); 690 EXPECT_EQ(has_opus, CodecSupported(NetEqDecoder::kDecoderOpus_2ch));
691 } 691 }
692 692
693 } // namespace webrtc 693 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698