Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Ilyes Gouta
Hi, > Maintaining N rows is an implementation detail of the scaler. I mean by > having a simple one-scanline-in, zero-or-more-scanlines-out interface, like > this: > > scaler.setSourceSize(10, 10); > scaler.setDestSize(100, 100); > while (decoder.hasMoreScanines()) { > scaler.supplyScanLine(deco

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Alpha Lam
2012/8/13 Ilyes Gouta > Hi, > > >>> If such a callback API for row-based resizing comes to fruition, then > >>> let's (also) not rule out whole-picture h/w accelerated resizing - > >>> such as by making that new API a mandatory stage in the decoding > > that's actually: such as by *not* making th

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Ilyes Gouta
Hi, >>> If such a callback API for row-based resizing comes to fruition, then >>> let's (also) not rule out whole-picture h/w accelerated resizing - >>> such as by making that new API a mandatory stage in the decoding that's actually: such as by *not* making that new API a mandatory stage in the

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Alpha Lam
I agree we should have a separate row-based downscaling phase. JPEGImageDecoder.cpp already supports downscaling with a given width and height, but it's using point sampling which has poor quality. It would be nice to have a callback based downscaling API that we can implement better algorithms.

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Ilyes Gouta
Hi, On Mon, Aug 13, 2012 at 3:46 PM, Anton Obzhirov wrote: > Libjpeg has some internal support for downscaling already (2x, 4x). Not sure > about > > Libpng and other libraries. In general probably it can be implemented by > downscaling decoded row of the pixels on the fly using callback API >

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Anton Obzhirov
- From: Ilyes Gouta [mailto:ilyes.go...@gmail.com] Sent: 13 August 2012 15:37 To: Anton Obzhirov Cc: webkit-dev@lists.webkit.org Subject: Re: [webkit-dev] image downscaling during decoding Hi, > At the moment such images are full decoded to a full size buffer and get downscaled during render

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Anton Obzhirov
Libjpeg has some internal support for downscaling already (2x, 4x). Not sure about Libpng and other libraries. In general probably it can be implemented by downscaling decoded row of the pixels on the fly using callback API provided. From: tomhud...@google.com [mailto:tomhud...@google.com] O

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Allan Sandfeld Jensen
On Monday 13 August 2012, Anton Obzhirov wrote: > Hi, > > We are looking for ways to improve page loading speed and reduce memory > usage for WebKit in general and for GTK port of WebKit in particular. One > of the ideas is to implement downscaling of the images during decoding for > image element

Re: [webkit-dev] image downscaling during decoding

2012-08-13 Thread Ilyes Gouta
Hi, > At the moment such images are full decoded to a full size buffer and get > downscaled during rendering. WebKit has already a hard coded ImageSource::s_maxPixelsPerDecodedImage value, in WebCode/platform/graphics/ImageSource.cpp which defaults to 1024 * 1024 when WebKit's option ENABLE(IMAG