New issue
Advanced search Search tips

Issue 889496 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 901221

Blocking:
issue 893501



Sign in to add a comment

Migrate video_VideoEncodeAccelerator to Tast

Project Member Reported by hiroh@chromium.org, Sep 26

Issue description

video_VideoEncodeAccelerator [1] is a video test which runs a binary unittest on DUT.
We migrate this to a new test framework, Tast [2].

[1] https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/site_tests/video_VideoEncodeAccelerator/
[2] https://chromium.googlesource.com/chromiumos/platform/tast/


 
Status: Assigned (was: Untriaged)
Cc: derat@chromium.org
+derat@

I am migrating video_VideoDecodeAccelerator.
I wonder there is an example in tast to run chrome binary unittest?
I especially curious about an alternative to chrome_binary_test.py.

https://chromium.googlesource.com/chromiumos/third_party/autotest/+/master/client/cros/chrome_binary_test.py

Thanks
Cc: nya@chromium.org
+nya@,
I talked with nya@ about the place chrome binary unit tests are pre-installed on test-image. We found an issue.

Currently, we have six chrome binary tests.
Because they are built without components, they are static linkaged. Therefore, the size of each of them is large. As one example, the size of video_decode_accelerator_unittest binary is about 130MB.
Then the sum of them will be about 1GB.

It is bad to increase Chrome OS test image by 1GB, by putting them on test image by default.
On the one hand, tast will never install anything in provision.

I think we need discussion to solve this situation.

+keiichiw@: FYI
derat@, do you have any idea?

IIUC local_test_runner might be run directly on DUT, in which case DUT does not have access to outside world. Considering the case, the only way to provide test files seems to install them on test image. But it's essentially impossible because file size is too large.

Components: Tests>Tast
Hmm, this is tricky.

What do the binaries do, exactly? Why are they so large? Do they include test data, or is there any way to make them smaller (e.g. by stripping symbols)?
It doesn't include test data. They are standalone binaries by static linkage.
I compiled them on eve, though wayland_client_perftests cannot be built due to compile error.
Their code size are as follows;

138M jpeg_decode_accelerator_unittest
97M ozone_gl_unittests
14M sandbox_linux_unittests
149M video_decode_accelerator_unittest
143M video_encode_accelerator_unittest

Hmm, I tried to strip symbols by "strip" and specifying "symbol_level=0" in gn. But in either way, I got some errors. I will investigate how to strip debug symbols from them.
Oh, I build them with symbol_level=0 by
$ gn gen out_$SDK_BOARD/Release --args="$GN_ARGS symbol_level=0 enable_resource_whitelist_generation=false" 

These sizes decreases quite as follows.
 
2.6M out_eve/Release/jpeg_decode_accelerator_unittest
 11M out_eve/Release/ozone_gl_unittests
2.5M out_eve/Release/sandbox_linux_unittests
 12M out_eve/Release/video_decode_accelerator_unittest
5.6M out_eve/Release/video_encode_accelerator_unittest
That sounds promising. If the size is as small as that, we can install them on test images.

I wonder it is allowed to change a symbol level in chromeos-chrome.ebuild.
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild#485

There was a discussion in internal group, g/chromeos-chatty-eng/xJ6DX9mQz5g/uFo58rH5CQAJ. No conclusion there though.


I think we'll get into very long discussion if we attempt to change the build flag for whole chromeos-chrome.

Can we apply the flag only to those unit tests?

Or another possibility is to strip symbols after they are built.

Cc: steve...@chromium.org
Components: OS>Packages
Thanks for looking into this -- I agree that that sounds promising.

I couldn't quite figure out how the test binaries are currently installed from my initial look at the chromeos-chrome ebuild. It would probably be ideal to install them from a new package that only gets installed in test images (e.g. chrome-video-tests), but I'm not sure how we'd be able to share the existing chromeos-chrome logic with it.

Do you need to do a completely separate build to apply the symbol_level=0 and enable_resource_whitelist_generation=false args when compiling the test binaries? How long do they take to compile (compared to chromeos-chrome)?
(But if we're able to get down the same size by stripping symbols as suggested in #14, that may make this easier.)
"enable_resource_whitelist_generation=false" should be unnecessary. It is a workround. I run into an error in "gn gen" with only "symbol_level=0". This seems a bug. Filed,  crbug.com/891164 .

I think, by changing "symbol_level", there is a need to recompile whole codes.
So I think it must be unwelcome. I will investigate how to execute strip command to the unittests.

By now, I get the following error in trying to execute "strip" to video_decode_accelerator_unittest built by using go/simplechrome.

(sdk eve R71-11110.0.0) hiroh@hiroh ~/chrome/src $ strip out_eve/Release/video_decode_accelerator_unittest 
strip: out_eve/Release/video_decode_accelerator_unittest: unknown type [0x13] section `.relr.dyn'
strip: Unable to recognise the format of the input file `out_eve/Release/video_decode_accelerator_unittest'



I think we can use "eu-strip" in the toolchain.
(sdk eve R71-11110.0.0) hiroh@hiroh ~/chrome/src $ ls -alh out_eve/Release/video_decode_accelerator_unittest 
-rwxr-xr-x 1 hiroh primarygroup 150M Oct  2 14:55 out_eve/Release/video_decode_accelerator_unittest as follows;
(sdk eve R71-11110.0.0) hiroh@hiroh ~/chrome/src $ ./build/cros_cache/chrome-sdk/tarballs/eve+11110.0.0+target_toolchain/bin/eu-strip out_eve/Release/video_decode_accelerator_unittest 
(sdk eve R71-11110.0.0) hiroh@hiroh ~/chrome/src $ ls -alh out_eve/Release/video_decode_accelerator_unittest 
-rwxr-xr-x 1 hiroh primarygroup 8.4M Oct  2 14:55 out_eve/Release/video_decode_accelerator_unittest

Then, I noticed there is the string "eu-strip" in chromeos-chrome.ebuild, and finally found this part.
https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild#1109

I finally found the binary tests provided by autotest (which may be the output of chromeos-chrome.ebuild) are already stripped and then these sizes are quite small!!

localhost ~ # find / -name video_decode_accelerator_unittest | xargs ls -lh
-rwxr-xr-x. 1 root root 8.9M Sep 19 10:55 /mnt/stateful_partition/dev_image/autotest/deps/chrome_test/test_src/out/Release/video_decode_accelerator_unittest
-rwxr-xr-x. 1 root root 8.9M Sep 19 10:55 /usr/local/autotest/deps/chrome_test/test_src/out/Release/video_decode_accelerator_unittest

So I think we just have to think about how to put them in dev image by default.

Cc: achuith@chromium.org keiichiw@chromium.org
 Issue 892564  has been merged into this issue.
Cc: shik@chromium.org
Cc: bpastene@chromium.org
Blocking: 893501
Project Member

Comment 23 by bugdroid1@chromium.org, Oct 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/58b1e618c2baa9c9c4dcff6e3faab6ad6e234a76

commit 58b1e618c2baa9c9c4dcff6e3faab6ad6e234a76
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Fri Oct 12 11:47:14 2018

chrome-binary-tests: Put chrome binary tests in test image

Autotest currently provides chrome binary tests built by chromeos-chrome and
installs them in its provision (i.e. "test_that").
The same test needs to be done by Tast.
However, tast doesn't have an efficient way to install data updated so often,
like these binaries that are synced with Chrome version.

Therefore, chrome binary tests built by chromeos-chrome needs to be installed in
test image by default, by a portage package.
The size of the binaries are around 30MB. It is reasonable to preinstall in test
image.

BUG=chromium:889496
TEST=./build_packages && ./build_image, confirm tests are in test image.

Change-Id: Iddb2fe99123e123dd2c8de168f8ccdfaf1938a0e
Reviewed-on: https://chromium-review.googlesource.com/1256775
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[add] https://crrev.com/58b1e618c2baa9c9c4dcff6e3faab6ad6e234a76/chromeos-base/chrome-binary-tests/chrome-binary-tests-0.0.1.ebuild
[modify] https://crrev.com/58b1e618c2baa9c9c4dcff6e3faab6ad6e234a76/virtual/target-chromium-os-test/target-chromium-os-test-1.ebuild
[rename] https://crrev.com/58b1e618c2baa9c9c4dcff6e3faab6ad6e234a76/virtual/target-chromium-os-test/target-chromium-os-test-1-r73.ebuild
[add] https://crrev.com/58b1e618c2baa9c9c4dcff6e3faab6ad6e234a76/chromeos-base/chrome-binary-tests/chrome-binary-tests-0.0.1-r1.ebuild

Blocking: -893501
Blocking: 893501
Summary: Migrate video_VideoDecodeAccelerator and video_VideoEncodeAccelerator to Tast (was: Migrate video_VideoDecodeAccelerator to Tast)
Project Member

Comment 27 by bugdroid1@chromium.org, Oct 22

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/2eadb5c3ad12c107e732b14e3e0386bece21bebd

commit 2eadb5c3ad12c107e732b14e3e0386bece21bebd
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Mon Oct 22 09:04:23 2018

tast-local-tests-cros: Add YUV raw data for VideoencAccelH264 tests

Add bear_320x192_40frames.yuv and bear_320x192_40frames.nv12.yuv into gs://chromiumos-test-assets-public/tast/cros/video/

BUG=chromium:889496
TEST=VideoencAccelH264I420 and VideoencAccelH264NV12

Change-Id: I7462625548e9fd1ec3b7ec6fd8bec60bab7b44ed
Reviewed-on: https://chromium-review.googlesource.com/1290591
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>

[modify] https://crrev.com/2eadb5c3ad12c107e732b14e3e0386bece21bebd/chromeos-base/tast-local-tests-cros/tast-local-tests-cros-9999.ebuild
[modify] https://crrev.com/2eadb5c3ad12c107e732b14e3e0386bece21bebd/chromeos-base/tast-local-tests-cros/Manifest
[modify] https://crrev.com/2eadb5c3ad12c107e732b14e3e0386bece21bebd/chromeos-base/tast-local-tests-cros/files/external_data.conf

I am submitting a test code, crrev.com/c/1288291.
I should settle as NV12 test doesn't run on some devices, because we know it would fail due to their driver issues.
There is no way currently to get CrOS board name in Tast.
Therefore, I should let the test not run by autocaps. Because autotest-capability doesn't have capabilities about pixel format, I needs to define them first.
Project Member

Comment 29 by bugdroid1@chromium.org, Oct 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/953a87b527ebbe844573f6c23f28a1fe88ee886a

commit 953a87b527ebbe844573f6c23f28a1fe88ee886a
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Fri Oct 26 19:14:57 2018

video: add EncodeAccelH264I420 and EncodeAccelH264NV12 in Tast

video.EncodeAccelH264I420/NV12 are video_VideoEncodeAccelerator.h264.bvt in autotest.
It runs video_encode_accelerator_unittest preinstalled on test image, with
small raw data, bear_320x192_40frames.yuv and bear_320x192_40frames.nv12.yuv.

BUG=chromium:889496
TEST=video.EncodeAccelH264I420 and video.EncodeAccelH264NV12

Change-Id: If6941ba3b818f9087e765026d8c65f2dab25d456
Reviewed-on: https://chromium-review.googlesource.com/1288291
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[add] https://crrev.com/953a87b527ebbe844573f6c23f28a1fe88ee886a/src/chromiumos/tast/local/bundles/cros/video/encode/testcases.go
[add] https://crrev.com/953a87b527ebbe844573f6c23f28a1fe88ee886a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_i420.go
[add] https://crrev.com/953a87b527ebbe844573f6c23f28a1fe88ee886a/src/chromiumos/tast/local/bundles/cros/video/lib/caps/caps.go
[modify] https://crrev.com/953a87b527ebbe844573f6c23f28a1fe88ee886a/src/chromiumos/tast/local/bundles/cros/video/lib/videotype/videotype.go
[add] https://crrev.com/953a87b527ebbe844573f6c23f28a1fe88ee886a/src/chromiumos/tast/local/bundles/cros/video/lib/chrometest/chrometest.go
[add] https://crrev.com/953a87b527ebbe844573f6c23f28a1fe88ee886a/src/chromiumos/tast/local/bundles/cros/video/encode/accel_video.go
[add] https://crrev.com/953a87b527ebbe844573f6c23f28a1fe88ee886a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_nv12.go

Project Member

Comment 30 by bugdroid1@chromium.org, Oct 29

Project Member

Comment 31 by bugdroid1@chromium.org, Oct 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/bb1cdec4f32685b96ab7172d01907b869e36b599

commit bb1cdec4f32685b96ab7172d01907b869e36b599
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Mon Oct 29 14:30:14 2018

video: chrometest.WritableFile creates a temporary file, not temporary directory

BUG=chromium:889496
TEST=video.EncodeAccelH264I420

Change-Id: I3f930499fffa9d2da25d8228c52e5f8b935a818b
Reviewed-on: https://chromium-review.googlesource.com/1303777
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/bb1cdec4f32685b96ab7172d01907b869e36b599/src/chromiumos/tast/local/bundles/cros/video/lib/chrometest/chrometest.go
[modify] https://crrev.com/bb1cdec4f32685b96ab7172d01907b869e36b599/src/chromiumos/tast/local/bundles/cros/video/encode/accel_video.go

Blockedon: 901221
Project Member

Comment 34 by bugdroid1@chromium.org, Nov 2

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/40fbd4c94afa47548529c94b8811fb8bd49e01b5

commit 40fbd4c94afa47548529c94b8811fb8bd49e01b5
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Fri Nov 02 21:50:46 2018

video.EncodeAccelVP8*: Add vp8 test cases

video.EncodeAccelVP8I420 and video.EncodeAccelVP8NV12 is the same as
video_VideoEncodeAccelerator.vp8.bvt in autotest.
They encode small raw video data to vp8 stream.

BUG=chromium:889496
TEST=tast run video.EncodeAccelVP8* on kevin

Change-Id: Ic51d6bf938c89967d750fc9e62aeb1e04991c26d
Reviewed-on: https://chromium-review.googlesource.com/1312749
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[add] https://crrev.com/40fbd4c94afa47548529c94b8811fb8bd49e01b5/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_i420.go
[add] https://crrev.com/40fbd4c94afa47548529c94b8811fb8bd49e01b5/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_nv12.go

Project Member

Comment 35 by bugdroid1@chromium.org, Nov 6

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1792b7670816154996ce0e91850cfc9b0c2912f4

commit 1792b7670816154996ce0e91850cfc9b0c2912f4
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Tue Nov 06 06:09:26 2018

tast-local-tests-cros: Add compressed video (.webm) for video.EncodeAccel*

video.EncodeAccel* use video raw data (yuv) for test inputs. Since their size
are large, they cannot put on test image as they are.
Therefore, video data compressed by vp9 are put and video.EncodeAccel* will
decode them by libvpx and use the decode video raw data in the test.

These are generated by commands like followings. libvpx version is 1.7.0.
$ vpxenc crowd1080-96f60dd6ff87ba8b129301a0f36efc58.yuv -o crowd-1920x1080.webm --codec=vp9 --best -w 1920 -h 1080

Below are their size.
452.79 KiB crowd-1920x1080_20181103.webm
521.74 KiB tulip2-1280x720_20181103.webm
493.59 KiB tulip2-320x180_20181103.webm
485.67 KiB tulip2-640x360_20181103.webm

BUG=chromium:889496
TEST=video.EncodeAccelH264* on kevin

Change-Id: I6c5d1130525e09493ac665832a744d37487d699e
Reviewed-on: https://chromium-review.googlesource.com/1316967
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/1792b7670816154996ce0e91850cfc9b0c2912f4/chromeos-base/tast-local-tests-cros/tast-local-tests-cros-9999.ebuild
[modify] https://crrev.com/1792b7670816154996ce0e91850cfc9b0c2912f4/chromeos-base/tast-local-tests-cros/Manifest
[modify] https://crrev.com/1792b7670816154996ce0e91850cfc9b0c2912f4/chromeos-base/tast-local-tests-cros/files/external_data.conf

Project Member

Comment 36 by bugdroid1@chromium.org, Nov 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48

commit b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Mon Nov 19 03:49:44 2018

video.EncodeAccelH264*: Add large test cases

This CL adds large test cases for video encoding. They are 1080p, 720p, 360p and
180p video raw data.
Since their size are too large, we are not put them on DUT by default. They are
compressed and the compressed videos are put in DUT. So the test decodes them at
first, uses the raw data in the test and remove them in the end.

BUG=chromium:889496
TEST=video.EncodeAccelH264*

Change-Id: Iad57ebc9b2d74be8cee9cf598542c38d36186170
Reviewed-on: https://chromium-review.googlesource.com/1305333
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>

[add] https://crrev.com/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_180p_i420.go
[modify] https://crrev.com/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48/src/chromiumos/tast/local/bundles/cros/video/encode/accel_video.go
[add] https://crrev.com/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_720p_i420.go
[modify] https://crrev.com/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48/src/chromiumos/tast/local/bundles/cros/video/encode/test_cases.go
[add] https://crrev.com/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_360p_i420.go
[add] https://crrev.com/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_1080p_i420.go
[add] https://crrev.com/b1b3d03bd11c1e2805d100e6c46f82fea4a4fa48/src/chromiumos/tast/local/bundles/cros/video/encode/yuv.go

Summary: Migrate video_VideoEncodeAccelerator to Tast (was: Migrate video_VideoDecodeAccelerator and video_VideoEncodeAccelerator to Tast)
Project Member

Comment 38 by bugdroid1@chromium.org, Nov 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/171537b04ffe9b18863045aaac936969c5117ed3

commit 171537b04ffe9b18863045aaac936969c5117ed3
Author: Daniel Erat <derat@chromium.org>
Date: Wed Nov 21 02:27:13 2018

tast-tests: Move chrometest package to chrome/bintest.

Move the chrometest package that's used by video tests to
execute Chrome test binaries to tast/local/chrome/bintest so
it can be shared with security tests.

Also replace its CreateWritableTempDir function with a
CreateTempDataDir function in a new binsetup package, and
remove CreateWritableTempFile since it's no longer
necessary.

BUG=chromium:889496,chromium:877733
TEST=video.DecodeAccelJPEG and Video.EncodeAccel* still pass
CQ-DEPEND=I02f69b1365d05a63934f4c38e26ec9089a86f3ae

Change-Id: I59dc67a4e1b21d6fb656700d76102ce35cf7b0f6
Reviewed-on: https://chromium-review.googlesource.com/1341451
Commit-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
Reviewed-by: David Staessens <dstaessens@chromium.org>

[modify] https://crrev.com/171537b04ffe9b18863045aaac936969c5117ed3/src/chromiumos/tast/local/bundles/cros/video/decode_accel_jpeg.go
[modify] https://crrev.com/171537b04ffe9b18863045aaac936969c5117ed3/src/chromiumos/tast/local/bundles/cros/video/encode/accel_video.go
[add] https://crrev.com/171537b04ffe9b18863045aaac936969c5117ed3/src/chromiumos/tast/local/bundles/cros/video/lib/binsetup/binsetup.go
[delete] https://crrev.com/1522c91b2bd926f8cd4fc80282b3b69d3ff6b123/src/chromiumos/tast/local/bundles/cros/video/lib/chrometest/chrometest.go
[add] https://crrev.com/171537b04ffe9b18863045aaac936969c5117ed3/src/chromiumos/tast/local/chrome/bintest/bintest.go
[modify] https://crrev.com/171537b04ffe9b18863045aaac936969c5117ed3/src/chromiumos/tast/local/bundles/cros/video/encode_accel_jpeg.go

Project Member

Comment 39 by bugdroid1@chromium.org, Nov 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/66a6a090c943b04ecfa6831d269d73bb3e56237a

commit 66a6a090c943b04ecfa6831d269d73bb3e56237a
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Fri Nov 23 03:07:38 2018

video.EncodeAccel*: Generate NV12 raw video data from .webm

Formerly, NV12 raw video data is put on test image. To save the disk usage in
test image more, NV12 raw video data are generated from .webm as well as I420.
Since vpxdec deosn't support NV12, we perform the conversion from I420 to NV12.
The conversion is done by go code, because using imagemagick for it seems
complicated, comparing to golang implementation by myself.

BUG=chromium:889496
TEST=video.EncodeAccel*
CQ-DEPEND=CL:1341711

Change-Id: Id9bd1af9d4c0201ff2af32d23b7b046d18e1bf09
Reviewed-on: https://chromium-review.googlesource.com/1341784
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>

[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_nv12.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_i420.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_180p_i420.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/lib/videotype/video_type.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode/accel_video.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_720p_i420.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode/test_cases.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_i420.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_360p_i420.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_1080p_i420.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode/yuv.go
[modify] https://crrev.com/66a6a090c943b04ecfa6831d269d73bb3e56237a/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_nv12.go

Project Member

Comment 40 by bugdroid1@chromium.org, Nov 23

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/0b2524707e182b3b525659db316f12d09b96ba14

commit 0b2524707e182b3b525659db316f12d09b96ba14
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Fri Nov 23 03:07:39 2018

tast-local-tests-cros: Replace bear yuv data by bear.vp9.webm

Add:
34.57 KiB bear-320x192.vp9.webm

Remove:
3.52 MiB bear_320x192_40frames_20181020.nv12.yuv
3.52 MiB bear_320x192_40frames_20181020.yuv

BUG=chromium:889496
TEST=video.EncodeAccel*
CQ-DEPEND=CL:1341784

Change-Id: I4050d76dd7b6df25a326ef9d2e00cbc7bfcb442b
Reviewed-on: https://chromium-review.googlesource.com/1341711
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>

[modify] https://crrev.com/0b2524707e182b3b525659db316f12d09b96ba14/chromeos-base/tast-local-tests-cros/tast-local-tests-cros-9999.ebuild
[modify] https://crrev.com/0b2524707e182b3b525659db316f12d09b96ba14/chromeos-base/tast-local-tests-cros/Manifest
[modify] https://crrev.com/0b2524707e182b3b525659db316f12d09b96ba14/chromeos-base/tast-local-tests-cros/files/external_data.conf

Description: Show this description
Project Member

Comment 44 by bugdroid1@chromium.org, Dec 5

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/5d309770349f7258e4d0fc5e9a97bcf1988a761c

commit 5d309770349f7258e4d0fc5e9a97bcf1988a761c
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Wed Dec 05 09:13:35 2018

video.EncodeAccel*Dmabuf: Add DMABUF-NV12 test case

In DMABUF-NV12 test cases, VEA unittest just runs with --native_input

BUG=chromium:889496,  chromium:895230 
TEST=video.EncodeAccel*Dmabuf on kevin

Change-Id: I6da192d3a1baccf82654b0bb8831b9a497333691
Reviewed-on: https://chromium-review.googlesource.com/1351969
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>

[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_nv12.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_180p_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_180p_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_720p_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_720p_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_360p_i420.go
[add] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_nv12_dmabuf.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_1080p_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_1080p_i420.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode/accel_video.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_nv12.go
[add] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_h264_nv12_dmabuf.go
[modify] https://crrev.com/5d309770349f7258e4d0fc5e9a97bcf1988a761c/src/chromiumos/tast/local/bundles/cros/video/encode_accel_vp8_360p_i420.go

Project Member

Comment 45 by bugdroid1@chromium.org, Jan 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/b43e03fc0613ae4be6444cddb88aae72bde16a10

commit b43e03fc0613ae4be6444cddb88aae72bde16a10
Author: Hirokazu Honda <hiroh@chromium.org>
Date: Tue Jan 08 19:43:57 2019

video: Replace WebM to generate yuv data for encode test with loss-less ones

Since raw video data (yuv) are large, we parepare compressed ones (vp9.webm)
and decompress them and generate yuv files in the beginning of the test. Since I
manufactured lossy compressed ones, the decompressed ones are different from
original ones. To ensure the test results are the same as the results using the
original ones, we should use loss-less ones.
Note that the size of files increses as follows:
bear-320x192.vp9.webm     34.57 KiB ->   1.14 MB,
crowd-1920x1080.vp9.webm 452.79 KiB -> 170.55 MiB
tulip2-1280x720.vp9.webm 521.74 KiB -> 144.6 MiB
tulip2-320x180.vp9.webm  493.59 KiB ->  13.06 MiB
tulip2-640x360.vp9.webm  485.67 KiB ->  44.86 MiB

TEST=tast run video.EncodeAccel* on eve
BUG=chromium:889496

Change-Id: I7563385974f5d84f9793ad8dc3fea68c1d17ed67
Reviewed-on: https://chromium-review.googlesource.com/1400082
Commit-Ready: Hirokazu Honda <hiroh@chromium.org>
Tested-by: Hirokazu Honda <hiroh@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>

[modify] https://crrev.com/b43e03fc0613ae4be6444cddb88aae72bde16a10/src/chromiumos/tast/local/bundles/cros/video/data/tulip2-640x360.vp9.webm.external
[modify] https://crrev.com/b43e03fc0613ae4be6444cddb88aae72bde16a10/src/chromiumos/tast/local/bundles/cros/video/data/bear-320x192.vp9.webm.external
[modify] https://crrev.com/b43e03fc0613ae4be6444cddb88aae72bde16a10/src/chromiumos/tast/local/bundles/cros/video/data/crowd-1920x1080.vp9.webm.external
[modify] https://crrev.com/b43e03fc0613ae4be6444cddb88aae72bde16a10/src/chromiumos/tast/local/bundles/cros/video/data/tulip2-320x180.vp9.webm.external
[modify] https://crrev.com/b43e03fc0613ae4be6444cddb88aae72bde16a10/src/chromiumos/tast/local/bundles/cros/video/encode/yuv.go
[modify] https://crrev.com/b43e03fc0613ae4be6444cddb88aae72bde16a10/src/chromiumos/tast/local/bundles/cros/video/data/tulip2-1280x720.vp9.webm.external

Sign in to add a comment