From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lb3-smtp-cloud3.xs4all.net ([194.109.24.30]:58022 "EHLO lb3-smtp-cloud3.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751164AbaLEPMg (ORCPT ); Fri, 5 Dec 2014 10:12:36 -0500 Message-ID: <5481CB5F.8010600@xs4all.nl> Date: Fri, 05 Dec 2014 16:12:31 +0100 From: Hans Verkuil MIME-Version: 1.0 To: Sakari Ailus , linux-media@vger.kernel.org CC: aviv.d.greenberg@intel.com Subject: Re: [REVIEW PATCH 2/2] v4l: Add packed Bayer raw10 pixel formats References: <1417605249-5322-1-git-send-email-sakari.ailus@iki.fi> <1417605249-5322-3-git-send-email-sakari.ailus@iki.fi> In-Reply-To: <1417605249-5322-3-git-send-email-sakari.ailus@iki.fi> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: On 12/03/2014 12:14 PM, Sakari Ailus wrote: > From: Aviv Greenberg > > These formats are just like 10-bit raw bayer formats that exist already, but > the pixels are not padded to byte boundaries. Instead, the eight high order > bits of four consecutive pixels are stored in four bytes, followed by a byte > of two low order bits of each of the four pixels. > > Signed-off-by: Aviv Greenberg > Signed-off-by: Sakari Ailus > --- > .../DocBook/media/v4l/pixfmt-srggb10p.xml | 83 ++++++++++++++++++++++ > Documentation/DocBook/media/v4l/pixfmt.xml | 1 + > include/uapi/linux/videodev2.h | 5 ++ > 3 files changed, 89 insertions(+) > create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb10p.xml > > diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb10p.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb10p.xml > new file mode 100644 > index 0000000..3e88d8d > --- /dev/null > +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb10p.xml > @@ -0,0 +1,83 @@ > + > + > + V4L2_PIX_FMT_SRGGB10P ('pRAA'), > + V4L2_PIX_FMT_SGRBG10P ('pgAA'), > + V4L2_PIX_FMT_SGBRG10P ('pGAA'), > + V4L2_PIX_FMT_SBGGR10P ('pBAA'), > + > + &manvol; > + > + > + V4L2_PIX_FMT_SRGGB10P > + V4L2_PIX_FMT_SGRBG10P > + V4L2_PIX_FMT_SGBRG10P > + V4L2_PIX_FMT_SBGGR10P > + 10-bit packed Bayer formats > + > + > + Description > + > + The following four pixel formats are packed raw sRGB / > + Bayer formats with 10 bits per colour. Every four consequtive Typo: consecutive > + colour components are packed into 5 bytes such that each of > + the first 4 bytes contain their 8 high bits, and the fifth > + byte contains 4 groups of 2 their low bits. Bytes are stored > + in memory in little endian 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 s/formats/formats:/ > + > + > + <constant>V4L2_PIX_FMT_SBGGR10P</constant> 4 × 4 > + pixel image > + > + > + Byte Order. > + Each cell is one byte. > + > + > + > + > + > + start + 0: > + B00high > + G01high > + B02high > + G03high > + B+G0-3low > + > + > + start + 5: > + G04high > + R05high > + G06high > + R07high > + G+R4-7low > + > + > + start + 10: > + B08high > + G09high > + B10high > + G11high > + B+G8-11low > + > + > + start + 15: > + G12high > + R13high > + G14high > + R15high > + G+R12-15low > + > + > + > + > + > + > + > + > + > diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml > index df5b23d..5a83d9c 100644 > --- a/Documentation/DocBook/media/v4l/pixfmt.xml > +++ b/Documentation/DocBook/media/v4l/pixfmt.xml > @@ -716,6 +716,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< > &sub-srggb10alaw8; > &sub-srggb10dpcm8; > &sub-srggb12; > + &sub-srggb10p; > > >
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index e9806c6..faba23a 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -402,6 +402,11 @@ struct v4l2_pix_format { > #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 packed, 5 bytes for every 4 pixels */ > +#define V4L2_PIX_FMT_SBGGR10P v4l2_fourcc('p', 'B', 'A', 'A') > +#define V4L2_PIX_FMT_SGBRG10P v4l2_fourcc('p', 'G', 'A', 'A') > +#define V4L2_PIX_FMT_SGRBG10P v4l2_fourcc('p', 'g', 'A', 'A') > +#define V4L2_PIX_FMT_SRGGB10P v4l2_fourcc('p', 'R', 'A', 'A') > /* > * 10bit raw bayer, expanded to 16 bits > * xxxxrrrrrrrrrrxxxxgggggggggg xxxxggggggggggxxxxbbbbbbbbbb... > After fixing those two typos you can add my: Acked-by: Hans Verkuil Regards, Hans