RE: [PATCH v4 2/2] v4l2: add new pixel formats supported on dm365

2012-07-17 Thread Hadli, Manjunath
Hi Laurent,

On Tue, Jul 17, 2012 at 16:29:44, Laurent Pinchart wrote:
> Hi Manjunath,
> 
> Thank you for the patch.
> 
> A couple of comments below.
> 
> On Friday 30 March 2012 10:09:14 Hadli, Manjunath wrote:
> > add new macro V4L2_PIX_FMT_SGRBG10ALAW8 and associated formats
> > to represent Bayer format frames compressed by A-LAW algorithm,
> > add V4L2_PIX_FMT_UV8 to represent storage of CbCr data (UV interleaved)
> > only.
> > 
> > Signed-off-by: Manjunath Hadli 
> > Cc: Laurent Pinchart 
> > Cc: Sakari Ailus 
> > Cc: Hans Verkuil 
> > ---
> >  .../DocBook/media/v4l/pixfmt-srggb10alaw8.xml  |   34 +++
> >  Documentation/DocBook/media/v4l/pixfmt-uv8.xml |   62
> >  Documentation/DocBook/media/v4l/pixfmt.xml |  
> >  2 +
> >  include/linux/videodev2.h  |8 +++
> >  4 files changed, 106 insertions(+), 0 deletions(-)
> >  create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
> >  create mode 100644 Documentation/DocBook/media/v4l/pixfmt-uv8.xml
> > 
> > diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
> > b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml new file mode
> > 100644
> > index 000..9b5c80d
> > --- /dev/null
> > +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
> > @@ -0,0 +1,34 @@
> > +   
> > + 
> > +   
> > + V4L2_PIX_FMT_SRGGB10ALAW8 ('aRA8'),
> > + V4L2_PIX_FMT_SGRBG10ALAW8 ('agA8'),
> > + V4L2_PIX_FMT_SGBRG10ALAW8 ('aGA8'),
> > + V4L2_PIX_FMT_SBGGR10ALAW8 ('aBA8'),
> > +   
> > +   &manvol;
> > + 
> > + 
> > +   
> > + V4L2_PIX_FMT_SRGGB10ALAW8
> > +   
> > +   
> > + V4L2_PIX_FMT_SGRBG10ALAW8
> > +   
> > +   
> > + V4L2_PIX_FMT_SGBRG10ALAW8
> > +   
> > +   
> > + V4L2_PIX_FMT_SBGGR10ALAW8
> > +   
> > +   10-bit Bayer formats compressed to 8 bits
> > + 
> > + 
> > +   Description
> > +   The following four pixel formats are raw sRGB / Bayer
> > +   formats with 10 bits per colour compressed to 8 bits each,
> > +   using the A-LAW algorithm. Each colour component consumes 8
> > +   bits of memory. In other respects this format is similar to
> > +   .
> > + 
> > +   
> > diff --git a/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
> > b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml new file mode 100644
> > index 000..c507c1f
> > --- /dev/null
> > +++ b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
> > @@ -0,0 +1,62 @@
> > +   
> > + 
> > +   V4L2_PIX_FMT_UV8  ('UV8')
> > +   &manvol;
> > + 
> > + 
> > +   V4L2_PIX_FMT_UV8
> > +   UV plane interleaved
> > + 
> > + 
> > +   Description
> > +   In this format there is no Y plane, Only CbCr plane. ie
> > +   (UV interleaved)
> > +   
> > +   
> > + V4L2_PIX_FMT_UV8
> > +  pixel image
> > +   
> > +
> > +   
> > + Byte Order.
> > + Each cell is one byte.
> > +   
> > +   
> > + 
> > + 
> > +   
> > + start + 0:
> > + Cb00
> > + Cr00
> > + Cb01
> > + Cr01
> > +   
> > +   
> > + start + 4:
> > + Cb10
> > + Cr10
> > + Cb11
> > + Cr11
> > +   
> > +   
> > + start + 8:
> > + Cb20
> > + Cr20
> > + Cb21
> > + Cr21
> > +   
> > +   
> > + start + 12:
> > + Cb30
> > + Cr30
> > + Cb31
> > + Cr31
> > +   
> > + 
> > +   
> > +   
> > + 
> > + 
> > +   
> > + 
> > +   
> > diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml
> > b/Documentation/DocBook/media/v4l/pixfmt.xml index 74d4fcd..9dc3024 100644
> > --- a/Documentation/DocBook/media/v4l/pixfmt.xml
> > +++ b/Documentation/DocBook/media/v4l/pixfmt.xml
> > @@ -674,6 +674,7 @@ access the palette, this must be done with ioctls of the
> > Linux framebuffer API.< &sub-sbggr16;
> >  &sub-srggb10;
> >  &sub-srggb10dpcm8;
> > +&sub-srggb10alaw8;
> 
> Please move the ALAW formats above the DPCM formats to keep them 
> alphabetically sorted.
> 
  Ok.

> >  &sub-srggb12;
> >
> > 
> > @@ -701,6 +702,7 @@ information.
> >  &sub-y12;
> >  &sub-y10b;
> >  &sub-y16;
> > +&sub-uv8;
> >  &sub-yuyv;
> >  &sub-uyvy;
> >  &sub-yvyu;
> > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > index dbc0d77..71f9f94 100644
> > --- a/include/linux/videodev2.h
> > +++ b/include/linux/videodev2.h
> > @@ -328,6 +328,9 @@ struct v4l2_pix_format {
> >  /* Palette formats *

Re: [PATCH v4 2/2] v4l2: add new pixel formats supported on dm365

2012-07-17 Thread Laurent Pinchart
Hi Manjunath,

Thank you for the patch.

A couple of comments below.

On Friday 30 March 2012 10:09:14 Hadli, Manjunath wrote:
> add new macro V4L2_PIX_FMT_SGRBG10ALAW8 and associated formats
> to represent Bayer format frames compressed by A-LAW algorithm,
> add V4L2_PIX_FMT_UV8 to represent storage of CbCr data (UV interleaved)
> only.
> 
> Signed-off-by: Manjunath Hadli 
> Cc: Laurent Pinchart 
> Cc: Sakari Ailus 
> Cc: Hans Verkuil 
> ---
>  .../DocBook/media/v4l/pixfmt-srggb10alaw8.xml  |   34 +++
>  Documentation/DocBook/media/v4l/pixfmt-uv8.xml |   62
>  Documentation/DocBook/media/v4l/pixfmt.xml |  
>  2 +
>  include/linux/videodev2.h  |8 +++
>  4 files changed, 106 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
>  create mode 100644 Documentation/DocBook/media/v4l/pixfmt-uv8.xml
> 
> diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
> b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml new file mode
> 100644
> index 000..9b5c80d
> --- /dev/null
> +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml
> @@ -0,0 +1,34 @@
> + 
> +   
> + 
> +   V4L2_PIX_FMT_SRGGB10ALAW8 ('aRA8'),
> +   V4L2_PIX_FMT_SGRBG10ALAW8 ('agA8'),
> +   V4L2_PIX_FMT_SGBRG10ALAW8 ('aGA8'),
> +   V4L2_PIX_FMT_SBGGR10ALAW8 ('aBA8'),
> + 
> + &manvol;
> +   
> +   
> + 
> +   V4L2_PIX_FMT_SRGGB10ALAW8
> + 
> + 
> +   V4L2_PIX_FMT_SGRBG10ALAW8
> + 
> + 
> +   V4L2_PIX_FMT_SGBRG10ALAW8
> + 
> + 
> +   V4L2_PIX_FMT_SBGGR10ALAW8
> + 
> + 10-bit Bayer formats compressed to 8 bits
> +   
> +   
> + Description
> + The following four pixel formats are raw sRGB / Bayer
> + formats with 10 bits per colour compressed to 8 bits each,
> + using the A-LAW algorithm. Each colour component consumes 8
> + bits of memory. In other respects this format is similar to
> + .
> +   
> + 
> diff --git a/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
> b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml new file mode 100644
> index 000..c507c1f
> --- /dev/null
> +++ b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml
> @@ -0,0 +1,62 @@
> + 
> +   
> + V4L2_PIX_FMT_UV8  ('UV8')
> + &manvol;
> +   
> +   
> + V4L2_PIX_FMT_UV8
> + UV plane interleaved
> +   
> +   
> + Description
> + In this format there is no Y plane, Only CbCr plane. ie
> + (UV interleaved)
> + 
> + 
> +   V4L2_PIX_FMT_UV8
> +pixel image
> + 
> +
> + 
> +   Byte Order.
> +   Each cell is one byte.
> + 
> + 
> +   
> +   
> + 
> +   start + 0:
> +   Cb00
> +   Cr00
> +   Cb01
> +   Cr01
> + 
> + 
> +   start + 4:
> +   Cb10
> +   Cr10
> +   Cb11
> +   Cr11
> + 
> + 
> +   start + 8:
> +   Cb20
> +   Cr20
> +   Cb21
> +   Cr21
> + 
> + 
> +   start + 12:
> +   Cb30
> +   Cr30
> +   Cb31
> +   Cr31
> + 
> +   
> + 
> + 
> +   
> +   
> + 
> +   
> + 
> diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml
> b/Documentation/DocBook/media/v4l/pixfmt.xml index 74d4fcd..9dc3024 100644
> --- a/Documentation/DocBook/media/v4l/pixfmt.xml
> +++ b/Documentation/DocBook/media/v4l/pixfmt.xml
> @@ -674,6 +674,7 @@ access the palette, this must be done with ioctls of the
> Linux framebuffer API.< &sub-sbggr16;
>  &sub-srggb10;
>  &sub-srggb10dpcm8;
> +&sub-srggb10alaw8;

Please move the ALAW formats above the DPCM formats to keep them 
alphabetically sorted.

>  &sub-srggb12;
>
> 
> @@ -701,6 +702,7 @@ information.
>  &sub-y12;
>  &sub-y10b;
>  &sub-y16;
> +&sub-uv8;
>  &sub-yuyv;
>  &sub-uyvy;
>  &sub-yvyu;
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index dbc0d77..71f9f94 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -328,6 +328,9 @@ struct v4l2_pix_format {
>  /* Palette formats */
>  #define V4L2_PIX_FMT_PAL8v4l2_fourcc('P', 'A', 'L', '8') /*  8  8-bit
> palette */
> 
> +/* Chrominance formats */
> +#define V4L2_PIX_FMT_UV8  v4l2_fourcc('U', 'V', '8', ' ') /*  8  UV 4:4
> */ +
>  /* Lu