[GEM-dev] [pix_video]: issue with swapped colors
IOhannes m zmoelnig
zmoelnig at iem.at
Wed May 9 09:01:28 CEST 2007
Roman Haefeli wrote:
> hello everyone
>
>
> when using [pix_video] with my built-in tv/video-card, colors look ok,
> but when i use it with the usb_cam [1], R and B are swapped. this
> happens only in gem. with other softwares (mplayer, camorama) both
> devices appear to have correct colors.
i haven't found out yet how to reliably detect which colourspace a
device can(not) serve.
obviously it does work for some devices and not for others...
>
> is it possible to _slightly_ change the source code of [pix_video], so
> that R- and G-subpixels are swapped?
the change is trivial and has been done a lot of times, until it was
confirmed that it is just the detection of the device's colorspace that
is wrong.
> if yes, would it be possible with reasonable little effort to copy the
> source of [pix_video] to a new object called e.g. [pix_videoBGR], so
> that i can decide at runtime, which version i want to use?
no way!
a request for 2 different objects so that you "can decide at runtime" is
a contradiction, isn't it?
the best way would of course be to correctly detect the colospace of the
device and do any conversions if necessary.
the second best way would be to provide a switch.
the worst way would be [pix_video_pwc], [pix_video_hauppauge] and
[pix_video_sony].
> thanks for any hints
try to find out what the "vmmap[frame].format" gets for the 2 cards
after the ioctl() (in videoV4L::startTransfer())
mfg.asdr.
IOhannes
More information about the GEM-dev
mailing list