* [PATCH] libv4lconvert: Fix support for Y16 pixel format
@ 2015-03-26 16:17 Ricardo Ribalda Delgado
2015-03-27 13:42 ` Hans de Goede
0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Ribalda Delgado @ 2015-03-26 16:17 UTC (permalink / raw)
To: Hans de Goede, Gregor Jasny, linux-media; +Cc: Ricardo Ribalda Delgado
Y16 is a little-endian format. The original implementation assumed that
it was big-endian.
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
---
lib/libv4lconvert/rgbyuv.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lib/libv4lconvert/rgbyuv.c b/lib/libv4lconvert/rgbyuv.c
index 0f30192..75c42aa 100644
--- a/lib/libv4lconvert/rgbyuv.c
+++ b/lib/libv4lconvert/rgbyuv.c
@@ -591,6 +591,9 @@ void v4lconvert_y16_to_rgb24(const unsigned char *src, unsigned char *dest,
int width, int height)
{
int j;
+
+ src++; /*Y16 is little endian*/
+
while (--height >= 0) {
for (j = 0; j < width; j++) {
*dest++ = *src;
@@ -606,6 +609,8 @@ void v4lconvert_y16_to_yuv420(const unsigned char *src, unsigned char *dest,
{
int x, y;
+ src++; /*Y16 is little endian*/
+
/* Y */
for (y = 0; y < src_fmt->fmt.pix.height; y++)
for (x = 0; x < src_fmt->fmt.pix.width; x++){
--
2.1.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libv4lconvert: Fix support for Y16 pixel format
2015-03-26 16:17 [PATCH] libv4lconvert: Fix support for Y16 pixel format Ricardo Ribalda Delgado
@ 2015-03-27 13:42 ` Hans de Goede
0 siblings, 0 replies; 2+ messages in thread
From: Hans de Goede @ 2015-03-27 13:42 UTC (permalink / raw)
To: Ricardo Ribalda Delgado, Gregor Jasny, linux-media
Hi,
On 26-03-15 17:17, Ricardo Ribalda Delgado wrote:
> Y16 is a little-endian format. The original implementation assumed that
> it was big-endian.
>
> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Thanks merged upstream, both into master and stable-1.6 branches.
Regards,
Hans
> ---
> lib/libv4lconvert/rgbyuv.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/libv4lconvert/rgbyuv.c b/lib/libv4lconvert/rgbyuv.c
> index 0f30192..75c42aa 100644
> --- a/lib/libv4lconvert/rgbyuv.c
> +++ b/lib/libv4lconvert/rgbyuv.c
> @@ -591,6 +591,9 @@ void v4lconvert_y16_to_rgb24(const unsigned char *src, unsigned char *dest,
> int width, int height)
> {
> int j;
> +
> + src++; /*Y16 is little endian*/
> +
> while (--height >= 0) {
> for (j = 0; j < width; j++) {
> *dest++ = *src;
> @@ -606,6 +609,8 @@ void v4lconvert_y16_to_yuv420(const unsigned char *src, unsigned char *dest,
> {
> int x, y;
>
> + src++; /*Y16 is little endian*/
> +
> /* Y */
> for (y = 0; y < src_fmt->fmt.pix.height; y++)
> for (x = 0; x < src_fmt->fmt.pix.width; x++){
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-27 13:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-26 16:17 [PATCH] libv4lconvert: Fix support for Y16 pixel format Ricardo Ribalda Delgado
2015-03-27 13:42 ` 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.