Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: videodev2.h
/* SPDX-License-Identifier: ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) */
[0] Fix | Delete
/*
[1] Fix | Delete
* Video for Linux Two header file
[2] Fix | Delete
*
[3] Fix | Delete
* Copyright (C) 1999-2012 the contributors
[4] Fix | Delete
*
[5] Fix | Delete
* This program is free software; you can redistribute it and/or modify
[6] Fix | Delete
* it under the terms of the GNU General Public License as published by
[7] Fix | Delete
* the Free Software Foundation; either version 2 of the License, or
[8] Fix | Delete
* (at your option) any later version.
[9] Fix | Delete
*
[10] Fix | Delete
* This program is distributed in the hope that it will be useful,
[11] Fix | Delete
* but WITHOUT ANY WARRANTY; without even the implied warranty of
[12] Fix | Delete
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
[13] Fix | Delete
* GNU General Public License for more details.
[14] Fix | Delete
*
[15] Fix | Delete
* Alternatively you can redistribute this file under the terms of the
[16] Fix | Delete
* BSD license as stated below:
[17] Fix | Delete
*
[18] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[19] Fix | Delete
* modification, are permitted provided that the following conditions
[20] Fix | Delete
* are met:
[21] Fix | Delete
* 1. Redistributions of source code must retain the above copyright
[22] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[23] Fix | Delete
* 2. Redistributions in binary form must reproduce the above copyright
[24] Fix | Delete
* notice, this list of conditions and the following disclaimer in
[25] Fix | Delete
* the documentation and/or other materials provided with the
[26] Fix | Delete
* distribution.
[27] Fix | Delete
* 3. The names of its contributors may not be used to endorse or promote
[28] Fix | Delete
* products derived from this software without specific prior written
[29] Fix | Delete
* permission.
[30] Fix | Delete
*
[31] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
[32] Fix | Delete
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
[33] Fix | Delete
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
[34] Fix | Delete
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
[35] Fix | Delete
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
[36] Fix | Delete
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
[37] Fix | Delete
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
[38] Fix | Delete
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
[39] Fix | Delete
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
[40] Fix | Delete
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
[41] Fix | Delete
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[42] Fix | Delete
*
[43] Fix | Delete
* Header file for v4l or V4L2 drivers and applications
[44] Fix | Delete
* with public API.
[45] Fix | Delete
* All kernel-specific stuff were moved to media/v4l2-dev.h, so
[46] Fix | Delete
* no #if __KERNEL tests are allowed here
[47] Fix | Delete
*
[48] Fix | Delete
* See https://linuxtv.org for more info
[49] Fix | Delete
*
[50] Fix | Delete
* Author: Bill Dirks <bill@thedirks.org>
[51] Fix | Delete
* Justin Schoeman
[52] Fix | Delete
* Hans Verkuil <hverkuil@xs4all.nl>
[53] Fix | Delete
* et al.
[54] Fix | Delete
*/
[55] Fix | Delete
#ifndef __LINUX_VIDEODEV2_H
[56] Fix | Delete
#define __LINUX_VIDEODEV2_H
[57] Fix | Delete
[58] Fix | Delete
#include <sys/time.h>
[59] Fix | Delete
[60] Fix | Delete
#include <linux/ioctl.h>
[61] Fix | Delete
#include <linux/types.h>
[62] Fix | Delete
#include <linux/v4l2-common.h>
[63] Fix | Delete
#include <linux/v4l2-controls.h>
[64] Fix | Delete
[65] Fix | Delete
/*
[66] Fix | Delete
* Common stuff for both V4L1 and V4L2
[67] Fix | Delete
* Moved from videodev.h
[68] Fix | Delete
*/
[69] Fix | Delete
#define VIDEO_MAX_FRAME 32
[70] Fix | Delete
#define VIDEO_MAX_PLANES 8
[71] Fix | Delete
[72] Fix | Delete
/*
[73] Fix | Delete
* M I S C E L L A N E O U S
[74] Fix | Delete
*/
[75] Fix | Delete
[76] Fix | Delete
/* Four-character-code (FOURCC) */
[77] Fix | Delete
#define v4l2_fourcc(a, b, c, d)\
[78] Fix | Delete
((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) | ((__u32)(d) << 24))
[79] Fix | Delete
#define v4l2_fourcc_be(a, b, c, d) (v4l2_fourcc(a, b, c, d) | (1U << 31))
[80] Fix | Delete
[81] Fix | Delete
/*
[82] Fix | Delete
* E N U M S
[83] Fix | Delete
*/
[84] Fix | Delete
enum v4l2_field {
[85] Fix | Delete
V4L2_FIELD_ANY = 0, /* driver can choose from none,
[86] Fix | Delete
top, bottom, interlaced
[87] Fix | Delete
depending on whatever it thinks
[88] Fix | Delete
is approximate ... */
[89] Fix | Delete
V4L2_FIELD_NONE = 1, /* this device has no fields ... */
[90] Fix | Delete
V4L2_FIELD_TOP = 2, /* top field only */
[91] Fix | Delete
V4L2_FIELD_BOTTOM = 3, /* bottom field only */
[92] Fix | Delete
V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
[93] Fix | Delete
V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
[94] Fix | Delete
buffer, top-bottom order */
[95] Fix | Delete
V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
[96] Fix | Delete
V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
[97] Fix | Delete
separate buffers */
[98] Fix | Delete
V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
[99] Fix | Delete
first and the top field is
[100] Fix | Delete
transmitted first */
[101] Fix | Delete
V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
[102] Fix | Delete
first and the bottom field is
[103] Fix | Delete
transmitted first */
[104] Fix | Delete
};
[105] Fix | Delete
#define V4L2_FIELD_HAS_TOP(field) \
[106] Fix | Delete
((field) == V4L2_FIELD_TOP ||\
[107] Fix | Delete
(field) == V4L2_FIELD_INTERLACED ||\
[108] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_TB ||\
[109] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_BT ||\
[110] Fix | Delete
(field) == V4L2_FIELD_SEQ_TB ||\
[111] Fix | Delete
(field) == V4L2_FIELD_SEQ_BT)
[112] Fix | Delete
#define V4L2_FIELD_HAS_BOTTOM(field) \
[113] Fix | Delete
((field) == V4L2_FIELD_BOTTOM ||\
[114] Fix | Delete
(field) == V4L2_FIELD_INTERLACED ||\
[115] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_TB ||\
[116] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_BT ||\
[117] Fix | Delete
(field) == V4L2_FIELD_SEQ_TB ||\
[118] Fix | Delete
(field) == V4L2_FIELD_SEQ_BT)
[119] Fix | Delete
#define V4L2_FIELD_HAS_BOTH(field) \
[120] Fix | Delete
((field) == V4L2_FIELD_INTERLACED ||\
[121] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_TB ||\
[122] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_BT ||\
[123] Fix | Delete
(field) == V4L2_FIELD_SEQ_TB ||\
[124] Fix | Delete
(field) == V4L2_FIELD_SEQ_BT)
[125] Fix | Delete
#define V4L2_FIELD_HAS_T_OR_B(field) \
[126] Fix | Delete
((field) == V4L2_FIELD_BOTTOM ||\
[127] Fix | Delete
(field) == V4L2_FIELD_TOP ||\
[128] Fix | Delete
(field) == V4L2_FIELD_ALTERNATE)
[129] Fix | Delete
#define V4L2_FIELD_IS_INTERLACED(field) \
[130] Fix | Delete
((field) == V4L2_FIELD_INTERLACED ||\
[131] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_TB ||\
[132] Fix | Delete
(field) == V4L2_FIELD_INTERLACED_BT)
[133] Fix | Delete
#define V4L2_FIELD_IS_SEQUENTIAL(field) \
[134] Fix | Delete
((field) == V4L2_FIELD_SEQ_TB ||\
[135] Fix | Delete
(field) == V4L2_FIELD_SEQ_BT)
[136] Fix | Delete
[137] Fix | Delete
enum v4l2_buf_type {
[138] Fix | Delete
V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
[139] Fix | Delete
V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
[140] Fix | Delete
V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
[141] Fix | Delete
V4L2_BUF_TYPE_VBI_CAPTURE = 4,
[142] Fix | Delete
V4L2_BUF_TYPE_VBI_OUTPUT = 5,
[143] Fix | Delete
V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
[144] Fix | Delete
V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
[145] Fix | Delete
V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
[146] Fix | Delete
V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE = 9,
[147] Fix | Delete
V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
[148] Fix | Delete
V4L2_BUF_TYPE_SDR_CAPTURE = 11,
[149] Fix | Delete
V4L2_BUF_TYPE_SDR_OUTPUT = 12,
[150] Fix | Delete
V4L2_BUF_TYPE_META_CAPTURE = 13,
[151] Fix | Delete
V4L2_BUF_TYPE_META_OUTPUT = 14,
[152] Fix | Delete
/* Deprecated, do not use */
[153] Fix | Delete
V4L2_BUF_TYPE_PRIVATE = 0x80,
[154] Fix | Delete
};
[155] Fix | Delete
[156] Fix | Delete
#define V4L2_TYPE_IS_MULTIPLANAR(type) \
[157] Fix | Delete
((type) == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE \
[158] Fix | Delete
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE)
[159] Fix | Delete
[160] Fix | Delete
#define V4L2_TYPE_IS_OUTPUT(type) \
[161] Fix | Delete
((type) == V4L2_BUF_TYPE_VIDEO_OUTPUT \
[162] Fix | Delete
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE \
[163] Fix | Delete
|| (type) == V4L2_BUF_TYPE_VIDEO_OVERLAY \
[164] Fix | Delete
|| (type) == V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY \
[165] Fix | Delete
|| (type) == V4L2_BUF_TYPE_VBI_OUTPUT \
[166] Fix | Delete
|| (type) == V4L2_BUF_TYPE_SLICED_VBI_OUTPUT \
[167] Fix | Delete
|| (type) == V4L2_BUF_TYPE_SDR_OUTPUT \
[168] Fix | Delete
|| (type) == V4L2_BUF_TYPE_META_OUTPUT)
[169] Fix | Delete
[170] Fix | Delete
enum v4l2_tuner_type {
[171] Fix | Delete
V4L2_TUNER_RADIO = 1,
[172] Fix | Delete
V4L2_TUNER_ANALOG_TV = 2,
[173] Fix | Delete
V4L2_TUNER_DIGITAL_TV = 3,
[174] Fix | Delete
V4L2_TUNER_SDR = 4,
[175] Fix | Delete
V4L2_TUNER_RF = 5,
[176] Fix | Delete
};
[177] Fix | Delete
[178] Fix | Delete
/* Deprecated, do not use */
[179] Fix | Delete
#define V4L2_TUNER_ADC V4L2_TUNER_SDR
[180] Fix | Delete
[181] Fix | Delete
enum v4l2_memory {
[182] Fix | Delete
V4L2_MEMORY_MMAP = 1,
[183] Fix | Delete
V4L2_MEMORY_USERPTR = 2,
[184] Fix | Delete
V4L2_MEMORY_OVERLAY = 3,
[185] Fix | Delete
V4L2_MEMORY_DMABUF = 4,
[186] Fix | Delete
};
[187] Fix | Delete
[188] Fix | Delete
/* see also http://vektor.theorem.ca/graphics/ycbcr/ */
[189] Fix | Delete
enum v4l2_colorspace {
[190] Fix | Delete
/*
[191] Fix | Delete
* Default colorspace, i.e. let the driver figure it out.
[192] Fix | Delete
* Can only be used with video capture.
[193] Fix | Delete
*/
[194] Fix | Delete
V4L2_COLORSPACE_DEFAULT = 0,
[195] Fix | Delete
[196] Fix | Delete
/* SMPTE 170M: used for broadcast NTSC/PAL SDTV */
[197] Fix | Delete
V4L2_COLORSPACE_SMPTE170M = 1,
[198] Fix | Delete
[199] Fix | Delete
/* Obsolete pre-1998 SMPTE 240M HDTV standard, superseded by Rec 709 */
[200] Fix | Delete
V4L2_COLORSPACE_SMPTE240M = 2,
[201] Fix | Delete
[202] Fix | Delete
/* Rec.709: used for HDTV */
[203] Fix | Delete
V4L2_COLORSPACE_REC709 = 3,
[204] Fix | Delete
[205] Fix | Delete
/*
[206] Fix | Delete
* Deprecated, do not use. No driver will ever return this. This was
[207] Fix | Delete
* based on a misunderstanding of the bt878 datasheet.
[208] Fix | Delete
*/
[209] Fix | Delete
V4L2_COLORSPACE_BT878 = 4,
[210] Fix | Delete
[211] Fix | Delete
/*
[212] Fix | Delete
* NTSC 1953 colorspace. This only makes sense when dealing with
[213] Fix | Delete
* really, really old NTSC recordings. Superseded by SMPTE 170M.
[214] Fix | Delete
*/
[215] Fix | Delete
V4L2_COLORSPACE_470_SYSTEM_M = 5,
[216] Fix | Delete
[217] Fix | Delete
/*
[218] Fix | Delete
* EBU Tech 3213 PAL/SECAM colorspace. This only makes sense when
[219] Fix | Delete
* dealing with really old PAL/SECAM recordings. Superseded by
[220] Fix | Delete
* SMPTE 170M.
[221] Fix | Delete
*/
[222] Fix | Delete
V4L2_COLORSPACE_470_SYSTEM_BG = 6,
[223] Fix | Delete
[224] Fix | Delete
/*
[225] Fix | Delete
* Effectively shorthand for V4L2_COLORSPACE_SRGB, V4L2_YCBCR_ENC_601
[226] Fix | Delete
* and V4L2_QUANTIZATION_FULL_RANGE. To be used for (Motion-)JPEG.
[227] Fix | Delete
*/
[228] Fix | Delete
V4L2_COLORSPACE_JPEG = 7,
[229] Fix | Delete
[230] Fix | Delete
/* For RGB colorspaces such as produces by most webcams. */
[231] Fix | Delete
V4L2_COLORSPACE_SRGB = 8,
[232] Fix | Delete
[233] Fix | Delete
/* opRGB colorspace */
[234] Fix | Delete
V4L2_COLORSPACE_OPRGB = 9,
[235] Fix | Delete
[236] Fix | Delete
/* BT.2020 colorspace, used for UHDTV. */
[237] Fix | Delete
V4L2_COLORSPACE_BT2020 = 10,
[238] Fix | Delete
[239] Fix | Delete
/* Raw colorspace: for RAW unprocessed images */
[240] Fix | Delete
V4L2_COLORSPACE_RAW = 11,
[241] Fix | Delete
[242] Fix | Delete
/* DCI-P3 colorspace, used by cinema projectors */
[243] Fix | Delete
V4L2_COLORSPACE_DCI_P3 = 12,
[244] Fix | Delete
};
[245] Fix | Delete
[246] Fix | Delete
/*
[247] Fix | Delete
* Determine how COLORSPACE_DEFAULT should map to a proper colorspace.
[248] Fix | Delete
* This depends on whether this is a SDTV image (use SMPTE 170M), an
[249] Fix | Delete
* HDTV image (use Rec. 709), or something else (use sRGB).
[250] Fix | Delete
*/
[251] Fix | Delete
#define V4L2_MAP_COLORSPACE_DEFAULT(is_sdtv, is_hdtv) \
[252] Fix | Delete
((is_sdtv) ? V4L2_COLORSPACE_SMPTE170M : \
[253] Fix | Delete
((is_hdtv) ? V4L2_COLORSPACE_REC709 : V4L2_COLORSPACE_SRGB))
[254] Fix | Delete
[255] Fix | Delete
enum v4l2_xfer_func {
[256] Fix | Delete
/*
[257] Fix | Delete
* Mapping of V4L2_XFER_FUNC_DEFAULT to actual transfer functions
[258] Fix | Delete
* for the various colorspaces:
[259] Fix | Delete
*
[260] Fix | Delete
* V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
[261] Fix | Delete
* V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_REC709 and
[262] Fix | Delete
* V4L2_COLORSPACE_BT2020: V4L2_XFER_FUNC_709
[263] Fix | Delete
*
[264] Fix | Delete
* V4L2_COLORSPACE_SRGB, V4L2_COLORSPACE_JPEG: V4L2_XFER_FUNC_SRGB
[265] Fix | Delete
*
[266] Fix | Delete
* V4L2_COLORSPACE_OPRGB: V4L2_XFER_FUNC_OPRGB
[267] Fix | Delete
*
[268] Fix | Delete
* V4L2_COLORSPACE_SMPTE240M: V4L2_XFER_FUNC_SMPTE240M
[269] Fix | Delete
*
[270] Fix | Delete
* V4L2_COLORSPACE_RAW: V4L2_XFER_FUNC_NONE
[271] Fix | Delete
*
[272] Fix | Delete
* V4L2_COLORSPACE_DCI_P3: V4L2_XFER_FUNC_DCI_P3
[273] Fix | Delete
*/
[274] Fix | Delete
V4L2_XFER_FUNC_DEFAULT = 0,
[275] Fix | Delete
V4L2_XFER_FUNC_709 = 1,
[276] Fix | Delete
V4L2_XFER_FUNC_SRGB = 2,
[277] Fix | Delete
V4L2_XFER_FUNC_OPRGB = 3,
[278] Fix | Delete
V4L2_XFER_FUNC_SMPTE240M = 4,
[279] Fix | Delete
V4L2_XFER_FUNC_NONE = 5,
[280] Fix | Delete
V4L2_XFER_FUNC_DCI_P3 = 6,
[281] Fix | Delete
V4L2_XFER_FUNC_SMPTE2084 = 7,
[282] Fix | Delete
};
[283] Fix | Delete
[284] Fix | Delete
/*
[285] Fix | Delete
* Determine how XFER_FUNC_DEFAULT should map to a proper transfer function.
[286] Fix | Delete
* This depends on the colorspace.
[287] Fix | Delete
*/
[288] Fix | Delete
#define V4L2_MAP_XFER_FUNC_DEFAULT(colsp) \
[289] Fix | Delete
((colsp) == V4L2_COLORSPACE_OPRGB ? V4L2_XFER_FUNC_OPRGB : \
[290] Fix | Delete
((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_XFER_FUNC_SMPTE240M : \
[291] Fix | Delete
((colsp) == V4L2_COLORSPACE_DCI_P3 ? V4L2_XFER_FUNC_DCI_P3 : \
[292] Fix | Delete
((colsp) == V4L2_COLORSPACE_RAW ? V4L2_XFER_FUNC_NONE : \
[293] Fix | Delete
((colsp) == V4L2_COLORSPACE_SRGB || (colsp) == V4L2_COLORSPACE_JPEG ? \
[294] Fix | Delete
V4L2_XFER_FUNC_SRGB : V4L2_XFER_FUNC_709)))))
[295] Fix | Delete
[296] Fix | Delete
enum v4l2_ycbcr_encoding {
[297] Fix | Delete
/*
[298] Fix | Delete
* Mapping of V4L2_YCBCR_ENC_DEFAULT to actual encodings for the
[299] Fix | Delete
* various colorspaces:
[300] Fix | Delete
*
[301] Fix | Delete
* V4L2_COLORSPACE_SMPTE170M, V4L2_COLORSPACE_470_SYSTEM_M,
[302] Fix | Delete
* V4L2_COLORSPACE_470_SYSTEM_BG, V4L2_COLORSPACE_SRGB,
[303] Fix | Delete
* V4L2_COLORSPACE_OPRGB and V4L2_COLORSPACE_JPEG: V4L2_YCBCR_ENC_601
[304] Fix | Delete
*
[305] Fix | Delete
* V4L2_COLORSPACE_REC709 and V4L2_COLORSPACE_DCI_P3: V4L2_YCBCR_ENC_709
[306] Fix | Delete
*
[307] Fix | Delete
* V4L2_COLORSPACE_BT2020: V4L2_YCBCR_ENC_BT2020
[308] Fix | Delete
*
[309] Fix | Delete
* V4L2_COLORSPACE_SMPTE240M: V4L2_YCBCR_ENC_SMPTE240M
[310] Fix | Delete
*/
[311] Fix | Delete
V4L2_YCBCR_ENC_DEFAULT = 0,
[312] Fix | Delete
[313] Fix | Delete
/* ITU-R 601 -- SDTV */
[314] Fix | Delete
V4L2_YCBCR_ENC_601 = 1,
[315] Fix | Delete
[316] Fix | Delete
/* Rec. 709 -- HDTV */
[317] Fix | Delete
V4L2_YCBCR_ENC_709 = 2,
[318] Fix | Delete
[319] Fix | Delete
/* ITU-R 601/EN 61966-2-4 Extended Gamut -- SDTV */
[320] Fix | Delete
V4L2_YCBCR_ENC_XV601 = 3,
[321] Fix | Delete
[322] Fix | Delete
/* Rec. 709/EN 61966-2-4 Extended Gamut -- HDTV */
[323] Fix | Delete
V4L2_YCBCR_ENC_XV709 = 4,
[324] Fix | Delete
[325] Fix | Delete
/*
[326] Fix | Delete
* sYCC (Y'CbCr encoding of sRGB), identical to ENC_601. It was added
[327] Fix | Delete
* originally due to a misunderstanding of the sYCC standard. It should
[328] Fix | Delete
* not be used, instead use V4L2_YCBCR_ENC_601.
[329] Fix | Delete
*/
[330] Fix | Delete
V4L2_YCBCR_ENC_SYCC = 5,
[331] Fix | Delete
[332] Fix | Delete
/* BT.2020 Non-constant Luminance Y'CbCr */
[333] Fix | Delete
V4L2_YCBCR_ENC_BT2020 = 6,
[334] Fix | Delete
[335] Fix | Delete
/* BT.2020 Constant Luminance Y'CbcCrc */
[336] Fix | Delete
V4L2_YCBCR_ENC_BT2020_CONST_LUM = 7,
[337] Fix | Delete
[338] Fix | Delete
/* SMPTE 240M -- Obsolete HDTV */
[339] Fix | Delete
V4L2_YCBCR_ENC_SMPTE240M = 8,
[340] Fix | Delete
};
[341] Fix | Delete
[342] Fix | Delete
/*
[343] Fix | Delete
* enum v4l2_hsv_encoding values should not collide with the ones from
[344] Fix | Delete
* enum v4l2_ycbcr_encoding.
[345] Fix | Delete
*/
[346] Fix | Delete
enum v4l2_hsv_encoding {
[347] Fix | Delete
[348] Fix | Delete
/* Hue mapped to 0 - 179 */
[349] Fix | Delete
V4L2_HSV_ENC_180 = 128,
[350] Fix | Delete
[351] Fix | Delete
/* Hue mapped to 0-255 */
[352] Fix | Delete
V4L2_HSV_ENC_256 = 129,
[353] Fix | Delete
};
[354] Fix | Delete
[355] Fix | Delete
/*
[356] Fix | Delete
* Determine how YCBCR_ENC_DEFAULT should map to a proper Y'CbCr encoding.
[357] Fix | Delete
* This depends on the colorspace.
[358] Fix | Delete
*/
[359] Fix | Delete
#define V4L2_MAP_YCBCR_ENC_DEFAULT(colsp) \
[360] Fix | Delete
(((colsp) == V4L2_COLORSPACE_REC709 || \
[361] Fix | Delete
(colsp) == V4L2_COLORSPACE_DCI_P3) ? V4L2_YCBCR_ENC_709 : \
[362] Fix | Delete
((colsp) == V4L2_COLORSPACE_BT2020 ? V4L2_YCBCR_ENC_BT2020 : \
[363] Fix | Delete
((colsp) == V4L2_COLORSPACE_SMPTE240M ? V4L2_YCBCR_ENC_SMPTE240M : \
[364] Fix | Delete
V4L2_YCBCR_ENC_601)))
[365] Fix | Delete
[366] Fix | Delete
enum v4l2_quantization {
[367] Fix | Delete
/*
[368] Fix | Delete
* The default for R'G'B' quantization is always full range, except
[369] Fix | Delete
* for the BT2020 colorspace. For Y'CbCr the quantization is always
[370] Fix | Delete
* limited range, except for COLORSPACE_JPEG: this is full range.
[371] Fix | Delete
*/
[372] Fix | Delete
V4L2_QUANTIZATION_DEFAULT = 0,
[373] Fix | Delete
V4L2_QUANTIZATION_FULL_RANGE = 1,
[374] Fix | Delete
V4L2_QUANTIZATION_LIM_RANGE = 2,
[375] Fix | Delete
};
[376] Fix | Delete
[377] Fix | Delete
/*
[378] Fix | Delete
* Determine how QUANTIZATION_DEFAULT should map to a proper quantization.
[379] Fix | Delete
* This depends on whether the image is RGB or not, the colorspace and the
[380] Fix | Delete
* Y'CbCr encoding.
[381] Fix | Delete
*/
[382] Fix | Delete
#define V4L2_MAP_QUANTIZATION_DEFAULT(is_rgb_or_hsv, colsp, ycbcr_enc) \
[383] Fix | Delete
(((is_rgb_or_hsv) && (colsp) == V4L2_COLORSPACE_BT2020) ? \
[384] Fix | Delete
V4L2_QUANTIZATION_LIM_RANGE : \
[385] Fix | Delete
(((is_rgb_or_hsv) || (colsp) == V4L2_COLORSPACE_JPEG) ? \
[386] Fix | Delete
V4L2_QUANTIZATION_FULL_RANGE : V4L2_QUANTIZATION_LIM_RANGE))
[387] Fix | Delete
[388] Fix | Delete
/*
[389] Fix | Delete
* Deprecated names for opRGB colorspace (IEC 61966-2-5)
[390] Fix | Delete
*
[391] Fix | Delete
* WARNING: Please don't use these deprecated defines in your code, as
[392] Fix | Delete
* there is a chance we have to remove them in the future.
[393] Fix | Delete
*/
[394] Fix | Delete
#define V4L2_COLORSPACE_ADOBERGB V4L2_COLORSPACE_OPRGB
[395] Fix | Delete
#define V4L2_XFER_FUNC_ADOBERGB V4L2_XFER_FUNC_OPRGB
[396] Fix | Delete
[397] Fix | Delete
enum v4l2_priority {
[398] Fix | Delete
V4L2_PRIORITY_UNSET = 0, /* not initialized */
[399] Fix | Delete
V4L2_PRIORITY_BACKGROUND = 1,
[400] Fix | Delete
V4L2_PRIORITY_INTERACTIVE = 2,
[401] Fix | Delete
V4L2_PRIORITY_RECORD = 3,
[402] Fix | Delete
V4L2_PRIORITY_DEFAULT = V4L2_PRIORITY_INTERACTIVE,
[403] Fix | Delete
};
[404] Fix | Delete
[405] Fix | Delete
struct v4l2_rect {
[406] Fix | Delete
__s32 left;
[407] Fix | Delete
__s32 top;
[408] Fix | Delete
__u32 width;
[409] Fix | Delete
__u32 height;
[410] Fix | Delete
};
[411] Fix | Delete
[412] Fix | Delete
struct v4l2_fract {
[413] Fix | Delete
__u32 numerator;
[414] Fix | Delete
__u32 denominator;
[415] Fix | Delete
};
[416] Fix | Delete
[417] Fix | Delete
/**
[418] Fix | Delete
* struct v4l2_capability - Describes V4L2 device caps returned by VIDIOC_QUERYCAP
[419] Fix | Delete
*
[420] Fix | Delete
* @driver: name of the driver module (e.g. "bttv")
[421] Fix | Delete
* @card: name of the card (e.g. "Hauppauge WinTV")
[422] Fix | Delete
* @bus_info: name of the bus (e.g. "PCI:" + pci_name(pci_dev) )
[423] Fix | Delete
* @version: KERNEL_VERSION
[424] Fix | Delete
* @capabilities: capabilities of the physical device as a whole
[425] Fix | Delete
* @device_caps: capabilities accessed via this particular device (node)
[426] Fix | Delete
* @reserved: reserved fields for future extensions
[427] Fix | Delete
*/
[428] Fix | Delete
struct v4l2_capability {
[429] Fix | Delete
__u8 driver[16];
[430] Fix | Delete
__u8 card[32];
[431] Fix | Delete
__u8 bus_info[32];
[432] Fix | Delete
__u32 version;
[433] Fix | Delete
__u32 capabilities;
[434] Fix | Delete
__u32 device_caps;
[435] Fix | Delete
__u32 reserved[3];
[436] Fix | Delete
};
[437] Fix | Delete
[438] Fix | Delete
/* Values for 'capabilities' field */
[439] Fix | Delete
#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */
[440] Fix | Delete
#define V4L2_CAP_VIDEO_OUTPUT 0x00000002 /* Is a video output device */
[441] Fix | Delete
#define V4L2_CAP_VIDEO_OVERLAY 0x00000004 /* Can do video overlay */
[442] Fix | Delete
#define V4L2_CAP_VBI_CAPTURE 0x00000010 /* Is a raw VBI capture device */
[443] Fix | Delete
#define V4L2_CAP_VBI_OUTPUT 0x00000020 /* Is a raw VBI output device */
[444] Fix | Delete
#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */
[445] Fix | Delete
#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */
[446] Fix | Delete
#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
[447] Fix | Delete
#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000200 /* Can do video output overlay */
[448] Fix | Delete
#define V4L2_CAP_HW_FREQ_SEEK 0x00000400 /* Can do hardware frequency seek */
[449] Fix | Delete
#define V4L2_CAP_RDS_OUTPUT 0x00000800 /* Is an RDS encoder */
[450] Fix | Delete
[451] Fix | Delete
/* Is a video capture device that supports multiplanar formats */
[452] Fix | Delete
#define V4L2_CAP_VIDEO_CAPTURE_MPLANE 0x00001000
[453] Fix | Delete
/* Is a video output device that supports multiplanar formats */
[454] Fix | Delete
#define V4L2_CAP_VIDEO_OUTPUT_MPLANE 0x00002000
[455] Fix | Delete
/* Is a video mem-to-mem device that supports multiplanar formats */
[456] Fix | Delete
#define V4L2_CAP_VIDEO_M2M_MPLANE 0x00004000
[457] Fix | Delete
/* Is a video mem-to-mem device */
[458] Fix | Delete
#define V4L2_CAP_VIDEO_M2M 0x00008000
[459] Fix | Delete
[460] Fix | Delete
#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
[461] Fix | Delete
#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
[462] Fix | Delete
#define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
[463] Fix | Delete
#define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
[464] Fix | Delete
[465] Fix | Delete
#define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */
[466] Fix | Delete
#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */
[467] Fix | Delete
#define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */
[468] Fix | Delete
#define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */
[469] Fix | Delete
[470] Fix | Delete
#define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
[471] Fix | Delete
#define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
[472] Fix | Delete
#define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
[473] Fix | Delete
#define V4L2_CAP_META_OUTPUT 0x08000000 /* Is a metadata output device */
[474] Fix | Delete
[475] Fix | Delete
#define V4L2_CAP_TOUCH 0x10000000 /* Is a touch device */
[476] Fix | Delete
[477] Fix | Delete
#define V4L2_CAP_DEVICE_CAPS 0x80000000 /* sets device capabilities field */
[478] Fix | Delete
[479] Fix | Delete
/*
[480] Fix | Delete
* V I D E O I M A G E F O R M A T
[481] Fix | Delete
*/
[482] Fix | Delete
struct v4l2_pix_format {
[483] Fix | Delete
__u32 width;
[484] Fix | Delete
__u32 height;
[485] Fix | Delete
__u32 pixelformat;
[486] Fix | Delete
__u32 field; /* enum v4l2_field */
[487] Fix | Delete
__u32 bytesperline; /* for padding, zero if unused */
[488] Fix | Delete
__u32 sizeimage;
[489] Fix | Delete
__u32 colorspace; /* enum v4l2_colorspace */
[490] Fix | Delete
__u32 priv; /* private data, depends on pixelformat */
[491] Fix | Delete
__u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */
[492] Fix | Delete
union {
[493] Fix | Delete
/* enum v4l2_ycbcr_encoding */
[494] Fix | Delete
__u32 ycbcr_enc;
[495] Fix | Delete
/* enum v4l2_hsv_encoding */
[496] Fix | Delete
__u32 hsv_enc;
[497] Fix | Delete
};
[498] Fix | Delete
__u32 quantization; /* enum v4l2_quantization */
[499] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function