commit | 080717f23d2f3ff0dc34ac79ce02fe9ca12525f1 | [log] [tgz] |
---|---|---|
author | Alexandre Courbot <acourbot@chromium.org> | Tue Mar 05 15:05:39 2024 +0900 |
committer | Hirokazu Honda (a.k.a hiroh) <rosetta.jpn@gmail.com> | Thu Oct 17 15:55:33 2024 +0900 |
tree | 8693833b2d6bb0e46638fc6b9aa0d144da31451c | |
parent | ade2ce37ac53376377787c08b0a028fb1f31400b [diff] |
codec/h264: separate DPB entry reference and frame The DPB serves two purposes: as a way to reorder frames in display order, and as a way to mark frames that are still used as reference. Currently both purposes are served by the same `handle` member, but separating it into dedicated members brings benefits: the type of the decoded frame could be different from the one used for reference, and the decoded frame could be take()n away from an Option when the frame is bumped, making sure it cannot be emitted a second time. IOW, this should allow the removal of the Rcs to reference frames in the DPB, once a proper reference frame type is introduced.
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>] [--synchronous] [--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 --synchronous whether to decode frames synchronously --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. 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.