From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga14.intel.com ([192.55.52.115]:37500 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753012AbcFTQDP (ORCPT ); Mon, 20 Jun 2016 12:03:15 -0400 Subject: Re: [PATCH 5/6] v4l: Add 14-bit raw bayer pixel format definitions To: Hans Verkuil , linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de References: <1464353080-18300-1-git-send-email-sakari.ailus@linux.intel.com> <1464353080-18300-6-git-send-email-sakari.ailus@linux.intel.com> <57680ACB.3050109@xs4all.nl> From: Sakari Ailus Message-ID: <576813B9.9050407@linux.intel.com> Date: Mon, 20 Jun 2016 19:03:05 +0300 MIME-Version: 1.0 In-Reply-To: <57680ACB.3050109@xs4all.nl> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-media-owner@vger.kernel.org List-ID: Hi Hans, Hans Verkuil wrote: > On 05/27/2016 02:44 PM, Sakari Ailus wrote: >> The formats added by this patch are: >> >> V4L2_PIX_FMT_SBGGR14 >> V4L2_PIX_FMT_SGBRG14 >> V4L2_PIX_FMT_SGRBG14 >> V4L2_PIX_FMT_SRGGB14 >> >> Signed-off-by: Jouni Ukkonen >> Signed-off-by: Sakari Ailus >> --- >> Documentation/DocBook/media/v4l/pixfmt-srggb14.xml | 90 ++++++++++++++++++++++ >> Documentation/DocBook/media/v4l/pixfmt.xml | 1 + >> include/uapi/linux/videodev2.h | 4 + >> 3 files changed, 95 insertions(+) >> create mode 100644 Documentation/DocBook/media/v4l/pixfmt-srggb14.xml >> >> diff --git a/Documentation/DocBook/media/v4l/pixfmt-srggb14.xml b/Documentation/DocBook/media/v4l/pixfmt-srggb14.xml >> new file mode 100644 >> index 0000000..7e82d7e >> --- /dev/null >> +++ b/Documentation/DocBook/media/v4l/pixfmt-srggb14.xml >> @@ -0,0 +1,90 @@ >> + >> + >> + V4L2_PIX_FMT_SRGGB14 ('RG14'), >> + V4L2_PIX_FMT_SGRBG14 ('BA14'), >> + V4L2_PIX_FMT_SGBRG14 ('GB14'), >> + V4L2_PIX_FMT_SBGGR14 ('BG14'), > > Same comma problem. Fixed. > >> + >> + &manvol; >> + >> + >> + V4L2_PIX_FMT_SRGGB14 >> + V4L2_PIX_FMT_SGRBG14 >> + V4L2_PIX_FMT_SGBRG14 >> + V4L2_PIX_FMT_SBGGR14 >> + 14-bit Bayer formats expanded to 16 bits >> + >> + >> + Description >> + >> + These four pixel formats are raw sRGB / Bayer formats with >> +14 bits per colour. Each colour component is stored in a 16-bit word, with 2 >> +unused high bits filled with zeros. Each n-pixel row contains n/2 green samples >> +and n/2 blue or red samples, with alternating red and blue rows. Bytes are >> +stored in memory in little endian order. They are conventionally described >> +as GRGR... BGBG..., RGRG... GBGB..., etc. Below is an example of one of these >> +formats > > s/formats/formats:/ Fixed. >> + >> + >> + <constant>V4L2_PIX_FMT_SBGGR14</constant> 4 × 4 >> +pixel image >> + >> + >> + Byte Order. >> + Each cell is one byte, high 2 bits in high bytes are 0. > > s/high 2/the high 2/ After re-reading the patch, I changed this to "Each cell is one byte, the 2 most significant bits in the high bytes are 0". > >> + >> + >> + >> + >> + >> + start + 0: >> + B00low >> + B00high >> + G01low >> + G01high >> + B02low >> + B02high >> + G03low >> + G03high >> + >> + >> + start + 8: >> + G10low >> + G10high >> + R11low >> + R11high >> + G12low >> + G12high >> + R13low >> + R13high >> + >> + >> + start + 16: >> + B20low >> + B20high >> + G21low >> + G21high >> + B22low >> + B22high >> + G23low >> + G23high >> + >> + >> + start + 24: >> + G30low >> + G30high >> + R31low >> + R31high >> + G32low >> + G32high >> + R33low >> + R33high >> + >> + >> + >> + >> + >> + >> + >> + >> + >> diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml >> index 457337e..29e9d7c 100644 >> --- a/Documentation/DocBook/media/v4l/pixfmt.xml >> +++ b/Documentation/DocBook/media/v4l/pixfmt.xml >> @@ -1594,6 +1594,7 @@ access the palette, this must be done with ioctls of the Linux framebuffer API.< >> &sub-srggb10dpcm8; >> &sub-srggb12; >> &sub-srggb12p; >> + &sub-srggb14; >> >> >>
>> diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h >> index 7ace868..2c4b076 100644 >> --- a/include/uapi/linux/videodev2.h >> +++ b/include/uapi/linux/videodev2.h >> @@ -581,6 +581,10 @@ struct v4l2_pix_format { >> #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_SBGGR14 v4l2_fourcc('B', 'G', '1', '4') /* 14 BGBG.. GRGR.. */ >> +#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.. */ >> #define V4L2_PIX_FMT_SBGGR16 v4l2_fourcc('B', 'Y', 'R', '2') /* 16 BGBG.. GRGR.. */ >> >> /* compressed formats */ >> > > Regards, > > Hans > -- Kind regards, Sakari Ailus sakari.ailus@linux.intel.com