OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <deque> | 5 #include <deque> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/format_macros.h" | 8 #include "base/format_macros.h" |
9 #include "base/md5.h" | 9 #include "base/md5.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 kSampleFormatF32, | 410 kSampleFormatF32, |
411 CHANNEL_LAYOUT_STEREO, | 411 CHANNEL_LAYOUT_STEREO, |
412 // Invalid sample rate of zero. | 412 // Invalid sample rate of zero. |
413 0, | 413 0, |
414 NULL, | 414 NULL, |
415 0, | 415 0, |
416 false); | 416 false); |
417 InitializeDecoderWithResult(decoder_config, false); | 417 InitializeDecoderWithResult(decoder_config, false); |
418 } | 418 } |
419 | 419 |
| 420 #if defined(OPUS_FIXED_POINT) |
| 421 const DecodedBufferExpectations kSfxOpusExpectations[] = { |
| 422 {0, 13500, "-2.70,-1.41,-0.78,-1.27,-2.56,-3.73,"}, |
| 423 {13500, 20000, "5.48,5.93,6.05,5.83,5.54,5.46,"}, |
| 424 {33500, 20000, "-3.44,-3.34,-3.57,-4.11,-4.74,-5.13,"}, |
| 425 }; |
| 426 #else |
420 const DecodedBufferExpectations kSfxOpusExpectations[] = { | 427 const DecodedBufferExpectations kSfxOpusExpectations[] = { |
421 {0, 13500, "-2.70,-1.41,-0.78,-1.27,-2.56,-3.73,"}, | 428 {0, 13500, "-2.70,-1.41,-0.78,-1.27,-2.56,-3.73,"}, |
422 {13500, 20000, "5.48,5.93,6.04,5.83,5.54,5.45,"}, | 429 {13500, 20000, "5.48,5.93,6.04,5.83,5.54,5.45,"}, |
423 {33500, 20000, "-3.45,-3.35,-3.57,-4.12,-4.74,-5.14,"}, | 430 {33500, 20000, "-3.45,-3.35,-3.57,-4.12,-4.74,-5.14,"}, |
424 }; | 431 }; |
| 432 #endif |
425 | 433 |
426 const DecodedBufferExpectations kBearOpusExpectations[] = { | 434 const DecodedBufferExpectations kBearOpusExpectations[] = { |
427 {500, 3500, "-0.26,0.87,1.36,0.84,-0.30,-1.22,"}, | 435 {500, 3500, "-0.26,0.87,1.36,0.84,-0.30,-1.22,"}, |
428 {4000, 10000, "0.09,0.23,0.21,0.03,-0.17,-0.24,"}, | 436 {4000, 10000, "0.09,0.23,0.21,0.03,-0.17,-0.24,"}, |
429 {14000, 10000, "0.10,0.24,0.23,0.04,-0.14,-0.23,"}, | 437 {14000, 10000, "0.10,0.24,0.23,0.04,-0.14,-0.23,"}, |
430 }; | 438 }; |
431 | 439 |
432 const DecoderTestData kOpusTests[] = { | 440 const DecoderTestData kOpusTests[] = { |
433 {OPUS, kCodecOpus, "sfx-opus.ogg", kSfxOpusExpectations, -312, 48000, | 441 {OPUS, kCodecOpus, "sfx-opus.ogg", kSfxOpusExpectations, -312, 48000, |
434 CHANNEL_LAYOUT_MONO}, | 442 CHANNEL_LAYOUT_MONO}, |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 }; | 531 }; |
524 | 532 |
525 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, | 533 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, |
526 AudioDecoderTest, | 534 AudioDecoderTest, |
527 testing::ValuesIn(kFFmpegTests)); | 535 testing::ValuesIn(kFFmpegTests)); |
528 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, | 536 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, |
529 FFmpegAudioDecoderBehavioralTest, | 537 FFmpegAudioDecoderBehavioralTest, |
530 testing::ValuesIn(kFFmpegBehavioralTest)); | 538 testing::ValuesIn(kFFmpegBehavioralTest)); |
531 | 539 |
532 } // namespace media | 540 } // namespace media |
OLD | NEW |