nx_av1_txfm2d.nx
buildroot/runtime/nx_av1_txfm2d.nx
about
nx_av1_txfm2d.nx -- the 2-D transform-type lattice shared VERBATIM with AV2.
WHY THIS ONE, AND WHY NOW. AOMedia published AV2 v1.0.0 on 2026-05-28 and
announced it on 2026-06-09. The technical overview by Andrey Norkin lists
what AV2 REUSES from AV1 unchanged, and the first item is:
"Four primary 1-D transform types producing 16 2-D combinations"
So this lattice is not AV1 work that might carry over to AV2 -- it is AV2
work, already, by the spec authors' own account. Every byte here serves both
decoders. That matters because as of mid-2026 NO browser decodes AV2:
not Chrome, Firefox, Edge or Safari; no shipping hardware decoder exists;
dav2d is early and the reference software is not production-ready. Practical
support is expected around 2028. Building the shared core now is the whole
moat argument, and this module is the part of it with the least risk of
being invalidated by a spec detail.
THE FOUR 1-D KINDS: DCT, ADST, FLIPADST, IDTX (identity).
THE 16 COMBINATIONS are exactly the 4x4 grid of (column kind, row kind),
each appearing EXACTLY ONCE -- a bijection. That is the property the gate
proves, and it is strong: any mis-assignment of any one of the sixteen
types either duplicates a pair or leaves one uncovered, and both are caught.
Naming follows AV1: the FIRST token is the COLUMN (vertical) transform and
the second is the ROW (horizontal) one, so ADST_DCT means ADST down the
columns and DCT across the rows. Swapping that convention decodes -- it
produces a transposed-looking error that survives on symmetric content --
which is exactly why it is pinned by test rather than by comment.
FLIPADST is the ADST with its output reversed. It exists because a block
whose energy sits at the far edge is predicted better by a basis that ramps
the other way; substituting plain ADST for it does not error, it just puts
the gradient at the wrong end of the block.
license_tier: ORIGINAL
dependencies 4 imports · 1 importers
imports: nx_syscalls.nxnx_av1_txfm.nxnx_av1_dct.nxnx_av1_adst.nx
imported by: nx_av1_txfm2d_gate.nx
structs
| none |
consts
| 43 | const NX_TX1D_DCT: i64 = 0 |
| 44 | const NX_TX1D_ADST: i64 = 1 |
| 45 | const NX_TX1D_FLIPADST: i64 = 2 |
| 46 | const NX_TX1D_IDTX: i64 = 3 |
| 47 | const NX_TX1D_N: i64 = 4 |
| 51 | const NX_TX2D_DCT_DCT: i64 = 0 |
| 52 | const NX_TX2D_ADST_DCT: i64 = 1 |
| 53 | const NX_TX2D_DCT_ADST: i64 = 2 |
| 54 | const NX_TX2D_ADST_ADST: i64 = 3 |
| 55 | const NX_TX2D_FLIPADST_DCT: i64 = 4 |
| 56 | const NX_TX2D_DCT_FLIPADST: i64 = 5 |
| 57 | const NX_TX2D_FLIPADST_FLIPADST: i64 = 6 |
| 58 | const NX_TX2D_ADST_FLIPADST: i64 = 7 |
| 59 | const NX_TX2D_FLIPADST_ADST: i64 = 8 |
| 60 | const NX_TX2D_IDTX: i64 = 9 |
| 61 | const NX_TX2D_V_DCT: i64 = 10 |
| 62 | const NX_TX2D_H_DCT: i64 = 11 |
| 63 | const NX_TX2D_V_ADST: i64 = 12 |
| 64 | const NX_TX2D_H_ADST: i64 = 13 |
| 65 | const NX_TX2D_V_FLIPADST: i64 = 14 |
| 66 | const NX_TX2D_H_FLIPADST: i64 = 15 |
| 67 | const NX_TX2D_N: i64 = 16 |
| 142 | const NX_TX_SQRT2_Q12: i64 = 5793 |
functions
| 71 | func nx_av1_tx2d_col_kind(t: i64) -> i64 called by 1: main |
| 92 | func nx_av1_tx2d_row_kind(t: i64) -> i64 called by 1: main |
| 117 | func nx_av1_iflipadst4(io: *i64) -> i64 |
| 144 | func nx_av1_itx_identity4(io: *i64) -> i64 |
| 159 | func nx_av1_itx1d_4(kind: i64, cos_table: *i64, io: *i64) -> i64 |