aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArun Kumar K <arun.kk@samsung.com>2012-10-03 21:19:05 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-05 21:39:51 -0400
commit4d08f670e63200cc092724de8c95f81df606b1a5 (patch)
tree8cffd39efbb46944c49ccde0e668f75a8324467b
parent65214a8603e3ec3b1c2bc4104e6806e7cf6d23ed (diff)
[media] v4l: Add fourcc definitions for new formats
Add the following new fourcc definitions, for multiplanar YCbCr: V4L2_PIX_FMT_NV21M, V4L2_PIX_FMT_NV12MT_16X16 and compressed formats: V4L2_PIX_FMT_H264_MVC, V4L2_PIX_FMT_VP8. Signed-off-by: Jeongtae Park <jtp.park@samsung.com> Signed-off-by: Naveen Krishna Chatradhi <ch.naveen@samsung.com> Signed-off-by: Arun Kumar K <arun.kk@samsung.com> Acked-by: Kamil Debski <k.debski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt-nv12m.xml17
-rw-r--r--Documentation/DocBook/media/v4l/pixfmt.xml10
-rw-r--r--include/linux/videodev2.h4
3 files changed, 26 insertions, 5 deletions
diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
index 5274c24d11e0..a990b34d911a 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-nv12m.xml
@@ -1,11 +1,13 @@
1 <refentry id="V4L2-PIX-FMT-NV12M"> 1 <refentry>
2 <refmeta> 2 <refmeta>
3 <refentrytitle>V4L2_PIX_FMT_NV12M ('NM12')</refentrytitle> 3 <refentrytitle>V4L2_PIX_FMT_NV12M ('NM12'), V4L2_PIX_FMT_NV21M ('NM21'), V4L2_PIX_FMT_NV12MT_16X16</refentrytitle>
4 &manvol; 4 &manvol;
5 </refmeta> 5 </refmeta>
6 <refnamediv> 6 <refnamediv>
7 <refname> <constant>V4L2_PIX_FMT_NV12M</constant></refname> 7 <refname id="V4L2-PIX-FMT-NV12M"><constant>V4L2_PIX_FMT_NV12M</constant></refname>
8 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> with planes 8 <refname id="V4L2-PIX-FMT-NV21M"><constant>V4L2_PIX_FMT_NV21M</constant></refname>
9 <refname id="V4L2-PIX-FMT-NV12MT_16X16"><constant>V4L2_PIX_FMT_NV12MT_16X16</constant></refname>
10 <refpurpose>Variation of <constant>V4L2_PIX_FMT_NV12</constant> and <constant>V4L2_PIX_FMT_NV21</constant> with planes
9 non contiguous in memory. </refpurpose> 11 non contiguous in memory. </refpurpose>
10 </refnamediv> 12 </refnamediv>
11 <refsect1> 13 <refsect1>
@@ -22,7 +24,12 @@ The CbCr plane is the same width, in bytes, as the Y plane (and of the image),
22but is half as tall in pixels. Each CbCr pair belongs to four pixels. For example, 24but is half as tall in pixels. Each CbCr pair belongs to four pixels. For example,
23Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to 25Cb<subscript>0</subscript>/Cr<subscript>0</subscript> belongs to
24Y'<subscript>00</subscript>, Y'<subscript>01</subscript>, 26Y'<subscript>00</subscript>, Y'<subscript>01</subscript>,
25Y'<subscript>10</subscript>, Y'<subscript>11</subscript>. </para> 27Y'<subscript>10</subscript>, Y'<subscript>11</subscript>.
28<constant>V4L2_PIX_FMT_NV12MT_16X16</constant> is the tiled version of
29<constant>V4L2_PIX_FMT_NV12M</constant> with 16x16 macroblock tiles. Here pixels
30are arranged in 16x16 2D tiles and tiles are arranged in linear order in memory.
31<constant>V4L2_PIX_FMT_NV21M</constant> is the same as <constant>V4L2_PIX_FMT_NV12M</constant>
32except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte.</para>
26 33
27 <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be 34 <para><constant>V4L2_PIX_FMT_NV12M</constant> is intended to be
28used only in drivers and applications that support the multi-planar API, 35used only in drivers and applications that support the multi-planar API,
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index fce143726fd5..bf94f417592c 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -758,6 +758,11 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see
758 <entry>'AVC1'</entry> 758 <entry>'AVC1'</entry>
759 <entry>H264 video elementary stream without start codes.</entry> 759 <entry>H264 video elementary stream without start codes.</entry>
760 </row> 760 </row>
761 <row id="V4L2-PIX-FMT-H264-MVC">
762 <entry><constant>V4L2_PIX_FMT_H264_MVC</constant></entry>
763 <entry>'MVC'</entry>
764 <entry>H264 MVC video elementary stream.</entry>
765 </row>
761 <row id="V4L2-PIX-FMT-H263"> 766 <row id="V4L2-PIX-FMT-H263">
762 <entry><constant>V4L2_PIX_FMT_H263</constant></entry> 767 <entry><constant>V4L2_PIX_FMT_H263</constant></entry>
763 <entry>'H263'</entry> 768 <entry>'H263'</entry>
@@ -793,6 +798,11 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see
793 <entry>'VC1L'</entry> 798 <entry>'VC1L'</entry>
794 <entry>VC1, SMPTE 421M Annex L compliant stream.</entry> 799 <entry>VC1, SMPTE 421M Annex L compliant stream.</entry>
795 </row> 800 </row>
801 <row id="V4L2-PIX-FMT-VP8">
802 <entry><constant>V4L2_PIX_FMT_VP8</constant></entry>
803 <entry>'VP8'</entry>
804 <entry>VP8 video elementary stream.</entry>
805 </row>
796 </tbody> 806 </tbody>
797 </tgroup> 807 </tgroup>
798 </table> 808 </table>
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 80977d6ec9bc..873adbe82988 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -366,7 +366,9 @@ struct v4l2_pix_format {
366 366
367/* two non contiguous planes - one Y, one Cr + Cb interleaved */ 367/* two non contiguous planes - one Y, one Cr + Cb interleaved */
368#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ 368#define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */
369#define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */
369#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ 370#define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */
371#define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */
370 372
371/* three non contiguous planes - Y, Cb, Cr */ 373/* three non contiguous planes - Y, Cb, Cr */
372#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ 374#define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */
@@ -403,6 +405,7 @@ struct v4l2_pix_format {
403#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */ 405#define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */
404#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ 406#define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */
405#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */ 407#define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */
408#define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */
406#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ 409#define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */
407#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ 410#define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */
408#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ 411#define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */
@@ -410,6 +413,7 @@ struct v4l2_pix_format {
410#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ 413#define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */
411#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ 414#define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */
412#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ 415#define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */
416#define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */
413 417
414/* Vendor-specific formats */ 418/* Vendor-specific formats */
415#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ 419#define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */