diff options
author | Hans Verkuil | 2016-07-14 07:58:35 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab | 2016-11-16 14:30:47 -0200 |
commit | 4f100ff65955c1076f90b4b7be92c4f86d70adff (patch) | |
tree | 7bdc78d37c8aa3fdd6edf59db02100521d666161 /include/uapi/linux/videodev2.h | |
parent | 8fbe91e7918af8adfad45828ae8acfc2f01cb6a5 (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/videodev2.h')
-rw-r--r-- | include/uapi/linux/videodev2.h | 27 |
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 { * (aka field 2) of interlaced field formats * @standards: Standards the timing belongs to * @flags: Flags + * @picture_aspect: The picture aspect ratio (hor/vert). + * @cea861_vic: VIC code as per the CEA-861 standard. + * @hdmi_vic: VIC code as per the HDMI standard. * @reserved: Reserved fields, must be zeroed. * * A note regarding vertical interlaced timings: height refers to the total @@ -1283,7 +1286,10 @@ struct v4l2_bt_timings { __u32 il_vbackporch; __u32 standards; __u32 flags; - __u32 reserved[14]; + struct v4l2_fract picture_aspect; + __u8 cea861_vic; + __u8 hdmi_vic; + __u8 reserved[46]; } __attribute__ ((packed)); /* Interlaced or progressive format */ @@ -1345,7 +1351,24 @@ struct v4l2_bt_timings { * total height. For these formats, if this flag is set, the first * field has the extra line. If not, it is the second field. */ -#define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5) +#define V4L2_DV_FL_FIRST_FIELD_EXTRA_LINE (1 << 5) +/* + * If set, then the picture_aspect field is valid. Otherwise assume that the + * pixels are square, so the picture aspect ratio is the same as the width to + * height ratio. + */ +#define V4L2_DV_FL_HAS_PICTURE_ASPECT (1 << 6) +/* + * If set, then the cea861_vic field is valid and contains the Video + * Identification Code as per the CEA-861 standard. + */ +#define V4L2_DV_FL_HAS_CEA861_VIC (1 << 7) +/* + * If set, then the hdmi_vic field is valid and contains the Video + * Identification Code as per the HDMI standard (HDMI Vendor Specific + * InfoFrame). + */ +#define V4L2_DV_FL_HAS_HDMI_VIC (1 << 8) /* A few useful defines to calculate the total blanking and frame sizes */ #define V4L2_DV_BT_BLANKING_WIDTH(bt) \ |