Re: [PATCH 3/6] v4l: Add packed Bayer raw12 pixel formats
Hi Hans, Thanks for the review! Hans Verkuil wrote: > On 05/27/2016 02:44 PM, Sakari Ailus wrote: >> These formats are compressed 12-bit raw bayer formats with four different >> pixel orders. They are similar to 10-bit variants. The formats added by >> this patch are >> >> V4L2_PIX_FMT_SBGGR12P >> V4L2_PIX_FMT_SGBRG12P >> V4L2_PIX_FMT_SGRBG12P >> V4L2_PIX_FMT_SRGGB12P >> >> Signed-off-by: Sakari Ailus>> --- >> .../DocBook/media/v4l/pixfmt-srggb12p.xml | 103 >> + >> Documentation/DocBook/media/v4l/pixfmt.xml | 1 + >> include/uapi/linux/videodev2.h | 5 + >> 3 files changed, 109 insertions(+) >> create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml >> >> diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml >> b/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml >> new file mode 100644 >> index 000..affa366 >> --- /dev/null >> +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml >> @@ -0,0 +1,103 @@ >> + >> + >> +V4L2_PIX_FMT_SRGGB12P ('pRCC'), >> + V4L2_PIX_FMT_SGRBG12P ('pgCC'), >> + V4L2_PIX_FMT_SGBRG12P ('pGCC'), >> + V4L2_PIX_FMT_SBGGR12P ('pBCC'), > > Nitpick: the last comma should be removed otherwise the title would end with > it. > > Looks good otherwise. > > With the comma removed: > > Acked-by: Hans Verkuil Indeed. Looks like this comes from the 10-bit definitions. I'll fix that one as well. -- Sakari Ailus sakari.ai...@linux.intel.com -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 3/6] v4l: Add packed Bayer raw12 pixel formats
On 05/27/2016 02:44 PM, Sakari Ailus wrote: > These formats are compressed 12-bit raw bayer formats with four different > pixel orders. They are similar to 10-bit variants. The formats added by > this patch are > > V4L2_PIX_FMT_SBGGR12P > V4L2_PIX_FMT_SGBRG12P > V4L2_PIX_FMT_SGRBG12P > V4L2_PIX_FMT_SRGGB12P > > Signed-off-by: Sakari Ailus> --- > .../DocBook/media/v4l/pixfmt-srggb12p.xml | 103 > + > Documentation/DocBook/media/v4l/pixfmt.xml | 1 + > include/uapi/linux/videodev2.h | 5 + > 3 files changed, 109 insertions(+) > create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml > > diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml > b/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml > new file mode 100644 > index 000..affa366 > --- /dev/null > +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml > @@ -0,0 +1,103 @@ > + > + > + V4L2_PIX_FMT_SRGGB12P ('pRCC'), > + V4L2_PIX_FMT_SGRBG12P ('pgCC'), > + V4L2_PIX_FMT_SGBRG12P ('pGCC'), > + V4L2_PIX_FMT_SBGGR12P ('pBCC'), Nitpick: the last comma should be removed otherwise the title would end with it. Looks good otherwise. With the comma removed: Acked-by: Hans Verkuil Regards, Hans > + > + > + > + > + id="V4L2-PIX-FMT-SRGGB12P">V4L2_PIX_FMT_SRGGB12P > + id="V4L2-PIX-FMT-SGRBG12P">V4L2_PIX_FMT_SGRBG12P > + id="V4L2-PIX-FMT-SGBRG12P">V4L2_PIX_FMT_SGBRG12P > + id="V4L2-PIX-FMT-SBGGR12P">V4L2_PIX_FMT_SBGGR12P > + 12-bit packed Bayer formats > + > + > + Description > + > + These four pixel formats are packed raw sRGB / Bayer > + formats with 12 bits per colour. Every four consecutive colour > + components are packed into 6 bytes. Each of the first 4 bytes > + contain the 8 high order bits of the pixels, and the fifth and > + sixth bytes contains the four least significants bits of each > + pixel, in the same order. > + > + Each n-pixel row contains n/2 green samples and n/2 blue > + or red samples, with alternating green-red and green-blue > + rows. They are conventionally described as GRGR... BGBG..., > + RGRG... GBGB..., etc. Below is an example of one of these > + formats: > + > + > + V4L2_PIX_FMT_SBGGR12P 4 4 > + pixel image > + > + > + Byte Order. > + Each cell is one byte. > + > + > + > + > + > + start+0: > + B00high > + G01high > + G01low(bits 7--4) > + B00low(bits 3--0) > + > + B02high > + G03high > + G03low(bits 7--4) > + B02low(bits 3--0) > + > + > + > + start+6: > + G10high > + R11high > + R11low(bits 7--4) > + G10low(bits 3--0) > + > + G12high > + R13high > + R13low(bits 7--4) > + G12low(bits 3--0) > + > + > + > + start+12: > + B20high > + G21high > + G21low(bits 7--4) > + B20low(bits 3--0) > + > + B22high > + G23high > + G23low(bits 7--4) > + B22low(bits 3--0) > + > + > + > + start+18: > + G30high > + R31high > + R31low(bits 7--4) > + G30low(bits 3--0) > + > + G32high > + R33high > + R33low(bits 7--4) > + G32low(bits 3--0) > + > + > + > + > + > + > + > + > + > + > diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml > b/Documentation/DocBook/media/v4l/pixfmt.xml > index 5a08aee..457337e 100644 > --- a/Documentation/DocBook/media/v4l/pixfmt.xml > +++ b/Documentation/DocBook/media/v4l/pixfmt.xml > @@ -1593,6 +1593,7 @@ access the palette, this must be done with ioctls of > the Linux framebuffer API.< > > > > + > > > > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 8f95191..7ace868 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -576,6 +576,11 @@ struct v4l2_pix_format { > #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. > RGRG.. */ > #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..
[PATCH 3/6] v4l: Add packed Bayer raw12 pixel formats
These formats are compressed 12-bit raw bayer formats with four different pixel orders. They are similar to 10-bit variants. The formats added by this patch are V4L2_PIX_FMT_SBGGR12P V4L2_PIX_FMT_SGBRG12P V4L2_PIX_FMT_SGRBG12P V4L2_PIX_FMT_SRGGB12P Signed-off-by: Sakari Ailus--- .../DocBook/media/v4l/pixfmt-srggb12p.xml | 103 + Documentation/DocBook/media/v4l/pixfmt.xml | 1 + include/uapi/linux/videodev2.h | 5 + 3 files changed, 109 insertions(+) create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml new file mode 100644 index 000..affa366 --- /dev/null +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb12p.xml @@ -0,0 +1,103 @@ + + + V4L2_PIX_FMT_SRGGB12P ('pRCC'), +V4L2_PIX_FMT_SGRBG12P ('pgCC'), +V4L2_PIX_FMT_SGBRG12P ('pGCC'), +V4L2_PIX_FMT_SBGGR12P ('pBCC'), + + + + + V4L2_PIX_FMT_SRGGB12P + V4L2_PIX_FMT_SGRBG12P + V4L2_PIX_FMT_SGBRG12P + V4L2_PIX_FMT_SBGGR12P + 12-bit packed Bayer formats + + + Description + + These four pixel formats are packed raw sRGB / Bayer + formats with 12 bits per colour. Every four consecutive colour + components are packed into 6 bytes. Each of the first 4 bytes + contain the 8 high order bits of the pixels, and the fifth and + sixth bytes contains the four least significants bits of each + pixel, in the same order. + + Each n-pixel row contains n/2 green samples and n/2 blue + or red samples, with alternating green-red and green-blue + rows. They are conventionally described as GRGR... BGBG..., + RGRG... GBGB..., etc. Below is an example of one of these + formats: + + + V4L2_PIX_FMT_SBGGR12P 4 4 + pixel image + + + Byte Order. + Each cell is one byte. + + + + + + start+0: + B00high + G01high + G01low(bits 7--4) +B00low(bits 3--0) + + B02high + G03high + G03low(bits 7--4) +B02low(bits 3--0) + + + + start+6: + G10high + R11high + R11low(bits 7--4) +G10low(bits 3--0) + + G12high + R13high + R13low(bits 7--4) +G12low(bits 3--0) + + + + start+12: + B20high + G21high + G21low(bits 7--4) +B20low(bits 3--0) + + B22high + G23high + G23low(bits 7--4) +B22low(bits 3--0) + + + + start+18: + G30high + R31high + R31low(bits 7--4) +G30low(bits 3--0) + + G32high + R33high + R33low(bits 7--4) +G32low(bits 3--0) + + + + + + + + + + diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 5a08aee..457337e 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -1593,6 +1593,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< + diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 8f95191..7ace868 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -576,6 +576,11 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */ #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.. */ + /* 12bit raw bayer packed, 6 bytes for every 4 pixels */ +#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C') +#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C') +#define V4L2_PIX_FMT_SGRBG12P v4l2_fourcc('p', 'g', 'C', 'C') +#define V4L2_PIX_FMT_SRGGB12P v4l2_fourcc('p', 'R', 'C', 'C') #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ /* compressed formats */ -- 1.9.1 -- To unsubscribe from this list: