Commit 7f68127f authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarLad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 5d2db817
...@@ -1057,6 +1057,16 @@ struct v4l2_bt_timings { ...@@ -1057,6 +1057,16 @@ struct v4l2_bt_timings {
or used depends on the hardware. */ or used depends on the hardware. */
#define V4L2_DV_FL_HALF_LINE (1 << 3) #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 /** struct v4l2_dv_timings - DV timings
* @type: the type of the timings * @type: the type of the timings
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment