linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marco Felsch <m.felsch@pengutronix.de>
To: p.zabel@pengutronix.de, mchehab@kernel.org,
	slongerbeam@gmail.com, hverkuil-cisco@xs4all.nl,
	laurent.pinchart@ideasonboard.com, sakari.ailus@linux.intel.com
Cc: linux-arm-kernel@lists.infradead.org,
	linux-media@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH 2/6] media: v4l: Add definition for bayered IR formats
Date: Tue, 27 Apr 2021 14:06:57 +0200	[thread overview]
Message-ID: <20210427120701.21809-3-m.felsch@pengutronix.de> (raw)
In-Reply-To: <20210427120701.21809-1-m.felsch@pengutronix.de>

Add special 8/12bit bayer media bus format for the OnSemi AR0237IR
camera sensor [1]. OnSemi calls this format RGB-IR, the pixel array
with the interleaved IR pixels looks like:

        |  G |  R |  G |  B | ...
        +----+----+----+----+---
        | IR |  G | IR |  G | ...
        +----+----+----+----+---
        |  G |  B |  G |  R | ...
        +----+----+----+----+---
        | IR |  G | IR |  G | ...
        +----+----+----+----+---
        | .. | .. | .. | .. | ..

[1] https://www.framos.com/media/pdf/96/ac/8f/AR0237CS-D-PDF-framos.pdf

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
---
 include/uapi/linux/videodev2.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 311a01cc5775..45ffd3867394 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -632,6 +632,8 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_SGBRG8  v4l2_fourcc('G', 'B', 'R', 'G') /*  8  GBGB.. RGRG.. */
 #define V4L2_PIX_FMT_SGRBG8  v4l2_fourcc('G', 'R', 'B', 'G') /*  8  GRGR.. BGBG.. */
 #define V4L2_PIX_FMT_SRGGB8  v4l2_fourcc('R', 'G', 'G', 'B') /*  8  RGRG.. GBGB.. */
+	/* 8bit infrared interleaved bayer format */
+#define V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG8 v4l2_fourcc('I', 'R', '0', '8') /* 8 GRGB.. IGIG.. GBGR.. IGIG.. */
 #define V4L2_PIX_FMT_SBGGR10 v4l2_fourcc('B', 'G', '1', '0') /* 10  BGBG.. GRGR.. */
 #define V4L2_PIX_FMT_SGBRG10 v4l2_fourcc('G', 'B', '1', '0') /* 10  GBGB.. RGRG.. */
 #define V4L2_PIX_FMT_SGRBG10 v4l2_fourcc('B', 'A', '1', '0') /* 10  GRGR.. BGBG.. */
@@ -673,6 +675,8 @@ struct v4l2_pix_format {
 #define V4L2_PIX_FMT_SGBRG16 v4l2_fourcc('G', 'B', '1', '6') /* 16  GBGB.. RGRG.. */
 #define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16  GRGR.. BGBG.. */
 #define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16  RGRG.. GBGB.. */
+	/* 16bit infrared interleaved bayer format */
+#define V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG16 v4l2_fourcc('I', 'R', '1', '6') /* 16 GRGB.. IGIG.. GBGR.. IGIG.. */
 
 /* HSV formats */
 #define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3')
-- 
2.29.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  parent reply	other threads:[~2021-04-27 12:10 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27 12:06 [PATCH 0/6] Add new bayer ir formats Marco Felsch
2021-04-27 12:06 ` [PATCH 1/6] media: uapi: Add MEDIA_BUS_FMT_SGRGB_IGIG_GBGR_IGIG media bus formats Marco Felsch
2021-04-29  1:51   ` Laurent Pinchart
2021-04-29  7:49     ` Marco Felsch
2021-04-29  8:44       ` Mauro Carvalho Chehab
2021-04-29 16:53         ` Laurent Pinchart
2021-04-30 12:44           ` Mauro Carvalho Chehab
2021-04-29 22:14       ` Laurent Pinchart
2021-04-30  6:51         ` Marco Felsch
2021-04-30 12:18           ` Laurent Pinchart
2021-04-30 12:51             ` Mauro Carvalho Chehab
2021-04-30 12:58               ` Laurent Pinchart
2023-02-08 19:44                 ` Marco Felsch
2023-02-09  9:49                   ` Laurent Pinchart
2021-04-27 12:06 ` Marco Felsch [this message]
2021-04-29  1:45   ` [PATCH 2/6] media: v4l: Add definition for bayered IR formats Laurent Pinchart
2021-04-29  7:07     ` Marco Felsch
2021-04-27 12:06 ` [PATCH 3/6] media: v4l2-ioctl.c: add V4L2_PIX_FMT_SGRGB_IGIG_GBGR_IGIG to v4l_fill_fmtdesc Marco Felsch
2021-04-27 12:06 ` [PATCH 4/6] media: video-mux: add new SGRGB_IGIG_GBGR_IGIG format support Marco Felsch
2021-04-27 12:07 ` [PATCH 5/6] gpu: ipu-v3: add custom " Marco Felsch
2021-04-27 12:07 ` [PATCH 6/6] media: imx: csi: " Marco Felsch
2021-04-27 12:09 ` [PATCH 0/6] Add new bayer ir formats Marco Felsch
2022-11-24 14:49 ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210427120701.21809-3-m.felsch@pengutronix.de \
    --to=m.felsch@pengutronix.de \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=sakari.ailus@linux.intel.com \
    --cc=slongerbeam@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).