[webkit-dev] WebKit runtime image compression
Paul Pedriana
ppedriana at gmail.com
Sat Dec 13 23:12:45 PST 2008
For a lot of web pages, images are the primary source of memory usage.
These images seem to be typically stored as RGB or ARGB data in the
BitmapImage class. It seems to me that applications that wish or need to
save runtime memory could benefit from runtime image compression whereby
images are stored in some compressed form instead of RGB or ARGB
formats. I am currently looking into this possibility and I'm wondering
if anybody has previously looked into it.
My current idea is to support two kinds of compressed images: RLE and
YCoCg-DXT5. The former could be for any images that are simple enough,
and the latter could be for general images and give a fixed 4:1
compression ratio. RGB transforms to YCoCg with better decorrelation
(breakdown of RGB to YCC) than YCbCr and many images can get PSNR values
over 40 (i.e. hard to tell from original). If the computer has decent
vector processing or a programmable GPU, the performance could be
decent, otherwise it depends on the CPU. (A)RGB could of course remain
as a fallback.
I'm wondering if anybody has looked into runtime image compression with
WebKit and considered options such as this.
Thanks.
More information about the webkit-dev
mailing list