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

Side by Side Diff: media/filters/audio_decoder_unittest.cc

Issue 2376513002: Fix implicit configuration changes in MediaCodecAudioDecoder. (Closed)
Patch Set: Cleanup code a bit. Created 4 years, 2 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 // 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 517
518 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderTest, 518 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderTest,
519 AudioDecoderTest, 519 AudioDecoderTest,
520 testing::ValuesIn(kOpusTests)); 520 testing::ValuesIn(kOpusTests));
521 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderBehavioralTest, 521 INSTANTIATE_TEST_CASE_P(OpusAudioDecoderBehavioralTest,
522 OpusAudioDecoderBehavioralTest, 522 OpusAudioDecoderBehavioralTest,
523 testing::ValuesIn(kOpusBehavioralTest)); 523 testing::ValuesIn(kOpusBehavioralTest));
524 524
525 #if defined(OS_ANDROID) 525 #if defined(OS_ANDROID)
526 #if defined(USE_PROPRIETARY_CODECS) 526 #if defined(USE_PROPRIETARY_CODECS)
527 const DecodedBufferExpectations kSfxAdtsMCExpectations[] = { 527 const DecodedBufferExpectations kSfxAdtsMcExpectations[] = {
528 {0, 23219, "-1.80,-1.49,-0.23,1.11,1.54,-0.11,"}, 528 {0, 23219, "-1.80,-1.49,-0.23,1.11,1.54,-0.11,"},
529 {23219, 23219, "-1.90,-1.53,-0.15,1.28,1.23,-0.33,"}, 529 {23219, 23219, "-1.90,-1.53,-0.15,1.28,1.23,-0.33,"},
530 {46439, 23219, "0.54,0.88,2.19,3.54,3.24,1.63,"}, 530 {46439, 23219, "0.54,0.88,2.19,3.54,3.24,1.63,"},
531 }; 531 };
532
533 const DecodedBufferExpectations kHeAacMcExpectations[] = {
534 {0, 42666, "-1.76,-0.12,1.72,1.45,0.10,-1.32,"},
535 {42666, 42666, "-1.78,-0.13,1.70,1.44,0.09,-1.32,"},
536 {85333, 42666, "-1.78,-0.13,1.70,1.44,0.08,-1.33,"},
537 };
532 #endif 538 #endif
533 539
534 const DecoderTestData kMediaCodecTests[] = { 540 const DecoderTestData kMediaCodecTests[] = {
535 {MEDIA_CODEC, kCodecOpus, "bear-opus.ogg", kBearOpusExpectations, 24, 48000, 541 {MEDIA_CODEC, kCodecOpus, "bear-opus.ogg", kBearOpusExpectations, 24, 48000,
536 CHANNEL_LAYOUT_STEREO}, 542 CHANNEL_LAYOUT_STEREO},
537 #if defined(USE_PROPRIETARY_CODECS) 543 #if defined(USE_PROPRIETARY_CODECS)
538 {MEDIA_CODEC, kCodecAAC, "sfx.adts", kSfxAdtsMCExpectations, 0, 44100, 544 {MEDIA_CODEC, kCodecAAC, "sfx.adts", kSfxAdtsMcExpectations, 0, 44100,
539 CHANNEL_LAYOUT_MONO}, 545 CHANNEL_LAYOUT_MONO},
546 {MEDIA_CODEC, kCodecAAC, "bear-audio-implicit-he-aac-v2.aac",
547 kHeAacMcExpectations, 0, 24000, CHANNEL_LAYOUT_MONO},
540 #endif 548 #endif
541 }; 549 };
542 550
543 INSTANTIATE_TEST_CASE_P(MediaCodecAudioDecoderTest, 551 INSTANTIATE_TEST_CASE_P(MediaCodecAudioDecoderTest,
544 AudioDecoderTest, 552 AudioDecoderTest,
545 testing::ValuesIn(kMediaCodecTests)); 553 testing::ValuesIn(kMediaCodecTests));
546 #endif // defined(OS_ANDROID) 554 #endif // defined(OS_ANDROID)
547 555
548 #if defined(USE_PROPRIETARY_CODECS) 556 #if defined(USE_PROPRIETARY_CODECS)
549 const DecodedBufferExpectations kSfxMp3Expectations[] = { 557 const DecodedBufferExpectations kSfxMp3Expectations[] = {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 }; 628 };
621 629
622 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, 630 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest,
623 AudioDecoderTest, 631 AudioDecoderTest,
624 testing::ValuesIn(kFFmpegTests)); 632 testing::ValuesIn(kFFmpegTests));
625 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, 633 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest,
626 FFmpegAudioDecoderBehavioralTest, 634 FFmpegAudioDecoderBehavioralTest,
627 testing::ValuesIn(kFFmpegBehavioralTest)); 635 testing::ValuesIn(kFFmpegBehavioralTest));
628 636
629 } // namespace media 637 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698