media: cros-codecs: Introduce the cros-codecs crate

Introduce the cros-codecs crate. This crate contains all the
codec-related code and does not depend on CrosVM. The decoders are
decoupled from the backends, which allows for the implementation of new
backends without touching the decoder code.

This crate comes with dummy backends to test the decoder functionality
in isolation, but in order to decode frames, a real backend is needed.
Currently this backend is the VAAPI backend. Using it adds a dependency
on the libva crate.

This change adds support for VP8, H264 and VP9.

BUG=b:214478588
TEST="cd media/cros-codecs && cargo test --release --features vaapi -- --include-ignored"
TEST="emerge-hatch chromeos-base/crosvm" completes successfully.

Change-Id: I596d5db4dabcc96dcfdbce1f41c8092e01b64271
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3875043
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
84 files changed
tree: 619d99ecad4383e71dcf4273a9d1a3f5d1acea16
  1. .cargo/
  2. .devcontainer/
  3. .github/
  4. .vscode/
  5. aarch64/
  6. acpi_tables/
  7. anti_tamper/
  8. arch/
  9. argh_helpers/
  10. base/
  11. bit_field/
  12. broker_ipc/
  13. common/
  14. crash_report/
  15. cros_async/
  16. cros_fdt/
  17. cros_tracing/
  18. crosvm-fuzz/
  19. crosvm_cli/
  20. crosvm_control/
  21. crosvm_plugin/
  22. devices/
  23. disk/
  24. docs/
  25. fuse/
  26. gpu_display/
  27. hypervisor/
  28. infra/
  29. integration_tests/
  30. io_uring/
  31. kernel_cmdline/
  32. kernel_loader/
  33. kvm/
  34. kvm_sys/
  35. libcras_stub/
  36. linux_input_sys/
  37. logo/
  38. media/
  39. metrics/
  40. net_sys/
  41. net_util/
  42. power_monitor/
  43. prebuilts/
  44. protos/
  45. qcow_utils/
  46. resources/
  47. rutabaga_gfx/
  48. sandbox/
  49. seccomp/
  50. serde_keyvalue/
  51. src/
  52. system_api/
  53. tests/
  54. third_party/
  55. tools/
  56. tpm2/
  57. tpm2-sys/
  58. tube_transporter/
  59. usb_sys/
  60. usb_util/
  61. vfio_sys/
  62. vhost/
  63. virtio_sys/
  64. vm_control/
  65. vm_memory/
  66. win_audio/
  67. win_util/
  68. x86_64/
  69. .dockerignore
  70. .gitignore
  71. .gitmodules
  72. .rustfmt.toml
  73. ARCHITECTURE.md
  74. build.rs
  75. Cargo.lock
  76. Cargo.toml
  77. CONTRIBUTING.md
  78. DIR_METADATA
  79. LICENSE
  80. mypy.ini
  81. OWNERS
  82. PRESUBMIT.cfg
  83. pyproject.toml
  84. README.chromeos.md
  85. README.md
  86. rust-toolchain
README.md

crosvm - The Chrome OS Virtual Machine Monitor

crosvm is a virtual machine monitor (VMM) based on Linux’s 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 doesn’t 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