All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] v4l: Compressed data formats on the video bus
@ 2011-11-22  9:55 Sylwester Nawrocki
  2011-11-22  9:55 ` [RFC/PATCH v1 1/3] v4l: Add new framesamples field to struct v4l2_mbus_framefmt Sylwester Nawrocki
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Sylwester Nawrocki @ 2011-11-22  9:55 UTC (permalink / raw)
  To: linux-media
  Cc: mchehab, laurent.pinchart, g.liakhovetski, sakari.ailus,
	m.szyprowski, riverful.kim, sw0312.kim, s.nawrocki

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-11-22 11:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-22  9:55 [RFC] v4l: Compressed data formats on the video bus Sylwester Nawrocki
2011-11-22  9:55 ` [RFC/PATCH v1 1/3] v4l: Add new framesamples field to struct v4l2_mbus_framefmt Sylwester Nawrocki
2011-11-22 10:48   ` Hans Verkuil
2011-11-22 11:06     ` Sylwester Nawrocki
2011-11-22 11:07   ` Tomasz Stanislawski
2011-11-22 11:54     ` Sylwester Nawrocki
2011-11-22  9:55 ` [RFC/PATCH v1 2/3] m5mols: Add buffer size configuration support for compressed data Sylwester Nawrocki
2011-11-22  9:55 ` [RFC/PATCH v1 3/3] s5p-fimc: Add support for media bus framesamples parameter Sylwester Nawrocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.