* [PATCH] libv4lconvert: add support for new pixelformats
@ 2014-07-17 22:27 Hans Verkuil
2014-07-18 10:01 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Hans Verkuil @ 2014-07-17 22:27 UTC (permalink / raw)
To: Linux Media Mailing List, Hans de Goede
Support for alpha-channel aware pixelformats was added. Recognize those formats
in libv4lconvert.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c
index 7ee7c19..cea65aa 100644
--- a/lib/libv4lconvert/libv4lconvert.c
+++ b/lib/libv4lconvert/libv4lconvert.c
@@ -86,6 +86,10 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = {
{ V4L2_PIX_FMT_RGB565, 16, 4, 6, 0 },
{ V4L2_PIX_FMT_BGR32, 32, 4, 6, 0 },
{ V4L2_PIX_FMT_RGB32, 32, 4, 6, 0 },
+ { V4L2_PIX_FMT_XBGR32, 32, 4, 6, 0 },
+ { V4L2_PIX_FMT_XRGB32, 32, 4, 6, 0 },
+ { V4L2_PIX_FMT_ABGR32, 32, 4, 6, 0 },
+ { V4L2_PIX_FMT_ARGB32, 32, 4, 6, 0 },
/* yuv 4:2:2 formats */
{ V4L2_PIX_FMT_YUYV, 16, 5, 4, 0 },
{ V4L2_PIX_FMT_YVYU, 16, 5, 4, 0 },
@@ -1121,6 +1125,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
break;
case V4L2_PIX_FMT_RGB32:
+ case V4L2_PIX_FMT_XRGB32:
+ case V4L2_PIX_FMT_ARGB32:
if (src_size < (width * height * 4)) {
V4LCONVERT_ERR("short rgb32 data frame\n");
errno = EPIPE;
@@ -1143,6 +1149,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
break;
case V4L2_PIX_FMT_BGR32:
+ case V4L2_PIX_FMT_XBGR32:
+ case V4L2_PIX_FMT_ABGR32:
if (src_size < (width * height * 4)) {
V4LCONVERT_ERR("short bgr32 data frame\n");
errno = EPIPE;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libv4lconvert: add support for new pixelformats
2014-07-17 22:27 [PATCH] libv4lconvert: add support for new pixelformats Hans Verkuil
@ 2014-07-18 10:01 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2014-07-18 10:01 UTC (permalink / raw)
To: Hans Verkuil, Linux Media Mailing List
Hi,
On 07/18/2014 12:27 AM, Hans Verkuil wrote:
> Support for alpha-channel aware pixelformats was added. Recognize those formats
> in libv4lconvert.
>
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Looks good:
Acked-by: Hans de Goede <hdegoede@redhat.com>
Feel free to push.
Regards,
Hans
>
> diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c
> index 7ee7c19..cea65aa 100644
> --- a/lib/libv4lconvert/libv4lconvert.c
> +++ b/lib/libv4lconvert/libv4lconvert.c
> @@ -86,6 +86,10 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = {
> { V4L2_PIX_FMT_RGB565, 16, 4, 6, 0 },
> { V4L2_PIX_FMT_BGR32, 32, 4, 6, 0 },
> { V4L2_PIX_FMT_RGB32, 32, 4, 6, 0 },
> + { V4L2_PIX_FMT_XBGR32, 32, 4, 6, 0 },
> + { V4L2_PIX_FMT_XRGB32, 32, 4, 6, 0 },
> + { V4L2_PIX_FMT_ABGR32, 32, 4, 6, 0 },
> + { V4L2_PIX_FMT_ARGB32, 32, 4, 6, 0 },
> /* yuv 4:2:2 formats */
> { V4L2_PIX_FMT_YUYV, 16, 5, 4, 0 },
> { V4L2_PIX_FMT_YVYU, 16, 5, 4, 0 },
> @@ -1121,6 +1125,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
> break;
>
> case V4L2_PIX_FMT_RGB32:
> + case V4L2_PIX_FMT_XRGB32:
> + case V4L2_PIX_FMT_ARGB32:
> if (src_size < (width * height * 4)) {
> V4LCONVERT_ERR("short rgb32 data frame\n");
> errno = EPIPE;
> @@ -1143,6 +1149,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data,
> break;
>
> case V4L2_PIX_FMT_BGR32:
> + case V4L2_PIX_FMT_XBGR32:
> + case V4L2_PIX_FMT_ABGR32:
> if (src_size < (width * height * 4)) {
> V4LCONVERT_ERR("short bgr32 data frame\n");
> errno = EPIPE;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-18 10:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-17 22:27 [PATCH] libv4lconvert: add support for new pixelformats Hans Verkuil
2014-07-18 10:01 ` Hans de Goede
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.