No description
Find a file
Alexandre Courbot fc891cea82 virtio: video: decoder: add ffmpeg-based software decoder backend
The virtio video decoder device is currently only available under very
drastic conditions: a build linked against libvda (a ChromeOS-only
library that needs the cros chroot to be built and linked against), and
a ChromeOS-flavored Chrome instance running alongside crosvm, so the
browser can provide the video decoding service through Mojo.

This makes the decoder device very difficult to develop on for
non-Chromies, and also for Chromies actually since they will always need
a DUT to test it on.

This patch introduces an alternative decoder backend based on
ffmpeg's libraries that performs decoding on the host's CPU. It supports both
guest pages and virtio objects as target, and can be considered a
reliable and predictable way to test the decoder in any environment.

We introduce our own ffmpeg bindings after a quick state of the art
revealed that the existing ones were all unsuitable, either for
technical or licensing reasons. Doing so is also not a big effort and
does not add any new external crate dependency to crosvm.

BUG=b:169295147
TEST=cargo test --features "video-decoder,ffmpeg" -p devices ffmpeg
TEST=v4l2r's simple_decoder example decodes test-25fps.h264 properly with the
     following command:
     ./simple_decoder test-25fps.h264 /dev/video0 --input_format h264 --save test-25fps.nv12
TEST=ARCVM Android youtube plays videos correctly when the ffmpeg
     backend is used.

Change-Id: Ic9c586193f7939f2a3fe59d009c3666585a8bbc7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3026355
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
2022-06-07 11:44:21 +00:00
.cargo Run some win64 tests with wine as part of presubmit 2022-04-06 19:45:49 +00:00
.devcontainer Make vscode devcontainer usable 2022-01-25 21:30:49 +00:00
.github Reland "github: Minimize dependencies for document generation" 2022-04-12 22:30:10 +00:00
aarch64 Fix some clippy warnings on aarch64. 2022-06-06 16:58:32 +00:00
acpi_tables doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
arch crosvm: Simplify Msr set up loop and MsrFilter. 2022-06-03 00:00:04 +00:00
argh_helpers crosvm: arghify top-level cmdline options 2022-06-02 21:34:01 +00:00
base base: unix: rename PollContext to EventContext 2022-06-06 17:07:35 +00:00
bin Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
bit_field crosvm: migrate to Rust 2021 edition 2022-03-09 01:16:03 +00:00
broker_ipc broker_ipc: add crate 2022-06-03 22:00:11 +00:00
ci/kokoro Kokoro: Fix dry-run merge target 2022-06-06 19:42:57 +00:00
common data_model: use fully qualified name in flexible_array_impl! macro 2022-06-06 18:17:03 +00:00
cros_async base: unix: rename PollContext to EventContext 2022-06-06 17:07:35 +00:00
crosvm-fuzz devices: virtio: convert Interrupt to use IrqLevelEvent 2022-04-06 18:54:41 +00:00
crosvm_control crosvm_control: Add make_rt API 2022-05-10 01:29:17 +00:00
crosvm_plugin Rust 1.60 clippy fixes 2022-04-11 20:40:36 +00:00
devices virtio: video: decoder: add ffmpeg-based software decoder backend 2022-06-07 11:44:21 +00:00
disk disk: upstream windows support 2022-05-19 18:25:30 +00:00
docs/book docs: Add a page for vhost-user usage 2022-06-03 03:11:23 +00:00
fuse doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
gpu_display base: replace PollToken with EventToken tree-wide 2022-06-02 22:30:38 +00:00
hypervisor Fix some clippy warnings on aarch64. 2022-06-06 16:58:32 +00:00
infra infra: Add merge_into_chromeos builder 2022-06-03 19:18:06 +00:00
integration_tests Make crosvm.rs a mod instead of a separate lib crate 2022-06-02 18:56:24 +00:00
io_uring base: remove WatchingEvents in favor of EventType 2022-06-06 17:07:33 +00:00
kernel_cmdline crosvm: migrate to Rust 2021 edition 2022-03-09 01:16:03 +00:00
kernel_loader doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
kvm base: clarify SharedMemory API 2022-06-01 03:55:47 +00:00
kvm_sys data_model: use fully qualified name in flexible_array_impl! macro 2022-06-06 18:17:03 +00:00
libcras_stub crosvm: migrate to Rust 2021 edition 2022-03-09 01:16:03 +00:00
linux_input_sys doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
logo README: Use PNG logo image 2021-10-29 01:56:23 +00:00
media virtio: video: decoder: add ffmpeg-based software decoder backend 2022-06-07 11:44:21 +00:00
metrics base: replace PollToken with EventToken tree-wide 2022-06-02 22:30:38 +00:00
net_sys doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
net_util base: replace PollToken with EventToken tree-wide 2022-06-02 22:30:38 +00:00
power_monitor doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
protos doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
qcow_utils doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
resources x86_64: Add parameter to speicify pcie cfg mmio base and size 2022-05-13 00:19:52 +00:00
rutabaga_gfx base: replace PollToken with EventToken tree-wide 2022-06-02 22:30:38 +00:00
seccomp Revert "Add rseq to the seccomp policy file on aarch64." 2022-06-07 04:30:15 +00:00
serde_keyvalue serde_keyvalue: parse hex, octal, and binary nums 2022-06-02 22:03:20 +00:00
src virtio: video: decoder: add ffmpeg-based software decoder backend 2022-06-07 11:44:21 +00:00
system_api_stub crosvm: migrate to Rust 2021 edition 2022-03-09 01:16:03 +00:00
tests net_util: refactor unix for cross platforming. 2022-04-22 01:37:58 +00:00
third_party third_party: libslirp-rs: remove unused files. 2022-06-02 03:00:37 +00:00
tools virtio: video: decoder: add ffmpeg-based software decoder backend 2022-06-07 11:44:21 +00:00
tpm2 doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
tpm2-sys doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
tube_transporter tube_transporter: Upstream this Window's specific crate 2022-04-20 01:24:35 +00:00
usb_sys doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
usb_util doc: add a top-level comment to all crates 2022-05-06 20:46:57 +00:00
vfio_sys Revert "direct_irq: Add support for host wakeup capable IRQs" 2022-05-19 14:28:46 +00:00
vhost virtio-sys: add virtio_config and clean up imports 2022-05-09 21:20:27 +00:00
virtio_sys virtio: create a DeviceType wrapper enum 2022-05-10 21:00:07 +00:00
vm_control Revert "crosvm: remove balloon stats request timeout" 2022-06-02 11:09:31 +00:00
vm_memory base: clarify SharedMemory API 2022-06-01 03:55:47 +00:00
win_util rustfmt, win_util: update to 2021 edition 2022-05-31 23:35:02 +00:00
x86_64 x86_64: reset msrs when using bios 2022-06-07 02:19:06 +00:00
.dockerignore add docker supported builds and tests 2019-05-15 13:36:19 -07:00
.gitignore infra: Initial setup of linux pre/post-submit builders 2022-05-24 23:13:13 +00:00
.gitmodules Switch to submodules based workflow 2021-08-05 18:32:32 +00:00
.rustfmt.toml rustfmt, win_util: update to 2021 edition 2022-05-31 23:35:02 +00:00
ARCHITECTURE.md base: replace PollToken with EventToken tree-wide 2022-06-02 22:30:38 +00:00
Cargo.toml virtio: video: decoder: add ffmpeg-based software decoder backend 2022-06-07 11:44:21 +00:00
CONTRIBUTING.md Add documentation for ChromeOS workflows 2022-04-18 19:05:49 +00:00
LICENSE add LICENSE and README 2017-04-17 14:06:21 -07:00
navbar.md docs: Use mdformat to format markdown files 2022-01-27 21:29:11 +00:00
OWNERS Adding Vikram to crosvm OWNERS 2022-06-06 17:20:10 +00:00
PRESUBMIT.cfg Add check_cq_depend to PRESUBMIT 2022-05-18 18:54:34 +00:00
README.chromeos.md Add documentation for ChromeOS workflows 2022-04-18 19:05:49 +00:00
README.md README: Update link to contributor guide 2022-05-11 13:21:04 +00:00
run_tests Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
rust-toolchain Upgrade rust toolchain version to 1.58.1 2022-02-04 02:20:36 +00:00
setup_cros_cargo.sh Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
test_all Deprecate old dev tooling scripts 2021-11-02 22:23:03 +00:00
unblocked_terms.txt unblocked_terms.txt: clean up trivial cases 2021-04-26 20:32:38 +00:00

crosvm - The Chrome OS Virtual Machine Monitor

crosvm is a virtual machine monitor (VMM) based on Linuxs KVM hypervisor, with a focus on simplicity, security, and speed. crosvm is intended to run Linux guests, originally as a security boundary for running native applications on the Chrome OS platform. Compared to QEMU, crosvm doesnt emulate architectures or real hardware, instead concentrating on paravirtualized devices, such as the virtio standard.

crosvm is currently used to run Linux/Android guests on Chrome OS devices.

Logo