commit | 17d7eae08d3b2d355da97248ace906dd81bcd6fe | [log] [tgz] |
---|---|---|
author | Justin Green <greenjustin@google.com> | Wed Jan 29 19:00:13 2025 -0500 |
committer | Hang Nguyen <hnt@google.com> | Wed Feb 19 21:50:04 2025 +0000 |
tree | 47f3efd343c58c609cd5ec6f75d1e81bff960457 | |
parent | abc7af56befe5d90899abdb8fa1309b11a11856f [diff] |
Add VideoFrame support to VA-API decoder Other changes: * Remove pooling logic since it is no longer needed. Normally I would make this a separate change, but it no longer compiles after removing the backend implementations of frame_pool(), highest_pool(), etc. * Add modifier support to GbmVideoFrame. This is necessary because I915 assumes imported DMA frames are tiled, which means we won't be able to read the video decoder output if we map it as linear. By adding proper modifier support, the GEM driver takes care of detiling for us during mapping. Bug: 390439314 Test: video.PlatformDecoding.cros_codecs* on Brya and Corsola Change-Id: I29f451980c8d78df46d7ca69a765a2d408f47152
A lightweight, simple, low-dependency, and hopefully safe crate for hardware-accelerated video decoding and encoding on Linux.
It is developed for use in ChromeOS (particularly crosvm), but has no dependency to ChromeOS and should be usable anywhere.
The ccdec
example program can decode an encoded stream and write the decoded frames to a file. As such it can be used for testing purposes.
$ cargo build --examples $ ./target/debug/examples/ccdec --help Usage: ccdec <input> [--output <output>] --input-format <input-format> [--output-format <output-format>] [--compute-md5 <compute-md5>] Simple player using cros-codecs Positional Arguments: input input file Options: --output output file to write the decoded frames to --input-format input format to decode from. --output-format pixel format to decode into. Default: i420 --compute-md5 whether to display the MD5 of the decoded stream, and at which granularity (stream or frame) --help display usage information
Fluster can be used for testing, using the ccdec
example program described above. This branch contains support for cros-codecs testing. Just make sure the ccdec
binary is in your PATH
, and run Fluster using one of the ccdec
decoders, e.g.
python fluster.py run -d ccdec-H.264 -ts JVT-AVC_V1
The majority of the code in the initial commit has been written by Daniel Almeida as a VAAPI backend for crosvm, before being split into this crate.