av1txasm

command
v0.21.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 10 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

Overview

Command av1txasm turns the AV1 encoder's 1D forward transforms (internal/av1/transform_fwd.go) and the inverse ones (transform_bf.go) into AVX2 kernels that run eight of them at once, one per 32-bit lane:

go run ./tools/av1txasm -dir internal/av1

Each butterfly statement of fdct8 to fdct64, fadst8 and fadst16 (a copy, a sum or difference, or a halfBtf of two cosines) becomes a few vector instructions on eight lanes, the same arithmetic as the Go: the products' low 32 bits, summed, rounded and shifted down. Copies only rename; every value has a 32-byte slot in the kernel's frame, reused after the value's last use. Two files are written:

  • fwdtx_amd64.s: for each transform a column kernel (eight adjacent columns of a residual, read a row at a time with a stride, scaled up, transformed, rounded down and written to eight columns of the column pass's output) and a row kernel (eight rows of that output, transposed in, transformed and transposed out, rounded down; for the ADSTs also one reading the rows right to left).
  • fwdtx_amd64.go: their declarations and the switches that call them.
  • invtx_amd64.s and invtx_amd64.go: the same for the inverse DCTs and 8- and 16-point ADSTs (whose rotations, clamped to the spec's ranges, fit 32 bits at bit depths up to 10), each pass rounded and clamped as inverseTransform's.

Jump to

Keyboard shortcuts

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