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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
f992cee5ef
commit
87f9ed85d0
@@ -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.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user