| commit | 8085626c01080333058f10a7487d3bdc0bd83c81 | [log] [tgz] |
|---|---|---|
| author | Justin Green <greenjustin@google.com> | Tue Aug 05 17:35:33 2025 -0400 |
| committer | Justin Green <greenjustin@google.com> | Tue Aug 05 17:51:11 2025 -0400 |
| tree | b8edae6780dcaf6ae36c8368d31967d3d6bae20c | |
| parent | daf863a3fab4de5c6bd02e51edf07c0a3eb73d07 [diff] |
Use multiple scratch frames during decode The timing changes caused by ag/34940103 and ag/34943195 uncovered a deadlock situation triggered by AV1's show existing frame feature in certain bitstreams. With only one scratch frame, we can run into a situation where we convert an output frame and release that output frame, but only free up one frame in the process, since the src frame for that conversion is being shown again. In this circumstance, the decoder will deadlock because it is unable to allocate the two frames required to continue decoding. Bug: 415773462 Test: Video VTS tests CtsMediaDecoderTestCases CtsMediaV2TestCases CtsVideoTestCases Change-Id: I10e6198178c9b5e0c880e28ddd486e7dca45702c
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.