golomb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: ISC Imports: 0 Imported by: 0

Documentation

Overview

Package golomb implements a Golomb-Rice coder as per Section 3.8.2. Golomb Rice Mode of draft-ietf-cellar-ffv1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coder

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

Coder is an instance of a Golomb-Rice coder as described in 3.8.2. Golomb Rice Mode.

func NewCoder

func NewCoder(buf []byte) *Coder

NewCoder creates a new Golomb-Rice coder.

func (*Coder) NewLine

func (c *Coder) NewLine()

NewLine resets the x position and starts a new run, since runs can only be per-line.

func (*Coder) NewPlane

func (c *Coder) NewPlane(width uint32)

NewPlane should be called on a given Coder as each new Plane is processed. It resets the run index and sets the slice width.

See: 3.8.2.2.1. Run Length Coding

func (*Coder) SG

func (c *Coder) SG(context int32, state *State, bits uint) int32

SG gets the next Golomb-Rice coded signed scalar symbol.

See: * 3.8.2. Golomb Rice Mode

  • 4. Bitstream

type State

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

State contains a single set of states for the a Golomb-Rice coder as define in 3.8.2.4. Initial Values for the VLC context state.

func NewState

func NewState() State

NewState creates a Golomb-Rice state with the initial values defined in 3.8.2.4. Initial Values for the VLC context state.

Jump to

Keyboard shortcuts

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