Hello,
This patch series tries to solve the issue presented in my other posting [1] by
extending the media bus format data structure with a new parameter, rather than
adding a new subdev video ops callback.
Although there are opinions [2] the 'framesamples' parameter should not be a
part
of v4l2_mbus_framefmt data structure, it might be a better approach than
creating
a new subdev callback for a few reasons:
- the frame size parameter is usually needed altogether with other parameters
already included in struct v4l2_mbus_framefmt;
- it allows to clearly associate the frame length with the media entity pads;
- the semantics is more straightforward and would yield simpler
implementations,
it's similar to current 'sizeimage' handling at struct v4l2_pix_format;
- the applications could simply propagate the 'framesamples' value along the
pipeline, starting from the data source (sensor) subdev, only for compressed
data formats;
The new struct v4l2_mbus_framefmt would look as follows:
struct v4l2_mbus_framefmt {
__u32 width;
__u32 height;
__u32 code;
__u32 field;
__u32 colorspace;
__u32 framesamples;
__u32 reserved[6];
};
The proposed semantics for the 'framesamples' parameter is roughly as follows:
- the value is propagated at video pipeline entities where 'code' indicates
compressed format;
- the subdevs adjust the value if needed;
- although currently there is only one compressed data format at the media
bus - V4L2_MBUS_FMT_JPEG_1X8 which corresponds to V4L2_PIX_FMT_JPEG and
one sample at the media bus equals to one byte in memory, it is assumed
that the host knows exactly what is framesamples/sizeimage ratio and it will
validate framesamples/sizeimage values before starting streaming;
- the host will query internally a relevant subdev to properly handle
'sizeimage'
at the VIDIOC_TRY/S_FMT ioctl
Comments ?
---
Regards,
Sylwester Nawrocki
Samsung Poland R&D Center
[1] http://www.spinics.net/lists/linux-media/msg39703.html
[2] http://www.spinics.net/lists/linux-media/msg37703.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html