Re: [PATCH v2 01/23] v4l: Add ARGB and XRGB pixel formats

2014-07-18 Thread Laurent Pinchart
Hi Hans,

On Thursday 17 July 2014 23:53:52 Hans Verkuil wrote:
 Hi Laurent,
 
 While implementing support for this in v4l-utils I discovered you missed
 one:

 On 06/24/2014 01:54 AM, Laurent Pinchart wrote:
  From: Laurent Pinchart laurent.pinch...@ideasonboard.com
  
  The existing RGB pixel formats are ill-defined in respect to their alpha
  bits and their meaning is driver dependent. Create new standard ARGB and
  XRGB variants with clearly defined meanings and make the existing
  variants deprecated.
  
  The new pixel formats 4CC values have been selected to match the DRM
  4CCs for the same in-memory formats.
  
  Signed-off-by: Laurent Pinchart
  laurent.pinchart+rene...@ideasonboard.com
  ---
  
   .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 415 +++-
   include/uapi/linux/videodev2.h |   8 +
   2 files changed, 403 insertions(+), 20 deletions(-)
  
  diff --git a/include/uapi/linux/videodev2.h
  b/include/uapi/linux/videodev2.h index 168ff50..0125f4d 100644
  --- a/include/uapi/linux/videodev2.h
  +++ b/include/uapi/linux/videodev2.h
  @@ -294,7 +294,11 @@ struct v4l2_pix_format {
  
   /* RGB formats */
   #define V4L2_PIX_FMT_RGB332  v4l2_fourcc('R', 'G', 'B', '1') /*  8 
   RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB444  v4l2_fourcc('R', '4', '4',
   '4') /* 16    */ 
  +#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 
    */ +#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R',
  '1', '2') /* 16    */ 
   #define V4L2_PIX_FMT_RGB555  v4l2_fourcc('R', 'G', 'B', 'O') /* 16 
   RGB-5-5-5 */ 
  +#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 
  ARGB-1-5-5-5  */ +#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1',
  '5') /* 16  XRGB-1-5-5-5  */ 
   #define V4L2_PIX_FMT_RGB565  v4l2_fourcc('R', 'G', 'B', 'P') /* 16 
   RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B',
   'Q') /* 16  RGB-5-5-5 BE  */

 A+X variants should also be added for this RGB555X pix format.

Agreed. The reason I've left it out is that I don't use it in my driver, and 
we have this policy of only adding FOURCCs for formats actively in use. Would 
you still like me to add it ?

   #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 
   RGB-5-6-5 BE  */ 
  @@ -302,7 +306,11 @@ struct v4l2_pix_format {
  
   #define V4L2_PIX_FMT_BGR24   v4l2_fourcc('B', 'G', 'R', '3') /* 24 
   BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24   v4l2_fourcc('R', 'G', 'B',
   '3') /* 24  RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32  
   v4l2_fourcc('B', 'G', 'R', '4') /* 32  BGR-8-8-8-8   */ 
  +#define V4L2_PIX_FMT_ABGR32  v4l2_fourcc('A', 'R', '2', '4') /* 32 
  BGRA-8-8-8-8  */ +#define V4L2_PIX_FMT_XBGR32  v4l2_fourcc('X', 'R', '2',
  '4') /* 32  BGRX-8-8-8-8  */ 
   #define V4L2_PIX_FMT_RGB32   v4l2_fourcc('R', 'G', 'B', '4') /* 32 
   RGB-8-8-8-8   */ 
  +#define V4L2_PIX_FMT_ARGB32  v4l2_fourcc('B', 'A', '2', '4') /* 32 
  ARGB-8-8-8-8  */ +#define V4L2_PIX_FMT_XRGB32  v4l2_fourcc('B', 'X', '2',
  '4') /* 32  XRGB-8-8-8-8  */ 
   /* Grey formats */
   #define V4L2_PIX_FMT_GREYv4l2_fourcc('G', 'R', 'E', 'Y') /*  8 
   Greyscale */

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/23] v4l: Add ARGB and XRGB pixel formats

2014-07-18 Thread Hans Verkuil
On 07/18/2014 03:14 PM, Hans Verkuil wrote:
 On 07/18/2014 02:31 PM, Laurent Pinchart wrote:
 Hi Hans,

 On Thursday 17 July 2014 23:53:52 Hans Verkuil wrote:
 Hi Laurent,

 While implementing support for this in v4l-utils I discovered you missed
 one:

 On 06/24/2014 01:54 AM, Laurent Pinchart wrote:
 From: Laurent Pinchart laurent.pinch...@ideasonboard.com

 The existing RGB pixel formats are ill-defined in respect to their alpha
 bits and their meaning is driver dependent. Create new standard ARGB and
 XRGB variants with clearly defined meanings and make the existing
 variants deprecated.

 The new pixel formats 4CC values have been selected to match the DRM
 4CCs for the same in-memory formats.

 Signed-off-by: Laurent Pinchart
 laurent.pinchart+rene...@ideasonboard.com
 ---

  .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 415 +++-
  include/uapi/linux/videodev2.h |   8 +
  2 files changed, 403 insertions(+), 20 deletions(-)

 diff --git a/include/uapi/linux/videodev2.h
 b/include/uapi/linux/videodev2.h index 168ff50..0125f4d 100644
 --- a/include/uapi/linux/videodev2.h
 +++ b/include/uapi/linux/videodev2.h
 @@ -294,7 +294,11 @@ struct v4l2_pix_format {

  /* RGB formats */
  #define V4L2_PIX_FMT_RGB332  v4l2_fourcc('R', 'G', 'B', '1') /*  8 
  RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB444  v4l2_fourcc('R', '4', '4',
  '4') /* 16    */ 
 +#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 
   */ +#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R',
 '1', '2') /* 16    */ 
  #define V4L2_PIX_FMT_RGB555  v4l2_fourcc('R', 'G', 'B', 'O') /* 16 
  RGB-5-5-5 */ 
 +#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 
 ARGB-1-5-5-5  */ +#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1',
 '5') /* 16  XRGB-1-5-5-5  */ 
  #define V4L2_PIX_FMT_RGB565  v4l2_fourcc('R', 'G', 'B', 'P') /* 16 
  RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B',
  'Q') /* 16  RGB-5-5-5 BE  */

 A+X variants should also be added for this RGB555X pix format.

 Agreed. The reason I've left it out is that I don't use it in my driver, and 
 we have this policy of only adding FOURCCs for formats actively in use. 
 Would 
 you still like me to add it ?
 
 Yes please, let's not leave the odd one out. It's supported by vivi for
 example, and qv4l2 supports it as well.

I see there is a BGR666 as well. But I suspect that is better defined and is
almost certainly without an alpha channel. The spec should be updated to
reflect that (by using '-' to signify that that bit is unused).

Regards,

Hans

 
 Regards,
 
   Hans
 

  #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 
  RGB-5-6-5 BE  */ 
 @@ -302,7 +306,11 @@ struct v4l2_pix_format {

  #define V4L2_PIX_FMT_BGR24   v4l2_fourcc('B', 'G', 'R', '3') /* 24 
  BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24   v4l2_fourcc('R', 'G', 'B',
  '3') /* 24  RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32  
  v4l2_fourcc('B', 'G', 'R', '4') /* 32  BGR-8-8-8-8   */ 
 +#define V4L2_PIX_FMT_ABGR32  v4l2_fourcc('A', 'R', '2', '4') /* 32 
 BGRA-8-8-8-8  */ +#define V4L2_PIX_FMT_XBGR32  v4l2_fourcc('X', 'R', '2',
 '4') /* 32  BGRX-8-8-8-8  */ 
  #define V4L2_PIX_FMT_RGB32   v4l2_fourcc('R', 'G', 'B', '4') /* 32 
  RGB-8-8-8-8   */ 
 +#define V4L2_PIX_FMT_ARGB32  v4l2_fourcc('B', 'A', '2', '4') /* 32 
 ARGB-8-8-8-8  */ +#define V4L2_PIX_FMT_XRGB32  v4l2_fourcc('B', 'X', '2',
 '4') /* 32  XRGB-8-8-8-8  */ 
  /* Grey formats */
  #define V4L2_PIX_FMT_GREYv4l2_fourcc('G', 'R', 'E', 'Y') /*  8 
  Greyscale */

 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/23] v4l: Add ARGB and XRGB pixel formats

2014-07-18 Thread Hans Verkuil
On 07/18/2014 02:31 PM, Laurent Pinchart wrote:
 Hi Hans,
 
 On Thursday 17 July 2014 23:53:52 Hans Verkuil wrote:
 Hi Laurent,

 While implementing support for this in v4l-utils I discovered you missed
 one:

 On 06/24/2014 01:54 AM, Laurent Pinchart wrote:
 From: Laurent Pinchart laurent.pinch...@ideasonboard.com

 The existing RGB pixel formats are ill-defined in respect to their alpha
 bits and their meaning is driver dependent. Create new standard ARGB and
 XRGB variants with clearly defined meanings and make the existing
 variants deprecated.

 The new pixel formats 4CC values have been selected to match the DRM
 4CCs for the same in-memory formats.

 Signed-off-by: Laurent Pinchart
 laurent.pinchart+rene...@ideasonboard.com
 ---

  .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 415 +++-
  include/uapi/linux/videodev2.h |   8 +
  2 files changed, 403 insertions(+), 20 deletions(-)

 diff --git a/include/uapi/linux/videodev2.h
 b/include/uapi/linux/videodev2.h index 168ff50..0125f4d 100644
 --- a/include/uapi/linux/videodev2.h
 +++ b/include/uapi/linux/videodev2.h
 @@ -294,7 +294,11 @@ struct v4l2_pix_format {

  /* RGB formats */
  #define V4L2_PIX_FMT_RGB332  v4l2_fourcc('R', 'G', 'B', '1') /*  8 
  RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB444  v4l2_fourcc('R', '4', '4',
  '4') /* 16    */ 
 +#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 
   */ +#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R',
 '1', '2') /* 16    */ 
  #define V4L2_PIX_FMT_RGB555  v4l2_fourcc('R', 'G', 'B', 'O') /* 16 
  RGB-5-5-5 */ 
 +#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 
 ARGB-1-5-5-5  */ +#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1',
 '5') /* 16  XRGB-1-5-5-5  */ 
  #define V4L2_PIX_FMT_RGB565  v4l2_fourcc('R', 'G', 'B', 'P') /* 16 
  RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B',
  'Q') /* 16  RGB-5-5-5 BE  */

 A+X variants should also be added for this RGB555X pix format.
 
 Agreed. The reason I've left it out is that I don't use it in my driver, and 
 we have this policy of only adding FOURCCs for formats actively in use. Would 
 you still like me to add it ?

Yes please, let's not leave the odd one out. It's supported by vivi for
example, and qv4l2 supports it as well.

Regards,

Hans

 
  #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 
  RGB-5-6-5 BE  */ 
 @@ -302,7 +306,11 @@ struct v4l2_pix_format {

  #define V4L2_PIX_FMT_BGR24   v4l2_fourcc('B', 'G', 'R', '3') /* 24 
  BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24   v4l2_fourcc('R', 'G', 'B',
  '3') /* 24  RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32  
  v4l2_fourcc('B', 'G', 'R', '4') /* 32  BGR-8-8-8-8   */ 
 +#define V4L2_PIX_FMT_ABGR32  v4l2_fourcc('A', 'R', '2', '4') /* 32 
 BGRA-8-8-8-8  */ +#define V4L2_PIX_FMT_XBGR32  v4l2_fourcc('X', 'R', '2',
 '4') /* 32  BGRX-8-8-8-8  */ 
  #define V4L2_PIX_FMT_RGB32   v4l2_fourcc('R', 'G', 'B', '4') /* 32 
  RGB-8-8-8-8   */ 
 +#define V4L2_PIX_FMT_ARGB32  v4l2_fourcc('B', 'A', '2', '4') /* 32 
 ARGB-8-8-8-8  */ +#define V4L2_PIX_FMT_XRGB32  v4l2_fourcc('B', 'X', '2',
 '4') /* 32  XRGB-8-8-8-8  */ 
  /* Grey formats */
  #define V4L2_PIX_FMT_GREYv4l2_fourcc('G', 'R', 'E', 'Y') /*  8 
  Greyscale */
 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/23] v4l: Add ARGB and XRGB pixel formats

2014-07-17 Thread Hans Verkuil
Hi Laurent,

While implementing support for this in v4l-utils I discovered you missed one:

On 06/24/2014 01:54 AM, Laurent Pinchart wrote:
 From: Laurent Pinchart laurent.pinch...@ideasonboard.com
 
 The existing RGB pixel formats are ill-defined in respect to their alpha
 bits and their meaning is driver dependent. Create new standard ARGB and
 XRGB variants with clearly defined meanings and make the existing
 variants deprecated.
 
 The new pixel formats 4CC values have been selected to match the DRM
 4CCs for the same in-memory formats.
 
 Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com
 ---
  .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 415 
 -
  include/uapi/linux/videodev2.h |   8 +
  2 files changed, 403 insertions(+), 20 deletions(-)
 
 diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
 index 168ff50..0125f4d 100644
 --- a/include/uapi/linux/videodev2.h
 +++ b/include/uapi/linux/videodev2.h
 @@ -294,7 +294,11 @@ struct v4l2_pix_format {
  /* RGB formats */
  #define V4L2_PIX_FMT_RGB332  v4l2_fourcc('R', 'G', 'B', '1') /*  8  
 RGB-3-3-2 */
  #define V4L2_PIX_FMT_RGB444  v4l2_fourcc('R', '4', '4', '4') /* 16   
  */
 +#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16   
  */
 +#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16   
  */
  #define V4L2_PIX_FMT_RGB555  v4l2_fourcc('R', 'G', 'B', 'O') /* 16  
 RGB-5-5-5 */
 +#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16  
 ARGB-1-5-5-5  */
 +#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16  
 XRGB-1-5-5-5  */
  #define V4L2_PIX_FMT_RGB565  v4l2_fourcc('R', 'G', 'B', 'P') /* 16  
 RGB-5-6-5 */
  #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16  
 RGB-5-5-5 BE  */

A+X variants should also be added for this RGB555X pix format.

Regards,

Hans

  #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16  
 RGB-5-6-5 BE  */
 @@ -302,7 +306,11 @@ struct v4l2_pix_format {
  #define V4L2_PIX_FMT_BGR24   v4l2_fourcc('B', 'G', 'R', '3') /* 24  
 BGR-8-8-8 */
  #define V4L2_PIX_FMT_RGB24   v4l2_fourcc('R', 'G', 'B', '3') /* 24  
 RGB-8-8-8 */
  #define V4L2_PIX_FMT_BGR32   v4l2_fourcc('B', 'G', 'R', '4') /* 32  
 BGR-8-8-8-8   */
 +#define V4L2_PIX_FMT_ABGR32  v4l2_fourcc('A', 'R', '2', '4') /* 32  
 BGRA-8-8-8-8  */
 +#define V4L2_PIX_FMT_XBGR32  v4l2_fourcc('X', 'R', '2', '4') /* 32  
 BGRX-8-8-8-8  */
  #define V4L2_PIX_FMT_RGB32   v4l2_fourcc('R', 'G', 'B', '4') /* 32  
 RGB-8-8-8-8   */
 +#define V4L2_PIX_FMT_ARGB32  v4l2_fourcc('B', 'A', '2', '4') /* 32  
 ARGB-8-8-8-8  */
 +#define V4L2_PIX_FMT_XRGB32  v4l2_fourcc('B', 'X', '2', '4') /* 32  
 XRGB-8-8-8-8  */
  
  /* Grey formats */
  #define V4L2_PIX_FMT_GREYv4l2_fourcc('G', 'R', 'E', 'Y') /*  8  
 Greyscale */
 

--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/23] v4l: Add ARGB and XRGB pixel formats

2014-06-27 Thread Hans Verkuil

Acked-by: Hans Verkuil hans.verk...@cisco.com

Regards,

Hans

On 06/24/2014 01:54 AM, Laurent Pinchart wrote:

From: Laurent Pinchart laurent.pinch...@ideasonboard.com

The existing RGB pixel formats are ill-defined in respect to their alpha
bits and their meaning is driver dependent. Create new standard ARGB and
XRGB variants with clearly defined meanings and make the existing
variants deprecated.

The new pixel formats 4CC values have been selected to match the DRM
4CCs for the same in-memory formats.

Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com
---
  .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 415 -
  include/uapi/linux/videodev2.h |   8 +
  2 files changed, 403 insertions(+), 20 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml 
b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
index e1c4f8b..5f1602f 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
@@ -130,9 +130,9 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para
entrybsubscript1/subscript/entry
entrybsubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-RGB444
-   entryconstantV4L2_PIX_FMT_RGB444/constant/entry
-   entry'R444'/entry
+ row id=V4L2-PIX-FMT-ARGB444
+   entryconstantV4L2_PIX_FMT_ARGB444/constant/entry
+   entry'AR12'/entry
entry/entry
entrygsubscript3/subscript/entry
entrygsubscript2/subscript/entry
@@ -152,9 +152,31 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entryrsubscript1/subscript/entry
entryrsubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-RGB555
-   entryconstantV4L2_PIX_FMT_RGB555/constant/entry
-   entry'RGBO'/entry
+ row id=V4L2-PIX-FMT-XRGB444
+   entryconstantV4L2_PIX_FMT_XRGB444/constant/entry
+   entry'XR12'/entry
+   entry/entry
+   entrygsubscript3/subscript/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry-/entry
+   entry-/entry
+   entry-/entry
+   entry-/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+ /row
+ row id=V4L2-PIX-FMT-ARGB555
+   entryconstantV4L2_PIX_FMT_ARGB555/constant/entry
+   entry'AR15'/entry
entry/entry
entrygsubscript2/subscript/entry
entrygsubscript1/subscript/entry
@@ -174,6 +196,28 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entrygsubscript4/subscript/entry
entrygsubscript3/subscript/entry
  /row
+ row id=V4L2-PIX-FMT-XRGB555
+   entryconstantV4L2_PIX_FMT_XRGB555/constant/entry
+   entry'XR15'/entry
+   entry/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript4/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry-/entry
+   entryrsubscript4/subscript/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+   entrygsubscript4/subscript/entry
+   entrygsubscript3/subscript/entry
+ /row
  row id=V4L2-PIX-FMT-RGB565
entryconstantV4L2_PIX_FMT_RGB565/constant/entry
entry'RGBP'/entry
@@ -341,9 +385,9 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para
entrybsubscript1/subscript/entry
entrybsubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-BGR32
-   entryconstantV4L2_PIX_FMT_BGR32/constant/entry
-   entry'BGR4'/entry
+ row id=V4L2-PIX-FMT-ABGR32
+   entryconstantV4L2_PIX_FMT_ABGR32/constant/entry
+   entry'AR24'/entry
entry/entry
entrybsubscript7/subscript/entry
entrybsubscript6/subscript/entry
@@ -381,9 +425,49 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entryasubscript1/subscript/entry
entryasubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-RGB32
-   

[PATCH v2 01/23] v4l: Add ARGB and XRGB pixel formats

2014-06-23 Thread Laurent Pinchart
From: Laurent Pinchart laurent.pinch...@ideasonboard.com

The existing RGB pixel formats are ill-defined in respect to their alpha
bits and their meaning is driver dependent. Create new standard ARGB and
XRGB variants with clearly defined meanings and make the existing
variants deprecated.

The new pixel formats 4CC values have been selected to match the DRM
4CCs for the same in-memory formats.

Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com
---
 .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 415 -
 include/uapi/linux/videodev2.h |   8 +
 2 files changed, 403 insertions(+), 20 deletions(-)

diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml 
b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
index e1c4f8b..5f1602f 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
@@ -130,9 +130,9 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para
entrybsubscript1/subscript/entry
entrybsubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-RGB444
-   entryconstantV4L2_PIX_FMT_RGB444/constant/entry
-   entry'R444'/entry
+ row id=V4L2-PIX-FMT-ARGB444
+   entryconstantV4L2_PIX_FMT_ARGB444/constant/entry
+   entry'AR12'/entry
entry/entry
entrygsubscript3/subscript/entry
entrygsubscript2/subscript/entry
@@ -152,9 +152,31 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entryrsubscript1/subscript/entry
entryrsubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-RGB555
-   entryconstantV4L2_PIX_FMT_RGB555/constant/entry
-   entry'RGBO'/entry
+ row id=V4L2-PIX-FMT-XRGB444
+   entryconstantV4L2_PIX_FMT_XRGB444/constant/entry
+   entry'XR12'/entry
+   entry/entry
+   entrygsubscript3/subscript/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry-/entry
+   entry-/entry
+   entry-/entry
+   entry-/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+ /row
+ row id=V4L2-PIX-FMT-ARGB555
+   entryconstantV4L2_PIX_FMT_ARGB555/constant/entry
+   entry'AR15'/entry
entry/entry
entrygsubscript2/subscript/entry
entrygsubscript1/subscript/entry
@@ -174,6 +196,28 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entrygsubscript4/subscript/entry
entrygsubscript3/subscript/entry
  /row
+ row id=V4L2-PIX-FMT-XRGB555
+   entryconstantV4L2_PIX_FMT_XRGB555/constant/entry
+   entry'XR15'/entry
+   entry/entry
+   entrygsubscript2/subscript/entry
+   entrygsubscript1/subscript/entry
+   entrygsubscript0/subscript/entry
+   entrybsubscript4/subscript/entry
+   entrybsubscript3/subscript/entry
+   entrybsubscript2/subscript/entry
+   entrybsubscript1/subscript/entry
+   entrybsubscript0/subscript/entry
+   entry/entry
+   entry-/entry
+   entryrsubscript4/subscript/entry
+   entryrsubscript3/subscript/entry
+   entryrsubscript2/subscript/entry
+   entryrsubscript1/subscript/entry
+   entryrsubscript0/subscript/entry
+   entrygsubscript4/subscript/entry
+   entrygsubscript3/subscript/entry
+ /row
  row id=V4L2-PIX-FMT-RGB565
entryconstantV4L2_PIX_FMT_RGB565/constant/entry
entry'RGBP'/entry
@@ -341,9 +385,9 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para
entrybsubscript1/subscript/entry
entrybsubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-BGR32
-   entryconstantV4L2_PIX_FMT_BGR32/constant/entry
-   entry'BGR4'/entry
+ row id=V4L2-PIX-FMT-ABGR32
+   entryconstantV4L2_PIX_FMT_ABGR32/constant/entry
+   entry'AR24'/entry
entry/entry
entrybsubscript7/subscript/entry
entrybsubscript6/subscript/entry
@@ -381,9 +425,49 @@ colorspace 
constantV4L2_COLORSPACE_SRGB/constant./para
entryasubscript1/subscript/entry
entryasubscript0/subscript/entry
  /row
- row id=V4L2-PIX-FMT-RGB32
-   entryconstantV4L2_PIX_FMT_RGB32/constant/entry
-   entry'RGB4'/entry
+ row id=V4L2-PIX-FMT-XBGR32
+