All of lore.kernel.org
 help / color / mirror / Atom feed
* V4L1: what's the meaning of video_window.chromakey?
@ 2008-12-24 14:07 Stefano Sabatini
  2008-12-24 19:56 ` Alan Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Stefano Sabatini @ 2008-12-24 14:07 UTC (permalink / raw)
  To: video4linux-list Mailing List

Hi all,

I'm reading/studying the code of a V4L1 application and I need to
understand the meaning of the video_window.chromakey field.

Official docs:
http://www.linuxtv.org/downloads/video4linux/API/V4L1_API.html

are not particularly exhaustive, so I'm falling back to request your
help here.

As far as I understood it, the video_window.chromakey field is used
only if video_capability.type & VID_TYPE_CHROMAKEY is true, and the
video_window.chromakey value (an RGB32 value, with the first byte set
to an undefined value) is set with the VIDIOCSWIN ioctl.

My guess is that V4L is using the simplest possible chromakeying
algorithm, so that it copies each pixel from the capture buffer to
the destination buffer with a value different from
video_window.chromakey.

Setting:
video_window.chromakey = -1; // the same as 0xffffffff

for example should copy all the pixels with a value different from
0xXXffffff to the destination buffer.

I wonder if this is the correct interpretation, and if the
chromakeying capability (if supported) can be disabled.

Many thanks in advance.

Regards.

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: V4L1: what's the meaning of video_window.chromakey?
  2008-12-24 14:07 V4L1: what's the meaning of video_window.chromakey? Stefano Sabatini
@ 2008-12-24 19:56 ` Alan Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2008-12-24 19:56 UTC (permalink / raw)
  To: video4linux-list Mailing List

On Wed, Dec 24, 2008 at 03:07:06PM +0100, Stefano Sabatini wrote:
> My guess is that V4L is using the simplest possible chromakeying
> algorithm, so that it copies each pixel from the capture buffer to
> the destination buffer with a value different from
> video_window.chromakey.

Chroma key is supported just for hardware that does it. Mostly old ISA hardware
could do chromakey overlay but nothing else. I think the PMS is the only card
with V4L1 one support that ever had chromakey in a production kernel.

Its also analogue side chromakey so "kind of the same shade as" rather than
24bit match.

Alan

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-12-24 19:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-24 14:07 V4L1: what's the meaning of video_window.chromakey? Stefano Sabatini
2008-12-24 19:56 ` Alan Cox

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.