Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ispresizer.h
Go to the documentation of this file.
1 /*
2  * ispresizer.h
3  *
4  * TI OMAP3 ISP - Resizer module
5  *
6  * Copyright (C) 2010 Nokia Corporation
7  * Copyright (C) 2009 Texas Instruments, Inc
8  *
9  * Contacts: Laurent Pinchart <[email protected]>
10  * Sakari Ailus <[email protected]>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU General Public License version 2 as
14  * published by the Free Software Foundation.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program; if not, write to the Free Software
23  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24  * 02110-1301 USA
25  */
26 
27 #ifndef OMAP3_ISP_RESIZER_H
28 #define OMAP3_ISP_RESIZER_H
29 
30 #include <linux/types.h>
31 
32 /*
33  * Constants for filter coefficents count
34  */
35 #define COEFF_CNT 32
36 
37 /*
38  * struct isprsz_coef - Structure for resizer filter coeffcients.
39  * @h_filter_coef_4tap: Horizontal filter coefficients for 8-phase/4-tap
40  * mode (.5x-4x)
41  * @v_filter_coef_4tap: Vertical filter coefficients for 8-phase/4-tap
42  * mode (.5x-4x)
43  * @h_filter_coef_7tap: Horizontal filter coefficients for 4-phase/7-tap
44  * mode (.25x-.5x)
45  * @v_filter_coef_7tap: Vertical filter coefficients for 4-phase/7-tap
46  * mode (.25x-.5x)
47  */
48 struct isprsz_coef {
51  /* Every 8th value is a dummy value in the following arrays: */
54 };
55 
56 /* Chrominance horizontal algorithm */
58  RSZ_THE_SAME = 0, /* Chrominance the same as Luminance */
59  RSZ_BILINEAR = 1, /* Chrominance uses bilinear interpolation */
60 };
61 
62 /* Resizer input type select */
64  RSZ_YUV422 = 0, /* YUV422 color is interleaved */
65  RSZ_COLOR8 = 1, /* Color separate data on 8 bits */
66 };
67 
68 /*
69  * Structure for horizontal and vertical resizing value
70  */
71 struct resizer_ratio {
74 };
75 
76 /*
77  * Structure for luminance enhancer parameters.
78  */
80  u8 algo; /* algorithm select. */
81  u8 gain; /* maximum gain. */
82  u8 slope; /* slope. */
83  u8 core; /* core offset. */
84 };
85 
88  RESIZER_INPUT_VP, /* input video port - prev or ccdc */
90 };
91 
92 /* Sink and source resizer pads */
93 #define RESZ_PAD_SINK 0
94 #define RESZ_PAD_SOURCE 1
95 #define RESZ_PADS_NUM 2
96 
97 /*
98  * struct isp_res_device - OMAP3 ISP resizer module
99  * @crop.request: Crop rectangle requested by the user
100  * @crop.active: Active crop rectangle (based on hardware requirements)
101  */
105  struct v4l2_mbus_framefmt formats[RESZ_PADS_NUM];
106 
110 
111  u32 addr_base; /* stored source buffer address in memory mode */
112  u32 crop_offset; /* additional offset for crop in memory mode */
114  int pm_state;
115  unsigned int applycrop:1;
119 
120  struct {
123  } crop;
124 };
125 
126 struct isp_device;
127 
128 int omap3isp_resizer_init(struct isp_device *isp);
129 void omap3isp_resizer_cleanup(struct isp_device *isp);
130 
132  struct v4l2_device *vdev);
136 
138  unsigned int *max_rate);
139 
141 
143 
145 
146 #endif /* OMAP3_ISP_RESIZER_H */