Guennadi Liakhovetski | 9a74251 | 2009-12-11 11:41:28 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Media Bus API header |
| 3 | * |
| 4 | * Copyright (C) 2009, Guennadi Liakhovetski <g.liakhovetski@gmx.de> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | |
| 11 | #ifndef V4L2_MEDIABUS_H |
| 12 | #define V4L2_MEDIABUS_H |
| 13 | |
Laurent Pinchart | 2ef2d5a | 2010-03-15 19:33:31 -0300 | [diff] [blame] | 14 | #include <linux/v4l2-mediabus.h> |
Guennadi Liakhovetski | 9a74251 | 2009-12-11 11:41:28 -0300 | [diff] [blame] | 15 | |
Hans Verkuil | 3a21cee | 2010-05-08 17:08:58 -0300 | [diff] [blame] | 16 | static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt, |
| 17 | const struct v4l2_mbus_framefmt *mbus_fmt) |
| 18 | { |
| 19 | pix_fmt->width = mbus_fmt->width; |
| 20 | pix_fmt->height = mbus_fmt->height; |
| 21 | pix_fmt->field = mbus_fmt->field; |
| 22 | pix_fmt->colorspace = mbus_fmt->colorspace; |
| 23 | } |
| 24 | |
| 25 | static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt, |
| 26 | const struct v4l2_pix_format *pix_fmt, |
| 27 | enum v4l2_mbus_pixelcode code) |
| 28 | { |
| 29 | mbus_fmt->width = pix_fmt->width; |
| 30 | mbus_fmt->height = pix_fmt->height; |
| 31 | mbus_fmt->field = pix_fmt->field; |
| 32 | mbus_fmt->colorspace = pix_fmt->colorspace; |
| 33 | mbus_fmt->code = code; |
| 34 | } |
| 35 | |
Guennadi Liakhovetski | 9a74251 | 2009-12-11 11:41:28 -0300 | [diff] [blame] | 36 | #endif |