Documentation
¶
Index ¶
Constants ¶
View Source
const ( FrameW = 1080 FrameH = 1080 Black = byte(64) White = byte(192) )
Variables ¶
View Source
var DefaultConfig = Config{Module: 4, RSPercent: 20}
DefaultConfig is the VP8/WebRTC-tuned default: 4×4 modules, 20% RS parity.
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec struct {
// contains filtered or unexported fields
}
Codec encodes/decodes tile frames.
func (*Codec) Decode ¶
func (c *Codec) Decode(frame []byte) (*DecodeResult, error)
Decode extracts payload from a 1080×1080 grayscale frame.
func (*Codec) MaxPayload ¶
MaxPayload returns the max user bytes per frame.
type Config ¶
type Config struct {
// Module is the pixel side of each bit-cell (1..270).
// 1 = max density (145KB/frame), 4 = VP8-safe default.
Module int
// RSPercent is Reed-Solomon parity overhead in percent of data shards (0..200).
// 0 = no ECC, 20 = 20% parity overhead (recovers up to 10% shard loss), 100 = 2× redundancy.
RSPercent int
}
Config configures Codec instance.
type DecodeResult ¶
DecodeResult holds decoded frame data.
Click to show internal directories.
Click to hide internal directories.