0
Files
android_webview
apps
ash
base
build
build_overrides
buildtools
cc
chrome
chromecast
chromeos
cloud_print
codelabs
components
content
courgette
crypto
dbus
device
docs
accessibility
autofill
design
enterprise
fuchsia
gpu
images
infra
ios
linux
login
mac
media
gpu
video_decoder_perf_test_usage.md
video_decoder_test_usage.md
video_encoder_test_usage.md
DIR_METADATA
audio_focus.md
autoplay.md
autoplay_by_attribute.png
autoplay_by_play_method.png
media_pipeline_overview.png
media_router.md
profile-screenshot.png
memory
memory-infra
patterns
privacy
privacy_budget
process
security
speed
speed_metrics
sync
testing
ui
updater
workflow
DIR_METADATA
OWNERS
README.md
accessibility.md
ad_tagging.md
adding_to_third_party.md
android_accessing_cpp_enums_in_java.md
android_accessing_cpp_features_in_java.md
android_accessing_cpp_switches_in_java.md
android_build_instructions.md
android_cast_build_instructions.md
android_debugging_instructions.md
android_dynamic_feature_modules.md
android_emulator.md
android_logging.md
android_native_libraries.md
android_studio.md
angle_in_chromium.md
asan.md
atom.md
bitmap_pipeline.md
branch_sheriff.md
building_old_revisions.md
callback.md
ccache_mac.md
chrome_os_logging.md
chrome_settings.md
chrome_untrusted.md
chromedriver_status.md
chromeos_build_instructions.md
chromeos_glossary.md
chromium_browser_vs_google_chrome.md
chromoting_android_hacking.md
cipd_and_3pp.md
cl_respect.md
clang.md
clang_code_coverage_wrapper.md
clang_format.md
clang_sheriffing.md
clang_static_analyzer.md
clang_tidy.md
clang_tool_refactoring.md
clangd.md
clion.md
closure_compilation.md
cocoa_tips_and_tricks.md
code_review_owners.md
code_reviews.md
commit_checklist.md
component_build.md
configuration.md
contributing.md
cr_respect.md
cr_user_manual.md
cross_platform_ui.md
cygwin_dll_remapping_failure.md
dbus_mojo_connection_service.md
debugging_with_crash_keys.md
deterministic_builds.md
disassemble_code.md
documentation_best_practices.md
documentation_guidelines.md
early-hints.md
eclipse.md
emacs.md
erc_irc.md
flag_expiry.md
flag_ownership.md
gdbinit.md
get_the_code.md
git_cookbook.md
git_tips.md
google_chrome_branded_builds.md
google_play_services.md
graphical_debugging_aid_chromium_views.md
gwp_asan.md
how_cc_works.md
how_to_add_your_feature_flag.md
how_to_extend_web_test_framework.md
idn.md
initialize_blink_features.md
inlined_stack_traces.md
installation_at_vmware.md
ios_build_instructions.md
ios_infra.md
ios_voiceover.md
kiosk_mode.md
lacros.md
lldbinit.md
luci_migration_faq.md
mac_arm64.md
mac_build_instructions.md
mac_lld.md
mojo_and_services.md
mojo_ipc_conversion.md
native_relocations.md
navigation-request-navigation-state.gv
navigation-request-navigation-state.png
navigation.md
navigation_concepts.md
network_traffic_annotations.md
new_port_policy.md
no_sources_assignment_filter.md
old_chromoting_build_instructions.md
optimizing_web_uis.md
optional.md
origin_trials_integration.md
ozone_overview.md
parsing_test_results.md
pgo.md
piranha_plant.md
profiling.md
profiling_content_shell_on_android.md
proxy_auto_config.md
qtcreator.md
release_branch_guidance.md
render-frame-host-lifecycle-state.gv
render-frame-host-lifecycle-state.png
render_document.md
seccomp_sandbox_crash_dumping.md
servicification.md
session_history.md
sheriff.md
shutdown.md
special_case_urls.md
static_initializers.md
sublime_ide.md
system_hardening_features.md
tab_helpers.md
threading_and_tasks.md
threading_and_tasks_faq.md
threading_and_tasks_testing.md
toolchain_support.md
tour_of_luci_ui.md
tpm_quick_ref.md
translation_screenshots.md
trusted_types_on_webui.md
updating_clang.md
updating_clang_format_binaries.md
use_counter_wiki.md
useful_urls.md
user_data_dir.md
user_data_storage.md
user_handle_mapping.md
using_build_runner.md
vanilla_msysgit_workflow.md
vscode.md
vscode_python.md
webui_explainer.md
webui_in_chrome.md
webui_in_components.md
webview_policies.md
win_cross.md
win_order_files.md
windows_build_instructions.md
windows_native_window_occlusion_tracking.md
windows_pwa_integration.md
windows_shortcut_and_taskbar_handling.md
windows_split_dll.md
windows_virtual_desktop_handling.md
wmax_tokens.md
working_remotely_with_android.md
writing_clang_plugins.md
extensions
fuchsia
gin
google_apis
google_update
gpu
headless
infra
ios
ipc
jingle
media
mojo
native_client_sdk
net
pdf
ppapi
printing
remoting
rlz
sandbox
services
skia
sql
storage
styleguide
testing
third_party
tools
ui
url
weblayer
.clang-format
.clang-tidy
.eslintrc.js
.git-blame-ignore-revs
.gitattributes
.gitignore
.gn
.vpython
.vpython3
.yapfignore
AUTHORS
BUILD.gn
CODE_OF_CONDUCT.md
DEPS
DIR_METADATA
ENG_REVIEW_OWNERS
LICENSE
LICENSE.chromium_os
OWNERS
PRESUBMIT.py
PRESUBMIT_test.py
PRESUBMIT_test_mocks.py
README.md
WATCHLISTS
codereview.settings
src/docs/media/gpu/video_decoder_test_usage.md
David Staessens 7bb1385cf7 media/gpu/test: Update video decoder (perf) test usage documentation.
This CL updates the video_decoder_(perf_)tests usage documentation with
the additional "--use_vd_vda" parameter that was added recently.

BUG=None
TEST=checked doc in gitiles

Change-Id: I175ba21fe3563d092409a3202c7257dae90d520a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2215394
Reviewed-by: Chih-Yu Huang <akahuang@chromium.org>
Commit-Queue: David Staessens <dstaessens@chromium.org>
Cr-Commit-Position: refs/heads/master@{#772116}
2020-05-27 05:05:51 +00:00

4.1 KiB

Video Decoder tests

The video decoder tests are a set of tests used to validate various video decoder implementations. Multiple scenarios are tested, and the resulting decoded frames are validated against known checksums. These tests run directly on top of the video decoder implementation, and don't require the full Chrome browser stack. They can be very useful when adding support for a new codec or platform, or to make sure code changes don't break existing functionality. They are build on top of the GoogleTest framework.

[TOC]

Running from Tast

The Tast framework provides an easy way to run the video decoder tests from a ChromeOS chroot. Test data is automatically deployed to the device being tested. To run all video decoder tests use:

tast run $HOST video.DecodeAccelH264* video.DecodeAccelVP*

Wildcards can be used to run specific sets of tests:

  • Run all VP8 tests: tast run $HOST video.DecodeAccelVP8*
  • Run all VP9 profile 2 tests: tast run $HOST video.DecodeAccelVP92*

Check the tast video folder for a list of all available tests. See the Tast quickstart guide for more information about the Tast framework.

Running manually

To run the video decoder tests manually the video_decode_accelerator_tests target needs to be built and deployed to the device being tested. Running the video decoder tests can be done by executing:

./video_decode_accelerator_tests [<video path>] [<video metadata path>]

e.g.: ./video_decode_accelerator_tests test-25fps.h264

Test videos: Test videos are present for multiple codecs in the media/test/data folder in Chromium's source tree (e.g. test-25fps.vp8). If no video is specified test-25fps.h264 will be used.

Video Metadata: These videos also have an accompanying metadata .json file that needs to be deployed alongside the test video. They can also be found in the media/test/data folder (e.g. test-25fps.h264.json). If no metadata file is specified <video path>.json will be used. The video metadata file contains info about the video such as its codec profile, dimensions, number of frames and a list of md5 frame checksums to validate decoded frames. These frame checksums can be generated using ffmpeg, e.g.: ffmpeg -i test-25fps.h264 -f framemd5 test-25fps.h264.frames.md5.

Command line options

Multiple command line arguments can be given to the command:

 -v                  enable verbose mode, e.g. -v=2.
--vmodule            enable verbose mode for the specified module,
                     e.g. --vmodule=*media/gpu*=2.

--disable_validator  disable frame validation.
--use_vd             use the new VD-based video decoders, instead of
                     the default VDA-based video decoders.
--use_vd_vda         use the new VD-based video decoders with a wrapper
                     that translates to the VDA interface, used to test
                     interaction with older components expecting the VDA
                     interface.

--output_frames      write the selected video frames to disk, possible
                     values are "all|corrupt".
--output_format      set the format of frames saved to disk, supported
                     formats are "png" (default) and "yuv".
--output_limit       limit the number of frames saved to disk.
--output_folder      set the folder used to store frames, defaults to
                     "<testname>"

--gtest_help         display the gtest help and exit.
--help               display this help and exit.

Source code

See the video decoder tests source code.