diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-08-10 05:11:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-09-13 15:09:59 -0400 |
commit | c61bd6a0e2a92009f3879457eeec75b5ad102303 (patch) | |
tree | 267c448b50c3a0ee0515a838dfbcd109f98c0578 /include/media/v4l2-common.h | |
parent | c2a667fa2b40ccb7d21a99ffae53610699a3102c (diff) |
[media] v4l2-common: add CVT and GTF detection functions
These two helper functions detect whether the analog video timings detected
by the video receiver match the VESA CVT or GTF standards.
They basically do the inverse of the CVT and GTF modeline calculations.
This patch also adds a helper function that will determine the aspect ratio
based on the provided EDID values. This aspect ratio can be given to the GTF
helper function.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'include/media/v4l2-common.h')
-rw-r--r-- | include/media/v4l2-common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 447f4b6b716c..1a0b2db4c5d3 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -216,4 +216,13 @@ bool v4l_match_dv_timings(const struct v4l2_dv_timings *t1, | |||
216 | const struct v4l2_dv_timings *t2, | 216 | const struct v4l2_dv_timings *t2, |
217 | unsigned pclock_delta); | 217 | unsigned pclock_delta); |
218 | 218 | ||
219 | bool v4l2_detect_cvt(unsigned frame_height, unsigned hfreq, unsigned vsync, | ||
220 | u32 polarities, struct v4l2_dv_timings *fmt); | ||
221 | |||
222 | bool v4l2_detect_gtf(unsigned frame_height, unsigned hfreq, unsigned vsync, | ||
223 | u32 polarities, struct v4l2_fract aspect, | ||
224 | struct v4l2_dv_timings *fmt); | ||
225 | |||
226 | struct v4l2_fract v4l2_calc_aspect_ratio(u8 hor_landscape, u8 vert_portrait); | ||
227 | |||
219 | #endif /* V4L2_COMMON_H_ */ | 228 | #endif /* V4L2_COMMON_H_ */ |