Documentation
¶
Overview ¶
Package decoder is the VP9 frame decoder — the final layer (M12) that wires together all lower-level packages into a complete decode pipeline.
Pipeline for each frame:
- Parse uncompressed header (frame.Parse).
- Decode compressed header probability updates (compheader.Decode).
- Allocate the output frame (refbuf.NewFrame).
- For each tile: create above-row context, then iterate superblock rows.
- For each SB: partition tree (recursive NONE/HORZ/VERT/SPLIT decode).
- For each coding block: blockmode.Decode → MV resolution → reconstruct.Block.
- After all tiles: apply loop filter (loopfilter.FilterPlane).
- Update reference buffer (refbuf.Buffer.Update, ExtendBorders).
Usage:
d := decoder.New()
for each IVF packet payload:
frame, err := d.DecodeFrame(payload)
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder holds VP9 decode state across frames.
func NewWithProbs ¶ added in v0.2.0
func NewWithProbs(probs *compheader.Probs) *Decoder
NewWithProbs creates a Decoder with pre-populated probability tables (for testing).
func (*Decoder) DecodeFrame ¶
DecodeFrame decodes one IVF packet payload (not including the 12-byte IVF frame header) and returns the displayable 4:2:0 8-bit frame. A packet may be a VP9 superframe — several coded frames (e.g. an invisible alt-ref plus the shown frame) with a trailing index; each is decoded in turn and the shown frame is returned.