From bc9028e1d38419f9249cb0d1285e290be7e67223 Mon Sep 17 00:00:00 2001 From: Arun Kumar K Date: Tue, 9 Jul 2013 01:24:41 -0300 Subject: [media] V4L: Add VP8 encoder controls This patch adds new V4L controls for VP8 encoding. Signed-off-by: Kiran AVND Signed-off-by: Arun Kumar K Acked-by: Hans Verkuil Signed-off-by: Kamil Debski Signed-off-by: Mauro Carvalho Chehab --- include/uapi/linux/v4l2-controls.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index e90a88a8708..083bb5a5aae 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -161,6 +161,8 @@ enum v4l2_colorfx { #define V4L2_CID_USER_SI476X_BASE (V4L2_CID_USER_BASE + 0x1040) /* MPEG-class control IDs */ +/* The MPEG controls are applicable to all codec controls + * and the 'MPEG' part of the define is historical */ #define V4L2_CID_MPEG_BASE (V4L2_CTRL_CLASS_MPEG | 0x900) #define V4L2_CID_MPEG_CLASS (V4L2_CTRL_CLASS_MPEG | 1) @@ -522,6 +524,33 @@ enum v4l2_mpeg_video_mpeg4_profile { }; #define V4L2_CID_MPEG_VIDEO_MPEG4_QPEL (V4L2_CID_MPEG_BASE+407) +/* Control IDs for VP8 streams + * Although VP8 is not part of MPEG we add these controls to the MPEG class + * as that class is already handling other video compression standards + */ +#define V4L2_CID_MPEG_VIDEO_VPX_NUM_PARTITIONS (V4L2_CID_MPEG_BASE+500) +enum v4l2_vp8_num_partitions { + V4L2_CID_MPEG_VIDEO_VPX_1_PARTITION = 0, + V4L2_CID_MPEG_VIDEO_VPX_2_PARTITIONS = 1, + V4L2_CID_MPEG_VIDEO_VPX_4_PARTITIONS = 2, + V4L2_CID_MPEG_VIDEO_VPX_8_PARTITIONS = 3, +}; +#define V4L2_CID_MPEG_VIDEO_VPX_IMD_DISABLE_4X4 (V4L2_CID_MPEG_BASE+501) +#define V4L2_CID_MPEG_VIDEO_VPX_NUM_REF_FRAMES (V4L2_CID_MPEG_BASE+502) +enum v4l2_vp8_num_ref_frames { + V4L2_CID_MPEG_VIDEO_VPX_1_REF_FRAME = 0, + V4L2_CID_MPEG_VIDEO_VPX_2_REF_FRAME = 1, + V4L2_CID_MPEG_VIDEO_VPX_3_REF_FRAME = 2, +}; +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_LEVEL (V4L2_CID_MPEG_BASE+503) +#define V4L2_CID_MPEG_VIDEO_VPX_FILTER_SHARPNESS (V4L2_CID_MPEG_BASE+504) +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_REF_PERIOD (V4L2_CID_MPEG_BASE+505) +#define V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_SEL (V4L2_CID_MPEG_BASE+506) +enum v4l2_vp8_golden_frame_sel { + V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_PREV = 0, + V4L2_CID_MPEG_VIDEO_VPX_GOLDEN_FRAME_USE_REF_PERIOD = 1, +}; + /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ #define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000) #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_MPEG_CX2341X_BASE+0) -- cgit v1.2.3-70-g09d2 From f57fa2102cd5c0b50359def79a3d39cda8431204 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 5 Jun 2013 04:19:53 -0300 Subject: [media] v4l: Add media format codes for ARGB8888 and AYUV8888 on 32-bit busses Signed-off-by: Laurent Pinchart Reviewed-by: Sylwester Nawrocki Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Documentation/DocBook/media/v4l/subdev-formats.xml | 609 +++++++++------------ Documentation/DocBook/media_api.tmpl | 6 + include/uapi/linux/v4l2-mediabus.h | 6 +- 3 files changed, 254 insertions(+), 367 deletions(-) (limited to 'include/uapi/linux') diff --git a/Documentation/DocBook/media/v4l/subdev-formats.xml b/Documentation/DocBook/media/v4l/subdev-formats.xml index 0c2b1f2e875..f72c1cc93a9 100644 --- a/Documentation/DocBook/media/v4l/subdev-formats.xml +++ b/Documentation/DocBook/media/v4l/subdev-formats.xml @@ -97,31 +97,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Identifier @@ -133,6 +141,14 @@ Bit + 31 + 30 + 29 + 28 + 27 + 26 + 25 + 24 23 22 21 @@ -164,7 +180,7 @@ V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE 0x1001 - &dash-ent-16; + &dash-ent-24; 0 0 0 @@ -178,7 +194,7 @@ - &dash-ent-16; + &dash-ent-24; g3 g2 g1 @@ -192,7 +208,7 @@ V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE 0x1002 - &dash-ent-16; + &dash-ent-24; g3 g2 g1 @@ -206,7 +222,7 @@ - &dash-ent-16; + &dash-ent-24; 0 0 0 @@ -220,7 +236,7 @@ V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE 0x1003 - &dash-ent-16; + &dash-ent-24; 0 r4 r3 @@ -234,7 +250,7 @@ - &dash-ent-16; + &dash-ent-24; g2 g1 g0 @@ -248,7 +264,7 @@ V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE 0x1004 - &dash-ent-16; + &dash-ent-24; g2 g1 g0 @@ -262,7 +278,7 @@ - &dash-ent-16; + &dash-ent-24; 0 r4 r3 @@ -276,7 +292,7 @@ V4L2_MBUS_FMT_BGR565_2X8_BE 0x1005 - &dash-ent-16; + &dash-ent-24; b4 b3 b2 @@ -290,7 +306,7 @@ - &dash-ent-16; + &dash-ent-24; g2 g1 g0 @@ -304,7 +320,7 @@ V4L2_MBUS_FMT_BGR565_2X8_LE 0x1006 - &dash-ent-16; + &dash-ent-24; g2 g1 g0 @@ -318,7 +334,7 @@ - &dash-ent-16; + &dash-ent-24; b4 b3 b2 @@ -332,7 +348,7 @@ V4L2_MBUS_FMT_RGB565_2X8_BE 0x1007 - &dash-ent-16; + &dash-ent-24; r4 r3 r2 @@ -346,7 +362,7 @@ - &dash-ent-16; + &dash-ent-24; g2 g1 g0 @@ -360,7 +376,7 @@ V4L2_MBUS_FMT_RGB565_2X8_LE 0x1008 - &dash-ent-16; + &dash-ent-24; g2 g1 g0 @@ -374,7 +390,7 @@ - &dash-ent-16; + &dash-ent-24; r4 r3 r2 @@ -388,12 +404,7 @@ V4L2_MBUS_FMT_RGB666_1X18 0x1009 - - - - - - - - - - - - + &dash-ent-14; r5 r4 r3 @@ -417,6 +428,7 @@ V4L2_MBUS_FMT_RGB888_1X24 0x100a + &dash-ent-8; r7 r6 r5 @@ -446,9 +458,7 @@ V4L2_MBUS_FMT_RGB888_2X12_BE 0x100b - &dash-ent-10; - - - - + &dash-ent-20; r7 r6 r5 @@ -466,9 +476,7 @@ - &dash-ent-10; - - - - + &dash-ent-20; g3 g2 g1 @@ -486,9 +494,7 @@ V4L2_MBUS_FMT_RGB888_2X12_LE 0x100c - &dash-ent-10; - - - - + &dash-ent-20; g3 g2 g1 @@ -506,9 +512,7 @@ - &dash-ent-10; - - - - + &dash-ent-20; r7 r6 r5 @@ -522,6 +526,43 @@ g5 g4 + + V4L2_MBUS_FMT_ARGB888_1X32 + 0x100d + + a7 + a6 + a5 + a4 + a3 + a2 + a1 + a0 + r7 + r6 + r5 + r4 + r3 + r2 + r1 + r0 + g7 + g6 + g5 + g4 + g3 + g2 + g1 + g0 + b7 + b6 + b5 + b4 + b3 + b2 + b1 + b0 + @@ -1149,6 +1190,7 @@ yx for luma component bit number x ux for blue chroma component bit number x vx for red chroma component bit number x + ax for alpha component bit number x - for non-available bits (for positions higher than the bus width) d for dummy bits @@ -1159,37 +1201,39 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Identifier @@ -1201,6 +1245,8 @@ Bit + 31 + 30 29 28 27 @@ -1238,10 +1284,7 @@ V4L2_MBUS_FMT_Y8_1X8 0x2001 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1255,18 +1298,7 @@ V4L2_MBUS_FMT_UV8_1X8 0x2015 - - - - - - - - - - - - - - - - - - - - - - - - + &dash-ent-24; u7 u6 u5 @@ -1280,18 +1312,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - + &dash-ent-24; v7 v6 v5 @@ -1305,10 +1326,7 @@ V4L2_MBUS_FMT_UYVY8_1_5X8 0x2002 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1322,10 +1340,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1339,10 +1354,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1356,10 +1368,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1373,10 +1382,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1390,10 +1396,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1407,10 +1410,7 @@ V4L2_MBUS_FMT_VYUY8_1_5X8 0x2003 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1424,10 +1424,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1441,10 +1438,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1458,10 +1452,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1475,10 +1466,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1492,10 +1480,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1509,10 +1494,7 @@ V4L2_MBUS_FMT_YUYV8_1_5X8 0x2004 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1526,10 +1508,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1543,10 +1522,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1560,10 +1536,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1577,10 +1550,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1594,10 +1564,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1611,10 +1578,7 @@ V4L2_MBUS_FMT_YVYU8_1_5X8 0x2005 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1628,10 +1592,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1645,10 +1606,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1662,10 +1620,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1679,10 +1634,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1696,10 +1648,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1713,10 +1662,7 @@ V4L2_MBUS_FMT_UYVY8_2X8 0x2006 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1730,10 +1676,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1747,10 +1690,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1764,10 +1704,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1781,10 +1718,7 @@ V4L2_MBUS_FMT_VYUY8_2X8 0x2007 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1798,10 +1732,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1815,10 +1746,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1832,10 +1760,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1849,10 +1774,7 @@ V4L2_MBUS_FMT_YUYV8_2X8 0x2008 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1866,10 +1788,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1883,10 +1802,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1900,10 +1816,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1917,10 +1830,7 @@ V4L2_MBUS_FMT_YVYU8_2X8 0x2009 - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1934,10 +1844,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; v7 v6 v5 @@ -1951,10 +1858,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; y7 y6 y5 @@ -1968,10 +1872,7 @@ - &dash-ent-10; - &dash-ent-10; - - - - + &dash-ent-24; u7 u6 u5 @@ -1985,8 +1886,7 @@ V4L2_MBUS_FMT_Y10_1X10 0x200a - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; y9 y8 y7 @@ -2002,8 +1902,7 @@ V4L2_MBUS_FMT_YUYV10_2X10 0x200b - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; y9 y8 y7 @@ -2019,8 +1918,7 @@ - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; u9 u8 u7 @@ -2036,8 +1934,7 @@ - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; y9 y8 y7 @@ -2053,8 +1950,7 @@ - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; v9 v8 v7 @@ -2070,8 +1966,7 @@ V4L2_MBUS_FMT_YVYU10_2X10 0x200c - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; y9 y8 y7 @@ -2087,8 +1982,7 @@ - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; v9 v8 v7 @@ -2104,8 +1998,7 @@ - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; y9 y8 y7 @@ -2121,8 +2014,7 @@ - &dash-ent-10; - &dash-ent-10; + &dash-ent-22; u9 u8 u7 @@ -2138,15 +2030,7 @@ V4L2_MBUS_FMT_Y12_1X12 0x2013 - &dash-ent-10; - - - - - - - - - - - - - - - - + &dash-ent-20; y11 y10 y9 @@ -2164,11 +2048,7 @@ V4L2_MBUS_FMT_UYVY8_1X16 0x200f - &dash-ent-10; - - - - - - - - + &dash-ent-16; u7 u6 u5 @@ -2190,11 +2070,7 @@ - &dash-ent-10; - - - - - - - - + &dash-ent-16; v7 v6 v5 @@ -2216,11 +2092,7 @@ V4L2_MBUS_FMT_VYUY8_1X16 0x2010 - &dash-ent-10; - - - - - - - - + &dash-ent-16; v7 v6 v5 @@ -2242,11 +2114,7 @@ - &dash-ent-10; - - - - - - - - + &dash-ent-16; u7 u6 u5 @@ -2268,11 +2136,7 @@ V4L2_MBUS_FMT_YUYV8_1X16 0x2011 - &dash-ent-10; - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2294,11 +2158,7 @@ - &dash-ent-10; - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2320,11 +2180,7 @@ V4L2_MBUS_FMT_YVYU8_1X16 0x2012 - &dash-ent-10; - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2346,11 +2202,7 @@ - &dash-ent-10; - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2372,10 +2224,7 @@ V4L2_MBUS_FMT_YDYUYDYV8_1X16 0x2014 - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2397,10 +2246,7 @@ - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2422,10 +2268,7 @@ - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2447,10 +2290,7 @@ - - - - - - - - + &dash-ent-16; y7 y6 y5 @@ -2472,7 +2312,7 @@ V4L2_MBUS_FMT_YUYV10_1X20 0x200d - &dash-ent-10; + &dash-ent-12; y9 y8 y7 @@ -2498,7 +2338,7 @@ - &dash-ent-10; + &dash-ent-12; y9 y8 y7 @@ -2524,7 +2364,7 @@ V4L2_MBUS_FMT_YVYU10_1X20 0x200e - &dash-ent-10; + &dash-ent-12; y9 y8 y7 @@ -2550,7 +2390,7 @@ - &dash-ent-10; + &dash-ent-12; y9 y8 y7 @@ -2576,6 +2416,8 @@ V4L2_MBUS_FMT_YUV10_1X30 0x2016 + - + - y9 y8 y7 @@ -2607,6 +2449,43 @@ v1 v0 + + V4L2_MBUS_FMT_AYUV8_1X32 + 0x2017 + + a7 + a6 + a5 + a4 + a3 + a2 + a1 + a0 + y7 + y6 + y5 + y4 + y3 + y2 + y1 + y0 + u7 + u6 + u5 + u4 + u3 + u2 + u1 + u0 + v7 + v6 + v5 + v4 + v3 + v2 + v1 + v0 + diff --git a/Documentation/DocBook/media_api.tmpl b/Documentation/DocBook/media_api.tmpl index 6a8b7158697..07e7eea52a0 100644 --- a/Documentation/DocBook/media_api.tmpl +++ b/Documentation/DocBook/media_api.tmpl @@ -22,8 +22,14 @@ http://linuxtv.org/repo/"> +--------"> ----------"> +------------"> +--------------"> ----------------"> +--------------------"> +----------------------"> +------------------------"> ]> diff --git a/include/uapi/linux/v4l2-mediabus.h b/include/uapi/linux/v4l2-mediabus.h index 6ee63d09b32..a9601257bb4 100644 --- a/include/uapi/linux/v4l2-mediabus.h +++ b/include/uapi/linux/v4l2-mediabus.h @@ -37,7 +37,7 @@ enum v4l2_mbus_pixelcode { V4L2_MBUS_FMT_FIXED = 0x0001, - /* RGB - next is 0x100d */ + /* RGB - next is 0x100e */ V4L2_MBUS_FMT_RGB444_2X8_PADHI_BE = 0x1001, V4L2_MBUS_FMT_RGB444_2X8_PADHI_LE = 0x1002, V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE = 0x1003, @@ -50,8 +50,9 @@ enum v4l2_mbus_pixelcode { V4L2_MBUS_FMT_RGB888_1X24 = 0x100a, V4L2_MBUS_FMT_RGB888_2X12_BE = 0x100b, V4L2_MBUS_FMT_RGB888_2X12_LE = 0x100c, + V4L2_MBUS_FMT_ARGB8888_1X32 = 0x100d, - /* YUV (including grey) - next is 0x2017 */ + /* YUV (including grey) - next is 0x2018 */ V4L2_MBUS_FMT_Y8_1X8 = 0x2001, V4L2_MBUS_FMT_UV8_1X8 = 0x2015, V4L2_MBUS_FMT_UYVY8_1_5X8 = 0x2002, @@ -74,6 +75,7 @@ enum v4l2_mbus_pixelcode { V4L2_MBUS_FMT_YUYV10_1X20 = 0x200d, V4L2_MBUS_FMT_YVYU10_1X20 = 0x200e, V4L2_MBUS_FMT_YUV10_1X30 = 0x2016, + V4L2_MBUS_FMT_AYUV8_1X32 = 0x2017, /* Bayer - next is 0x3019 */ V4L2_MBUS_FMT_SBGGR8_1X8 = 0x3001, -- cgit v1.2.3-70-g09d2 From 8493054844145e47a8f0668f57e2b0073aca850f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Wed, 26 Jun 2013 09:46:42 -0300 Subject: [media] v4l: Add V4L2_PIX_FMT_NV16M and V4L2_PIX_FMT_NV61M formats 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 Reviewed-by: Sylwester Nawrocki Reviewed-by: Sakari Ailus Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- 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 (limited to 'include/uapi/linux') diff --git a/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml new file mode 100644 index 00000000000..c51d5a4cda0 --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-nv16m.xml @@ -0,0 +1,171 @@ + + + V4L2_PIX_FMT_NV16M ('NM16'), V4L2_PIX_FMT_NV61M ('NM61') + &manvol; + + + V4L2_PIX_FMT_NV16M + V4L2_PIX_FMT_NV61M + Variation of V4L2_PIX_FMT_NV16 and V4L2_PIX_FMT_NV61 with planes + non contiguous in memory. + + + Description + + This 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. +V4L2_PIX_FMT_NV16M differs from V4L2_PIX_FMT_NV16 + in that the two planes are non-contiguous in memory, i.e. the chroma +plane does 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 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, +Cb0/Cr0 belongs to +Y'00, Y'01, +Y'10, Y'11. +V4L2_PIX_FMT_NV61M is the same as V4L2_PIX_FMT_NV16M +except the Cb and Cr bytes are swapped, the CrCb plane starts with a Cr byte. + + V4L2_PIX_FMT_NV16M and +V4L2_PIX_FMT_NV61M are intended to be used only in drivers +and applications that support the multi-planar API, described in +. + + + <constant>V4L2_PIX_FMT_NV16M</constant> 4 × 4 pixel image + + + Byte Order. + Each cell is one byte. + + + + + + start0 + 0: + Y'00 + Y'01 + Y'02 + Y'03 + + + start0 + 4: + Y'10 + Y'11 + Y'12 + Y'13 + + + start0 + 8: + Y'20 + Y'21 + Y'22 + Y'23 + + + start0 + 12: + Y'30 + Y'31 + Y'32 + Y'33 + + + + + + start1 + 0: + Cb00 + Cr00 + Cb02 + Cr02 + + + start1 + 4: + Cb10 + Cr10 + Cb12 + Cr12 + + + start1 + 8: + Cb20 + Cr20 + Cb22 + Cr22 + + + start1 + 12: + Cb30 + Cr30 + Cb32 + Cr32 + + + + + + + + + Color Sample Location. + + + + + + + 01 + 23 + + + 0 + YY + YY + + + + C + C + + + 1 + YY + YY + + + + C + C + + + + + + 2 + YY + YY + + + + C + C + + + 3 + YY + YY + + + + C + C + + + + + + + + + diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 99b8d2ad6e4..16db350848a 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -718,6 +718,7 @@ information. &sub-nv12m; &sub-nv12mt; &sub-nv16; + &sub-nv16m; &sub-nv24; &sub-m420; diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 95ef4551edc..fec0c205f38 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -348,6 +348,8 @@ struct v4l2_pix_format { /* two non contiguous planes - one Y, one Cr + Cb interleaved */ #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ #define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */ +#define V4L2_PIX_FMT_NV16M v4l2_fourcc('N', 'M', '1', '6') /* 16 Y/CbCr 4:2:2 */ +#define V4L2_PIX_FMT_NV61M v4l2_fourcc('N', 'M', '6', '1') /* 16 Y/CrCb 4:2:2 */ #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */ -- cgit v1.2.3-70-g09d2 From 299878fa3c373dbf74edf5872c79ef4c65b80a04 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 29 Jul 2013 08:40:54 -0300 Subject: [media] v4l2-dv-timings.h: remove duplicate V4L2_DV_BT_DMT_1366X768P60 This particular DMT timing definition was duplicated in the header. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/uapi/linux/v4l2-dv-timings.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/v4l2-dv-timings.h b/include/uapi/linux/v4l2-dv-timings.h index 4e0c58d25ff..be709fe2955 100644 --- a/include/uapi/linux/v4l2-dv-timings.h +++ b/include/uapi/linux/v4l2-dv-timings.h @@ -823,12 +823,4 @@ V4L2_DV_FL_REDUCED_BLANKING) \ } -#define V4L2_DV_BT_DMT_1366X768P60 { \ - .type = V4L2_DV_BT_656_1120, \ - V4L2_INIT_BT_TIMINGS(1366, 768, 0, \ - V4L2_DV_HSYNC_POS_POL | V4L2_DV_VSYNC_POS_POL, \ - 85500000, 70, 143, 213, 3, 3, 24, 0, 0, 0, \ - V4L2_DV_BT_STD_DMT, 0) \ -} - #endif -- cgit v1.2.3-70-g09d2 From 7f68127fa11f08c5468537eb28ca6b8b95d70f08 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Mon, 29 Jul 2013 08:40:58 -0300 Subject: [media] videodev2.h: defines to calculate blanking and frame sizes It is very common to have to calculate the total width and height of the blanking and the full frame, so add a few defines that deal with that. Signed-off-by: Hans Verkuil Acked-by: Lad, Prabhakar Signed-off-by: Mauro Carvalho Chehab --- include/uapi/linux/videodev2.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/uapi/linux') diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index fec0c205f38..437f1b0f893 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -1057,6 +1057,16 @@ struct v4l2_bt_timings { or used depends on the hardware. */ #define V4L2_DV_FL_HALF_LINE (1 << 3) +/* A few useful defines to calculate the total blanking and frame sizes */ +#define V4L2_DV_BT_BLANKING_WIDTH(bt) \ + (bt->hfrontporch + bt->hsync + bt->hbackporch) +#define V4L2_DV_BT_FRAME_WIDTH(bt) \ + (bt->width + V4L2_DV_BT_BLANKING_WIDTH(bt)) +#define V4L2_DV_BT_BLANKING_HEIGHT(bt) \ + (bt->vfrontporch + bt->vsync + bt->vbackporch + \ + bt->il_vfrontporch + bt->il_vsync + bt->il_vbackporch) +#define V4L2_DV_BT_FRAME_HEIGHT(bt) \ + (bt->height + V4L2_DV_BT_BLANKING_HEIGHT(bt)) /** struct v4l2_dv_timings - DV timings * @type: the type of the timings -- cgit v1.2.3-70-g09d2