v4l2-mediabus.h 1002 B

123456789101112131415161718192021222324252627282930313233343536
  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. #ifndef V4L2_MEDIABUS_H
  11. #define V4L2_MEDIABUS_H
  12. #include <linux/v4l2-mediabus.h>
  13. static inline void v4l2_fill_pix_format(struct v4l2_pix_format *pix_fmt,
  14. const struct v4l2_mbus_framefmt *mbus_fmt)
  15. {
  16. pix_fmt->width = mbus_fmt->width;
  17. pix_fmt->height = mbus_fmt->height;
  18. pix_fmt->field = mbus_fmt->field;
  19. pix_fmt->colorspace = mbus_fmt->colorspace;
  20. }
  21. static inline void v4l2_fill_mbus_format(struct v4l2_mbus_framefmt *mbus_fmt,
  22. const struct v4l2_pix_format *pix_fmt,
  23. enum v4l2_mbus_pixelcode code)
  24. {
  25. mbus_fmt->width = pix_fmt->width;
  26. mbus_fmt->height = pix_fmt->height;
  27. mbus_fmt->field = pix_fmt->field;
  28. mbus_fmt->colorspace = pix_fmt->colorspace;
  29. mbus_fmt->code = code;
  30. }
  31. #endif