About
à vif (French for "raw") is a 64-edition generative series on Ethereum where each 256×256 color AVIF artwork is generated 100% on-chain inside the EVM via a custom smart contract, with zero off-chain dependencies.
Mint
Editions
Valid by Construction
Though its visual language recalls glitch art, there is no base image being corrupted—every frame is generated from scratch out of the syntax and structural constraints of the AV1 codec itself, encoding block partitions, intra-prediction modes, and transform residuals directly through an on-chain arithmetic range encoder into a spec-compliant bitstream.
Normally, an image encoder takes a grid of pixels and tries to compress it into a compact bitstream. à vif works in reverse: it skips the pixels entirely and speaks AV1's internal language directly.
When your browser opens one of the minted AVIFs, its AV1 decoder reads a perfectly valid set of instructions—split this region, predict colors from the neighbors at this angle, add a small frequency wave here—and reconstructs the final image from those rules alone.
From Mint Seed to AVIF in Four Steps
1. One Seed, Three Codec Knobs
At mint time, the contract records a deterministic 256-bit tokenSeed on-chain. Nothing else is stored per token. Whenever a wallet, marketplace, or browser calls tokenURI() or imageURI(), the contract derives three parameters from that seed:
splitBias(65–75%): How aggressively each 64×64 superblock subdivides into smaller rectangles and squares (down to 4×4).residualRate(70–88%): How often a block injects new color/luminance energy instead of simply copying and extending its neighbors.acWaveRate(55–85%): The balance between flat block-wide color shifts (DC coefficients) and standing wave textures (AC coefficients).
2. Walking AV1's Syntax Tree
The 256×256 canvas is processed as a 4×4 grid of 64×64 superblocks. For each leaf block in the partition tree, the contract emits AV1 syntax in exact specification order:
- Intra-prediction modes: Chooses how the block extrapolates from already-decoded pixels above and to its left—directional streaks, smooth gradients, Paeth prediction, or Chroma-from-Luma (which derives color directly from brightness).
- Minimal residuals: Optionally adds a flat brightness/color jump and a single AC frequency component, creating crisp geometric edges alongside soft interference patterns.
Rather than mimicking natural photography, the contract samples these syntax choices uniformly while still obeying every contextual rule of the format. The result is pure codec geometry.
3. On-Chain Arithmetic Range Encoding
AV1 does not write syntax choices as plain bits—it packs them through a 15-bit multi-symbol arithmetic range coder driven by probability tables (CDFs).
MiniAv1Core.sol implements that exact range encoder directly in Solidity. To stay under Ethereum's 24 KB contract size limit (the deployed contract is 23,093 bytes), the encoder uses:
- A compact 2,286-byte lookup table of AV1's static default probabilities (for quantization context 3, 8-bit 4:2:0 color).
- Static CDFs and disabled post-processing filters (no loop filter or CDEF), keeping both bytecode size and
eth_callexecution lean while preserving raw block boundaries.
4. Packaging a Real AVIF
Once all 16 superblocks are encoded, the contract flushes the range coder's carry buffer, prepends valid AV1 Sequence and Frame headers (BT.709 / sRGB, full-range 8-bit 4:2:0), and wraps the resulting OBUs inside an ISOBMFF container (ftyp, meta, and mdat boxes).
Finally, an inline-assembly Base64 encoder converts the raw AVIF binary into a data:image/avif;base64,... URI embedded directly inside the ERC-721 JSON metadata. No IPFS, no Arweave, no external renderer—just the Ethereum Virtual Machine outputting a native modern image format.