public inbox for linux-media@vger.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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox