Re: [PATCH v5 6/9] v4l: Add V4L2_PIX_FMT_NV16M and V4L2_PIX_FMT_NV61M formats

2013-08-02 Thread Hans Verkuil


On 08/02/2013 03:03 AM, Laurent Pinchart wrote:
 NV16M and NV61M are planar YCbCr 4:2:2 and YCrCb 4:2:2 formats with a
 luma plane followed by an interleaved chroma plane. The planes are not
 required to be contiguous in memory, and the formats can only be used
 with the multi-planar formats API.
 
 Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com
 Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com
 Reviewed-by: Sakari Ailus sakari.ai...@iki.fi

Just a few small changes below. Once that is corrected you can add my:

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

Regards,

Hans

 ---
  Documentation/DocBook/media/v4l/pixfmt-nv16m.xml | 171 
 +++
  Documentation/DocBook/media/v4l/pixfmt.xml   |   1 +
  include/uapi/linux/videodev2.h   |   2 +
  3 files changed, 174 insertions(+)
  create mode 100644 Documentation/DocBook/media/v4l/pixfmt-nv16m.xml
 
 diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml 
 b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml
 new file mode 100644
 index 000..afec039
 --- /dev/null
 +++ b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml
 @@ -0,0 +1,171 @@
 +refentry
 +  refmeta
 + refentrytitleV4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M 
 ('NM61')/refentrytitle
 + manvol;
 +  /refmeta
 +  refnamediv
 + refname 
 id=V4L2-PIX-FMT-NV16MconstantV4L2_PIX_FMT_NV16M/constant/refname
 + refname 
 id=V4L2-PIX-FMT-NV61MconstantV4L2_PIX_FMT_NV61M/constant/refname
 + refpurposeVariation of constantV4L2_PIX_FMT_NV16/constant and 
 constantV4L2_PIX_FMT_NV61/constant with planes
 +   non contiguous in memory. /refpurpose
 +  /refnamediv
 +  refsect1
 + titleDescription/title
 +
 + paraThis is a multi-planar, two-plane version of the YUV 4:2:0 format.
 +The three components are separated into two sub-images or planes.
 +constantV4L2_PIX_FMT_NV16M/constant differs from 
 constantV4L2_PIX_FMT_NV16
 +/constant in that the two planes are non-contiguous in memory, i.e. the 
 chroma
 +plane do not necessarily immediately follows the luma plane.

s/do/does/

 +The luminance data occupies the first plane. The Y plane has one byte per 
 pixel.
 +In the second plane there is a chrominance data with alternating chroma 
 samples.

s/is a/is/

 +The CbCr plane is the same width and height, in bytes, as the Y plane.
 +Each CbCr pair belongs to four pixels. For example,
 +Cbsubscript0/subscript/Crsubscript0/subscript belongs to
 +Y'subscript00/subscript, Y'subscript01/subscript,
 +Y'subscript10/subscript, Y'subscript11/subscript.
 +constantV4L2_PIX_FMT_NV61M/constant is the same as 
 constantV4L2_PIX_FMT_NV16M/constant
 +except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr 
 byte./para

Regards,

Hans
--
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


[PATCH v5 6/9] v4l: Add V4L2_PIX_FMT_NV16M and V4L2_PIX_FMT_NV61M formats

2013-08-01 Thread Laurent Pinchart
NV16M and NV61M are planar YCbCr 4:2:2 and YCrCb 4:2:2 formats with a
luma plane followed by an interleaved chroma plane. The planes are not
required to be contiguous in memory, and the formats can only be used
with the multi-planar formats API.

Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com
Reviewed-by: Sylwester Nawrocki s.nawro...@samsung.com
Reviewed-by: Sakari Ailus sakari.ai...@iki.fi
---
 Documentation/DocBook/media/v4l/pixfmt-nv16m.xml | 171 +++
 Documentation/DocBook/media/v4l/pixfmt.xml   |   1 +
 include/uapi/linux/videodev2.h   |   2 +
 3 files changed, 174 insertions(+)
 create mode 100644 Documentation/DocBook/media/v4l/pixfmt-nv16m.xml

diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml 
b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml
new file mode 100644
index 000..afec039
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml
@@ -0,0 +1,171 @@
+refentry
+  refmeta
+   refentrytitleV4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M 
('NM61')/refentrytitle
+   manvol;
+  /refmeta
+  refnamediv
+   refname 
id=V4L2-PIX-FMT-NV16MconstantV4L2_PIX_FMT_NV16M/constant/refname
+   refname 
id=V4L2-PIX-FMT-NV61MconstantV4L2_PIX_FMT_NV61M/constant/refname
+   refpurposeVariation of constantV4L2_PIX_FMT_NV16/constant and 
constantV4L2_PIX_FMT_NV61/constant with planes
+ non contiguous in memory. /refpurpose
+  /refnamediv
+  refsect1
+   titleDescription/title
+
+   paraThis is a multi-planar, two-plane version of the YUV 4:2:0 format.
+The three components are separated into two sub-images or planes.
+constantV4L2_PIX_FMT_NV16M/constant differs from 
constantV4L2_PIX_FMT_NV16
+/constant in that the two planes are non-contiguous in memory, i.e. the 
chroma
+plane do not necessarily immediately follows the luma plane.
+The luminance data occupies the first plane. The Y plane has one byte per 
pixel.
+In the second plane there is a chrominance data with alternating chroma 
samples.
+The CbCr plane is the same width and height, in bytes, as the Y plane.
+Each CbCr pair belongs to four pixels. For example,
+Cbsubscript0/subscript/Crsubscript0/subscript belongs to
+Y'subscript00/subscript, Y'subscript01/subscript,
+Y'subscript10/subscript, Y'subscript11/subscript.
+constantV4L2_PIX_FMT_NV61M/constant is the same as 
constantV4L2_PIX_FMT_NV16M/constant
+except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr 
byte./para
+
+   paraconstantV4L2_PIX_FMT_NV16M/constant and
+constantV4L2_PIX_FMT_NV61M/constant are intended to be used only in drivers
+and applications that support the multi-planar API, described in
+xref linkend=planar-apis/. /para
+
+   example
+ titleconstantV4L2_PIX_FMT_NV16M/constant 4 times; 4 pixel 
image/title
+
+ formalpara
+   titleByte Order./title
+   paraEach cell is one byte.
+   informaltable frame=none
+   tgroup cols=5 align=center
+ colspec align=left colwidth=2* /
+ tbody valign=top
+   row
+ entrystart0nbsp;+nbsp;0:/entry
+ entryY'subscript00/subscript/entry
+ entryY'subscript01/subscript/entry
+ entryY'subscript02/subscript/entry
+ entryY'subscript03/subscript/entry
+   /row
+   row
+ entrystart0nbsp;+nbsp;4:/entry
+ entryY'subscript10/subscript/entry
+ entryY'subscript11/subscript/entry
+ entryY'subscript12/subscript/entry
+ entryY'subscript13/subscript/entry
+   /row
+   row
+ entrystart0nbsp;+nbsp;8:/entry
+ entryY'subscript20/subscript/entry
+ entryY'subscript21/subscript/entry
+ entryY'subscript22/subscript/entry
+ entryY'subscript23/subscript/entry
+   /row
+   row
+ entrystart0nbsp;+nbsp;12:/entry
+ entryY'subscript30/subscript/entry
+ entryY'subscript31/subscript/entry
+ entryY'subscript32/subscript/entry
+ entryY'subscript33/subscript/entry
+   /row
+   row
+ entry/entry
+   /row
+   row
+ entrystart1nbsp;+nbsp;0:/entry
+ entryCbsubscript00/subscript/entry
+ entryCrsubscript00/subscript/entry
+ entryCbsubscript02/subscript/entry
+ entryCrsubscript02/subscript/entry
+   /row
+   row
+ entrystart1nbsp;+nbsp;4:/entry
+ entryCbsubscript10/subscript/entry