| commit | 8d56b885ce11b4ee1df683adb9f19c7af4182c0c | [log] [tgz] |
|---|---|---|
| author | Andres Calderon Jaramillo <andrescj@google.com> | Fri May 30 02:18:46 2025 +0000 |
| committer | Andres Calderon Jaramillo <andrescj@google.com> | Mon Jun 23 19:14:20 2025 +0000 |
| tree | f8b3e8ffb4600babe0f50157c34129acb592e674 | |
| parent | bc9e8c3a3718a7d9f6aa165fa643ff8af1fa25e1 [diff] |
c2_encoder: Reply to non-drain()/flush() empty jobs unconditionally Before this CL, the C2EncoderWorker replied to empty jobs through the work_done_cb as long as those empty jobs corresponded to explicit drain requests (end-of-stream C2Works). However, it was observed that in VtsHalMediaC2V1_0TargetVideoEncTest, it's also possible to get empty jobs that correspond to requests for CSD (codec-specific data), and the test expects a reply. This CL makes the C2EncoderWorker reply to non-drain()/flush() empty jobs unconditionally to handle both of the aforementioned cases. Bug: 389993558 Test: VtsHalMediaC2V1_0TargetVideoEncTest on brya Change-Id: I1e1d256ef2d304f450d2aa7d5af7de8578933037
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.