diff options
author | Kuninori Morimoto <morimoto.kuninori@renesas.com> | 2009-03-31 02:44:22 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:43:49 -0400 |
commit | db6cbc8cf2fa699a876e4f76ef069b9a2861900a (patch) | |
tree | 91d7df064f6f874126b88b61f5d6fb3f94e33048 /include | |
parent | e951cbf20cdc7c55c9c752d28411d956675befd6 (diff) |
V4L/DVB (11327): ov772x: add edge contrl support
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/media/ov772x.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/include/media/ov772x.h b/include/media/ov772x.h index 57db48dd85b8..30d9629198ef 100644 --- a/include/media/ov772x.h +++ b/include/media/ov772x.h | |||
@@ -17,10 +17,45 @@ | |||
17 | #define OV772X_FLAG_VFLIP 0x00000001 /* Vertical flip image */ | 17 | #define OV772X_FLAG_VFLIP 0x00000001 /* Vertical flip image */ |
18 | #define OV772X_FLAG_HFLIP 0x00000002 /* Horizontal flip image */ | 18 | #define OV772X_FLAG_HFLIP 0x00000002 /* Horizontal flip image */ |
19 | 19 | ||
20 | /* | ||
21 | * for Edge ctrl | ||
22 | * | ||
23 | * strength also control Auto or Manual Edge Control Mode | ||
24 | * see also OV772X_MANUAL_EDGE_CTRL | ||
25 | */ | ||
26 | struct ov772x_edge_ctrl { | ||
27 | unsigned char strength; | ||
28 | unsigned char threshold; | ||
29 | unsigned char upper; | ||
30 | unsigned char lower; | ||
31 | }; | ||
32 | |||
33 | #define OV772X_MANUAL_EDGE_CTRL 0x80 /* un-used bit of strength */ | ||
34 | #define EDGE_STRENGTH_MASK 0x1F | ||
35 | #define EDGE_THRESHOLD_MASK 0x0F | ||
36 | #define EDGE_UPPER_MASK 0xFF | ||
37 | #define EDGE_LOWER_MASK 0xFF | ||
38 | |||
39 | #define OV772X_AUTO_EDGECTRL(u, l) \ | ||
40 | { \ | ||
41 | .upper = (u & EDGE_UPPER_MASK), \ | ||
42 | .lower = (l & EDGE_LOWER_MASK), \ | ||
43 | } | ||
44 | |||
45 | #define OV772X_MANUAL_EDGECTRL(s, t) \ | ||
46 | { \ | ||
47 | .strength = (s & EDGE_STRENGTH_MASK) | OV772X_MANUAL_EDGE_CTRL,\ | ||
48 | .threshold = (t & EDGE_THRESHOLD_MASK), \ | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * ov772x camera info | ||
53 | */ | ||
20 | struct ov772x_camera_info { | 54 | struct ov772x_camera_info { |
21 | unsigned long buswidth; | 55 | unsigned long buswidth; |
22 | unsigned long flags; | 56 | unsigned long flags; |
23 | struct soc_camera_link link; | 57 | struct soc_camera_link link; |
58 | struct ov772x_edge_ctrl edgectrl; | ||
24 | }; | 59 | }; |
25 | 60 | ||
26 | #endif /* __OV772X_H__ */ | 61 | #endif /* __OV772X_H__ */ |