[RFC] frame rate control on a (non sensor) subdev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

the DCMIPP Camera interface (platform/st/stm32/stm32-dcmipp) is able to adjust
the capture rate.  As an example, even if a sensor is streaming at 30fps, it is
possible to either capture:
   - all frames (aka 30fps)
   - 1 frame out of 2 (aka 15 fps)
   - 1 frame out of 4 ...
   - 1 frame out of 8 ...

In such case the dropped frames won't go to the memory and will be dropped
internally by the HW.
This allows for reduction of the amount of captured data, reduce the bus usage,
and can also be useful when the same sensor data must be captured in parallel
by several pipelines outputting in different formats/framerates. (the current
stm32mp13 has a single pipeline but the stm32mp25 has several).

Having a look at existing subdevs within the media tree, I couldn't find similar
subdev having an impact on the framerate (apart from the sensors).  I first
implemented this behavior using frame_interval control on both SINK and SOURCE
pads of the subdev however linux-media doc clearly mentions that frame_interval
should only be done on one pad.  Original idea was to compute the difference of
frame_interval between the SOURCE and SINK pad and thus apply the settings.  As
an example, having a SINK pad frame_interval corresponding to 30fps (coming from
the sensor), and setting a frame_interval of 15fps on the SOURCE pad would lead
to configuring the DCMIPP to perform capture of 1 frame out of 2.

Another approach I could think of would be to have a dedicated ctrl on the subdev
to control the frame rate adjustment factor.

Do you have guidelines regarding how such functionality should be exposed ?

Regards,
Alain




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux