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

Side by Side Diff: media/test/pipeline_integration_test.cc

Issue 1561703002: media/vpx: Add support for VP9 alpha channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 4 years, 11 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1772 matching lines...) Expand 10 before | Expand all | Expand 10 after
1783 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { 1783 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) {
1784 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM, 1784 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM,
1785 32768, 1785 32768,
1786 base::TimeDelta::FromMilliseconds(167), 1786 base::TimeDelta::FromMilliseconds(167),
1787 base::TimeDelta::FromMilliseconds(1668), 1787 base::TimeDelta::FromMilliseconds(1668),
1788 0x1C896, 65536)); 1788 0x1C896, 65536));
1789 } 1789 }
1790 1790
1791 // Verify that Opus audio in WebM containers can be played back. 1791 // Verify that Opus audio in WebM containers can be played back.
1792 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { 1792 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) {
1793 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm")); 1793 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm", kClockless));
1794 Play(); 1794 Play();
1795 ASSERT_TRUE(WaitUntilOnEnded()); 1795 ASSERT_TRUE(WaitUntilOnEnded());
1796 } 1796 }
1797 1797
1798 // Verify that VP9 video in WebM containers can be played back. 1798 // Verify that VP9 video in WebM containers can be played back.
1799 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) { 1799 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) {
1800 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm")); 1800 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm", kClockless));
1801 Play(); 1801 Play();
1802 ASSERT_TRUE(WaitUntilOnEnded()); 1802 ASSERT_TRUE(WaitUntilOnEnded());
1803 } 1803 }
1804 1804
1805 // Verify that VP9 video and Opus audio in the same WebM container can be played 1805 // Verify that VP9 video and Opus audio in the same WebM container can be played
1806 // back. 1806 // back.
1807 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) { 1807 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) {
1808 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-opus.webm")); 1808 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-opus.webm", kClockless));
1809 Play(); 1809 Play();
1810 ASSERT_TRUE(WaitUntilOnEnded()); 1810 ASSERT_TRUE(WaitUntilOnEnded());
1811 } 1811 }
1812 1812
1813 // Verify that VP8 video with alpha channel can be played back. 1813 // Verify that VP8 video with alpha channel can be played back.
1814 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_WebM) { 1814 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_WebM) {
1815 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a.webm")); 1815 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a.webm", kClockless));
1816 Play(); 1816 Play();
1817 ASSERT_TRUE(WaitUntilOnEnded()); 1817 ASSERT_TRUE(WaitUntilOnEnded());
1818 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A); 1818 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1819 } 1819 }
1820 1820
1821 // Verify that VP8A video with odd width/height can be played back. 1821 // Verify that VP8A video with odd width/height can be played back.
1822 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_Odd_WebM) { 1822 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_Odd_WebM) {
1823 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a-odd-dimensions.webm")); 1823 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a-odd-dimensions.webm", kClockless));
1824 Play(); 1824 Play();
1825 ASSERT_TRUE(WaitUntilOnEnded()); 1825 ASSERT_TRUE(WaitUntilOnEnded());
1826 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A); 1826 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1827 } 1827 }
1828 1828
1829 // Verify that VP9 video with odd width/height can be played back. 1829 // Verify that VP9 video with odd width/height can be played back.
1830 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Odd_WebM) { 1830 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Odd_WebM) {
1831 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-odd-dimensions.webm")); 1831 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-odd-dimensions.webm", kClockless));
1832 Play(); 1832 Play();
1833 ASSERT_TRUE(WaitUntilOnEnded()); 1833 ASSERT_TRUE(WaitUntilOnEnded());
1834 } 1834 }
1835 1835
1836 // Verify that VP9 video with alpha channel can be played back.
1837 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9A_WebM) {
1838 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9a.webm", kClockless));
1839 Play();
1840 ASSERT_TRUE(WaitUntilOnEnded());
1841 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1842 }
1843
1844 // Verify that VP9A video with odd width/height can be played back.
1845 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9A_Odd_WebM) {
1846 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9a-odd-dimensions.webm", kClockless));
1847 Play();
1848 ASSERT_TRUE(WaitUntilOnEnded());
1849 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1850 }
1851
1836 #if !defined(DISABLE_TEXT_TRACK_TESTS) 1852 #if !defined(DISABLE_TEXT_TRACK_TESTS)
1837 // Verify that VP8 video with inband text track can be played back. 1853 // Verify that VP8 video with inband text track can be played back.
1838 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) { 1854 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) {
1839 EXPECT_CALL(*this, OnAddTextTrack(_, _)); 1855 EXPECT_CALL(*this, OnAddTextTrack(_, _));
1840 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8-webvtt.webm")); 1856 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8-webvtt.webm"));
1841 Play(); 1857 Play();
1842 ASSERT_TRUE(WaitUntilOnEnded()); 1858 ASSERT_TRUE(WaitUntilOnEnded());
1843 } 1859 }
1844 #endif // !defined(DISABLE_TEXT_TRACK_TESTS) 1860 #endif // !defined(DISABLE_TEXT_TRACK_TESTS)
1845 1861
1846 // Verify that VP9 video with 4:4:4 subsampling can be played back. 1862 // Verify that VP9 video with 4:4:4 subsampling can be played back.
1847 TEST_F(PipelineIntegrationTest, P444_VP9_WebM) { 1863 TEST_F(PipelineIntegrationTest, P444_VP9_WebM) {
1848 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-P444.webm")); 1864 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-P444.webm", kClockless));
1849 Play(); 1865 Play();
1850 ASSERT_TRUE(WaitUntilOnEnded()); 1866 ASSERT_TRUE(WaitUntilOnEnded());
1851 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV24); 1867 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV24);
1852 } 1868 }
1853 1869
1854 // Verify that frames of VP9 video in the BT.709 color space have the YV12HD 1870 // Verify that frames of VP9 video in the BT.709 color space have the YV12HD
1855 // format. 1871 // format.
1856 TEST_F(PipelineIntegrationTest, BT709_VP9_WebM) { 1872 TEST_F(PipelineIntegrationTest, BT709_VP9_WebM) {
1857 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-bt709.webm")); 1873 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-bt709.webm", kClockless));
1858 Play(); 1874 Play();
1859 ASSERT_TRUE(WaitUntilOnEnded()); 1875 ASSERT_TRUE(WaitUntilOnEnded());
1860 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12); 1876 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12);
1861 EXPECT_COLOR_SPACE_EQ(last_video_frame_color_space_, COLOR_SPACE_HD_REC709); 1877 EXPECT_COLOR_SPACE_EQ(last_video_frame_color_space_, COLOR_SPACE_HD_REC709);
1862 } 1878 }
1863 1879
1864 // Verify that videos with an odd frame size playback successfully. 1880 // Verify that videos with an odd frame size playback successfully.
1865 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) { 1881 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) {
1866 ASSERT_EQ(PIPELINE_OK, Start("butterfly-853x480.webm")); 1882 ASSERT_EQ(PIPELINE_OK, Start("butterfly-853x480.webm", kClockless));
1867 Play(); 1883 Play();
1868 ASSERT_TRUE(WaitUntilOnEnded()); 1884 ASSERT_TRUE(WaitUntilOnEnded());
1869 } 1885 }
1870 1886
1871 // Verify that OPUS audio in a webm which reports a 44.1kHz sample rate plays 1887 // Verify that OPUS audio in a webm which reports a 44.1kHz sample rate plays
1872 // correctly at 48kHz 1888 // correctly at 48kHz
1873 TEST_F(PipelineIntegrationTest, BasicPlayback_Opus441kHz) { 1889 TEST_F(PipelineIntegrationTest, BasicPlayback_Opus441kHz) {
1874 ASSERT_EQ(PIPELINE_OK, Start("sfx-opus-441.webm")); 1890 ASSERT_EQ(PIPELINE_OK, Start("sfx-opus-441.webm"));
1875 Play(); 1891 Play();
1876 ASSERT_TRUE(WaitUntilOnEnded()); 1892 ASSERT_TRUE(WaitUntilOnEnded());
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1936 1952
1937 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 1953 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
1938 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 1954 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
1939 Play(); 1955 Play();
1940 ASSERT_TRUE(WaitUntilOnEnded()); 1956 ASSERT_TRUE(WaitUntilOnEnded());
1941 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 1957 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
1942 demuxer_->GetStartTime()); 1958 demuxer_->GetStartTime());
1943 } 1959 }
1944 1960
1945 } // namespace media 1961 } // namespace media
OLDNEW
« media/filters/vpx_video_decoder.cc ('K') | « media/test/data/bear-vp9a-odd-dimensions.webm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698