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

From: Laurent Pinchart

Date: Sat Sep 26 2026 - 10:41:36 EST


On Sat, Sep 26, 2026 at 05:30:22PM +0300, 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>.

That's right, we shouldn't add new CFA-specific media bus codes. They
just don't scale.

> That's mostly pending on userspace support now.
>
> Can the sensor output Bayer pattern as well?

--
Regards,

Laurent Pinchart