cabac

package
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 21, 2026 License: BSD-2-Clause Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	CatIntra16x16DC = 0
	CatIntra16x16AC = 1
	CatLuma4x4      = 2
	CatChromaDC     = 3
	CatChromaAC     = 4
)
View Source
const (
	CBPUnavailable = 0x0F
	CBPPCM         = 0x2F
)
View Source
const (
	MVDHorizontal = offMVD
	MVDVertical   = offMVD + 7
)
View Source
const CatLuma8x8 = 5
View Source
const NumContexts = 1024

Variables

View Source
var (
	ErrNotAligned = errors.New("go264/cabac: slice data does not start byte aligned")
	ErrAlignment  = errors.New("go264/cabac: cabac_alignment_one_bit is not one")
	ErrInitIDC    = errors.New("go264/cabac: cabac_init_idc out of range")
)

Functions

This section is empty.

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func (*Decoder) CodedBlockFlag

func (d *Decoder) CodedBlockFlag(cat, condTermA, condTermB int) bool

func (*Decoder) CodedBlockPatternChroma

func (d *Decoder) CodedBlockPatternChroma(leftCBP, topCBP int) int

func (*Decoder) CodedBlockPatternLuma

func (d *Decoder) CodedBlockPatternLuma(leftCBP, topCBP int) int

func (*Decoder) DecodeBypass

func (d *Decoder) DecodeBypass() uint32

func (*Decoder) DecodeDecision

func (d *Decoder) DecodeDecision(ctxIdx int) uint32

func (*Decoder) DecodeTerminate

func (d *Decoder) DecodeTerminate() uint32

func (*Decoder) EndOfSlice

func (d *Decoder) EndOfSlice() bool

func (*Decoder) Init

func (d *Decoder) Init(r *bits.Reader, sliceQPY int, intra bool, initIDC uint32) error

func (*Decoder) Intra4x4PredMode

func (d *Decoder) Intra4x4PredMode(predMode int) int

func (*Decoder) IntraChromaPredMode

func (d *Decoder) IntraChromaPredMode(inc int) int

func (*Decoder) IntraMBType

func (d *Decoder) IntraMBType(inc int) int

func (*Decoder) LevelOverflow added in v1.6.0

func (d *Decoder) LevelOverflow() bool

func (*Decoder) MBQPDelta

func (d *Decoder) MBQPDelta(prevNonZero bool) int

func (*Decoder) MBSkipFlagB

func (d *Decoder) MBSkipFlagB(inc int) bool

func (*Decoder) MBSkipFlagP

func (d *Decoder) MBSkipFlagP(inc int) bool

func (*Decoder) MBTypeB

func (d *Decoder) MBTypeB(inc int) (mbType int, intra bool)

func (*Decoder) MBTypeP

func (d *Decoder) MBTypeP() (mbType int, intra bool)

func (*Decoder) MVD

func (d *Decoder) MVD(base, absSum int) int

func (*Decoder) Overrun added in v1.6.0

func (d *Decoder) Overrun() int

func (*Decoder) RefIdx

func (d *Decoder) RefIdx(inc int) int

func (*Decoder) ResidualBlock

func (d *Decoder) ResidualBlock(coeffs []int32, cat, condTermA, condTermB, numC8x8 int) int

func (*Decoder) ResidualBlock8x8 added in v1.2.0

func (d *Decoder) ResidualBlock8x8(coeffs *[64]int32) int

func (*Decoder) Restart

func (d *Decoder) Restart(r *bits.Reader) error

func (*Decoder) State

func (d *Decoder) State(ctxIdx int) (state, mps uint8)

func (*Decoder) SubMBTypeB

func (d *Decoder) SubMBTypeB() int

func (*Decoder) SubMBTypeP

func (d *Decoder) SubMBTypeP() int

func (*Decoder) TransformSize8x8Flag added in v1.2.0

func (d *Decoder) TransformSize8x8Flag(inc int) bool

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func (*Encoder) CodedBlockFlag

func (e *Encoder) CodedBlockFlag(cat, condTermA, condTermB int, flag bool)

func (*Encoder) CodedBlockPatternChroma

func (e *Encoder) CodedBlockPatternChroma(leftCBP, topCBP, v int)

func (*Encoder) CodedBlockPatternLuma

func (e *Encoder) CodedBlockPatternLuma(leftCBP, topCBP, cbp int)

func (*Encoder) EncodeBypass

func (e *Encoder) EncodeBypass(bin uint32)

func (*Encoder) EncodeDecision

func (e *Encoder) EncodeDecision(ctxIdx int, bin uint32)

func (*Encoder) EncodeTerminate

func (e *Encoder) EncodeTerminate(bin uint32)

func (*Encoder) EndOfSlice

func (e *Encoder) EndOfSlice(end bool)

func (*Encoder) EstimateBits

func (e *Encoder) EstimateBits(fn func(*Encoder)) int

func (*Encoder) EstimateResidualBlockBits

func (e *Encoder) EstimateResidualBlockBits(coeffs []int32, cat, condTermA, condTermB, numC8x8 int) int

func (*Encoder) Finish

func (e *Encoder) Finish()

func (*Encoder) Init

func (e *Encoder) Init(w *bits.Writer, sliceQPY int, intra bool, initIDC uint32) error

func (*Encoder) Intra4x4PredMode

func (e *Encoder) Intra4x4PredMode(predMode, mode int)

func (*Encoder) IntraChromaPredMode

func (e *Encoder) IntraChromaPredMode(inc, mode int)

func (*Encoder) IntraMBType

func (e *Encoder) IntraMBType(inc, mbType int)

func (*Encoder) MBQPDelta

func (e *Encoder) MBQPDelta(delta int, prevNonZero bool)

func (*Encoder) MBSkipFlagB

func (e *Encoder) MBSkipFlagB(inc int, skip bool)

func (*Encoder) MBSkipFlagP

func (e *Encoder) MBSkipFlagP(inc int, skip bool)

func (*Encoder) MBTypeB

func (e *Encoder) MBTypeB(inc, mbType int, intra bool)

func (*Encoder) MBTypeP

func (e *Encoder) MBTypeP(mbType int, intra bool)

func (*Encoder) MVD

func (e *Encoder) MVD(base, absSum, v int)

func (*Encoder) RefIdx

func (e *Encoder) RefIdx(inc, ref int)

func (*Encoder) ResidualBlock

func (e *Encoder) ResidualBlock(coeffs []int32, cat, condTermA, condTermB, numC8x8 int)

func (*Encoder) ResidualBlock8x8 added in v1.2.0

func (e *Encoder) ResidualBlock8x8(coeffs *[64]int32)

func (*Encoder) Restore

func (e *Encoder) Restore(s State)

func (*Encoder) Snapshot

func (e *Encoder) Snapshot() State

func (*Encoder) State

func (e *Encoder) State(ctxIdx int) (state, mps uint8)

func (*Encoder) SubMBTypeB

func (e *Encoder) SubMBTypeB(t int)

func (*Encoder) SubMBTypeP

func (e *Encoder) SubMBTypeP(t int)

func (*Encoder) TransformSize8x8Flag added in v1.2.0

func (e *Encoder) TransformSize8x8Flag(inc int, flag bool)

type State

type State struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL