From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from lb1-smtp-cloud2.xs4all.net ([194.109.24.21]:48749 "EHLO lb1-smtp-cloud2.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754042AbcFTP3z (ORCPT ); Mon, 20 Jun 2016 11:29:55 -0400 Subject: Re: [PATCH 6/6] v4l: Add packed Bayer raw14 pixel formats To: Sakari Ailus , linux-media@vger.kernel.org References: <1464353080-18300-1-git-send-email-sakari.ailus@linux.intel.com> <1464353080-18300-7-git-send-email-sakari.ailus@linux.intel.com> Cc: g.liakhovetski@gmx.de From: Hans Verkuil Message-ID: <57680BDB.7070608@xs4all.nl> Date: Mon, 20 Jun 2016 17:29:31 +0200 MIME-Version: 1.0 In-Reply-To: <1464353080-18300-7-git-send-email-sakari.ailus@linux.intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: On 05/27/2016 02:44 PM, Sakari Ailus wrote: > These formats are compressed 14-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_SBGGR14P > V4L2_PIX_FMT_SGBRG14P > V4L2_PIX_FMT_SGRBG14P > V4L2_PIX_FMT_SRGGB14P > > Signed-off-by: Sakari Ailus > --- > .../DocBook/media/v4l/pixfmt-srggb14p.xml | 118 +++++++++++++++++++++ > Documentation/DocBook/media/v4l/pixfmt.xml | 1 + > include/uapi/linux/videodev2.h | 5 + > 3 files changed, 124 insertions(+) > create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb14p.xml > > diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb14p.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb14p.xml > new file mode 100644 > index 0000000..ecb06ef > --- /dev/null > +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb14p.xml > @@ -0,0 +1,118 @@ > + > + > + V4L2_PIX_FMT_SRGGB14P ('pREE'), > + V4L2_PIX_FMT_SGRBG14P ('pgEE'), > + V4L2_PIX_FMT_SGBRG14P ('pGEE'), > + V4L2_PIX_FMT_SBGGR14P ('pBEE'), Again comma too many. > + > + &manvol; > + > + > + V4L2_PIX_FMT_SRGGB14P > + V4L2_PIX_FMT_SGRBG14P > + V4L2_PIX_FMT_SGBRG14P > + V4L2_PIX_FMT_SBGGR14P > + 14-bit packed Bayer formats > + > + > + Description > + > + These four pixel formats are packed raw sRGB / Bayer > + formats with 14 bits per colour. Every four consecutive colour > + components are packed into 7 bytes. Each of the first 4 bytes > + contain the 8 high order bits of the pixels, and the fifth, sixth > + and seventh bytes contains the six least significants bits of each s/significants/significant/ After fixing this: Acked-by: Hans Verkuil Regards, Hans > + 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: > + > + > + <constant>V4L2_PIX_FMT_SBGGR14P</constant> 4 × 4 > + pixel image > + > + > + Byte Order. > + Each cell is one byte. The bits in subscript denote bits > + of the sample. The bits of the cell byte can be found in > + parentheses. > + > + > + > + > + > + > + start + 0: > + B00 bits 13--8 > + G01 bits 13--8 > + B02 bits 13--8 > + G03 bits 13--8 > + G01 bits 1--0(bits 7--6) > + B00 bits 5--0(bits 5--0) > + > + B02 bits 3--0(bits 7--4) > + G01 bits 5--2(bits 3--0) > + > + G03 bits 5--0(bits 7--2) > + B02 bits 5--4(bits 1--0) > + > + > + > + start + 7: > + G10 bits 13--8 > + R11 bits 13--8 > + G12 bits 13--8 > + R13 bits 13--8 > + R11 bits 1--0(bits 7--6) > + B10 bits 5--0(bits 5--0) > + > + R12 bits 3--0(bits 7--4) > + G11 bits 5--2(bits 3--0) > + > + R13 bits 5--0(bits 7--2) > + B12 bits 5--4(bits 1--0) > + > + > + > + start + 14: > + B20 bits 13--8 > + G21 bits 13--8 > + B22 bits 13--8 > + G23 bits 13--8 > + G21 bits 1--0(bits 7--6) > + B20 bits 5--0(bits 5--0) > + > + B22 bits 3--0(bits 7--4) > + G21 bits 5--2(bits 3--0) > + > + G23 bits 5--0(bits 7--2) > + B22 bits 5--4(bits 1--0) > + > + > + > + start + 21: > + G30 bits 13--8 > + R31 bits 13--8 > + G32 bits 13--8 > + R33 bits 13--8 > + R31 bits 1--0(bits 7--6) > + B30 bits 5--0(bits 5--0) > + > + R32 bits 3--0(bits 7--4) > + G31 bits 5--2(bits 3--0) > + > + R33 bits 5--0(bits 7--2) > + B32 bits 5--4(bits 1--0) > + > + > + > + > + > + > + > + > + > + > diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml > index 29e9d7c..296a50a 100644 > --- a/Documentation/DocBook/media/v4l/pixfmt.xml > +++ b/Documentation/DocBook/media/v4l/pixfmt.xml > @@ -1595,6 +1595,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< > &sub-srggb12; > &sub-srggb12p; > &sub-srggb14; > + &sub-srggb14p; > > >
> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index 2c4b076..63d141e 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -585,6 +585,11 @@ struct v4l2_pix_format { > #define V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4') /* 14 GBGB.. RGRG.. */ > #define V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('B', 'A', '1', '4') /* 14 GRGR.. BGBG.. */ > #define V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4') /* 14 RGRG.. GBGB.. */ > + /* 14bit raw bayer packed, 7 bytes for every 4 pixels */ > +#define V4L2_PIX_FMT_SBGGR14P v4l2_fourcc('p', 'B', 'E', 'E') > +#define V4L2_PIX_FMT_SGBRG14P v4l2_fourcc('p', 'G', 'E', 'E') > +#define V4L2_PIX_FMT_SGRBG14P v4l2_fourcc('p', 'g', 'E', 'E') > +#define V4L2_PIX_FMT_SRGGB14P v4l2_fourcc('p', 'R', 'E', 'E') > #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ > > /* compressed formats */ >