Commit 7c509ec6 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu VDA unittest: Enable testing resolution change videos

In VDA unittest, the video frame size is given as input, and the unittest checks
that the visible size does not change.
To enable resolution changing videos, set the frame size dynamically when a
resolution change happens (i.e. ProvidePictureBuffers()).

BUG=chromium:834170
TEST= on kevin
$ ./video_decode_accelerator_unittest --test_video_data=switch_720p_1080p_240frames.h264:1920:1080:240:240:24:24:1 --ozone-platform=gbm
$ ./video_decode_accelerator_unittest --test_video_data=resolution_change_500frames-vp8.ivf:640:360:500:500:30:30:11 --ozone-platform=gbm
$ ./video_decode_accelerator_unittest --test_video_data=resolution_change_500frames-vp9.ivf:640:360:500:500:30:30:12 --ozone-platform=gbm


Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I803afb16bc3a706ea9f806ac1f1372c24f80c341
Reviewed-on: https://chromium-review.googlesource.com/1027690
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: default avatarPawel Osciak <posciak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557422}
parent df7f6189
......@@ -498,6 +498,7 @@ void GLRenderingVDAClient::ProvidePictureBuffers(
LOG_ASSERT((pixel_format_ == PIXEL_FORMAT_UNKNOWN) ||
(pixel_format_ == pixel_format));
pixel_format_ = pixel_format;
frame_size_ = dimensions;
texture_target_ = texture_target;
for (uint32_t i = 0; i < requested_num_of_buffers; ++i) {
......@@ -561,7 +562,7 @@ void GLRenderingVDAClient::PictureReady(const Picture& picture) {
gfx::Rect visible_rect = picture.visible_rect();
if (!visible_rect.IsEmpty())
EXPECT_EQ(gfx::Rect(frame_size_), visible_rect);
EXPECT_TRUE(gfx::Rect(frame_size_).Contains(visible_rect));
base::TimeTicks now = base::TimeTicks::Now();
......
......@@ -283,6 +283,21 @@ red-green.h264.md5:
not specified to the last bit and GLES shader/texture filtering
precision varies.
// VDA test files: resolution_change_500frames
resolution_change_500frames-vp8.ivf
resolution_change_500frames-vp9.ivf
Dumped compressed stream of videos on http://crosvideo.appspot.com manually
changing resolutions at random.
Those contain 144p, 240p, 360p, 480p, 720p, and 1080p frames.
Those frame sizes can be found by
ffprobe -show_frames resolution_change_500frames.vp8
// VDA test files: switch_1080p_720p_240frames
switch_1080p_720p_240frames.h264
Extract 240 frames using ffmpeg from
http://commondatastorage.googleapis.com/chromiumos-test-assets-public/MSE/switch_1080p_720p.mp4.
The frame sizes change between 1080p and 720p every 24 frames.
// VEA test files:
bear_320x192_40frames.yuv
First 40 raw i420 frames of bear-1280x720.mp4 scaled down to 320x192 for
......
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