Expand description
This crate provides tools to help decode and encode various video codecs, leveraging the hardware acceleration available on the target.
The codec module contains tools to parse encoded video streams like H.264 or VP9 and extract the information useful in order to perform e.g. hardware-accelerated decoding.
The [backend] module contains common backend code. A backend is a provider of some way to decode or encode a particular codec, like VAAPI.
The [decoder] module contains decoders that can turn an encoded video stream into a sequence of decoded frames using the hardware acceleration available on the host.
The [encoder] module contains encoder that can turn a picture sequence into a compressed sequence of decodable encoded packets using the hardware acceleration available on the host.
The [utils] module contains some useful code that is shared between different parts of this crate and didn’t fit any of the modules above.
Modules§
- bitstream_
utils - codec
- Parsers for various kinds of encoded streams.
Macros§
- multiple_
desc_ type - Build a frame memory descriptor enum that supports multiple descriptor types.
Structs§
- Fourcc
- Wrapper around u32 when they are meant to be a fourcc.
- Frame
Layout - Unambiguously describes the layout of a frame.
- Plane
Layout - Describes the layout of a plane within a frame.
- Rect
- Resolution
- A frame resolution in pixels.
Enums§
- Blocking
Mode - Instructs on whether it should block on the operation(s).
- Decoded
Format - Formats that buffers can be mapped into for the CPU to read.
- Encoded
Format - Frame
Memory Type - Resolution
Round Mode - Rounding modes for
Resolution
Functions§
- decoded_
frame_ size - Returns the size required to store a frame of
format
with sizewidth
xheight
, without any padding. This is the minimum size of the destination buffer passed tonv12_copy
ori420_copy
.