wai-rs: derive the dequant gain — the last fixture-sourced decoder input #29
Loading…
Reference in a new issue
No description provided.
Delete branch "jpegai-dequant-derive"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The per-position dequant gain was the one input still read from a dumped fixture. It is now built from normative assets alone, closing the derivation chain.
Verified on real
test256.bin: the RVS stage is bit-exact against the ISO reference on both planes (luma 40960/40960, chroma 24576/24576), and the derived tables match the referencebuildTables()output for all three cwg variants. The same scale list reproducesRVS_ADDITIVEexactly, so those previously-tabulated constants are now cross-checked against their derivation.Three hazards pinned down by assertions, each of which silently corrupts the result:
125*1.06is exactly132.5; half-away-from-zero picks the wrong multiplier)>>16and float/2^16paths selected by a device comparison, disagreeing on negative input70 existing tests still pass.
Co-Authored-By: Claude Opus 4.8 [email protected]
9593fa71bd1c98db7fd5