Versions in this module Expand all Collapse all v0 v0.6.1 Oct 10, 2026 v0.6.0 Oct 10, 2026 v0.5.0 Oct 9, 2026 v0.4.0 Oct 9, 2026 v0.3.0 Oct 9, 2026 Changes in this version + var ErrRefIdxRange = errors.New("h264: num_ref_idx_lX_active_minus1 out of range") v0.2.1 Oct 4, 2026 v0.2.0 Oct 4, 2026 v0.1.0 Oct 4, 2026 Changes in this version + var DefaultWeighting = Weighting + var ErrNotPPS = errors.New("h264: unit is not a picture parameter set") + var ErrNotSPS = errors.New("h264: unit is not a sequence parameter set") + var ErrNotSlice = errors.New("h264: unit is not a coded slice") + var ErrPOCType = fmt.Errorf("%w: picture order count type", ErrSliceHeader) + var ErrRefLists = fmt.Errorf("%w: reference lists", ErrSliceHeader) + var ErrRefSet = fmt.Errorf("%w: reference set", ErrSliceHeader) + var ErrSliceGroups = errors.New("h264: slice groups are not supported") + var ErrSliceHeader = errors.New("h264: unsupported slice header") + var ErrUnsupportedPPS = errors.New("h264: picture parameter set was not consumed exactly") + var ErrUnsupportedSPS = errors.New("h264: unsupported sequence parameter set") + func DistScaleFactor(currPOC, poc0, poc1 int32) int32 + func ParseSliceReferences(u Unit, sps SPS, pps PPS) (SliceHeader, SliceReferences, error) + type MarkOp struct + Extra uint32 + Operation uint32 + Value uint32 + type POC struct + Bottom int32 + Top int32 + Value int32 + type POCCounter struct + func (c *POCCounter) Next(u Unit, h SliceHeader, ref SliceReferences, sps SPS) (POC, error) + func (c *POCCounter) Reset() + type PPS struct + BottomFieldPicOrder bool + CABAC bool + ChromaQPIndexOffset int32 + ConstrainedIntraPred bool + DeblockingControl bool + ID uint32 + InitQP int32 + InitQS int32 + NumRefIdxL0 uint32 + NumRefIdxL1 uint32 + RedundantPicCnt bool + SPSID uint32 + SecondChromaQPOffset int32 + Transform8x8 bool + WeightedBipredIDC uint8 + WeightedPred bool + func ParsePPS(u Unit, sps SPS) (PPS, error) + type Picture struct + Bytes int + Sync bool + Type SliceType + Units []Unit + func SplitPictures(units []Unit, sps SPS, pps PPS) ([]Picture, error) + type PredWeights struct + ChromaLog2Denom uint32 + L0 []RefWeight + L1 []RefWeight + LumaLog2Denom uint32 + type Prediction struct + Handle int + L0 []RefPicture + L1 []RefPicture + POC POC + type Predictor struct + func NewPredictor() *Predictor + func (p *Predictor) Held() []RefPicture + func (p *Predictor) Picture(u Unit, h SliceHeader, ref SliceReferences, sps SPS, pps PPS) (Prediction, error) + func (p *Predictor) Reset() + type RefListOp struct + Kind uint32 + Value uint32 + type RefPicture struct + FrameNum uint32 + ID int + LongTerm bool + LongTermIdx uint32 + POC int32 + func ApplyRefListOps(list, refs []RefPicture, ops []RefListOp, active int, currPicNum uint32, ...) ([]RefPicture, error) + func InitialRefLists(h SliceHeader, refs []RefPicture, currPOC int32, currFrameNum uint32, ...) (l0, l1 []RefPicture, err error) + type RefSet struct + func NewRefSet() *RefSet + func (s *RefSet) AfterPicture(u Unit, h SliceHeader, ref SliceReferences, p POC, sps SPS) (int, error) + func (s *RefSet) Pictures() []RefPicture + func (s *RefSet) Reset() + type RefWeight struct + ChromaOffset [2]int32 + ChromaStated bool + ChromaWeight [2]int32 + LumaOffset int32 + LumaStated bool + LumaWeight int32 + type SPS struct + BitDepthChroma uint8 + BitDepthLuma uint8 + ChromaFormat uint8 + CropBottom uint32 + CropLeft uint32 + CropRight uint32 + CropTop uint32 + FrameMBSOnly bool + Height uint32 + ID uint32 + Level uint8 + Log2MaxFrameNum uint8 + Log2MaxPOCLSB uint8 + MBHeight uint32 + MBWidth uint32 + MaxNumRefFrames uint32 + POCAlwaysZero bool + POCType uint32 + Profile uint8 + SeparatePlanes bool + Width uint32 + func ParseSPS(u Unit) (SPS, error) + type SliceHeader struct + AllOfType bool + BottomField bool + ColourPlane uint8 + DeltaPOC [2]int32 + DeltaPOCBottom int32 + FieldPic bool + FirstMB uint32 + FrameNum uint32 + IDR bool + IDRPicID uint32 + POCLSB uint32 + PPSID uint32 + RedundantPicCnt uint32 + Type SliceType + func ParseSliceHeader(u Unit, sps SPS, pps PPS) (SliceHeader, error) + func (h SliceHeader) BeginsPicture() bool + type SliceReferences struct + AdaptiveMarking bool + AlphaC0OffsetDiv2 int32 + BetaOffsetDiv2 int32 + CABACInit uint32 + DeblockingIDC uint32 + DirectSpatial bool + LongTermReference bool + Marking []MarkOp + ModifyL0 []RefListOp + ModifyL1 []RefListOp + NoOutputOfPriorPics bool + NumRefIdxL0Active uint32 + NumRefIdxL1Active uint32 + QP int32 + ResetsPOC bool + Weights *PredWeights + type SliceType uint8 + const SliceB + const SliceI + const SliceP + const SliceSI + const SliceSP + func (t SliceType) String() string + type Unit struct + Payload []byte + RefIDC uint8 + Type UnitType + func SplitAnnexB(data []byte) ([]Unit, error) + func SplitLengthPrefixed(data []byte, lengthSize int) ([]Unit, error) + func (u Unit) Unescape() []byte + type UnitType uint8 + const UnitAUD + const UnitIDR + const UnitNonIDR + const UnitPPS + const UnitSEI + const UnitSPS + type Weighting struct + LogDenom int32 + O0 int32 + O1 int32 + W0 int32 + W1 int32 + func ExplicitWeighting(w *PredWeights, idx0, idx1 int) Weighting + func ImplicitWeighting(currPOC, poc0, poc1 int32, eitherLongTerm bool) Weighting + func WeightingFor(pps PPS, h SliceHeader, ref SliceReferences, currPOC, poc0, poc1 int32, ...) Weighting + func (w Weighting) Trivial() bool