From: Hans de Goede <hdegoede@redhat.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>,
Hans Verkuil <hverkuil@xs4all.nl>,
Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: ABI breakage due to "Unsupported formats in TRY_FMT/S_FMT" recommendation
Date: Sun, 30 Dec 2012 10:27:48 +0100 [thread overview]
Message-ID: <50E00914.2090908@redhat.com> (raw)
In-Reply-To: <20121229183224.349c9cf3@redhat.com>
Hi,
On 12/29/2012 09:32 PM, Mauro Carvalho Chehab wrote:
> Agreed. Adding YUYV support at libv4l should be easy.
Make that easy-ish. There is the easy and the hardway, the easy way
is to add an extra conversion step and then convert yuv420 to yuyv, but
TBH that is a stupid thing to do, it potentially looses video resolution
in the u and v planes and it is just not very cpu effective.
So the right thing to do is to go over all the rawXXX -> rgb + rawXXX ->
yuv420 converter function pairs, and add a rawXXX -> yuyv function to them
for all supported src formats.
<snip>
> Applications that use libv4l will do whatever behavior libv4l does.
libv4l has 3 different scenarios here:
1) The app is asking for a format libv4l does not support (iow not rgb24
or yuv420), and the video device only supports some proprietary format
(ie many gspca webcams), then libv4l will change the requested format to
RGB24, do a try_fmt to the device to get closest width/height and returns
that. So in this scenario it behaves as Hans V. has suggested.
2) The app is asking for a format libv4l does not support and the device
supports one or more standard formats, then libv4l simple passes
on the try_fmt to the device, and returns whatever it returns. This is
what will happen with most tv-cards, so using libv4l won't help here!
3) The app is asking for a format that libv4l does support, then libv4l
negotiates with the device to find the best src format to convert from.
libv4l's negotation code will check both the try_fmt return value, as
well as that the resulting format is what it asked for. So it does not
care either way...
Regards,
Hans
next prev parent reply other threads:[~2012-12-30 9:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 19:52 ABI breakage due to "Unsupported formats in TRY_FMT/S_FMT" recommendation Devin Heitmueller
2012-12-29 0:27 ` Mauro Carvalho Chehab
2012-12-29 11:53 ` Hans Verkuil
2012-12-29 14:23 ` Mauro Carvalho Chehab
2012-12-29 14:58 ` Mauro Carvalho Chehab
2012-12-29 19:52 ` Devin Heitmueller
2012-12-29 20:32 ` Mauro Carvalho Chehab
2012-12-30 9:27 ` Hans de Goede [this message]
2012-12-29 17:39 ` Devin Heitmueller
2012-12-29 20:00 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50E00914.2090908@redhat.com \
--to=hdegoede@redhat.com \
--cc=dheitmueller@kernellabs.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).