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.
Re-exports§
pub use libva;
Modules§
- backend
- Shared code for codec backends.
- codec
- Parsers for various kinds of encoded streams.
- decoder
- Encoded stream decoding.
- encoder
- utils
- Utility functions used by several parts of this crate.
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.
- 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.
- 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
. - i4xx_
copy - Copies
src
intodst
as I4xx (YUV tri-planar). - nv12_
copy - Copies
src
intodst
as NV12, removing any extra padding.