From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jacopo Mondi Subject: Re: [PATCH v1.1 3/9] v4l: Add definitions for missing 16-bit RGB555 formats Date: Tue, 23 Apr 2019 13:53:37 +0200 Message-ID: <20190423115337.2ve2j6cg254yduor@uno.localdomain> References: <20190328070723.26553-4-laurent.pinchart+renesas@ideasonboard.com> <20190418062711.15224-1-laurent.pinchart+renesas@ideasonboard.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1212244884==" Return-path: Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by gabe.freedesktop.org (Postfix) with ESMTPS id DD94189061 for ; Tue, 23 Apr 2019 11:52:45 +0000 (UTC) In-Reply-To: <20190418062711.15224-1-laurent.pinchart+renesas@ideasonboard.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Laurent Pinchart Cc: linux-renesas-soc@vger.kernel.org, Maxime Ripard , dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org --===============1212244884== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="s3taerhrz7gu7vqs" Content-Disposition: inline --s3taerhrz7gu7vqs Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hi Laurent, On Thu, Apr 18, 2019 at 09:27:11AM +0300, Laurent Pinchart wrote: > The V4L2 API is missing the 16-bit RGB555 formats for the RGBA, RGBX, > ABGR, XBGR, BGRA and BGRX component orders. Add them, using the same > 4CCs as DRM. > > Signed-off-by: Laurent Pinchart > --- > Changes since v1: > > - Fixed the BGRA555 and BGRX555 formats With this fixed (happy my wrong comment lead to an actual fix :p ) Reviewed-by: Jacopo Mondi Thanks j > --- > .../media/uapi/v4l/pixfmt-packed-rgb.rst | 138 ++++++++++++++++++ > include/uapi/linux/videodev2.h | 6 + > 2 files changed, 144 insertions(+) > > diff --git a/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst b/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst > index b475cbba492f..624c3700110f 100644 > --- a/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst > +++ b/Documentation/media/uapi/v4l/pixfmt-packed-rgb.rst > @@ -323,6 +323,144 @@ next to each other in memory. > - g\ :sub:`4` > - g\ :sub:`3` > - > + * .. _V4L2-PIX-FMT-RGBA555: > + > + - ``V4L2_PIX_FMT_RGBA555`` > + - 'RA15' > + > + - g\ :sub:`1` > + - g\ :sub:`0` > + - b\ :sub:`4` > + - b\ :sub:`3` > + - b\ :sub:`2` > + - b\ :sub:`1` > + - b\ :sub:`0` > + - a > + > + - r\ :sub:`4` > + - r\ :sub:`3` > + - r\ :sub:`2` > + - r\ :sub:`1` > + - r\ :sub:`0` > + - g\ :sub:`4` > + - g\ :sub:`3` > + - g\ :sub:`2` > + - > + * .. _V4L2-PIX-FMT-RGBX555: > + > + - ``V4L2_PIX_FMT_RGBX555`` > + - 'RX15' > + > + - g\ :sub:`1` > + - g\ :sub:`0` > + - b\ :sub:`4` > + - b\ :sub:`3` > + - b\ :sub:`2` > + - b\ :sub:`1` > + - b\ :sub:`0` > + - > + > + - r\ :sub:`4` > + - r\ :sub:`3` > + - r\ :sub:`2` > + - r\ :sub:`1` > + - r\ :sub:`0` > + - g\ :sub:`4` > + - g\ :sub:`3` > + - g\ :sub:`2` > + - > + * .. _V4L2-PIX-FMT-ABGR555: > + > + - ``V4L2_PIX_FMT_ABGR555`` > + - 'AB15' > + > + - g\ :sub:`2` > + - g\ :sub:`1` > + - g\ :sub:`0` > + - r\ :sub:`4` > + - r\ :sub:`3` > + - r\ :sub:`2` > + - r\ :sub:`1` > + - r\ :sub:`0` > + > + - a > + - b\ :sub:`4` > + - b\ :sub:`3` > + - b\ :sub:`2` > + - b\ :sub:`1` > + - b\ :sub:`0` > + - g\ :sub:`4` > + - g\ :sub:`3` > + - > + * .. _V4L2-PIX-FMT-XBGR555: > + > + - ``V4L2_PIX_FMT_XBGR555`` > + - 'XB15' > + > + - g\ :sub:`2` > + - g\ :sub:`1` > + - g\ :sub:`0` > + - r\ :sub:`4` > + - r\ :sub:`3` > + - r\ :sub:`2` > + - r\ :sub:`1` > + - r\ :sub:`0` > + > + - > + - b\ :sub:`4` > + - b\ :sub:`3` > + - b\ :sub:`2` > + - b\ :sub:`1` > + - b\ :sub:`0` > + - g\ :sub:`4` > + - g\ :sub:`3` > + - > + * .. _V4L2-PIX-FMT-BGRA555: > + > + - ``V4L2_PIX_FMT_BGRA555`` > + - 'BA15' > + > + - g\ :sub:`1` > + - g\ :sub:`0` > + - r\ :sub:`4` > + - r\ :sub:`3` > + - r\ :sub:`2` > + - r\ :sub:`1` > + - r\ :sub:`0` > + - a > + > + - b\ :sub:`4` > + - b\ :sub:`3` > + - b\ :sub:`2` > + - b\ :sub:`1` > + - b\ :sub:`0` > + - g\ :sub:`4` > + - g\ :sub:`3` > + - g\ :sub:`2` > + - > + * .. _V4L2-PIX-FMT-BGRX555: > + > + - ``V4L2_PIX_FMT_BGRX555`` > + - 'BX15' > + > + - g\ :sub:`1` > + - g\ :sub:`0` > + - r\ :sub:`4` > + - r\ :sub:`3` > + - r\ :sub:`2` > + - r\ :sub:`1` > + - r\ :sub:`0` > + - > + > + - b\ :sub:`4` > + - b\ :sub:`3` > + - b\ :sub:`2` > + - b\ :sub:`1` > + - b\ :sub:`0` > + - g\ :sub:`4` > + - g\ :sub:`3` > + - g\ :sub:`2` > + - > * .. _V4L2-PIX-FMT-RGB565: > > - ``V4L2_PIX_FMT_RGB565`` > diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h > index df9fa78a6ab7..fb6f01a7c91c 100644 > --- a/include/uapi/linux/videodev2.h > +++ b/include/uapi/linux/videodev2.h > @@ -523,6 +523,12 @@ struct v4l2_pix_format { > #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ > #define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ > #define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ > +#define V4L2_PIX_FMT_RGBA555 v4l2_fourcc('R', 'A', '1', '5') /* 16 RGBA-5-5-5-1 */ > +#define V4L2_PIX_FMT_RGBX555 v4l2_fourcc('R', 'X', '1', '5') /* 16 RGBX-5-5-5-1 */ > +#define V4L2_PIX_FMT_ABGR555 v4l2_fourcc('A', 'B', '1', '5') /* 16 ABGR-1-5-5-5 */ > +#define V4L2_PIX_FMT_XBGR555 v4l2_fourcc('X', 'B', '1', '5') /* 16 XBGR-1-5-5-5 */ > +#define V4L2_PIX_FMT_BGRA555 v4l2_fourcc('B', 'A', '1', '5') /* 16 BGRA-5-5-5-1 */ > +#define V4L2_PIX_FMT_BGRX555 v4l2_fourcc('B', 'X', '1', '5') /* 16 BGRX-5-5-5-1 */ > #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ > #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ > #define V4L2_PIX_FMT_ARGB555X v4l2_fourcc_be('A', 'R', '1', '5') /* 16 ARGB-5-5-5 BE */ > -- > Regards, > > Laurent Pinchart > --s3taerhrz7gu7vqs Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEtcQ9SICaIIqPWDjAcjQGjxahVjwFAly+/MEACgkQcjQGjxah Vjzn3Q/7Bz3/dTYf7Ggn+HPBIb3xo7Fs91Xd8x4u9Q51/WmTVRyovqFjQnI5I0/X yY+fDeWfb7ik61zsw/eWaYA2h3EXueF/UoW6T6g0YAqPMcpw1tFzAPLQDiurM71k dGUgZLRJc9ovb6zNFAncasv7qmGRGkY4Z3KeWreFnOgPvyFuYPc3zEHowvSZ8+CU vcaE7Xgj5LSy++s5eUS0a5DG72aK9CmOHCkn1hGYVCQSlGU1+wIv3GK0UvmiyZtW zMgoyaRD/06DhfrWfLwZalof+qO5kpeML1572Rr8Q5T9j33EY8esOBh5Jp3NkSZH XD7yPlOxSzoQli6tNzAZ7YGM8cUDN8KJuDVR2gyovSDISFyHz1sbx9fZ/EXRsprh 55oPUolFfxeX2KGGP7i1egSeCE4opf6O8QyQkdMBaLIrmCCpe4d2oXTmKOpmMZLj 8Az7y1JuUNAam5DM1U5cP/PkwkrrEs1xS39HTDphINjBF1td7VB20u4hKpatA0m5 eXscYh0i8ioyfqQZE8QdX+WLsTSB6z2AQ8LL8PF8EMr5HLwAjmHR9EyTWQbkzQBJ O2sds9zC4OW7TMHf+jNniHdBcaLn375C0H9+xZa6+5QiMqVTrDrWExCsGl3yFqtF 8d/N9+foYwY0KQ3hpQwlyxiINFJSsEfUDu32GDLbr//3NUcqz5o= =z85e -----END PGP SIGNATURE----- --s3taerhrz7gu7vqs-- --===============1212244884== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1212244884==--