1607ca46eSDavid Howells /* 2607ca46eSDavid Howells * include/linux/v4l2-common.h 3607ca46eSDavid Howells * 4607ca46eSDavid Howells * Common V4L2 and V4L2 subdev definitions. 5607ca46eSDavid Howells * 6607ca46eSDavid Howells * Users are advised to #include this file either through videodev2.h 7607ca46eSDavid Howells * (V4L2) or through v4l2-subdev.h (V4L2 subdev) rather than to refer 8607ca46eSDavid Howells * to this file directly. 9607ca46eSDavid Howells * 10607ca46eSDavid Howells * Copyright (C) 2012 Nokia Corporation 11607ca46eSDavid Howells * Contact: Sakari Ailus <sakari.ailus@iki.fi> 12607ca46eSDavid Howells * 13607ca46eSDavid Howells * This program is free software; you can redistribute it and/or 14607ca46eSDavid Howells * modify it under the terms of the GNU General Public License 15607ca46eSDavid Howells * version 2 as published by the Free Software Foundation. 16607ca46eSDavid Howells * 17607ca46eSDavid Howells * This program is distributed in the hope that it will be useful, but 18607ca46eSDavid Howells * WITHOUT ANY WARRANTY; without even the implied warranty of 19607ca46eSDavid Howells * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 20607ca46eSDavid Howells * General Public License for more details. 21607ca46eSDavid Howells * 22607ca46eSDavid Howells * You should have received a copy of the GNU General Public License 23607ca46eSDavid Howells * along with this program; if not, write to the Free Software 24607ca46eSDavid Howells * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 25607ca46eSDavid Howells * 02110-1301 USA 26607ca46eSDavid Howells * 27607ca46eSDavid Howells */ 28607ca46eSDavid Howells 29607ca46eSDavid Howells #ifndef __V4L2_COMMON__ 30607ca46eSDavid Howells #define __V4L2_COMMON__ 31607ca46eSDavid Howells 32607ca46eSDavid Howells /* 33607ca46eSDavid Howells * 34607ca46eSDavid Howells * Selection interface definitions 35607ca46eSDavid Howells * 36607ca46eSDavid Howells */ 37607ca46eSDavid Howells 38607ca46eSDavid Howells /* Current cropping area */ 39607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP 0x0000 40607ca46eSDavid Howells /* Default cropping area */ 41607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_DEFAULT 0x0001 42607ca46eSDavid Howells /* Cropping bounds */ 43607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_BOUNDS 0x0002 44607ca46eSDavid Howells /* Current composing area */ 45607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE 0x0100 46607ca46eSDavid Howells /* Default composing area */ 47607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_DEFAULT 0x0101 48607ca46eSDavid Howells /* Composing bounds */ 49607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_BOUNDS 0x0102 50607ca46eSDavid Howells /* Current composing area plus all padding pixels */ 51607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_PADDED 0x0103 52607ca46eSDavid Howells 53607ca46eSDavid Howells /* Backward compatibility target definitions --- to be removed. */ 54607ca46eSDavid Howells #define V4L2_SEL_TGT_CROP_ACTIVE V4L2_SEL_TGT_CROP 55607ca46eSDavid Howells #define V4L2_SEL_TGT_COMPOSE_ACTIVE V4L2_SEL_TGT_COMPOSE 56607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_CROP_ACTUAL V4L2_SEL_TGT_CROP 57607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_COMPOSE_ACTUAL V4L2_SEL_TGT_COMPOSE 58607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_CROP_BOUNDS V4L2_SEL_TGT_CROP_BOUNDS 59607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_TGT_COMPOSE_BOUNDS V4L2_SEL_TGT_COMPOSE_BOUNDS 60607ca46eSDavid Howells 61607ca46eSDavid Howells /* Selection flags */ 62607ca46eSDavid Howells #define V4L2_SEL_FLAG_GE (1 << 0) 63607ca46eSDavid Howells #define V4L2_SEL_FLAG_LE (1 << 1) 64607ca46eSDavid Howells #define V4L2_SEL_FLAG_KEEP_CONFIG (1 << 2) 65607ca46eSDavid Howells 66607ca46eSDavid Howells /* Backward compatibility flag definitions --- to be removed. */ 67607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_FLAG_SIZE_GE V4L2_SEL_FLAG_GE 68607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_FLAG_SIZE_LE V4L2_SEL_FLAG_LE 69607ca46eSDavid Howells #define V4L2_SUBDEV_SEL_FLAG_KEEP_CONFIG V4L2_SEL_FLAG_KEEP_CONFIG 70607ca46eSDavid Howells 71607ca46eSDavid Howells #endif /* __V4L2_COMMON__ */ 72