[sane-devel] proposel for buffer size increase frontends
scanimage ..
gerard klaver
gerard@gkall.hobby.nl
Wed, 19 Jan 2005 13:54:10 +0100
On Wed, 2005-01-19 at 08:31 +0100, Gerhard Jaeger wrote:
> On Tuesday 18 January 2005 18:19, Johannes Berg wrote:
> > gerard klaver schrieb:
> >
> > >In this way the write cycle in sane_read will be reduced and is it
> > >possible to write a image from for example a 640 x 480 webcam in
> > >one cycle to the frontend buffer.
> > >
> > >
> > What's the advantage? If there really is an advantage, I think it should
> > probably be made dynamic instead. Using this much space on the stack
> > isn't really a good thing IMHO.
> >
> That would be my comment too. 1Mib on the stack - hmmm, I don't like this
> idea. If we really need such an amount of mem, use malloc!
>
> My 2 cents
> Gerhard
>
>
IFAIK in the backend as in the frontend more and/or bigger buffers are
used in general to do color correction, line skew correction etc.
The idea of making it dynamic sounds good to me.
How this should be done, i don't know yet.
If somebody else has an idea, please let me know.
I think it should be something like:
Frontends defines a max. buffer value ( for example 1024 * 1024, default
value is old value 32 * 1024)
Backends defines a value ( for example 256 * 1024)
if no backend value is present default value frontend will be used (so
no existing backend is affected).
if backend value < max. frontend value, backend value will be used
if backend value >= max. frontend value, frontend value will be used
--
--------
m.vr.gr.
Gerard Klaver