Re: v4l2_mbus_framefmt and v4l2_pix_format

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

 



On Wednesday, May 25, 2011 11:56:23 Scott Jiang wrote:
> Hi Hans and Laurent,
> 
> I got fmt info from a video data source subdev, I thought there should
> be a helper function to convert these two format enums.
> However, v4l2_fill_pix_format didn't do this, why? Should I do this in
> bridge driver one by one?
> I think these codes are common use, I prefer adding them in
> v4l2_fill_pix_format.

Only the bridge driver knows how these two enums relate. The mediabus enum
as used by subdevs describes the format of the video data as is transferred
over the physical bus between the subdev and the bridge. The V4L2_PIX_FMT*
formats describe what the video data looks like in memory. Depending on the
DMA engine those may or may not have a simple one on one mapping.

In other words, it is indeed the bridge driver that has to do the mapping.

That said, soc_camera has such a mapping. If it turns out that it can be
reused elsewhere for certain bridges, then that code should probably be
made a generic helper function. (See soc_mediabus.c/h)

Regards,

	Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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