* [PATCH 0/2] Support additional DPCM compressed formats
@ 2011-12-28 10:20 Sakari Ailus
2011-12-28 10:20 ` [PATCH 1/2] v4l: Add " Sakari Ailus
2011-12-28 10:20 ` [PATCH 2/2] omap3isp: Support additional in-memory compressed bayer formats Sakari Ailus
0 siblings, 2 replies; 7+ messages in thread
From: Sakari Ailus @ 2011-12-28 10:20 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart
Hi all,
This small patchset adds support for the other three 10-to-8 bit
DPCM-compressed formats as well as prevent accessing NULL pointers in the
omap3isp driver.
The issue was that there was no corresponding in-memory format for the media
bus formats on the CSI-2 receiver but the CSI-2 receiver driver still
allowed such format on its source pad. Alternatively this could be fixed by
preventing using such formats, but I can't see a reason to do so.
That said, the additional formats on the OMAP 3 ISP driver are untested.
Regards,
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi jabber/XMPP/Gmail: sailus@retiisi.org.uk
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/2] v4l: Add DPCM compressed formats
2011-12-28 10:20 [PATCH 0/2] Support additional DPCM compressed formats Sakari Ailus
@ 2011-12-28 10:20 ` Sakari Ailus
2011-12-28 10:25 ` Laurent Pinchart
2011-12-28 10:20 ` [PATCH 2/2] omap3isp: Support additional in-memory compressed bayer formats Sakari Ailus
1 sibling, 1 reply; 7+ messages in thread
From: Sakari Ailus @ 2011-12-28 10:20 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart
Add three other colour orders for 10-bit to 8-bit DPCM compressed formats.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
include/linux/videodev2.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 0f8f904..560e468 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -365,7 +365,10 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
/* 10bit raw bayer DPCM compressed to 8 bits */
+#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('B', 'D', 'B', '1')
+#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('B', 'D', 'G', '1')
#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
+#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('B', 'D', 'R', '1')
/*
* 10bit raw bayer, expanded to 16 bits
* xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
--
1.7.2.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] omap3isp: Support additional in-memory compressed bayer formats
2011-12-28 10:20 [PATCH 0/2] Support additional DPCM compressed formats Sakari Ailus
2011-12-28 10:20 ` [PATCH 1/2] v4l: Add " Sakari Ailus
@ 2011-12-28 10:20 ` Sakari Ailus
2011-12-28 10:26 ` Laurent Pinchart
2011-12-28 13:01 ` [PATCH v2 1/1] v4l: Add DPCM compressed formats Sakari Ailus
1 sibling, 2 replies; 7+ messages in thread
From: Sakari Ailus @ 2011-12-28 10:20 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart
This also prevents accessing NULL pointer in csi2_try_format().
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
drivers/media/video/omap3isp/ispvideo.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/media/video/omap3isp/ispvideo.c b/drivers/media/video/omap3isp/ispvideo.c
index 0568234..3c984ae 100644
--- a/drivers/media/video/omap3isp/ispvideo.c
+++ b/drivers/media/video/omap3isp/ispvideo.c
@@ -46,6 +46,10 @@
* Helper functions
*/
+/*
+ * NOTE: When adding new media bus codes, always remember to add
+ * corresponding in-memory formats to the table below!!!
+ */
static struct isp_format_info formats[] = {
{ V4L2_MBUS_FMT_Y8_1X8, V4L2_MBUS_FMT_Y8_1X8,
V4L2_MBUS_FMT_Y8_1X8, V4L2_MBUS_FMT_Y8_1X8,
@@ -68,9 +72,18 @@ static struct isp_format_info formats[] = {
{ V4L2_MBUS_FMT_SRGGB8_1X8, V4L2_MBUS_FMT_SRGGB8_1X8,
V4L2_MBUS_FMT_SRGGB8_1X8, V4L2_MBUS_FMT_SRGGB8_1X8,
V4L2_PIX_FMT_SRGGB8, 8, },
+ { V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8, V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8,
+ V4L2_MBUS_FMT_SBGGR10_1X10, 0,
+ V4L2_PIX_FMT_SBGGR10DPCM8, 8, },
+ { V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8, V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8,
+ V4L2_MBUS_FMT_SGBRG10_1X10, 0,
+ V4L2_PIX_FMT_SGBRG10DPCM8, 8, },
{ V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8, V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8,
V4L2_MBUS_FMT_SGRBG10_1X10, 0,
V4L2_PIX_FMT_SGRBG10DPCM8, 8, },
+ { V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8, V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8,
+ V4L2_MBUS_FMT_SRGGB10_1X10, 0,
+ V4L2_PIX_FMT_SRGGB10DPCM8, 8, },
{ V4L2_MBUS_FMT_SBGGR10_1X10, V4L2_MBUS_FMT_SBGGR10_1X10,
V4L2_MBUS_FMT_SBGGR10_1X10, V4L2_MBUS_FMT_SBGGR8_1X8,
V4L2_PIX_FMT_SBGGR10, 10, },
--
1.7.2.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] v4l: Add DPCM compressed formats
2011-12-28 10:20 ` [PATCH 1/2] v4l: Add " Sakari Ailus
@ 2011-12-28 10:25 ` Laurent Pinchart
2011-12-28 10:33 ` Sakari Ailus
0 siblings, 1 reply; 7+ messages in thread
From: Laurent Pinchart @ 2011-12-28 10:25 UTC (permalink / raw)
To: Sakari Ailus; +Cc: linux-media
Hi Sakari,
On Wednesday 28 December 2011 11:20:56 Sakari Ailus wrote:
> Add three other colour orders for 10-bit to 8-bit DPCM compressed formats.
>
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
> ---
> include/linux/videodev2.h | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 0f8f904..560e468 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -365,7 +365,10 @@ struct v4l2_pix_format {
> #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR..
> BGBG.. */ #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /*
> 12 RGRG.. GBGB.. */ /* 10bit raw bayer DPCM compressed to 8 bits */
> +#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('B', 'D', 'B', '1')
> +#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('B', 'D', 'G', '1')
> #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
> +#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('B', 'D', 'R', '1')
> /*
> * 10bit raw bayer, expanded to 16 bits
> * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
Could you please have a look at the discussion about a similar patch in
http://patchwork.linuxtv.org/patch/8844/ ?
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] omap3isp: Support additional in-memory compressed bayer formats
2011-12-28 10:20 ` [PATCH 2/2] omap3isp: Support additional in-memory compressed bayer formats Sakari Ailus
@ 2011-12-28 10:26 ` Laurent Pinchart
2011-12-28 13:01 ` [PATCH v2 1/1] v4l: Add DPCM compressed formats Sakari Ailus
1 sibling, 0 replies; 7+ messages in thread
From: Laurent Pinchart @ 2011-12-28 10:26 UTC (permalink / raw)
To: Sakari Ailus; +Cc: linux-media
Hi Sakari,
Thanks for the patch.
On Wednesday 28 December 2011 11:20:57 Sakari Ailus wrote:
> This also prevents accessing NULL pointer in csi2_try_format().
>
> Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/video/omap3isp/ispvideo.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/media/video/omap3isp/ispvideo.c
> b/drivers/media/video/omap3isp/ispvideo.c index 0568234..3c984ae 100644
> --- a/drivers/media/video/omap3isp/ispvideo.c
> +++ b/drivers/media/video/omap3isp/ispvideo.c
> @@ -46,6 +46,10 @@
> * Helper functions
> */
>
> +/*
> + * NOTE: When adding new media bus codes, always remember to add
> + * corresponding in-memory formats to the table below!!!
> + */
> static struct isp_format_info formats[] = {
> { V4L2_MBUS_FMT_Y8_1X8, V4L2_MBUS_FMT_Y8_1X8,
> V4L2_MBUS_FMT_Y8_1X8, V4L2_MBUS_FMT_Y8_1X8,
> @@ -68,9 +72,18 @@ static struct isp_format_info formats[] = {
> { V4L2_MBUS_FMT_SRGGB8_1X8, V4L2_MBUS_FMT_SRGGB8_1X8,
> V4L2_MBUS_FMT_SRGGB8_1X8, V4L2_MBUS_FMT_SRGGB8_1X8,
> V4L2_PIX_FMT_SRGGB8, 8, },
> + { V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8, V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8,
> + V4L2_MBUS_FMT_SBGGR10_1X10, 0,
> + V4L2_PIX_FMT_SBGGR10DPCM8, 8, },
> + { V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8, V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8,
> + V4L2_MBUS_FMT_SGBRG10_1X10, 0,
> + V4L2_PIX_FMT_SGBRG10DPCM8, 8, },
> { V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8, V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8,
> V4L2_MBUS_FMT_SGRBG10_1X10, 0,
> V4L2_PIX_FMT_SGRBG10DPCM8, 8, },
> + { V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8, V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8,
> + V4L2_MBUS_FMT_SRGGB10_1X10, 0,
> + V4L2_PIX_FMT_SRGGB10DPCM8, 8, },
> { V4L2_MBUS_FMT_SBGGR10_1X10, V4L2_MBUS_FMT_SBGGR10_1X10,
> V4L2_MBUS_FMT_SBGGR10_1X10, V4L2_MBUS_FMT_SBGGR8_1X8,
> V4L2_PIX_FMT_SBGGR10, 10, },
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] v4l: Add DPCM compressed formats
2011-12-28 10:25 ` Laurent Pinchart
@ 2011-12-28 10:33 ` Sakari Ailus
0 siblings, 0 replies; 7+ messages in thread
From: Sakari Ailus @ 2011-12-28 10:33 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: linux-media
On Wed, Dec 28, 2011 at 11:25:13AM +0100, Laurent Pinchart wrote:
> Hi Sakari,
>
> On Wednesday 28 December 2011 11:20:56 Sakari Ailus wrote:
> > Add three other colour orders for 10-bit to 8-bit DPCM compressed formats.
> >
> > Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
> > ---
> > include/linux/videodev2.h | 3 +++
> > 1 files changed, 3 insertions(+), 0 deletions(-)
> >
> > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > index 0f8f904..560e468 100644
> > --- a/include/linux/videodev2.h
> > +++ b/include/linux/videodev2.h
> > @@ -365,7 +365,10 @@ struct v4l2_pix_format {
> > #define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR..
> > BGBG.. */ #define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /*
> > 12 RGRG.. GBGB.. */ /* 10bit raw bayer DPCM compressed to 8 bits */
> > +#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('B', 'D', 'B', '1')
> > +#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('B', 'D', 'G', '1')
> > #define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
> > +#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('B', 'D', 'R', '1')
> > /*
> > * 10bit raw bayer, expanded to 16 bits
> > * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
>
> Could you please have a look at the discussion about a similar patch in
> http://patchwork.linuxtv.org/patch/8844/ ?
Oh, I had missed that, even if I was cc'd... :-P
Thanks.
--
Sakari Ailus
e-mail: sakari.ailus@iki.fi jabber/XMPP/Gmail: sailus@retiisi.org.uk
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/1] v4l: Add DPCM compressed formats
2011-12-28 10:20 ` [PATCH 2/2] omap3isp: Support additional in-memory compressed bayer formats Sakari Ailus
2011-12-28 10:26 ` Laurent Pinchart
@ 2011-12-28 13:01 ` Sakari Ailus
1 sibling, 0 replies; 7+ messages in thread
From: Sakari Ailus @ 2011-12-28 13:01 UTC (permalink / raw)
To: linux-media; +Cc: laurent.pinchart
Add three other colour orders for 10-bit to 8-bit DPCM compressed formats.
Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
---
Documentation/DocBook/media/v4l/pixfmt-srggb10.xml | 2 +-
.../DocBook/media/v4l/pixfmt-srggb10dpcm8.xml | 29 ++++++++++++++++++++
Documentation/DocBook/media/v4l/pixfmt.xml | 1 +
include/linux/videodev2.h | 3 ++
4 files changed, 34 insertions(+), 1 deletions(-)
create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml
index 7b27409..c1c62a9 100644
--- a/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10.xml
@@ -1,4 +1,4 @@
- <refentry>
+ <refentry id="pixfmt-srggb10">
<refmeta>
<refentrytitle>V4L2_PIX_FMT_SRGGB10 ('RG10'),
V4L2_PIX_FMT_SGRBG10 ('BA10'),
diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml
new file mode 100644
index 0000000..985440c
--- /dev/null
+++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10dpcm8.xml
@@ -0,0 +1,29 @@
+ <refentry>
+ <refmeta>
+ <refentrytitle>
+ V4L2_PIX_FMT_SRGGB10DPCM8 ('bBA8'),
+ V4L2_PIX_FMT_SGBRG10DPCM8 ('bGA8'),
+ V4L2_PIX_FMT_SGRBG10DPCM8 ('BD10'),
+ V4L2_PIX_FMT_SBGGR10DPCM8 ('bRA8'),
+ </refentrytitle>
+ &manvol;
+ </refmeta>
+ <refnamediv>
+ <refname id="V4L2-PIX-FMT-SRGGB10DPCM8"><constant>V4L2_PIX_FMT_SRGGB10DPCM8</constant></refname>
+ <refname id="V4L2-PIX-FMT-SGRBG10DPCM8"><constant>V4L2_PIX_FMT_SGRBG10DPCM8</constant></refname>
+ <refname id="V4L2-PIX-FMT-SGBRG10DPCM8"><constant>V4L2_PIX_FMT_SGBRG10DPCM8</constant></refname>
+ <refname id="V4L2-PIX-FMT-SBGGR10DPCM8"><constant>V4L2_PIX_FMT_SBGGR10DPCM8</constant></refname>
+ <refpurpose>10-bit Bayer formats compressed to 8 bits</refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+
+ <para>The following four pixel formats are raw sRGB / Bayer
+ formats with 10 bits per colour compressed to 8 bits each,
+ using the DPCM. DPCM, differential pulse-code modulation, is
+ lossy. Each colour component consumes 8 bits of memory. In
+ other respects this format is similar to
+ <xref linkend="pixfmt-srggb10">.</xref></para>
+
+ </refsect1>
+ </refentry>
diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
index 2ff6b77..9b06c7b 100644
--- a/Documentation/DocBook/media/v4l/pixfmt.xml
+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
@@ -673,6 +673,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.<
&sub-srggb8;
&sub-sbggr16;
&sub-srggb10;
+ &sub-srggb10dpcm8;
&sub-srggb12;
</section>
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 0f8f904..622570c 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -365,7 +365,10 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
/* 10bit raw bayer DPCM compressed to 8 bits */
+#define V4L2_PIX_FMT_SBGGR10DPCM8 v4l2_fourcc('b', 'B', 'A', '8')
+#define V4L2_PIX_FMT_SGBRG10DPCM8 v4l2_fourcc('b', 'G', 'A', '8')
#define V4L2_PIX_FMT_SGRBG10DPCM8 v4l2_fourcc('B', 'D', '1', '0')
+#define V4L2_PIX_FMT_SRGGB10DPCM8 v4l2_fourcc('b', 'R', 'A', '8')
/*
* 10bit raw bayer, expanded to 16 bits
* xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb...
--
1.7.2.5
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-12-28 13:01 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-28 10:20 [PATCH 0/2] Support additional DPCM compressed formats Sakari Ailus
2011-12-28 10:20 ` [PATCH 1/2] v4l: Add " Sakari Ailus
2011-12-28 10:25 ` Laurent Pinchart
2011-12-28 10:33 ` Sakari Ailus
2011-12-28 10:20 ` [PATCH 2/2] omap3isp: Support additional in-memory compressed bayer formats Sakari Ailus
2011-12-28 10:26 ` Laurent Pinchart
2011-12-28 13:01 ` [PATCH v2 1/1] v4l: Add DPCM compressed formats Sakari Ailus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox