diff options
author | Manjunath Hadli <manjunath.hadli@ti.com> | 2012-10-18 06:58:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-19 10:02:10 -0500 |
commit | 05ad6fc1d54f106d5b8c598e2f9b59b12f3fb476 (patch) | |
tree | b67b96f6db39e5826103ad72a73362571ee8c780 | |
parent | 028986fe0edab3ca7f14a9fe92f3e492304b3eec (diff) |
[media] v4l2: add new pixel formats supported on dm365
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 <manjunath.hadli@ti.com>
Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com>
Acked-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml | 34 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/pixfmt-uv8.xml | 62 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/pixfmt.xml | 2 | ||||
-rw-r--r-- | include/uapi/linux/videodev2.h | 8 |
4 files changed, 106 insertions, 0 deletions
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml new file mode 100644 index 000000000000..c934192e98ce --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10alaw8.xml | |||
@@ -0,0 +1,34 @@ | |||
1 | <refentry> | ||
2 | <refmeta> | ||
3 | <refentrytitle> | ||
4 | V4L2_PIX_FMT_SBGGR10ALAW8 ('aBA8'), | ||
5 | V4L2_PIX_FMT_SGBRG10ALAW8 ('aGA8'), | ||
6 | V4L2_PIX_FMT_SGRBG10ALAW8 ('agA8'), | ||
7 | V4L2_PIX_FMT_SRGGB10ALAW8 ('aRA8'), | ||
8 | </refentrytitle> | ||
9 | &manvol; | ||
10 | </refmeta> | ||
11 | <refnamediv> | ||
12 | <refname id="V4L2-PIX-FMT-SBGGR10ALAW8"> | ||
13 | <constant>V4L2_PIX_FMT_SBGGR10ALAW8</constant> | ||
14 | </refname> | ||
15 | <refname id="V4L2-PIX-FMT-SGBRG10ALAW8"> | ||
16 | <constant>V4L2_PIX_FMT_SGBRG10ALAW8</constant> | ||
17 | </refname> | ||
18 | <refname id="V4L2-PIX-FMT-SGRBG10ALAW8"> | ||
19 | <constant>V4L2_PIX_FMT_SGRBG10ALAW8</constant> | ||
20 | </refname> | ||
21 | <refname id="V4L2-PIX-FMT-SRGGB10ALAW8"> | ||
22 | <constant>V4L2_PIX_FMT_SRGGB10ALAW8</constant> | ||
23 | </refname> | ||
24 | <refpurpose>10-bit Bayer formats compressed to 8 bits</refpurpose> | ||
25 | </refnamediv> | ||
26 | <refsect1> | ||
27 | <title>Description</title> | ||
28 | <para>The following four pixel formats are raw sRGB / Bayer | ||
29 | formats with 10 bits per color compressed to 8 bits each, | ||
30 | using the A-LAW algorithm. Each color component consumes 8 | ||
31 | bits of memory. In other respects this format is similar to | ||
32 | <xref linkend="V4L2-PIX-FMT-SRGGB8">.</xref></para> | ||
33 | </refsect1> | ||
34 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt-uv8.xml b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml new file mode 100644 index 000000000000..c507c1f73cd0 --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-uv8.xml | |||
@@ -0,0 +1,62 @@ | |||
1 | <refentry id="V4L2-PIX-FMT-UV8"> | ||
2 | <refmeta> | ||
3 | <refentrytitle>V4L2_PIX_FMT_UV8 ('UV8')</refentrytitle> | ||
4 | &manvol; | ||
5 | </refmeta> | ||
6 | <refnamediv> | ||
7 | <refname><constant>V4L2_PIX_FMT_UV8</constant></refname> | ||
8 | <refpurpose>UV plane interleaved</refpurpose> | ||
9 | </refnamediv> | ||
10 | <refsect1> | ||
11 | <title>Description</title> | ||
12 | <para>In this format there is no Y plane, Only CbCr plane. ie | ||
13 | (UV interleaved)</para> | ||
14 | <example> | ||
15 | <title> | ||
16 | <constant>V4L2_PIX_FMT_UV8</constant> | ||
17 | pixel image | ||
18 | </title> | ||
19 | |||
20 | <formalpara> | ||
21 | <title>Byte Order.</title> | ||
22 | <para>Each cell is one byte. | ||
23 | <informaltable frame="none"> | ||
24 | <tgroup cols="5" align="center"> | ||
25 | <colspec align="left" colwidth="2*" /> | ||
26 | <tbody valign="top"> | ||
27 | <row> | ||
28 | <entry>start + 0:</entry> | ||
29 | <entry>Cb<subscript>00</subscript></entry> | ||
30 | <entry>Cr<subscript>00</subscript></entry> | ||
31 | <entry>Cb<subscript>01</subscript></entry> | ||
32 | <entry>Cr<subscript>01</subscript></entry> | ||
33 | </row> | ||
34 | <row> | ||
35 | <entry>start + 4:</entry> | ||
36 | <entry>Cb<subscript>10</subscript></entry> | ||
37 | <entry>Cr<subscript>10</subscript></entry> | ||
38 | <entry>Cb<subscript>11</subscript></entry> | ||
39 | <entry>Cr<subscript>11</subscript></entry> | ||
40 | </row> | ||
41 | <row> | ||
42 | <entry>start + 8:</entry> | ||
43 | <entry>Cb<subscript>20</subscript></entry> | ||
44 | <entry>Cr<subscript>20</subscript></entry> | ||
45 | <entry>Cb<subscript>21</subscript></entry> | ||
46 | <entry>Cr<subscript>21</subscript></entry> | ||
47 | </row> | ||
48 | <row> | ||
49 | <entry>start + 12:</entry> | ||
50 | <entry>Cb<subscript>30</subscript></entry> | ||
51 | <entry>Cr<subscript>30</subscript></entry> | ||
52 | <entry>Cb<subscript>31</subscript></entry> | ||
53 | <entry>Cr<subscript>31</subscript></entry> | ||
54 | </row> | ||
55 | </tbody> | ||
56 | </tgroup> | ||
57 | </informaltable> | ||
58 | </para> | ||
59 | </formalpara> | ||
60 | </example> | ||
61 | </refsect1> | ||
62 | </refentry> | ||
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index bf94f417592c..99b8d2ad6e4f 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml | |||
@@ -673,6 +673,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< | |||
673 | &sub-srggb8; | 673 | &sub-srggb8; |
674 | &sub-sbggr16; | 674 | &sub-sbggr16; |
675 | &sub-srggb10; | 675 | &sub-srggb10; |
676 | &sub-srggb10alaw8; | ||
676 | &sub-srggb10dpcm8; | 677 | &sub-srggb10dpcm8; |
677 | &sub-srggb12; | 678 | &sub-srggb12; |
678 | </section> | 679 | </section> |
@@ -701,6 +702,7 @@ information.</para> | |||
701 | &sub-y12; | 702 | &sub-y12; |
702 | &sub-y10b; | 703 | &sub-y10b; |
703 | &sub-y16; | 704 | &sub-y16; |
705 | &sub-uv8; | ||
704 | &sub-yuyv; | 706 | &sub-yuyv; |
705 | &sub-uyvy; | 707 | &sub-uyvy; |
706 | &sub-yvyu; | 708 | &sub-yvyu; |
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 3cf3e946e331..39d2cecdf38c 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h | |||
@@ -334,6 +334,9 @@ struct v4l2_pix_format { | |||
334 | /* Palette formats */ | 334 | /* Palette formats */ |
335 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ | 335 | #define V4L2_PIX_FMT_PAL8 v4l2_fourcc('P', 'A', 'L', '8') /* 8 8-bit palette */ |
336 | 336 | ||
337 | /* Chrominance formats */ | ||
338 | #define V4L2_PIX_FMT_UV8 v4l2_fourcc('U', 'V', '8', ' ') /* 8 UV 4:4 */ | ||
339 | |||
337 | /* Luminance+Chrominance formats */ | 340 | /* Luminance+Chrominance formats */ |
338 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ | 341 | #define V4L2_PIX_FMT_YVU410 v4l2_fourcc('Y', 'V', 'U', '9') /* 9 YVU 4:1:0 */ |
339 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ | 342 | #define V4L2_PIX_FMT_YVU420 v4l2_fourcc('Y', 'V', '1', '2') /* 12 YVU 4:2:0 */ |
@@ -386,6 +389,11 @@ struct v4l2_pix_format { | |||
386 | #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ | 389 | #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ |
387 | #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ | 390 | #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */ |
388 | #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ | 391 | #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */ |
392 | /* 10bit raw bayer a-law compressed to 8 bits */ | ||
393 | #define V4L2_PIX_FMT_SBGGR10ALAW8 v4l2_fourcc('a', 'B', 'A', '8') | ||
394 | #define V4L2_PIX_FMT_SGBRG10ALAW8 v4l2_fourcc('a', 'G', 'A', '8') | ||
395 | #define V4L2_PIX_FMT_SGRBG10ALAW8 v4l2_fourcc('a', 'g', 'A', '8') | ||
396 | #define V4L2_PIX_FMT_SRGGB10ALAW8 v4l2_fourcc('a', 'R', 'A', '8') | ||
389 | /* 10bit raw bayer DPCM compressed to 8 bits */ | 397 | /* 10bit raw bayer DPCM compressed to 8 bits */ |
390 | #define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8') | 398 | #define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8') |
391 | #define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8') | 399 | #define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8') |