diff options
author | Jose Abreu <Jose.Abreu@synopsys.com> | 2017-03-21 07:49:17 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-08-31 10:02:45 -0400 |
commit | 87f9ed85d0f93fcc810dd7081e5f1a883940fab6 (patch) | |
tree | af7aa19bbe49aecdf3e7162d524f77a0b1019741 /include/media/v4l2-dv-timings.h | |
parent | f992cee5ef9769f8a804d155e4451980cc96c855 (diff) | |
download | talos-op-linux-87f9ed85d0f93fcc810dd7081e5f1a883940fab6.tar.gz talos-op-linux-87f9ed85d0f93fcc810dd7081e5f1a883940fab6.zip |
media: v4l2-dv-timings: Introduce v4l2_calc_timeperframe helper
A new helper function was introduced to facilitate the calculation
of time per frame value whenever we have access to the full
v4l2_dv_timings structure.
This should be used only for receivers and only when there is
enough accuracy in the measured pixel clock value as well as in
the horizontal/vertical values.
Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media/v4l2-dv-timings.h')
-rw-r--r-- | include/media/v4l2-dv-timings.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/media/v4l2-dv-timings.h b/include/media/v4l2-dv-timings.h index 17cb27df1b81..fb355d9577a4 100644 --- a/include/media/v4l2-dv-timings.h +++ b/include/media/v4l2-dv-timings.h @@ -10,6 +10,17 @@ #include <linux/videodev2.h> +/** + * v4l2_calc_timeperframe - helper function to calculate timeperframe based + * v4l2_dv_timings fields. + * @t: Timings for the video mode. + * + * Calculates the expected timeperframe using the pixel clock value and + * horizontal/vertical measures. This means that v4l2_dv_timings structure + * must be correctly and fully filled. + */ +struct v4l2_fract v4l2_calc_timeperframe(const struct v4l2_dv_timings *t); + /* * v4l2_dv_timings_presets: list of all dv_timings presets. */ |