diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-05-08 22:08:58 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-06-01 06:21:24 +0200 |
commit | 3a21ceed7f373894a7c537b4dbbe484f36e7ae24 (patch) | |
tree | 8fb69b0287b450f2ae77cc1bfad3efcfb19192f9 /include/media/v4l2-mediabus.h | |
parent | V4L/DVB: saa717x: remove obsolete s_fmt op (diff) | |
download | linux-3a21ceed7f373894a7c537b4dbbe484f36e7ae24.tar.xz linux-3a21ceed7f373894a7c537b4dbbe484f36e7ae24.zip |
V4L/DVB: v4l2-mediabus.h: add two helper functions
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to '')
-rw-r--r-- | include/media/v4l2-mediabus.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/media/v4l2-mediabus.h b/include/media/v4l2-mediabus.h index 0dbe02ada259..d8e1608fee59 100644 --- a/include/media/v4l2-mediabus.h +++ b/include/media/v4l2-mediabus.h @@ -58,4 +58,24 @@ struct v4l2_mbus_framefmt { enum v4l2_colorspace colorspace; }; +static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, + const struct v4l2_mbus_framefmt *mbus_fmt) +{ + pix_fmt->width = mbus_fmt->width; + pix_fmt->height = mbus_fmt->height; + pix_fmt->field = mbus_fmt->field; + pix_fmt->colorspace = mbus_fmt->colorspace; +} + +static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt, + const struct v4l2_pix_format *pix_fmt, + enum v4l2_mbus_pixelcode code) +{ + mbus_fmt->width = pix_fmt->width; + mbus_fmt->height = pix_fmt->height; + mbus_fmt->field = pix_fmt->field; + mbus_fmt->colorspace = pix_fmt->colorspace; + mbus_fmt->code = code; +} + #endif |