aboutsummaryrefslogtreecommitdiffstats
path: root/include/media/v4l2-mediabus.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/media/v4l2-mediabus.h')
-rw-r--r--include/media/v4l2-mediabus.h20
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 {
58 enum v4l2_colorspace colorspace; 58 enum v4l2_colorspace colorspace;
59}; 59};
60 60
61static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt,
62 const struct v4l2_mbus_framefmt *mbus_fmt)
63{
64 pix_fmt->width = mbus_fmt->width;
65 pix_fmt->height = mbus_fmt->height;
66 pix_fmt->field = mbus_fmt->field;
67 pix_fmt->colorspace = mbus_fmt->colorspace;
68}
69
70static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
71 const struct v4l2_pix_format *pix_fmt,
72 enum v4l2_mbus_pixelcode code)
73{
74 mbus_fmt->width = pix_fmt->width;
75 mbus_fmt->height = pix_fmt->height;
76 mbus_fmt->field = pix_fmt->field;
77 mbus_fmt->colorspace = pix_fmt->colorspace;
78 mbus_fmt->code = code;
79}
80
61#endif 81#endif