[cpia] at what time should we goto_high_power

Peter Pregler Peter.Pregler@risc.uni-linz.ac.at
Tue, 21 Mar 2000 17:29:32 +0100 (CET)


Dear all,

I got the information below about how the camera does handle setting
changes. This has quite some impact on the basic layout of the linux
driver. I have written it under the implicit assumption that the first
frame I read from the camera can read with the settings (exposure, gain,
color balance, ...) I want. Now in the worst case it seems that it takes
up to 8 frames until I get what I really want. Why does this affect the
current driver operation? With the current driver the camera power is
switched on only _after_ the first device is opened. So unless you have a
device open the camera is in power-save mode (i.e. the video processor is
not running). I thought this is a reasonable model since linux-boxes tend
to run all day (contrary to M$-stuff which is rebooted on demand ;), but
the camera does not. Now the new information is that it can take 8 frames
until the picture looks like the way you want it after you have switched
power on, i.e. in the current driver afer you opened the device. Rigth now
the driver throws away the first one or two images which works moderatly
well with most settings. Note that this problem will not affect
video-conferencing stuff, but webcam-software that does a open/read/close
to get a single frame is heavily affected by this. Also for grabbing
videos the first few frames will be 'bad'.

My question is: should we switch on power as soon as the driver is loaded.
So the video-processor will run all the time? Is this bad for camera
lifetime? I certainly do not want to throw away the first 8 frames if the
user changed any setting. Adding a special load-time option will blow up
the code a bit but looks reasonable. Any other suggestions? I do not want
to force a special power-on model.

-Peter

-----FW: <200003201517.PAA20497@matthau.vvl.co.uk>-----

Date: Mon, 20 Mar 2000 15:17:32 GMT
From: Henry Bruce <Henry.BRUCE@st.com>
To: Peter.Pregler@risc.uni-linz.ac.at
Subject: Re: Fw: RE: [cpia] VIDIOCSWIN/reset_camera_struct and weird colors
Cc: Henry.BRUCE@matthau.vvl.co.uk

Here's a simplification of what happens:

If a grab is taking place then the camera takes the new settings and
applies them to the next frame to be uploaded. Exposure sensor gain
and compensation gain settings take effect up to 1 frame later. If
a combination of settings are changed during 1 frame period then it
make take several frames for all settings to take effect. When the
camera switched to high power mode, the firmware spends approximately
8 frames downloading default settings. The first frame will always
be uncompressed. To avoid recieving frames in the wrong format,
disable grabbing before applying the new settings, wait a few frames
and start grabbing again.


--------------End of forwarded message-------------------------

-------------------------------
Email: Peter.Pregler@risc.uni-linz.ac.at
WWW:   http://www.risc.uni-linz.ac.at/people/ppregler