diff mbox series

[v2] uvcvideo: Add simple packed bayer 12-bit formats

Message ID b9dc4c99-5aaa-db43-f6cb-f829da9fd654@edgarthier.net (mailing list archive)
State New, archived
Headers show
Series [v2] uvcvideo: Add simple packed bayer 12-bit formats | expand

Commit Message

Edgar Thier Jan. 10, 2019, 7:55 a.m. UTC
These formats are compressed 12-bit raw bayer formats with four different
pixel orders. They are similar to 10-bit bayer formats 'IPU3'.

Signed-off-by: Edgar Thier <info@edgarthier.net>
---
drivers/media/usb/uvc/uvcvideo.h | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)

--
2.20.1

Comments

Laurent Pinchart May 10, 2019, 2:26 p.m. UTC | #1
Hi Edgar,

Thank you for the patch.

On Thu, Jan 10, 2019 at 08:55:31AM +0100, Edgar Thier wrote:
> 
> These formats are compressed 12-bit raw bayer formats with four different
> pixel orders. They are similar to 10-bit bayer formats 'IPU3'.

If you want to compare them to other formats, I think they're more
similar to the SBGGR12P family.

> Signed-off-by: Edgar Thier <info@edgarthier.net>
> ---
> drivers/media/usb/uvc/uvcvideo.h | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
> index e5f5d84f1d1d..3cf4a6d17dc1 100644
> --- a/drivers/media/usb/uvc/uvcvideo.h
> +++ b/drivers/media/usb/uvc/uvcvideo.h
> @@ -108,7 +108,19 @@
> #define UVC_GUID_FORMAT_RGGB \
> { 'R',  'G',  'G',  'B', 0x00, 0x00, 0x10, 0x00, \
> 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> -#define UVC_GUID_FORMAT_BG16 \
> +#define UVC_GUID_FORMAT_BG12SP \
> +	{ 'B',  'G',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
> +	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +#define UVC_GUID_FORMAT_GB12SP \
> +	{ 'G',  'B',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
> +	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +#define UVC_GUID_FORMAT_RG12SP \
> +	{ 'R',  'G',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
> +	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +#define UVC_GUID_FORMAT_GR12SP \
> +	{ 'G',  'R',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
> +	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> +#define UVC_GUID_FORMAT_BG16                         \

No need to move the \ on this line.

> { 'B',  'G',  '1',  '6', 0x00, 0x00, 0x10, 0x00, \
> 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
> #define UVC_GUID_FORMAT_GB16 \

This has been corrupted by your mailer as well :-(
diff mbox series

Patch

diff --git a/drivers/media/usb/uvc/uvcvideo.h b/drivers/media/usb/uvc/uvcvideo.h
index e5f5d84f1d1d..3cf4a6d17dc1 100644
--- a/drivers/media/usb/uvc/uvcvideo.h
+++ b/drivers/media/usb/uvc/uvcvideo.h
@@ -108,7 +108,19 @@ 
#define UVC_GUID_FORMAT_RGGB \
{ 'R',  'G',  'G',  'B', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
-#define UVC_GUID_FORMAT_BG16 \
+#define UVC_GUID_FORMAT_BG12SP \
+	{ 'B',  'G',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
+	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_GB12SP \
+	{ 'G',  'B',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
+	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_RG12SP \
+	{ 'R',  'G',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
+	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_GR12SP \
+	{ 'G',  'R',  'C',  'p', 0x00, 0x00, 0x10, 0x00, \
+	 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
+#define UVC_GUID_FORMAT_BG16                         \
{ 'B',  'G',  '1',  '6', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_GB16 \