aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2016-07-14 06:58:35 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-11-16 11:30:47 -0500
commit4f100ff65955c1076f90b4b7be92c4f86d70adff (patch)
tree7bdc78d37c8aa3fdd6edf59db02100521d666161 /include/uapi/linux
parent8fbe91e7918af8adfad45828ae8acfc2f01cb6a5 (diff)
[media] videodev2.h: add VICs and picture aspect ratio
Add picture aspect ratio information, the CEA-861 VIC (Video Identification Code) and the HDMI VIC to struct v4l2_bt_timings. The picture aspect was chosen rather than the pixel aspect since 1) the CEA-861 standard uses picture aspect, and 2) pixel aspect ratio can become tricky when dealing with pixel repeat timings. While we don't support those yet at the moment, this might become necessary. And in that case using picture aspect ratio makes more sense. And converting picture aspect ratio to pixel aspect ratio is easy enough. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/videodev2.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 7d3e2e9673af..d3f613e2c54a 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1254,6 +1254,9 @@ struct v4l2_standard {
1254 * (aka field 2) of interlaced field formats 1254 * (aka field 2) of interlaced field formats
1255 * @standards: Standards the timing belongs to 1255 * @standards: Standards the timing belongs to
1256 * @flags: Flags 1256 * @flags: Flags
1257 * @picture_aspect: The picture aspect ratio (hor/vert).
1258 * @cea861_vic: VIC code as per the CEA-861 standard.
1259 * @hdmi_vic: VIC code as per the HDMI standard.
1257 * @reserved: Reserved fields, must be zeroed. 1260 * @reserved: Reserved fields, must be zeroed.
1258 * 1261 *
1259 * A note regarding vertical interlaced timings: height refers to the total 1262 * A note regarding vertical interlaced timings: height refers to the total
@@ -1283,7 +1286,10 @@ struct v4l2_bt_timings {
1283 __u32 il_vbackporch; 1286 __u32 il_vbackporch;
1284 __u32 standards; 1287 __u32 standards;
1285 __u32 flags; 1288 __u32 flags;
1286 __u32 reserved[14]; 1289 struct v4l2_fract picture_aspect;
1290 __u8 cea861_vic;
1291 __u8 hdmi_vic;
1292 __u8 reserved[46];
1287} __attribute__ ((packed)); 1293} __attribute__ ((packed));
1288 1294
1289/* Interlaced or progressive format */ 1295/* Interlaced or progressive format */
@@ -1345,7 +1351,24 @@ struct v4l2_bt_timings {
1345 * total height. For these formats, if this flag is set, the first 1351 * total height. For these formats, if this flag is set, the first
1346 * field has the extra line. If not, it is the second field. 1352 * field has the extra line. If not, it is the second field.
1347 */ 1353 */
1348#define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5) 1354#define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5)
1355/*
1356 * If set, then the picture_aspect field is valid. Otherwise assume that the
1357 * pixels are square, so the picture aspect ratio is the same as the width to
1358 * height ratio.
1359 */
1360#define V4L2_DV_FL_HAS_PICTURE_ASPECT (1 << 6)
1361/*
1362 * If set, then the cea861_vic field is valid and contains the Video
1363 * Identification Code as per the CEA-861 standard.
1364 */
1365#define V4L2_DV_FL_HAS_CEA861_VIC (1 << 7)
1366/*
1367 * If set, then the hdmi_vic field is valid and contains the Video
1368 * Identification Code as per the HDMI standard (HDMI Vendor Specific
1369 * InfoFrame).
1370 */
1371#define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8)
1349 1372
1350/* A few useful defines to calculate the total blanking and frame sizes */ 1373/* A few useful defines to calculate the total blanking and frame sizes */
1351#define V4L2_DV_BT_BLANKING_WIDTH(bt) \ 1374#define V4L2_DV_BT_BLANKING_WIDTH(bt) \