diff options
author | Steve Longerbeam <slongerbeam@gmail.com> | 2019-01-09 19:30:04 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-01-16 20:10:43 +0100 |
commit | 1c3721b1f22286033abeda30b7e12439b083ed0f (patch) | |
tree | 71a52d72e2475ec22c2af10a5cfa94c22f091f6c /include/uapi | |
parent | media: rcar-vin: Allow independent VIN link enablement (diff) | |
download | linux-1c3721b1f22286033abeda30b7e12439b083ed0f.tar.xz linux-1c3721b1f22286033abeda30b7e12439b083ed0f.zip |
media: videodev2.h: Add more field helper macros
Adds two helper macros:
V4L2_FIELD_IS_SEQUENTIAL: returns true if the given field type is
'sequential', that is a full frame is transmitted, or exists in
memory, as all top field lines followed by all bottom field lines,
or vice-versa.
V4L2_FIELD_IS_INTERLACED: returns true if the given field type is
'interlaced', that is a full frame is transmitted, or exists in
memory, as top field lines interlaced with bottom field lines.
Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/linux/videodev2.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index c0c36c165bf4..9a920f071ff9 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -130,6 +130,13 @@ enum v4l2_field { ((field) == V4L2_FIELD_BOTTOM ||\ (field) == V4L2_FIELD_TOP ||\ (field) == V4L2_FIELD_ALTERNATE) +#define V4L2_FIELD_IS_INTERLACED(field) \ + ((field) == V4L2_FIELD_INTERLACED ||\ + (field) == V4L2_FIELD_INTERLACED_TB ||\ + (field) == V4L2_FIELD_INTERLACED_BT) +#define V4L2_FIELD_IS_SEQUENTIAL(field) \ + ((field) == V4L2_FIELD_SEQ_TB ||\ + (field) == V4L2_FIELD_SEQ_BT) enum v4l2_buf_type { V4L2_BUF_TYPE_VIDEO_CAPTURE = 1, |