From 65675f77dc82482a7ffe72f6eade87f80863467b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sat, 8 May 2010 17:08:58 -0300 Subject: [PATCH] --- yaml --- r: 199945 b: refs/heads/master c: 3a21ceed7f373894a7c537b4dbbe484f36e7ae24 h: refs/heads/master i: 199943: 6ec107d0c334fb4c75b8651c3d034a5ec1133e93 v: v3 --- [refs] | 2 +- trunk/include/media/v4l2-mediabus.h | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2e1d28a6bcf1..68b45e950802 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 66e9df07d362b63a594e8663260e0430ba4a17bf +refs/heads/master: 3a21ceed7f373894a7c537b4dbbe484f36e7ae24 diff --git a/trunk/include/media/v4l2-mediabus.h b/trunk/include/media/v4l2-mediabus.h index 0dbe02ada259..d8e1608fee59 100644 --- a/trunk/include/media/v4l2-mediabus.h +++ b/trunk/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