[cpia] hmm

Peter Pregler Peter.Pregler@risc.uni-linz.ac.at
Wed, 26 Jan 2000 08:52:40 +0100 (CET)


On 25-Jan-2000 Johannes Erdfelt wrote:
> On Tue, Jan 25, 2000, David Cougle <lunarbard@moonman.com> wrote:
>> www.slidellweb.com/dcougle/test.jpg
>> i fixed it up a bit with changing the focus, but is this the best
>> quality
>> the webcam 2 can do? if it is, it doesn't seem to get as good as b&w
>> quickcam or color quickcam 2.
> 
> There's been some connfusion how the RGB data is suspposed to come. All
> of the V4L programs do it differently. This problem you're seeing with
> the colors is the RGB data being interpreted as BGR. I'm still trying to
> figure out exactly how it's supposed to be interpreted.

I discussed this on the v4l list. The 'correct' way is:

- for read: rgb is just rgb
- for mmap: rgb24/32 is actually bgr24/32, rgb15/16 is rgb

There is no reasoning for the above except history and misunderstanding by
the programmers. I suggest you stick to this for the simple reason that
one would break either all mmap-based applications or all read-based
application to do it right. For this very reason there is no intention
to change this from the v4l-guys side. For v4l2 things are different. You
have the correct palettes there (PALETTE_RGB and PALETTE_BGR).

As for the parport cpia driver the situation is the following:
- up to version 0.4X the read byte order was wrong, the ported
  gqcam did swap the colors to compensate for that
- beginning with 0.5 the driver and the ported gqcam behave as described
  above (different byte order for read/mmap), I have seen no wrong colors
  with v4l-applications since driver version 0.5

As for the usb-driver you have to fill in the details. :)

Greetings, Peter


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