transform

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: BSD-2-Clause Imports: 0 Imported by: 1 module, 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

Overview

Package transform implements VP9 inverse transforms (spec §8.7.1). Sizes 4/8/16/32; kernels DCT-II and ADST (no 32×32 ADST in VP9). Integer arithmetic: constants scaled by 2^14; drs = (v+(1<<13))>>14. 2-D pass: rows → >>4 → transpose → cols → >>4 → transpose.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DCOnlyValue

func DCOnlyValue(dc int16) int16

DCOnlyValue returns the uniform output value of a DCT_DCT inverse 2-D transform when only the DC coefficient (after dequantization) is non-zero. Identical for all block sizes 4×4 … 32×32.

func InvTransform2D

func InvTransform2D(coeffs []int16, bs int, tt TxType)

InvTransform2D applies the inverse 2-D transform in-place. coeffs is bs×bs int16, row-major. bs ∈ {4,8,16,32}; bs=32 forces DCT_DCT.

Types

type TxType

type TxType int

TxType selects the 1-D kernel pair (row kernel, col kernel).

const (
	DCT_DCT   TxType = 0
	ADST_DCT  TxType = 1
	DCT_ADST  TxType = 2
	ADST_ADST TxType = 3
)

Jump to

Keyboard shortcuts

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