Expand description
Native VP9 decoding, registered as a VideoDecoderFactory: a
dependency-free software decoder, and the platform’s hardware decoder
where the host has one.
This wraps the crate’s VP9 profile 0 and 2 decoder (crate::vp9_dec),
which decodes 8-bit, 10-bit and 12-bit 4:2:0 streams bit for bit as libvpx
does: hidden frames,
superframes, show_existing_frame, intra-only frames, reference frames
of another size, tiles, segmentation, lossless coding and every
interpolation filter.
A sample is one VP9 chunk as the VP9 ISO-BMFF binding defines it: a frame,
or a superframe whose hidden frames precede the one it shows. Each sample
must show a frame. Decoded pictures are converted to Rgba8 with
convert_to_rgba8, using the matrix the frame’s color_space names
(BT.601 when it is unknown or one the conversion does not implement), at
the size the frame was coded at: a stream that changes resolution emits
frames of each size. A 10- or 12-bit picture is rounded to 8 bits before
that conversion.
Profile 2 is decoded in hardware where a backend decodes its bit depth,
which the track’s vpcC box or WebM CodecPrivate must name: NVDEC
decodes 10- and 12-bit streams, and Media Foundation and VideoToolbox
10-bit ones. A profile 2 track without a configuration, or whose bit depth
no backend on the host decodes, is decoded in software by Prefer, and
Require reports that no hardware backend is available for it.
The hardware backends decode the same chunks. A chunk’s headers are read
before it reaches the platform decoder, so each sample still shows exactly
one frame, and the decoded picture is cropped to the size its header names
and converted by picture_to_rgba with the color space and range the
header names, exactly as a software picture is.
Functions§
- native_
vp9_ video_ decoder_ factory - Returns the native VP9 profile 0 (8-bit 4:2:0) and profile 2 (10- and 12-bit 4:2:0) decoder backend.