Commit cb5eb813 authored by Tom Finegan's avatar Tom Finegan Committed by Commit Bot

media: Add basic AV1 10bit playback test.

BUG=896519

Change-Id: Ic6572e30daf960501f14ecac4a932f1091be5957
Reviewed-on: https://chromium-review.googlesource.com/c/1290132
Commit-Queue: Tom Finegan <tomfinegan@chromium.org>
Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#601024}
parent 939d7b20
......@@ -125,6 +125,24 @@ aomenc bear_480P.yuv -w 640 -h 480 --fps=30000/1001 --cpu-used=8 \
--lag-in-frames=0 --test-decode=fatal --target-bitrate=50 \
-o bear-av1-640x480.webm
```
#### bear-av1-320x180-10bit.mp4
Created using FFmpeg with the following command:
```
ffmpeg -i bear-av1-320x180-10bit.webm -vcodec copy -f mp4 \
-movflags frag_keyframe+empty_moov+default_base_moof+faststart \
bear-av1-320x180-10bit.mp4
```
#### bear-av1-320x180-10bit.webm
Created using vpxdec and aomenc with the following commands:
```
vpxdec bear-320x180-hi10p-vp9.webm -o bear-320x180-10bit.y4m
aomenc bear-320x180-10bit.y4m --lag-in-frames=0 --target-bitrate=50 \
--fps=30000/1001 --cpu-used=8 --bit-depth=10 --test-decode=fatal \
-o bear-av1-320x180-10bit.webm
```
### Alpha Channel
#### bear-vp8a.webm
......
......@@ -116,6 +116,7 @@ const char kMP3[] = "audio/mpeg";
#if BUILDFLAG(ENABLE_AV1_DECODER)
const char kMP4AV1[] = "video/mp4; codecs=\"av01.0.04M.08\"";
const char kWebMAV1[] = "video/webm; codecs=\"av01.0.04M.08\"";
const int kAV110BitMp4FileDurationMs = 2735;
const int kAV1640WebMFileDurationMs = 2736;
#endif // BUILDFLAG(ENABLE_AV1_DECODER)
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
......@@ -1534,6 +1535,28 @@ TEST_P(MSEPipelineIntegrationTest, BasicPlayback_AV1_WebM) {
source.Shutdown();
Stop();
}
TEST_P(MSEPipelineIntegrationTest, BasicPlayback_AV1_10bit_WebM) {
base::test::ScopedFeatureList scoped_feature_list_;
scoped_feature_list_.InitAndEnableFeature(kAv1Decoder);
MockMediaSource source("bear-av1-320x180-10bit.webm", kWebMAV1, 19076);
EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source));
source.EndOfStream();
EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
EXPECT_EQ(kVP9WebMFileDurationMs,
pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
Play();
ASSERT_TRUE(WaitUntilOnEnded());
source.Shutdown();
EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YUV420P10);
Stop();
}
#endif
TEST_P(MSEPipelineIntegrationTest, BasicPlayback_VP9_WebM) {
......@@ -1903,6 +1926,26 @@ TEST_P(MSEPipelineIntegrationTest, BasicPlayback_AV1_MP4) {
source.Shutdown();
Stop();
}
TEST_P(MSEPipelineIntegrationTest, BasicPlayback_AV1_10bit_MP4) {
base::test::ScopedFeatureList scoped_feature_list_;
scoped_feature_list_.InitAndEnableFeature(kAv1Decoder);
MockMediaSource source("bear-av1-320x180-10bit.mp4", kMP4AV1, 19658);
EXPECT_EQ(PIPELINE_OK, StartPipelineWithMediaSource(&source));
source.EndOfStream();
EXPECT_EQ(1u, pipeline_->GetBufferedTimeRanges().size());
EXPECT_EQ(0, pipeline_->GetBufferedTimeRanges().start(0).InMilliseconds());
EXPECT_EQ(kAV110BitMp4FileDurationMs,
pipeline_->GetBufferedTimeRanges().end(0).InMilliseconds());
Play();
ASSERT_TRUE(WaitUntilOnEnded());
source.Shutdown();
EXPECT_VIDEO_FORMAT_EQ(last_video_frame_format_, PIXEL_FORMAT_YUV420P10);
Stop();
}
#endif
TEST_P(MSEPipelineIntegrationTest, FlacInMp4_Hashed) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment