uvcvideo: Add mapping for HEVC payloads
Subsystems (2)
RFC PATCH 1/1 uvcvideo: Add mapping for HEVC payloads
Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver.
--- drivers/media/usb/uvc/uvc_driver.c | 5 +++++ drivers/media/usb/uvc/uvcvideo.h | 4 ++++ 2 files changed, 9 insertions(+)
drivers/media/usb/uvc/uvc_driver.c +5 -0
@@ -214,6 +214,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_CNF4, .fcc = V4L2_PIX_FMT_CNF4, }, + { + .name = "HEVC", + .guid = UVC_GUID_FORMAT_HEVC, + .fcc = V4L2_PIX_FMT_HEVC, + }, };/* ------------------------------------------------------------------------
drivers/media/usb/uvc/uvcvideo.h +4 -0
@@ -165,6 +165,10 @@ {0x32 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x10 ,0x00 , \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_HEVC \ + { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +/* ------------------------------------------------------------------------ * Driver specific constants.
Signature · 2 lines
Dmitry Buzdyk Rhonda Software
Laurent Pinchart
maintainerHi Dmitry,
Thank you for the patch.
Quoted 2 lines · Dmitry Buzdyk
Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver.
The patch itself looks OK to me, but could you share a bit more information about which device(s) implement this ? Are they UVC 1.1 devices ? Could you share their full USB descriptors (retrieved with 'lsusb -v', running as root if possible) ?
Is there anything else needed to get HEVC capture working, such as extension unit controls, or is this patch enough ? What userspace software do you use to capture and decode HEVC (or capture it to disk) ?
Quoted 37 lines
Signed-off-by Dmitry Buzdyk <[email protected]>--- drivers/media/usb/uvc/uvc_driver.c | 5 +++++ drivers/media/usb/uvc/uvcvideo.h | 4 ++++ 2 files changed, 9 insertions(+)drivers/media/usb/uvc/uvc_driver.c +5
-0@@ -214,6 +214,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_CNF4, .fcc = V4L2_PIX_FMT_CNF4, }, + { + .name = "HEVC", + .guid = UVC_GUID_FORMAT_HEVC, + .fcc = V4L2_PIX_FMT_HEVC, + }, };/* ------------------------------------------------------------------------ drivers/media/usb/uvc/uvcvideo.h +4
-0@@ -165,6 +165,10 @@ {0x32 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x10 ,0x00 , \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_HEVC \ + { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +/* ------------------------------------------------------------------------ * Driver specific constants.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 4 lines · Laurent Pinchart
Hi Dmitry,
Thank you for the patch.
Quoted 8 lines
Quoted 2 lines · Dmitry Buzdyk
Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver.
The patch itself looks OK to me, but could you share a bit more information about which device(s) implement this ? Are they UVC 1.1 devices ? Could you share their full USB descriptors (retrieved with 'lsusb -v', running as root if possible) ?
This is a UVC1.1 camera device based on Ambarella H22 SOC. Please note that device is still in development and yet to get actual VID and PID.
Output of lsusb is:
Bus 001 Device 010: ID 1209:0001 Generic pid.codes Test PID Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x1209 Generic
idProduct 0x0001 pid.codes Test PID
bcdDevice 0.10
iManufacturer 1 Rhonda iProduct 2 Rhonda Cam iSerial 3 FMABCLE15000007 bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x01ff
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 2 Rhonda Cam
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 2 Rhonda Cam
VideoControl Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.10
wTotalLength 0x006b
dwClockFrequency 50.000000MHz
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
VideoControl Interface Descriptor:
bLength 44
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 10
guidExtensionCode {e307e649-4618-a3ff-82fc-2d8b5f216773}
bNumControl 146
bNrPins 1
baSourceID( 0) 5
bControlSize 19
bmControls( 0) 0x05
bmControls( 1) 0x00
bmControls( 2) 0x00
bmControls( 3) 0x00
bmControls( 4) 0x00
bmControls( 5) 0x00
bmControls( 6) 0x00
bmControls( 7) 0x00
bmControls( 8) 0x00
bmControls( 9) 0x00
bmControls(10) 0x00
bmControls(11) 0x00
bmControls(12) 0x00
bmControls(13) 0x00
bmControls(14) 0x00
bmControls(15) 0x00
bmControls(16) 0x00
bmControls(17) 0xf0
bmControls(18) 0x02
iExtension 0
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls 0x00100000
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
bUnitID 5
bSourceID 1
wMaxMultiplier 0
bControlSize 3
bmControls 0x00000400
Power Line Frequency
iProcessing 0
bmVideoStandards 0x00
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 16
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 3
wTotalLength 0x00bf
bEndPointAddress 130
bmInfo 0
bTerminalLink 16
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
bmaControls( 2) 4
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 3
bNumFrameDescriptors 1
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 3000
wHeight 4000
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwMaxVideoFrameBufferSize 36000000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 2
wTotalLength 0x008f
bEndPointAddress 131
bmInfo 0
bTerminalLink 17
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Quoted 4 lines
Is there anything else needed to get HEVC capture working, such as extension unit controls, or is this patch enough ? What userspace software do you use to capture and decode HEVC (or capture it to disk) ?
No other changes to Linux nor extra actions needed to start HEVC capture. We use patched version of FFmpeg to capture, decode and display HEVC stream from camera device. That simple patch also going to be sent to FFmpeg upstream.
Quoted 31 lines
Quoted 31 lines
Signed-off-by Dmitry Buzdyk <[email protected]>--- drivers/media/usb/uvc/uvc_driver.c | 5 +++++ drivers/media/usb/uvc/uvcvideo.h | 4 ++++ 2 files changed, 9 insertions(+)drivers/media/usb/uvc/uvc_driver.c +5
-0@@ -214,6 +214,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_CNF4, .fcc = V4L2_PIX_FMT_CNF4, }, + { + .name = "HEVC", + .guid = UVC_GUID_FORMAT_HEVC, + .fcc = V4L2_PIX_FMT_HEVC, + }, };/* ------------------------------------------------------------------------ drivers/media/usb/uvc/uvcvideo.h +0
-0@@ -165,6 +165,10 @@ {0x32 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x10 ,0x00 , \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
Quoted 12 lines
Quoted 7 lines
drivers/media/usb/uvc/uvcvideo.h +4
-0+#define UVC_GUID_FORMAT_HEVC \ + { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +/* ------------------------------------------------------------------------ * Driver specific constants. Signature · 3 lines
Regards, Laurent Pinchart
--
Dmitry Buzdyk
Rhonda Software
On Tue, Jun 09, 2020 at 02:57:36PM +1000, Dmitry Buzdyk wrote:
Hi Laurent,
Please see updated information below
Quoted 9 lines · Laurent Pinchart
Quoted 8 lines
Hi Dmitry,
Thank you for the patch.
Quoted 2 lines · Dmitry Buzdyk
Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver.
Quoted 7 lines
Quoted 4 lines
The patch itself looks OK to me, but could you share a bit more information about which device(s) implement this ? Are they UVC 1.1 devices ? Could you share their full USB descriptors (retrieved with 'lsusb -v', running as root if possible) ?
This is a UVC1.1 camera device based on Ambarella H22 SOC. Please note that device is still in development and yet to get actual VID and PID.
Device got its VID:PID from USB-IF:
Bus 001 Device 009: ID 3301:1000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x3301
idProduct 0x1000
bcdDevice 0.10
iManufacturer 1 Rhonda iProduct 2 Rhonda Cam iSerial 3 FMABCLE15000007 bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x022f
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 2 Rhonda Cam
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 2 Rhonda Cam
VideoControl Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.10
wTotalLength 0x006b
dwClockFrequency 50.000000MHz
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
VideoControl Interface Descriptor:
bLength 44
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 10
guidExtensionCode {e307e649-4618-a3ff-82fc-2d8b5f216773}
bNumControl 146
bNrPins 1
baSourceID( 0) 5
bControlSize 19
bmControls( 0) 0x05
bmControls( 1) 0x00
bmControls( 2) 0x00
bmControls( 3) 0x00
bmControls( 4) 0x00
bmControls( 5) 0x00
bmControls( 6) 0x00
bmControls( 7) 0x00
bmControls( 8) 0x00
bmControls( 9) 0x00
bmControls(10) 0x00
bmControls(11) 0x00
bmControls(12) 0x00
bmControls(13) 0x00
bmControls(14) 0x00
bmControls(15) 0x00
bmControls(16) 0x00
bmControls(17) 0xf0
bmControls(18) 0x02
iExtension 0
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType 0x0201 Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls 0x00100000
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
bUnitID 5
bSourceID 1
wMaxMultiplier 0
bControlSize 3
bmControls 0x00000400
Power Line Frequency
iProcessing 0
bmVideoStandards 0x00
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 16
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 3
wTotalLength 0x00bf
bEndPointAddress 130
bmInfo 0
bTerminalLink 16
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
bmaControls( 2) 4
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 3
bNumFrameDescriptors 1
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 3000
wHeight 4000
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwMaxVideoFrameBufferSize 36000000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 3
wTotalLength 0x00bf
bEndPointAddress 131
bmInfo 0
bTerminalLink 17
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
bmaControls( 2) 4
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 3
bNumFrameDescriptors 1
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags 0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 3000
wHeight 4000
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwMaxVideoFrameBufferSize 36000000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Quoted 424 lines
Output of lsusb is:
Bus 001 Device 010: ID 1209:0001 Generic pid.codes Test PID Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor0x1209Generic
idProduct0x0001pid.codes Test PID
bcdDevice 0.10iManufacturer 1 Rhonda iProduct 2 Rhonda Cam iSerial 3 FMABCLE15000007 bNumConfigurations 1Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength0x01ff
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 2 Rhonda Cam
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 2 Rhonda Cam
VideoControl Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.10
wTotalLength0x006b
dwClockFrequency 50.000000MHz
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
VideoControl Interface Descriptor:
bLength 44
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 10
guidExtensionCode {e307e649-4618-a3ff-82fc-2d8b5f216773}
bNumControl 146
bNrPins 1
baSourceID( 0) 5
bControlSize 19
bmControls( 0)0x05
bmControls( 1)0x00
bmControls( 2)0x00
bmControls( 3)0x00
bmControls( 4)0x00
bmControls( 5)0x00
bmControls( 6)0x00
bmControls( 7)0x00
bmControls( 8)0x00
bmControls( 9)0x00
bmControls(10)0x00
bmControls(11)0x00
bmControls(12)0x00
bmControls(13)0x00
bmControls(14)0x00
bmControls(15)0x00
bmControls(16)0x00
bmControls(17)0xf0
bmControls(18)0x02
iExtension 0
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType0x0201Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls0x00100000
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
bUnitID 5
bSourceID 1
wMaxMultiplier 0
bControlSize 3
bmControls0x00000400
Power Line Frequency
iProcessing 0
bmVideoStandards0x00
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 16
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x81EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize0x00101x 16 bytes
bInterval 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 3
wTotalLength0x00bf
bEndPointAddress 130
bmInfo 0
bTerminalLink 16
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
bmaControls( 2) 4
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 3
bNumFrameDescriptors 1
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 3000
wHeight 4000
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwMaxVideoFrameBufferSize 36000000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x82EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 2
wTotalLength0x008f
bEndPointAddress 131
bmInfo 0
bTerminalLink 17
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x83EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status:0x0000
(Bus Powered)Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Is there anything else needed to get HEVC capture working, such as extension unit controls, or is this patch enough ? What userspace software do you use to capture and decode HEVC (or capture it to disk) ?
No other changes to Linux nor extra actions needed to start HEVC capture. We use patched version of FFmpeg to capture, decode and display HEVC stream from camera device. That simple patch also going to be sent to FFmpeg upstream.
Patch for FFmpeg sent to https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=1760
Quoted 43 lines
Quoted 43 lines
Quoted 39 lines
Signed-off-by Dmitry Buzdyk <[email protected]>--- drivers/media/usb/uvc/uvc_driver.c | 5 +++++ drivers/media/usb/uvc/uvcvideo.h | 4 ++++ 2 files changed, 9 insertions(+)drivers/media/usb/uvc/uvc_driver.c +5
-0@@ -214,6 +214,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_CNF4, .fcc = V4L2_PIX_FMT_CNF4, }, + { + .name = "HEVC", + .guid = UVC_GUID_FORMAT_HEVC, + .fcc = V4L2_PIX_FMT_HEVC, + }, };/* ------------------------------------------------------------------------ drivers/media/usb/uvc/uvcvideo.h +4
-0@@ -165,6 +165,10 @@ {0x32 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x10 ,0x00 , \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_HEVC \ + { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +/* ------------------------------------------------------------------------ * Driver specific constants. Signature · 1 line
Regards,
Quoted 4 lines
Quoted 1 line
Laurent Pinchart
--
Dmitry Buzdyk
Rhonda Software
Best Regards,
Dmitry Buzdyk
Hi Laurent,
Had you a chance to review USB descriptors from the device provided below? Is any additional information needed?
Quoted 957 lines · Dmitry Buzdyk
On Tue, Jun 09, 2020 at 02:57:36PM +1000, Dmitry Buzdyk wrote:
Hi Laurent,Please see updated information below
Quoted 9 lines · Laurent Pinchart
Quoted 8 lines
Hi Dmitry,
Thank you for the patch.
Quoted 2 lines · Dmitry Buzdyk
Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver.
Quoted 7 lines
Quoted 4 lines
The patch itself looks OK to me, but could you share a bit more information about which device(s) implement this ? Are they UVC 1.1 devices ? Could you share their full USB descriptors (retrieved with 'lsusb -v', running as root if possible) ?
This is a UVC1.1 camera device based on Ambarella H22 SOC. Please note that device is still in development and yet to get actual VID and PID.
Device got its VID:PID from USB-IF:
Bus 001 Device 009: ID 3301:1000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor0x3301
idProduct0x1000
bcdDevice 0.10iManufacturer 1 Rhonda iProduct 2 Rhonda Cam iSerial 3 FMABCLE15000007 bNumConfigurations 1Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength0x022f
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 2 Rhonda Cam
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 2 Rhonda Cam
VideoControl Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.10
wTotalLength0x006b
dwClockFrequency 50.000000MHz
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
VideoControl Interface Descriptor:
bLength 44
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 10
guidExtensionCode {e307e649-4618-a3ff-82fc-2d8b5f216773}
bNumControl 146
bNrPins 1
baSourceID( 0) 5
bControlSize 19
bmControls( 0)0x05
bmControls( 1)0x00
bmControls( 2)0x00
bmControls( 3)0x00
bmControls( 4)0x00
bmControls( 5)0x00
bmControls( 6)0x00
bmControls( 7)0x00
bmControls( 8)0x00
bmControls( 9)0x00
bmControls(10)0x00
bmControls(11)0x00
bmControls(12)0x00
bmControls(13)0x00
bmControls(14)0x00
bmControls(15)0x00
bmControls(16)0x00
bmControls(17)0xf0
bmControls(18)0x02
iExtension 0
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType0x0201Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls0x00100000
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
bUnitID 5
bSourceID 1
wMaxMultiplier 0
bControlSize 3
bmControls0x00000400
Power Line Frequency
iProcessing 0
bmVideoStandards0x00
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 16
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x81EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize0x00101x 16 bytes
bInterval 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 3
wTotalLength0x00bf
bEndPointAddress 130
bmInfo 0
bTerminalLink 16
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
bmaControls( 2) 4
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 3
bNumFrameDescriptors 1
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 3000
wHeight 4000
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwMaxVideoFrameBufferSize 36000000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x82EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 3
wTotalLength0x00bf
bEndPointAddress 131
bmInfo 0
bTerminalLink 17
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
bmaControls( 2) 4
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 3
bNumFrameDescriptors 1
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 3000
wHeight 4000
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwMaxVideoFrameBufferSize 36000000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x83EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status:0x0000
(Bus Powered)Quoted 424 lines
Output of lsusb is:
Bus 001 Device 010: ID 1209:0001 Generic pid.codes Test PID Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor0x1209Generic
idProduct0x0001pid.codes Test PID
bcdDevice 0.10iManufacturer 1 Rhonda iProduct 2 Rhonda Cam iSerial 3 FMABCLE15000007 bNumConfigurations 1Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength0x01ff
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 3
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 2 Rhonda Cam
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 2 Rhonda Cam
VideoControl Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.10
wTotalLength0x006b
dwClockFrequency 50.000000MHz
bInCollection 2
baInterfaceNr( 0) 1
baInterfaceNr( 1) 2
VideoControl Interface Descriptor:
bLength 44
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 10
guidExtensionCode {e307e649-4618-a3ff-82fc-2d8b5f216773}
bNumControl 146
bNrPins 1
baSourceID( 0) 5
bControlSize 19
bmControls( 0)0x05
bmControls( 1)0x00
bmControls( 2)0x00
bmControls( 3)0x00
bmControls( 4)0x00
bmControls( 5)0x00
bmControls( 6)0x00
bmControls( 7)0x00
bmControls( 8)0x00
bmControls( 9)0x00
bmControls(10)0x00
bmControls(11)0x00
bmControls(12)0x00
bmControls(13)0x00
bmControls(14)0x00
bmControls(15)0x00
bmControls(16)0x00
bmControls(17)0xf0
bmControls(18)0x02
iExtension 0
VideoControl Interface Descriptor:
bLength 18
bDescriptorType 36
bDescriptorSubtype 2 (INPUT_TERMINAL)
bTerminalID 1
wTerminalType0x0201Camera Sensor
bAssocTerminal 0
iTerminal 0
wObjectiveFocalLengthMin 0
wObjectiveFocalLengthMax 0
wOcularFocalLength 0
bControlSize 3
bmControls0x00100000
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
bUnitID 5
bSourceID 1
wMaxMultiplier 0
bControlSize 3
bmControls0x00000400
Power Line Frequency
iProcessing 0
bmVideoStandards0x00
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 16
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x81EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize0x00101x 16 bytes
bInterval 15
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 16
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 3
wTotalLength0x00bf
bEndPointAddress 130
bmInfo 0
bTerminalLink 16
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
bmaControls( 2) 4
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 6 (FORMAT_MJPEG)
bFormatIndex 3
bNumFrameDescriptors 1
bFlags 0
Fixed-size samples: No
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 1 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 7 (FRAME_MJPEG)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 3000
wHeight 4000
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwMaxVideoFrameBufferSize 36000000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x82EP 2 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 15
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 2
wTotalLength0x008f
bEndPointAddress 131
bmInfo 0
bTerminalLink 17
bStillCaptureMethod 0
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 0
bmaControls( 1) 0
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 1
bNumFrameDescriptors 1
guidFormat {34363248-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
VideoStreaming Interface Descriptor:
bLength 28
bDescriptorType 36
bDescriptorSubtype 16 (FORMAT_FRAME_BASED)
bFormatIndex 2
bNumFrameDescriptors 1
guidFormat {43564548-0000-0010-8000-00aa00389b71}
bBitsPerPixel 16
bDefaultFrameIndex 1
bAspectRatioX 0
bAspectRatioY 0
bmInterlaceFlags0x00
Interlaced stream or variable: No
Fields per frame: 2 fields
Field 1 first: No
Field pattern: Field 1 only
bCopyProtect 0
bVariableSize 1
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 17 (FRAME_FRAME_BASED)
bFrameIndex 1
bmCapabilities0x00
Still image unsupported
wWidth 1440
wHeight 1920
dwMinBitRate 10000000
dwMaxBitRate 10000000
dwDefaultFrameInterval 333333
bFrameIntervalType 1
dwBytesPerLine 0
dwFrameInterval( 0) 333333
VideoStreaming Interface Descriptor:
bLength 6
bDescriptorType 36
bDescriptorSubtype 13 (COLORFORMAT)
bColorPrimaries 1 (BT.709,sRGB)
bTransferCharacteristics 1 (BT.709)
bMatrixCoefficients 4 (SMPTE 170M (BT.601))
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x83EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status:0x0000
(Bus Powered)Quoted 1 line
Quoted 7 lines
Quoted 3 lines
Is there anything else needed to get HEVC capture working, such as extension unit controls, or is this patch enough ? What userspace software do you use to capture and decode HEVC (or capture it to disk) ?
No other changes to Linux nor extra actions needed to start HEVC capture. We use patched version of FFmpeg to capture, decode and display HEVC stream from camera device. That simple patch also going to be sent to FFmpeg upstream.
Patch for FFmpeg sent to https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=1760
Quoted 43 lines
Quoted 43 lines
Quoted 39 lines
Signed-off-by Dmitry Buzdyk <[email protected]>--- drivers/media/usb/uvc/uvc_driver.c | 5 +++++ drivers/media/usb/uvc/uvcvideo.h | 4 ++++ 2 files changed, 9 insertions(+)drivers/media/usb/uvc/uvc_driver.c +5
-0@@ -214,6 +214,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_CNF4, .fcc = V4L2_PIX_FMT_CNF4, }, + { + .name = "HEVC", + .guid = UVC_GUID_FORMAT_HEVC, + .fcc = V4L2_PIX_FMT_HEVC, + }, };/* ------------------------------------------------------------------------ drivers/media/usb/uvc/uvcvideo.h +4
-0@@ -165,6 +165,10 @@ {0x32 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x10 ,0x00 , \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_HEVC \ + { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +/* ------------------------------------------------------------------------ * Driver specific constants. Signature · 1 line
Regards,
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Laurent Pinchart
--
Dmitry Buzdyk
Rhonda SoftwareBest Regards,
Dmitry Buzdyk
--
Dmitry Buzdyk
Rhonda Software
Hi Dmitry,
Sorry for the late reply.
Mauro, there's a question for your below.
Quoted 26 lines · Dmitry Buzdyk
Hi Laurent,
Had you a chance to review USB descriptors from the device provided below? Is any additional information needed?
Quoted 20 lines · Dmitry Buzdyk
On Tue, Jun 09, 2020 at 02:57:36PM +1000, Dmitry Buzdyk wrote:
Hi Laurent,Please see updated information below
Quoted 15 lines · Laurent Pinchart
Quoted 4 lines
Hi Dmitry,
Thank you for the patch.
Quoted 8 lines
Quoted 2 lines · Dmitry Buzdyk
Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver.
The patch itself looks OK to me, but could you share a bit more information about which device(s) implement this ? Are they UVC 1.1 devices ? Could you share their full USB descriptors (retrieved with 'lsusb -v', running as root if possible) ?
This is a UVC1.1 camera device based on Ambarella H22 SOC.
That's interesting. It would be nice to have upstream support for the Ambarella SoCs in the kernel :-)
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Please note that device is still in development and yet to get actual VID and PID.
Device got its VID:PID from USB-IF:
Quoted 16 lines
Quoted 12 lines
Bus 001 Device 009: ID 3301:1000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor0x3301
idProduct0x1000
bcdDevice 0.10Quoted 4 lines
iManufacturer 1 Rhonda iProduct 2 Rhonda Cam iSerial 3 FMABCLE15000007 bNumConfigurations 1
Thank you for the descriptors.
[snip]
Quoted 10 lines
Quoted 10 lines
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 16
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
VideoControl Interface Descriptor:
Quoted 8 lines
Quoted 8 lines
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
Two output terminals ? Does that mean the device can provide two streams from the same source ?
[snip]
Quoted 10 lines
Quoted 10 lines
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x83EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
This is interesting too, does it provide enough bandwidth for 3000x4000 @10fps MJPEG ?
[snip]
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Is there anything else needed to get HEVC capture working, such as extension unit controls, or is this patch enough ? What userspace software do you use to capture and decode HEVC (or capture it to disk) ?
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
No other changes to Linux nor extra actions needed to start HEVC capture. We use patched version of FFmpeg to capture, decode and display HEVC stream from camera device. That simple patch also going to be sent to FFmpeg upstream.
Patch for FFmpeg sent to https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=1760
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Dmitry Buzdyk <[email protected]>
and taken in my tree. I'm afraid we're a bit too close to the v5.9 merge window for me to send a pull request now, unless Mauro would be fine with that. Otherwise I'll include it in the pull request for the next release.
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
Quoted 36 lines
--- drivers/media/usb/uvc/uvc_driver.c | 5 +++++ drivers/media/usb/uvc/uvcvideo.h | 4 ++++ 2 files changed, 9 insertions(+)drivers/media/usb/uvc/uvc_driver.c +5
-0@@ -214,6 +214,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_CNF4, .fcc = V4L2_PIX_FMT_CNF4, }, + { + .name = "HEVC", + .guid = UVC_GUID_FORMAT_HEVC, + .fcc = V4L2_PIX_FMT_HEVC, + }, };/* ------------------------------------------------------------------------ drivers/media/usb/uvc/uvcvideo.h +4
-0@@ -165,6 +165,10 @@ {0x32 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x10 ,0x00 , \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +#define UVC_GUID_FORMAT_HEVC \ + { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +/* ------------------------------------------------------------------------ * Driver specific constants.
Signature · 3 lines
Regards, Laurent Pinchart
Hi Laurent,
Quoted 82 lines · Laurent Pinchart
Hi Dmitry,
Sorry for the late reply.
Mauro, there's a question for your below.
Quoted 26 lines · Dmitry Buzdyk
Hi Laurent,
Had you a chance to review USB descriptors from the device provided below? Is any additional information needed?
Quoted 20 lines · Dmitry Buzdyk
On Tue, Jun 09, 2020 at 02:57:36PM +1000, Dmitry Buzdyk wrote:
Hi Laurent,Please see updated information below
Quoted 15 lines · Laurent Pinchart
Quoted 4 lines
Hi Dmitry,
Thank you for the patch.
Quoted 8 lines
Quoted 2 lines · Dmitry Buzdyk
Add HEVC GUID and assotiate with HEVC pixel format so that frame based format descriptors recognized by the UVC video driver.
The patch itself looks OK to me, but could you share a bit more information about which device(s) implement this ? Are they UVC 1.1 devices ? Could you share their full USB descriptors (retrieved with 'lsusb -v', running as root if possible) ?
This is a UVC1.1 camera device based on Ambarella H22 SOC.
That's interesting. It would be nice to have upstream support for the Ambarella SoCs in the kernel :-)
Quoted 5 lines
Quoted 5 lines
Quoted 2 lines
Please note that device is still in development and yet to get actual VID and PID.
Device got its VID:PID from USB-IF:
Quoted 16 lines
Quoted 12 lines
Bus 001 Device 009: ID 3301:1000
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor0x3301
idProduct0x1000
bcdDevice 0.10Quoted 4 lines
iManufacturer 1 Rhonda iProduct 2 Rhonda Cam iSerial 3 FMABCLE15000007 bNumConfigurations 1Thank you for the descriptors.
[snip]
Quoted 10 lines
Quoted 10 lines
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 16
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
VideoControl Interface Descriptor:Quoted 8 lines
Quoted 8 lines
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 17
wTerminalType0x0101USB Streaming
bAssocTerminal 0
bSourceID 10
iTerminal 0
Quoted 2 lines
Two output terminals ? Does that mean the device can provide two streams from the same source ?
Correct. This device encode and stream two indpendent H264 or HEVC video streams. Picture for both streams comes from single image sensor, with own ROI applied for each stream.
Quoted 15 lines
[snip]
Quoted 10 lines
Quoted 10 lines
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress0x83EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize0x02001x 512 bytes
bInterval 0
Quoted 2 lines
This is interesting too, does it provide enough bandwidth for 3000x4000 @10fps MJPEG ?
This video mode has relatively high compression ratio thus total bitrate for this mode does not exceed 100Mbps.
Quoted 52 lines
[snip]
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Is there anything else needed to get HEVC capture working, such as extension unit controls, or is this patch enough ? What userspace software do you use to capture and decode HEVC (or capture it to disk) ?
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
No other changes to Linux nor extra actions needed to start HEVC capture. We use patched version of FFmpeg to capture, decode and display HEVC stream from camera device. That simple patch also going to be sent to FFmpeg upstream.
Patch for FFmpeg sent to https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=1760
Quoted 1 line
Quoted 1 line
Quoted 1 line
Signed-off-by Dmitry Buzdyk <[email protected]>Reviewed-by Laurent Pinchart <[email protected]>and taken in my tree. I'm afraid we're a bit too close to the v5.9 merge window for me to send a pull request now, unless Mauro would be fine with that. Otherwise I'll include it in the pull request for the next release.
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
Quoted 29 lines
--- drivers/media/usb/uvc/uvc_driver.c | 5 +++++ drivers/media/usb/uvc/uvcvideo.h | 4 ++++ 2 files changed, 9 insertions(+)drivers/media/usb/uvc/uvc_driver.c +5
-0@@ -214,6 +214,11 @@ static struct uvc_format_desc uvc_fmts[] = { .guid = UVC_GUID_FORMAT_CNF4, .fcc = V4L2_PIX_FMT_CNF4, }, + { + .name = "HEVC", + .guid = UVC_GUID_FORMAT_HEVC, + .fcc = V4L2_PIX_FMT_HEVC, + }, };/* ------------------------------------------------------------------------ drivers/media/usb/uvc/uvcvideo.h +0
-0@@ -165,6 +165,10 @@ {0x32 ,0x00 ,0x00 ,0x00 ,0x02 ,0x00 ,0x10 ,0x00 , \ 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}
Quoted 12 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
drivers/media/usb/uvc/uvcvideo.h +4
-0+#define UVC_GUID_FORMAT_HEVC \ + { 'H', 'E', 'V', 'C', 0x00, 0x00, 0x10, 0x00, \ + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71} +/* ------------------------------------------------------------------------ * Driver specific constants. Signature · 3 lines
Regards, Laurent Pinchart
--
Dmitry Buzdyk
Rhonda Software