![]() |
|
|||
0001 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 0002 /* 0003 * Copyright (C) 2013 - 2014 Texas Instruments, Inc. 0004 * 0005 * Benoit Parrot <bparrot@ti.com> 0006 * Lad, Prabhakar <prabhakar.csengg@gmail.com> 0007 * 0008 * This program is free software; you may redistribute it and/or modify 0009 * it under the terms of the GNU General Public License as published by 0010 * the Free Software Foundation; version 2 of the License. 0011 * 0012 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 0013 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 0014 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 0015 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 0016 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 0017 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 0018 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 0019 * SOFTWARE. 0020 */ 0021 0022 #ifndef AM437X_VPFE_USER_H 0023 #define AM437X_VPFE_USER_H 0024 0025 #include <linux/videodev2.h> 0026 0027 enum vpfe_ccdc_data_size { 0028 VPFE_CCDC_DATA_16BITS = 0, 0029 VPFE_CCDC_DATA_15BITS, 0030 VPFE_CCDC_DATA_14BITS, 0031 VPFE_CCDC_DATA_13BITS, 0032 VPFE_CCDC_DATA_12BITS, 0033 VPFE_CCDC_DATA_11BITS, 0034 VPFE_CCDC_DATA_10BITS, 0035 VPFE_CCDC_DATA_8BITS, 0036 }; 0037 0038 /* enum for No of pixel per line to be avg. in Black Clamping*/ 0039 enum vpfe_ccdc_sample_length { 0040 VPFE_CCDC_SAMPLE_1PIXELS = 0, 0041 VPFE_CCDC_SAMPLE_2PIXELS, 0042 VPFE_CCDC_SAMPLE_4PIXELS, 0043 VPFE_CCDC_SAMPLE_8PIXELS, 0044 VPFE_CCDC_SAMPLE_16PIXELS, 0045 }; 0046 0047 /* enum for No of lines in Black Clamping */ 0048 enum vpfe_ccdc_sample_line { 0049 VPFE_CCDC_SAMPLE_1LINES = 0, 0050 VPFE_CCDC_SAMPLE_2LINES, 0051 VPFE_CCDC_SAMPLE_4LINES, 0052 VPFE_CCDC_SAMPLE_8LINES, 0053 VPFE_CCDC_SAMPLE_16LINES, 0054 }; 0055 0056 /* enum for Alaw gamma width */ 0057 enum vpfe_ccdc_gamma_width { 0058 VPFE_CCDC_GAMMA_BITS_15_6 = 0, /* use bits 15-6 for gamma */ 0059 VPFE_CCDC_GAMMA_BITS_14_5, 0060 VPFE_CCDC_GAMMA_BITS_13_4, 0061 VPFE_CCDC_GAMMA_BITS_12_3, 0062 VPFE_CCDC_GAMMA_BITS_11_2, 0063 VPFE_CCDC_GAMMA_BITS_10_1, 0064 VPFE_CCDC_GAMMA_BITS_09_0, /* use bits 9-0 for gamma */ 0065 }; 0066 0067 /* structure for ALaw */ 0068 struct vpfe_ccdc_a_law { 0069 /* Enable/disable A-Law */ 0070 unsigned char enable; 0071 /* Gamma Width Input */ 0072 enum vpfe_ccdc_gamma_width gamma_wd; 0073 }; 0074 0075 /* structure for Black Clamping */ 0076 struct vpfe_ccdc_black_clamp { 0077 unsigned char enable; 0078 /* only if bClampEnable is TRUE */ 0079 enum vpfe_ccdc_sample_length sample_pixel; 0080 /* only if bClampEnable is TRUE */ 0081 enum vpfe_ccdc_sample_line sample_ln; 0082 /* only if bClampEnable is TRUE */ 0083 unsigned short start_pixel; 0084 /* only if bClampEnable is TRUE */ 0085 unsigned short sgain; 0086 /* only if bClampEnable is FALSE */ 0087 unsigned short dc_sub; 0088 }; 0089 0090 /* structure for Black Level Compensation */ 0091 struct vpfe_ccdc_black_compensation { 0092 /* Constant value to subtract from Red component */ 0093 char r; 0094 /* Constant value to subtract from Gr component */ 0095 char gr; 0096 /* Constant value to subtract from Blue component */ 0097 char b; 0098 /* Constant value to subtract from Gb component */ 0099 char gb; 0100 }; 0101 0102 /* Structure for CCDC configuration parameters for raw capture mode passed 0103 * by application 0104 */ 0105 struct vpfe_ccdc_config_params_raw { 0106 /* data size value from 8 to 16 bits */ 0107 enum vpfe_ccdc_data_size data_sz; 0108 /* Structure for Optional A-Law */ 0109 struct vpfe_ccdc_a_law alaw; 0110 /* Structure for Optical Black Clamp */ 0111 struct vpfe_ccdc_black_clamp blk_clamp; 0112 /* Structure for Black Compensation */ 0113 struct vpfe_ccdc_black_compensation blk_comp; 0114 }; 0115 0116 /* 0117 * Private IOCTL 0118 * VIDIOC_AM437X_CCDC_CFG - Set CCDC configuration for raw capture 0119 * This is an experimental ioctl that will change in future kernels. So use 0120 * this ioctl with care ! 0121 **/ 0122 #define VIDIOC_AM437X_CCDC_CFG \ 0123 _IOW('V', BASE_VIDIOC_PRIVATE + 1, void *) 0124 0125 #endif /* AM437X_VPFE_USER_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.1.0 LXR engine. The LXR team |
![]() ![]() |