This page is intended as a playground to demonstrate the power of the modern web platform. The styling, content and scripts compress to less than 15kB, excluding the default test image. The filters are implemented mostly in asm.js with help from emscripten, tuned across a few round trips.
For simplicity, the block sizes for all filters are fixed at 8x8 and chroma is not subsampled. We take the RGBA data from the canvas and transform to YCgCo before applying the filters.
We apply the 4-point lapping along block edges that has been settled on in Daala. It balances some relief from blocking artifacts with less ringing than a full block transform.
Quantization has the same 4-band implementation of Perceptual Vector Quantization as in Daala. The bitrate is estimated assuming entropy coding of the PVQ codeword with less than one bit overhead per band. DC coefficents are simply delta encoded using the prefix scheme recommended for JPEG. A similar scheme is applied for companded gain and the prediction angle.
The deringing code was mangled to be initialized on demand and use a small buffer, so it probably has bugs. However, it still illustrates the many uses of directed selective smoothing in reducing artifacts.
You can load an image into the page and play with the parameters to see how they interact.
If you have any suggestions to improve this demo, you could always open an issue on GitHub.