v4l2-common.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * include/linux/v4l2-common.h
  3. *
  4. * Common V4L2 and V4L2 subdev definitions.
  5. *
  6. * Users are advised to #include this file either through videodev2.h
  7. * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
  8. * to this file directly.
  9. *
  10. * Copyright (C) 2012 Nokia Corporation
  11. * Contact: Sakari Ailus <sakari.ailus@iki.fi>
  12. *
  13. * This program is free software; you can redistribute it and/or
  14. * modify it under the terms of the GNU General Public License
  15. * version 2 as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful, but
  18. * WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  20. * General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU General Public License
  23. * along with this program; if not, write to the Free Software
  24. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  25. * 02110-1301 USA
  26. *
  27. */
  28. #ifndef __V4L2_COMMON__
  29. #define __V4L2_COMMON__
  30. /*
  31. *
  32. * Selection interface definitions
  33. *
  34. */
  35. /* Current cropping area */
  36. #define V4L2_SEL_TGT_CROP 0x0000
  37. /* Default cropping area */
  38. #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001
  39. /* Cropping bounds */
  40. #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002
  41. /* Current composing area */
  42. #define V4L2_SEL_TGT_COMPOSE 0x0100
  43. /* Default composing area */
  44. #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101
  45. /* Composing bounds */
  46. #define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102
  47. /* Current composing area plus all padding pixels */
  48. #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103
  49. /* Backward compatibility target definitions --- to be removed. */
  50. #define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP
  51. #define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE
  52. #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP
  53. #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE
  54. #define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS
  55. #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS
  56. /* Selection flags */
  57. #define V4L2_SEL_FLAG_GE (1 << 0)
  58. #define V4L2_SEL_FLAG_LE (1 << 1)
  59. #define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2)
  60. /* Backward compatibility flag definitions --- to be removed. */
  61. #define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE
  62. #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE
  63. #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG
  64. #endif /* __V4L2_COMMON__ */