Message ID | A24693684029E5489D1D202277BE89444A7839B7@dlee02.ent.ti.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
> -----Original Message----- > From: linux-media-owner@vger.kernel.org [mailto:linux-media- > owner@vger.kernel.org] On Behalf Of Aguirre Rodriguez, Sergio Alberto > Sent: Thursday, August 13, 2009 1:51 PM > To: linux-media@vger.kernel.org > Subject: [RFC][PATCH] v4l2: Add other RAW Bayer 10bit component orders > > From: Sergio Aguirre <saaguirre@ti.com> > > This helps clarifying different pattern orders for RAW Bayer 10 bit > cases. My intention with this patch is to help sensor drivers letting know the userspace (or a v4l2_device master) the exact order of components a sensor is outputting... Please share your comments/thoughts/kicks :) Regards, Sergio > > Signed-off-by: Sergio Aguirre <saaguirre@ti.com> > --- > 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.. */ > > /* compressed formats */ > -- > 1.6.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, 13 Aug 2009, Aguirre Rodriguez, Sergio Alberto wrote: > From: Sergio Aguirre <saaguirre@ti.com> > > This helps clarifying different pattern orders for RAW Bayer 10 bit > cases. > > Signed-off-by: Sergio Aguirre <saaguirre@ti.com> > --- > 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thursday 13 August 2009 20:58:59 Aguirre Rodriguez, Sergio Alberto wrote: > > > -----Original Message----- > > From: linux-media-owner@vger.kernel.org [mailto:linux-media- > > owner@vger.kernel.org] On Behalf Of Aguirre Rodriguez, Sergio Alberto > > Sent: Thursday, August 13, 2009 1:51 PM > > To: linux-media@vger.kernel.org > > Subject: [RFC][PATCH] v4l2: Add other RAW Bayer 10bit component orders > > > > From: Sergio Aguirre <saaguirre@ti.com> > > > > This helps clarifying different pattern orders for RAW Bayer 10 bit > > cases. > > My intention with this patch is to help sensor drivers letting know the userspace (or a v4l2_device master) the exact order of components a sensor is outputting... > > Please share your comments/thoughts/kicks :) Adding new pixel formats require that the v4l2-spec is also updated, otherwise it will fail to build. It may be a good idea anyway to document these formats there. Regards, Hans > > Regards, > Sergio > > > > Signed-off-by: Sergio Aguirre <saaguirre@ti.com> > > --- > > 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.. */ > > > > /* compressed formats */ > > -- > > 1.6.3.2 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-media" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >
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.. */ /* compressed formats */