Re: [RFC][PATCH] v4l2: Add other RAW Bayer 10bit component orders

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 13 Aug 2009, Aguirre Rodriguez, Sergio Alberto wrote:

> From: Sergio Aguirre <saaguirre@xxxxxx>
> 
> This helps clarifying different pattern orders for RAW Bayer 10 bit
> cases.
> 
> Signed-off-by: Sergio Aguirre <saaguirre@xxxxxx>
> ---
>  include/linux/videodev2.h |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 9e66c50..8aa6255 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -327,6 +327,9 @@ struct v4l2_pix_format {
>  #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')
>  /* 10bit raw bayer DPCM compressed to 8 bits */
>  #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
> +#define V4L2_PIX_FMT_SRGGB10 v4l2_fourcc('R', 'G', '1', '0')
> +#define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0')
> +#define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0')
>  #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16  BGBG.. GRGR.. */

To be honest, I don't have a clear picture of all available fourcc formats 
and what exactly they mean, including Bayer codes. But - I suspect, these 
are uncompressed formats, right? i.e., also extended to 16 bits? So, 
shouldn't your additional formats go a couple lines higher in the file 
after

/*
 * 10bit raw bayer, expanded to 16 bits
 * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
 */
#define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0')

And besides, the above comment seems not quite correct - there should be 6 
'x' bits in each colour instead of 4, shouldn't there? You might want to 
fix this while at it. And also please comment your formats with colour 
order, however "obvious" they are:-)

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux