| commit | bb6c72de7daef68bf28554843b1f87182e529fd5 | [log] [tgz] |
|---|---|---|
| author | Hirokazu Honda <hiroh@google.com> | Thu Sep 04 18:22:57 2025 -0700 |
| committer | Hirokazu Honda <hiroh@google.com> | Thu Sep 11 11:58:55 2025 -0700 |
| tree | 5e8becafd825ab64db284a32ce2d8c88d1cfdfc6 | |
| parent | ae2cd789d6efb23166b1ad8323d438203eeda9eb [diff] |
Support H264 encrypted stream processing This adds the code to `StatelessDecoderH264` for encrypted stream processing. - Specify encrypted ranges for NALU parser. - Compute the subsamples for the current NALU. This change doesn't support CENCv1. Bug: 435219833, 441153357 Test: VtsHalMediaC2V1_0TargetVideoDecTest Test: CtsMediaDecoderTestCases, CtsMediaV2TestCases, and CtsVideoCodecTestCases Flag: EXEMPT desktop only Change-Id: Ia87d7a76bf366d41764a604234f4a5a553e55221
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.