UPSTREAM: media: uvcvideo: Add UVC_GUID_FORMAT_H265

This patch aims to add UVC_GUID_FORMAT_H265
High Efficiency Video Coding (HEVC), also known as H.265 and MPEG-H Part 2.
They describe the same video encoding method.
So for handling their behavior is the same.
However, when external camera device describes this encoding method,
some use hevc, some use h265.
There is no uniform specification to describe this encoding method.
So if an external camera device use h265 to describe this encoding method,
driver will not recognize it.
Therefore, this patch is to enable driver to read HEVC/H265
and convert it to V4L2_PIX_FMT_HEVC.

Signed-off-by: James_Lin <Ping-lei.Lin@mediatek.com>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>

Bug: 235045181
(cherry picked from commit be938c70e292731f81226917fc214683e66da577)
Signed-off-by: Lecopzer Chen <lecopzer.chen@mediatek.com>
Change-Id: Ib9a78c2aa900abdd37b08351d56a3815b55ec7f4
This commit is contained in:
James_Lin 2022-04-18 11:06:52 +02:00 committed by Lecopzer Chen
parent d1b6bd094b
commit 03b512f716
2 changed files with 8 additions and 0 deletions

View File

@ -155,6 +155,11 @@ static struct uvc_format_desc uvc_fmts[] = {
.guid = UVC_GUID_FORMAT_H264, .guid = UVC_GUID_FORMAT_H264,
.fcc = V4L2_PIX_FMT_H264, .fcc = V4L2_PIX_FMT_H264,
}, },
{
.name = "H.265",
.guid = UVC_GUID_FORMAT_H265,
.fcc = V4L2_PIX_FMT_HEVC,
},
{ {
.name = "Greyscale 8 L/R (Y8I)", .name = "Greyscale 8 L/R (Y8I)",
.guid = UVC_GUID_FORMAT_Y8I, .guid = UVC_GUID_FORMAT_Y8I,

View File

@ -139,6 +139,9 @@
#define UVC_GUID_FORMAT_H264 \ #define UVC_GUID_FORMAT_H264 \
{ 'H', '2', '6', '4', 0x00, 0x00, 0x10, 0x00, \ { 'H', '2', '6', '4', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_H265 \
{ 'H', '2', '6', '5', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
#define UVC_GUID_FORMAT_Y8I \ #define UVC_GUID_FORMAT_Y8I \
{ 'Y', '8', 'I', ' ', 0x00, 0x00, 0x10, 0x00, \ { 'Y', '8', 'I', ' ', 0x00, 0x00, 0x10, 0x00, \
0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}