Class Vp8Decoder
Decodes VP8 frames, RFC 6386, in pure C#: a port of the RFC's reference decoder, exact to libvpx, so that its test vectors decode bit for bit.
Inherited Members
Namespace: Uniform.Matrix.Video.Vp8
Assembly: Uniform.Matrix.Video.dll
Syntax
public sealed class Vp8Decoder : IVideoDecoder, IDisposable
Remarks
Give the frames in order, starting with a keyframe; a frame that cannot be decoded throws InvalidDataException, after which decoding needs a keyframe again. Partial files:
- Vp8Decoder.cs: state, frame headers, the macroblock row loop and the reference frames.
- Vp8Decoder.Modes.cs: macroblock modes and motion vectors.
- Vp8Decoder.Tokens.cs: DCT coefficients.
- Vp8Decoder.Prediction.cs: intra and inter prediction, and adding the residual.
- Vp8Decoder.LoopFilter.cs: the loop filter.
Methods
| Edit this page View SourceDecode(ReadOnlySpan<byte>)
Decode one frame; return the picture when the frame is shown, or null for a frame only kept as a reference.
Declaration
public VideoFrame? Decode(ReadOnlySpan<byte> frame)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<byte> | frame |
Returns
| Type | Description |
|---|---|
| VideoFrame |
Exceptions
| Type | Condition |
|---|---|
| InvalidDataException | The frame is corrupt or unsupported, or no keyframe came first. |
Dispose()
Nothing to release: the decoder holds only managed memory.
Declaration
public void Dispose()