Re: Looking for device driver advice

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

 



On 04/12/2017 04:29 PM, Patrick Doyle wrote:
> Thank you again Hans.
> 
> On Wed, Apr 12, 2017 at 9:58 AM, Hans Verkuil <hverkuil@xxxxxxxxx> wrote:
>> On 04/12/2017 03:13 PM, Patrick Doyle wrote:
>>> The SAMA5 has a downsampler built into its LCD engine.  Suppose I
>>> wanted to treat that downsampler as an independent device and pass
>>> image buffers through that downsampler (the LCD display output is
>>> disabled in hardware when the device is configured in this mode)....
>>> do you have any recommendations as to how I might structure a device
>>> driver to do that.  At it's core, it would DMA a buffer from memory,
>>> through the downsampler, and back into memory.  Is that something I
>>> might also wire in as a pseudo-subdev of the ISC?  Or is there a
>>> better abstraction for arbitrary image processing pipeline elements?
>>
>> I think this is out of scope of V4L2. Check with Atmel/Microchip.
> 
> The V4L2 tie-in is in answering the question: Is there a standard V4L2
> way to perform arbitrary video processing functions (such as
> downsampling) with an arbitrary device.  If the answer is "no", that's
> fine.  If the answer is, "yes, here is how Xilinx does it for their IP
> modules", then I'll go look at some Xilinx stuff (which I'm going to
> do anyway).

VIDIOC_S_FMT: the pixelformat you specify in the v4l2_pix_format struct
determines Bayer vs YUV 4:2:2 vs YUV 4:2:0 vs RGB.

So that triggers whatever conversion is needed to arrive at the desired
memory format.

https://www.linuxtv.org/downloads/v4l-dvb-apis-new/uapi/v4l/vidioc-g-fmt.html

Regards,

	Hans




[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