Re: [Discussion] Subpixel rendering issues with compressed video output formats
Alexei Podtelezhnikov <[email protected]> Mon, 9 Jun 2025 14:01:10 -0400
| Newsgroups | gmane.comp.fonts.freetype.devel |
|---|---|
| Message-ID | <[email protected]> |
Vitor, Frankly, I can hardly relate your problem description to font rendering. Can= you possibly rephrase it? In FreeType speak LCD rendering is just triplicat= ed for 3 arbitrary color channels with slight differences depending how thes= e channels are spatially shifted. Regular antialiasing is just a special cas= e assuming that three channels are not shifted at all. Note that FreeType do= es not assign color to the channels.=20 Alexei =20 > On Jun 6, 2025, at 09:35, V=C3=8DTOR RAMOS <[email protected]> wrote: >=20 > =EF=BB=BFAll, >=20 > I have been studying the subpixel rendering code and I could spot a > few improvement areas and I would like to hear your opinion about it. > In this message I discuss one of them. >=20 > There are a few issues people face with subpixel antialiasing that > yield artifacts on their setup. The most common culprit is gamma > mismatches, but quite a few other less obvious factors are involved, > such as geometry which is partially addressed. >=20 > One factor that is not addressed (or even mentioned in discussions at > all) is lossy color format and space transformations in display output > pipelines. >=20 > It has become increasingly common that display adapters may > autoconfigure the output to use compressed video streams under a lossy > (chroma-subsampled) YUV output color format. This is usually done in > the context of a trade-off to achieve higher resolutions, refresh > rates or bit depths. As an example, many high-DPI panels only offer > UHD at 60 Hz under a chroma-subsampled YUV 4:2:0 stream. As another > example, many high-refresh rate panels only offer their maximum rates > under a likewise compressed format. As yet another example, higher bit > depth may also only be available under a chroma-subsampled format. In > general, video throughput may be limited by panels, adapters and even > physical channels, and the display output may be automatically > configured to use a compressed format. >=20 > As is, the project implicitly assumes an RGB 4:4:4 uncompressed output > video format and performs excellently, but if the output has chroma > subsampling then subpixel antialiased rendering can exhibit color > fringe artifacts. Indeed, several complaints about fringing may very > well be caused by chroma subsampling rather than gamma issues. >=20 > Exposing a subpixel antialiasing filter that addresses cases where the > output format has subsampled chroma is quite a large undertaking but > is feasible. Though the simpler solution in this case is to switch to > grayscale antialiasing. >=20 > To my knowledge, no libraries commercial or otherwise currently > address this issue. >=20 > V=C3=ADtor >=20