Re: [RFC PATCH 2/8] media: v4l: Add 10-bit RGBIr formats

From: Rishikesh Donadkar

Date: Sun Sep 27 2026 - 01:09:16 EST




On 26/09/26 20:00, Sakari Ailus wrote:
Hi Rishikesh,

On Fri, Sep 25, 2026 at 06:59:55PM +0530, Rishikesh Donadkar wrote:
From: Jai Luthra <j-luthra@xxxxxx>

Some camera sensors now use an expanded CFA pattern to capture near-IR
light along with the visible spectrum (R,G,B). This allows capturing
light in both low-light and day-light scenarios using the same sensor.

Instead of having a 2x2 repetition of B,G,R like in older bayer formats,
here we have a 4x4 repetition of B,G,R,Ir where the number of G pixels
are the same, but half the B and R pixels are replaced with Ir. Thus
instead of having 4 total phases, we now have 8 total phases or
re-arrangements of this pattern.

Co-developed-by: Rahul T R <r-ravikumar@xxxxxx>
Signed-off-by: Rahul T R <r-ravikumar@xxxxxx>
Signed-off-by: Jai Luthra <j-luthra@xxxxxx>
Co-developed-by: Rishikesh Donadkar <r-donadkar@xxxxxx>
Signed-off-by: Rishikesh Donadkar <r-donadkar@xxxxxx>

I think we need to use the common raw mbus and pixel formats for the
patterns that have IR pixels. See
<URL:https://git.linuxtv.org/sailus/media_tree.git/log/?h=metadata>.

Sure, I will use the RAW mbus pixel formats.


That's mostly pending on userspace support now.

Can the sensor output Bayer pattern as well?

No, the sensor give only gives out RGB+Ir where the CFA is a 4x4 repetition of B,G,R and Ir.

Rishikesh