Re: [PATCH 00/18] media: microchip-isc: Color correction and histogram stats

Balamanikandan.Gunasundar
2025-10-15T06:45:43Z

Hi Kieran,

On 15/10/25 11:35 am, Balamanikandan Gunasundar - I64410 wrote:
> Hi  Kieran,
>
> On 10/10/25 1:51 pm, Kieran Bingham wrote:
>>> Hi Bala,
>>>
>>> On 10/9/25 18:52, Balamanikandan Gunasundar wrote:
>>>> Hi,
>>>>
>>>> This patch series has a set of enhancements to the Microchip Image Sensor
>>>> Controller driver. The objective is to expand its image processing
>>>> capabilities and to improve the colors.
>>>>
>>>> This series also introduces a new stats driver that exposes the histogram
>>>> data to userspace via v4l2 controls. This allows applications such as
>>>> libcamera to access real time image statistics for advanced image
>>>> processing like automatic exposure, white balance adjustments etc.
>> How much data do you anticipate to be passing through controls? (What
>> can the hardware provide in total if we look at the bigger picture to
>> support the full device?)
> Thanks for the feedback. Currently the hardware provides histogram data
> with 256 bins per color (R, G, B and Y) each 32 bit wide. So roughly
> around 4 x 256 x 4 = 4K of data per frame. The intent to use  it as v4l2
> controls was to make this data easily accessible to user space without a

Correcting my mistake here. The histogram statistics are exported to
userspace as v4l2 meta data through the new driver.  Not the v4l2 controls.

The controls like brightness, contrast etc are exported as v4l2 controls.

Thanks,

Bala.

> need for a new data interface initially. However I agree that we may
> expand the statistics for future ISP blocks to include region based
> stats (We are already in discussion with the design)
>> For all other ISPs we've been working towards using structured parameter
>> buffers to pass data - and we've been making that format extensible,
>> which I think could also be a design that can apply to statistics.
> That sounds great and we can certainly explore aligning with the
> structured buffers for histogram data and any other future statistics.
>
> Thanks,
>
> Bala
>
>> This would greatly reduce the overhead of managing 'one control per
>> value' ... or things like passing large tables (like a lens shading
>> table perhaps) through controls.
>>
>> --
>> Kieran
>