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

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

Issue 1608113002: Revert of media/vpx: Add support for VP9 alpha channel (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « media/test/data/bear-vp9a-odd-dimensions.webm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1840 matching lines...) Expand 10 before | Expand all | Expand 10 after
1851 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) { 1851 TEST_F(PipelineIntegrationTest, ChunkDemuxerAbortRead_VideoOnly) {
1852 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM, 1852 ASSERT_TRUE(TestSeekDuringRead("bear-320x240-video-only.webm", kVideoOnlyWebM,
1853 32768, 1853 32768,
1854 base::TimeDelta::FromMilliseconds(167), 1854 base::TimeDelta::FromMilliseconds(167),
1855 base::TimeDelta::FromMilliseconds(1668), 1855 base::TimeDelta::FromMilliseconds(1668),
1856 0x1C896, 65536)); 1856 0x1C896, 65536));
1857 } 1857 }
1858 1858
1859 // Verify that Opus audio in WebM containers can be played back. 1859 // Verify that Opus audio in WebM containers can be played back.
1860 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) { 1860 TEST_F(PipelineIntegrationTest, BasicPlayback_AudioOnly_Opus_WebM) {
1861 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm", kClockless)); 1861 ASSERT_EQ(PIPELINE_OK, Start("bear-opus-end-trimming.webm"));
1862 Play(); 1862 Play();
1863 ASSERT_TRUE(WaitUntilOnEnded()); 1863 ASSERT_TRUE(WaitUntilOnEnded());
1864 } 1864 }
1865 1865
1866 // Verify that VP9 video in WebM containers can be played back. 1866 // Verify that VP9 video in WebM containers can be played back.
1867 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) { 1867 TEST_F(PipelineIntegrationTest, BasicPlayback_VideoOnly_VP9_WebM) {
1868 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm", kClockless)); 1868 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9.webm"));
1869 Play(); 1869 Play();
1870 ASSERT_TRUE(WaitUntilOnEnded()); 1870 ASSERT_TRUE(WaitUntilOnEnded());
1871 } 1871 }
1872 1872
1873 // Verify that VP9 video and Opus audio in the same WebM container can be played 1873 // Verify that VP9 video and Opus audio in the same WebM container can be played
1874 // back. 1874 // back.
1875 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) { 1875 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Opus_WebM) {
1876 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-opus.webm", kClockless)); 1876 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-opus.webm"));
1877 Play(); 1877 Play();
1878 ASSERT_TRUE(WaitUntilOnEnded()); 1878 ASSERT_TRUE(WaitUntilOnEnded());
1879 } 1879 }
1880 1880
1881 // Verify that VP8 video with alpha channel can be played back. 1881 // Verify that VP8 video with alpha channel can be played back.
1882 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_WebM) { 1882 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_WebM) {
1883 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a.webm", kClockless)); 1883 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a.webm"));
1884 Play(); 1884 Play();
1885 ASSERT_TRUE(WaitUntilOnEnded()); 1885 ASSERT_TRUE(WaitUntilOnEnded());
1886 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A); 1886 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1887 } 1887 }
1888 1888
1889 // Verify that VP8A video with odd width/height can be played back. 1889 // Verify that VP8A video with odd width/height can be played back.
1890 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_Odd_WebM) { 1890 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8A_Odd_WebM) {
1891 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a-odd-dimensions.webm", kClockless)); 1891 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8a-odd-dimensions.webm"));
1892 Play(); 1892 Play();
1893 ASSERT_TRUE(WaitUntilOnEnded()); 1893 ASSERT_TRUE(WaitUntilOnEnded());
1894 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A); 1894 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1895 } 1895 }
1896 1896
1897 // Verify that VP9 video with odd width/height can be played back. 1897 // Verify that VP9 video with odd width/height can be played back.
1898 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Odd_WebM) { 1898 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9_Odd_WebM) {
1899 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-odd-dimensions.webm", kClockless)); 1899 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-odd-dimensions.webm"));
1900 Play(); 1900 Play();
1901 ASSERT_TRUE(WaitUntilOnEnded()); 1901 ASSERT_TRUE(WaitUntilOnEnded());
1902 } 1902 }
1903 1903
1904 // Verify that VP9 video with alpha channel can be played back.
1905 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9A_WebM) {
1906 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9a.webm", kClockless));
1907 Play();
1908 ASSERT_TRUE(WaitUntilOnEnded());
1909 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1910 }
1911
1912 // Verify that VP9A video with odd width/height can be played back.
1913 TEST_F(PipelineIntegrationTest, BasicPlayback_VP9A_Odd_WebM) {
1914 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9a-odd-dimensions.webm", kClockless));
1915 Play();
1916 ASSERT_TRUE(WaitUntilOnEnded());
1917 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12A);
1918 }
1919
1920 #if !defined(DISABLE_TEXT_TRACK_TESTS) 1904 #if !defined(DISABLE_TEXT_TRACK_TESTS)
1921 // Verify that VP8 video with inband text track can be played back. 1905 // Verify that VP8 video with inband text track can be played back.
1922 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) { 1906 TEST_F(PipelineIntegrationTest, BasicPlayback_VP8_WebVTT_WebM) {
1923 EXPECT_CALL(*this, OnAddTextTrack(_, _)); 1907 EXPECT_CALL(*this, OnAddTextTrack(_, _));
1924 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8-webvtt.webm")); 1908 ASSERT_EQ(PIPELINE_OK, Start("bear-vp8-webvtt.webm"));
1925 Play(); 1909 Play();
1926 ASSERT_TRUE(WaitUntilOnEnded()); 1910 ASSERT_TRUE(WaitUntilOnEnded());
1927 } 1911 }
1928 #endif // !defined(DISABLE_TEXT_TRACK_TESTS) 1912 #endif // !defined(DISABLE_TEXT_TRACK_TESTS)
1929 1913
1930 // Verify that VP9 video with 4:4:4 subsampling can be played back. 1914 // Verify that VP9 video with 4:4:4 subsampling can be played back.
1931 TEST_F(PipelineIntegrationTest, P444_VP9_WebM) { 1915 TEST_F(PipelineIntegrationTest, P444_VP9_WebM) {
1932 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-P444.webm", kClockless)); 1916 ASSERT_EQ(PIPELINE_OK, Start("bear-320x240-P444.webm"));
1933 Play(); 1917 Play();
1934 ASSERT_TRUE(WaitUntilOnEnded()); 1918 ASSERT_TRUE(WaitUntilOnEnded());
1935 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV24); 1919 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV24);
1936 } 1920 }
1937 1921
1938 // Verify that frames of VP9 video in the BT.709 color space have the YV12HD 1922 // Verify that frames of VP9 video in the BT.709 color space have the YV12HD
1939 // format. 1923 // format.
1940 TEST_F(PipelineIntegrationTest, BT709_VP9_WebM) { 1924 TEST_F(PipelineIntegrationTest, BT709_VP9_WebM) {
1941 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-bt709.webm", kClockless)); 1925 ASSERT_EQ(PIPELINE_OK, Start("bear-vp9-bt709.webm"));
1942 Play(); 1926 Play();
1943 ASSERT_TRUE(WaitUntilOnEnded()); 1927 ASSERT_TRUE(WaitUntilOnEnded());
1944 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12); 1928 EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YV12);
1945 EXPECT_COLOR_SPACE_EQ(last_video_frame_color_space_, COLOR_SPACE_HD_REC709); 1929 EXPECT_COLOR_SPACE_EQ(last_video_frame_color_space_, COLOR_SPACE_HD_REC709);
1946 } 1930 }
1947 1931
1948 // Verify that videos with an odd frame size playback successfully. 1932 // Verify that videos with an odd frame size playback successfully.
1949 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) { 1933 TEST_F(PipelineIntegrationTest, BasicPlayback_OddVideoSize) {
1950 ASSERT_EQ(PIPELINE_OK, Start("butterfly-853x480.webm", kClockless)); 1934 ASSERT_EQ(PIPELINE_OK, Start("butterfly-853x480.webm"));
1951 Play(); 1935 Play();
1952 ASSERT_TRUE(WaitUntilOnEnded()); 1936 ASSERT_TRUE(WaitUntilOnEnded());
1953 } 1937 }
1954 1938
1955 // Verify that OPUS audio in a webm which reports a 44.1kHz sample rate plays 1939 // Verify that OPUS audio in a webm which reports a 44.1kHz sample rate plays
1956 // correctly at 48kHz 1940 // correctly at 48kHz
1957 TEST_F(PipelineIntegrationTest, BasicPlayback_Opus441kHz) { 1941 TEST_F(PipelineIntegrationTest, BasicPlayback_Opus441kHz) {
1958 ASSERT_EQ(PIPELINE_OK, Start("sfx-opus-441.webm")); 1942 ASSERT_EQ(PIPELINE_OK, Start("sfx-opus-441.webm"));
1959 Play(); 1943 Play();
1960 ASSERT_TRUE(WaitUntilOnEnded()); 1944 ASSERT_TRUE(WaitUntilOnEnded());
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 2004
2021 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) { 2005 TEST_F(PipelineIntegrationTest, BasicPlaybackPositiveStartTime) {
2022 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm")); 2006 ASSERT_EQ(PIPELINE_OK, Start("nonzero-start-time.webm"));
2023 Play(); 2007 Play();
2024 ASSERT_TRUE(WaitUntilOnEnded()); 2008 ASSERT_TRUE(WaitUntilOnEnded());
2025 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000), 2009 ASSERT_EQ(base::TimeDelta::FromMicroseconds(396000),
2026 demuxer_->GetStartTime()); 2010 demuxer_->GetStartTime());
2027 } 2011 }
2028 2012
2029 } // namespace media 2013 } // namespace media
OLDNEW
« no previous file with comments | « 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