1 /* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
3 * include/linux/v4l2-common.h
5 * Common V4L2 and V4L2 subdev definitions.
7 * Users are advised to #include this file either through videodev2.h
8 * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer
9 * to this file directly.
11 * Copyright (C) 2012 Nokia Corporation
12 * Contact: Sakari Ailus <sakari.ailus@iki.fi>
15 #ifndef __V4L2_COMMON__
16 #define __V4L2_COMMON__
18 #include <linux/types.h>
22 * Selection interface definitions
26 /* Current cropping area */
27 #define V4L2_SEL_TGT_CROP 0x0000
28 /* Default cropping area */
29 #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001
31 #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002
32 /* Native frame size */
33 #define V4L2_SEL_TGT_NATIVE_SIZE 0x0003
34 /* Current composing area */
35 #define V4L2_SEL_TGT_COMPOSE 0x0100
36 /* Default composing area */
37 #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101
38 /* Composing bounds */
39 #define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102
40 /* Current composing area plus all padding pixels */
41 #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103
44 #define V4L2_SEL_FLAG_GE (1 << 0)
45 #define V4L2_SEL_FLAG_LE (1 << 1)
46 #define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2)
57 /* Backward compatibility target definitions --- to be removed. */
58 #define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP
59 #define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE
60 #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP
61 #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE
62 #define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS
63 #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS
65 /* Backward compatibility flag definitions --- to be removed. */
66 #define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE
67 #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE
68 #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG
71 #endif /* __V4L2_COMMON__ */