Re: Question about Large Custom Coefficients for V4L2 sub-device drivers

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

 



On 05/06/17 18:32, Rohit Athavale wrote:
> Hello Media Community,
> 
> I am working on a scaler and gamma correction V4L2 sub-device based drivers. A common theme to both of them is that
> the kernel driver is expected bring-up these devices in a working (good) configuration. As it turns out these coefficients are tailor-made
> or are fairly complex to generate dynamically at run-time.
> 
> This implies the driver has to store at least one set of coefficients for each supported configuration. This could easily become 10-20 KB of data stored as a large static array of shorts or integers.
> 
> I have a couple of questions to ask all here :
> 
> 1. What is the best practice for embedding large coefficients ( > 10 KB) into V4L2 sub-device based drivers ?

Typically it is just a static const array. For large arrays it is best to put them in a separate
source so it doesn't overwhelm the actual driver code.

> 2. How can user applications feed coefficients to the sub-device based V4L2 drivers ? I'm wondering if there is standard ioctl, write or mmap file op that can be performed to achieve this ?

In most cases you can make an extended control (array or compound) for this. If the hardware
supports some sort of DMA hardware to load the coefficients quickly into memory, then a video
node can be created. But based on what you write that doesn't appear to be necessary.

Regards,

	Hans

> 
> All inputs will be greatly appreciated :)
> 
> Best Regards,
> Rohit
> 
> 
> 
> This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
> 




[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