Query on V4L2 interlaced "height"

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

 



Hi,

I am working on interlaced capture devices. There is some confusion in
handling height parameter between application and driver.

Capture device is able to produce 1920x1080i, where one field
(top/bottom) resolution is 1920x540.

Query 1:
What should be the height passed by application to driver to capture
1920x1080i resolution?
According to v4l2 specification:
https://www.kernel.org/doc/html/v4.16/media/uapi/v4l/pixfmt-v4l2.html

Image height in pixels. If field is one of V4L2_FIELD_TOP,
V4L2_FIELD_BOTTOM or V4L2_FIELD_ALTERNATE then height refers to

the number of lines in the field, otherwise it refers to the number of
lines in the frame (which is twice the field height for interlaced
formats).

Query 2:
I can think of 4 possible cases here:

i) If application calling VIDIOC_TRY_FMT with filed as
V4L2_FIELD_ALTERNATE and capture hardware supports same

ii) If application calling VIDIOC_TRY_FMT with filed as
V4L2_FIELD_NONE and capture hardware supports same

iii) If application calling VIDIOC_TRY_FMT with field as
V4L2_FIELD_NONE (progressive) and capture hardware supports
V4L2_FIELD_ALTERNATE

iv) If application calling VIDIOC_TRY_FMT with field as
V4L2_FIELD_ALTERNATE (progressive) and capture hardware supports
V4L2_FIELD_NONE

The first 2 cases are straightforward. What should be the driver
behavior for iii and iv ? Should it alter height passed by the
application accordingly?

I see some of the capture drivers are dividing height by 2 if field is
V4L2_FIELD_ALTERNATE. Is this the right behavior?

Regards,
Satish



[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