ETC1S is the original universal supercompression texture format supported by the open source Basis Universal library. It was designed to support all LDR GPU texture formats like ETC1, BC1-7, ASTC, PVRTC1, etc. and be fast to transcode in basic WASM (no threading, no SIMD needed), and also have compelling bitrates via codebooks applied to the individual components of the ETC1S latent.
It decodes slightly faster than libjpeg. In various domains, like in very large scale geospatial use cases, it's quite popular, but using the ETC1S format resulted in quality tradeoffs. My previous open source "crunch" library (used by some game engines and by various geospatial vendors) had higher quality, but also higher bitrates and could only target the older BC1-5 formats (originally).
We didn't announce this ETC1S specific feature when it was first released over a year ago: over time we've slowly moved to real-time filtering and encoding of some ETC1S blocks when targeting some formats like BC7. Developers can disable this via transcoder "decode" flag, but by default we now apply a chroma space filter during transcoding ETC1S.
Here's an example: ETC1S supercompression at 1.5 bpp, 6x pixel zoom, BC7 target. We use a real-time encoder (mode 5 BC7) selectively if doing so will reduce artifacts. The filter works on the CoCg components of the YCoCg colorspace.
Crop 6x pixel zoom, chroma filter enabled:
Crop 6x pixel zoom,
chroma filter disabled:
Full, 2x pixel zoom, filter enabled:
Full, 6x pixel zoom, filter enabled:
The ETC1S latent has lost chroma resolution. That information can't actually be recovered. But BC7/ASTC has substantially greater representational freedom than ETC1S. So instead of faithfully preserving ETC1S's artifacts, the transcoder can use BC7's or ASTC's excess degrees of freedom to represent a better reconstruction of the latent signal.
Real-Time Encoders and Format Transcoding Graph Expansion
We've been steadily expanding our
real-time analytical texture encoders to encompass most LDR/HDR formats. bc7f targeting the entire BC7 format (all modes, all partition patterns, all mode options, 1-2 planes, 2-3 subsets), given 8 threads on a Ryzen 9, has a throughput of roughly 1 gigatexel/sec. We use it as a fallback in various scenarios when we can't easily transcode directly to the BC7 latent. Our new ETC1 encoder (etc1f) is also extremely fast.
Instead of exploiting SIMD (like we previously did with
bc7e.ispc), we embrace divergence and use a simple error model of the BC7 decoder to analytically predict which mode is likely best given basic block statistics. By default bc7f doesn't decode the output and measure the error vs. each original block: that would be too slow (but it is a leap of faith).
We can also now near-losslessly transcode between BC7 and ASTC LDR 4x4, which means our BC7 encoder (bc7f) can easily target ASTC LDR 4x4, too. (At effort 0 using bc7f to encode ASTC is actually faster than using one of our two ASTC LDR encoders.) We have the same unification with ASTC HDR 4x4: its output can be rapidly transcoded to BC6H near-losslessly via ASTC HDR to BC6H direct latent conversion. Our GPU texture format encoding/transcoding graph is nearing completion.
Plain GPU texture encoders aren't really interesting to us (they are enabling tools for our transform domain format transcoders, not our primary focus), so I haven't bothered to release public benchmarks. The developers that actually care will do this themselves anyway.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.