Discussion:
[Linux-uvc-devel] vflip & hflip options for uvcvideo
Khashayar Naderehvandi
2008-12-14 14:45:41 UTC
Permalink
Hi all,

I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).

I came across these patches [1] posted on the Ubuntu forums that
allows the uvcvideo module to flip the image. I was wondering if there
are any plans to incorporate those patches in uvc to accomplish
something similar to the syntek driver's hflip & vflip options?

Thanks!

Regards,
Khashayar.

[1] http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=838210
David A. De Graaf
2008-12-14 19:40:11 UTC
Permalink
Post by Khashayar Naderehvandi
Hi all,
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
Me too. My new Asus N10JA2 netbook has this camera:
Bus 001 Device 002: ID 04f2:b071 Chicony Electronics Co., Ltd
and it produces images rotated 180 deg with Fedora 10, and kernel
2.6.27.7-134.fc10.i686. This is very frustrating.

However the patches to the uvcvideo module that you mention have fixed
the problem nicely. I, too, hope these patches will be incorporated
into the "official" driver.

Thanks, Khashayar.
Post by Khashayar Naderehvandi
I came across these patches [1] posted on the Ubuntu forums that
allows the uvcvideo module to flip the image. I was wondering if there
are any plans to incorporate those patches in uvc to accomplish
something similar to the syntek driver's hflip & vflip options?
Thanks!
Regards,
Khashayar.
[1] http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=838210
_______________________________________________
Linux-uvc-devel mailing list
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
--
David A. De Graaf DATIX, Inc. Hendersonville, NC
***@datix.us www.datix.us
Khashayar Naderehvandi
2008-12-14 22:36:04 UTC
Permalink
Post by Khashayar Naderehvandi
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)

Regards,
K.
David A. De Graaf
2008-12-15 18:38:43 UTC
Permalink
Post by Khashayar Naderehvandi
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)
My camera is 04f2:b071 CNF7129 (in Asus N10JA2 netbook).
It works with the uvcvideo driver in Fedora 10 except the image is
upside down (rotated 180 deg).

With the patched uvcvideo driver from
http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=6368216&posted=1#post6368216,
either patch_solution1_NOTmirrored.txt or patch_solution2_NOTmirrored.txt
it works correctly.
--
David A. De Graaf DATIX, Inc. Hendersonville, NC
***@datix.us www.datix.us
Laurent Pinchart
2008-12-16 15:58:26 UTC
Permalink
Hi David,
Post by David A. De Graaf
Post by Khashayar Naderehvandi
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)
My camera is 04f2:b071 CNF7129 (in Asus N10JA2 netbook).
It works with the uvcvideo driver in Fedora 10 except the image is
upside down (rotated 180 deg).
With the patched uvcvideo driver from
http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=6368216&posted=1#p
ost6368216, either patch_solution1_NOTmirrored.txt or
patch_solution2_NOTmirrored.txt it works correctly.
Could you please post the output of

lsusb -v -d 04f2:b071

using usbutils 0.72 or newer (0.73+ preferred) ? Thanks.

Best regards,

Laurent Pinchart
David A. De Graaf
2008-12-16 19:48:18 UTC
Permalink
Post by Laurent Pinchart
Hi David,
Post by David A. De Graaf
Post by Khashayar Naderehvandi
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)
My camera is 04f2:b071 CNF7129 (in Asus N10JA2 netbook).
It works with the uvcvideo driver in Fedora 10 except the image is
upside down (rotated 180 deg).
With the patched uvcvideo driver from
http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=6368216&posted=1#p
ost6368216, either patch_solution1_NOTmirrored.txt or
patch_solution2_NOTmirrored.txt it works correctly.
Could you please post the output of
lsusb -v -d 04f2:b071
using usbutils 0.72 or newer (0.73+ preferred) ? Thanks.
OK, you asked for it.


Bus 001 Device 002: ID 04f2:b071 Chicony Electronics Co., Ltd
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x04f2 Chicony Electronics Co., Ltd
idProduct 0xb071
bcdDevice 15.15
iManufacturer 2 Chicony Electronics Co., Ltd.
iProduct 1 CNF7129
iSerial 3 SN0001
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 592
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 5 USB2.0 1.3M UVC WebCam
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 5 USB2.0 1.3M UVC WebCam
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.00
wTotalLength 104
dwClockFrequency 15.000000MHz
bInCollection 1
baInterfaceNr( 0) 1
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 5
iTerminal 0
VideoControl Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {7033f028-1163-2e4a-ba2c-6890eb334016}
bNumControl 8
bNrPins 1
baSourceID( 0) 3
bControlSize 1
bmControls( 0) 0x0f
iExtension 0
VideoControl Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 5
guidExtensionCode {3fae1228-d7bc-114e-a357-6f1edef7d61d}
bNumControl 8
bNrPins 1
baSourceID( 0) 4
bControlSize 1
bmControls( 0) 0xff
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 0x00000000
VideoControl Interface Descriptor:
bLength 12
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
Warning: Descriptor too short
bUnitID 3
bSourceID 1
wMaxMultiplier 0
bControlSize 3
bmControls 0x0000377f
Brightness
Contrast
Hue
Saturation
Sharpness
Gamma
White Balance Temperature
Backlight Compensation
Gain
Power Line Frequency
White Balance Temperature, Auto
White Balance Component, Auto
iProcessing 0
bmVideoStandards 0x 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 6
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 1
wTotalLength 345
bEndPointAddress 129
bmInfo 0
bTerminalLink 2
bStillCaptureMethod 0
bTriggerSupport 1
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 27
VideoStreaming Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED)
bFormatIndex 1
bNumFrameDescriptors 7
guidFormat {59555932-0000-1000-8000-00aa00389b71}
bBitsPerPixel 16
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 46
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 480
dwMinBitRate 3072000
dwMaxBitRate 18432000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 5
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 500000
dwFrameInterval( 2) 666666
dwFrameInterval( 3) 1000000
dwFrameInterval( 4) 2000000
VideoStreaming Interface Descriptor:
bLength 46
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 2
bmCapabilities 0x00
Still image unsupported
wWidth 352
wHeight 288
dwMinBitRate 1013760
dwMaxBitRate 6082560
dwMaxVideoFrameBufferSize 202752
dwDefaultFrameInterval 333333
bFrameIntervalType 5
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 500000
dwFrameInterval( 2) 666666
dwFrameInterval( 3) 1000000
dwFrameInterval( 4) 2000000
VideoStreaming Interface Descriptor:
bLength 46
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 3
bmCapabilities 0x00
Still image unsupported
wWidth 320
wHeight 240
dwMinBitRate 768000
dwMaxBitRate 4608000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 5
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 500000
dwFrameInterval( 2) 666666
dwFrameInterval( 3) 1000000
dwFrameInterval( 4) 2000000
VideoStreaming Interface Descriptor:
bLength 46
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 4
bmCapabilities 0x00
Still image unsupported
wWidth 176
wHeight 144
dwMinBitRate 253440
dwMaxBitRate 1520640
dwMaxVideoFrameBufferSize 50688
dwDefaultFrameInterval 333333
bFrameIntervalType 5
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 500000
dwFrameInterval( 2) 666666
dwFrameInterval( 3) 1000000
dwFrameInterval( 4) 2000000
VideoStreaming Interface Descriptor:
bLength 46
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 5
bmCapabilities 0x00
Still image unsupported
wWidth 160
wHeight 120
dwMinBitRate 192000
dwMaxBitRate 1152000
dwMaxVideoFrameBufferSize 38400
dwDefaultFrameInterval 333333
bFrameIntervalType 5
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 500000
dwFrameInterval( 2) 666666
dwFrameInterval( 3) 1000000
dwFrameInterval( 4) 2000000
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 6
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 800
dwMinBitRate 10240000
dwMaxBitRate 14336000
dwMaxVideoFrameBufferSize 2048000
dwDefaultFrameInterval 1428571
bFrameIntervalType 2
dwFrameInterval( 0) 1428571
dwFrameInterval( 1) 2000000
VideoStreaming Interface Descriptor:
bLength 34
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 7
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 1024
dwMinBitRate 13107200
dwMaxBitRate 18350080
dwMaxVideoFrameBufferSize 2621440
dwDefaultFrameInterval 1428571
bFrameIntervalType 2
dwFrameInterval( 0) 1428571
dwFrameInterval( 1) 2000000
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))
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0080 1x 128 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0100 1x 256 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0320 1x 800 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0b20 2x 800 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1320 3x 800 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 6
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1400 3x 1024 bytes
bInterval 1
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: 0x0002
(Bus Powered)
Remote Wakeup Enabled
--
David A. De Graaf DATIX, Inc. Hendersonville, NC
***@datix.us www.datix.us
Laurent Pinchart
2008-12-17 21:34:54 UTC
Permalink
Hi David,
Post by David A. De Graaf
Post by Laurent Pinchart
Hi David,
Post by David A. De Graaf
Post by Khashayar Naderehvandi
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is
not listed below, please report it to the Linux UVC development
mailing list.", this is what I'm doing now :-)
My camera is 04f2:b071 CNF7129 (in Asus N10JA2 netbook).
It works with the uvcvideo driver in Fedora 10 except the image is
upside down (rotated 180 deg).
With the patched uvcvideo driver from
http://ubuntu-virginia.ubuntuforums.org/showthread.php?p=6368216&posted
=1#p ost6368216, either patch_solution1_NOTmirrored.txt or
patch_solution2_NOTmirrored.txt it works correctly.
Could you please post the output of
lsusb -v -d 04f2:b071
using usbutils 0.72 or newer (0.73+ preferred) ? Thanks.
OK, you asked for it.
Bus 001 Device 002: ID 04f2:b071 Chicony Electronics Co., Ltd
[snip]

Thanks for the report. I've updated the supported devices list on the website.

Best regards,

Laurent Pinchart
Laurent Pinchart
2008-12-16 15:57:25 UTC
Permalink
Hi Khashayar,
Post by Khashayar Naderehvandi
Post by Khashayar Naderehvandi
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)
Thanks. Could you please post the output of

lsusb -v -d 064e:a116

using usbutils 0.72 or newer (0.73+ preferred) ? Thanks.

Best regards,

Laurent Pinchart
Khashayar Naderehvandi
2008-12-16 19:09:29 UTC
Permalink
Laurent,

On Tue, Dec 16, 2008 at 4:57 PM, Laurent Pinchart
Post by Laurent Pinchart
Hi Khashayar,
Post by Khashayar Naderehvandi
Post by Khashayar Naderehvandi
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)
Thanks. Could you please post the output of
lsusb -v -d 064e:a116
using usbutils 0.72 or newer (0.73+ preferred) ? Thanks.
Here's the requested output with usbutils 0.73:

Bus 008 Device 004: ID 064e:a116 Suyin Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x064e Suyin Corp.
idProduct 0xa116
bcdDevice 3.13
iManufacturer 2 SuYin
iProduct 1 USB2.0 UVC 1.3M WebCam
iSerial 3 CN1316-S30B-MI03-VS-R03.01.03
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 599
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 168mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 5 USB2.0 UVC 1.3M WebCam
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 5 USB2.0 UVC 1.3M WebCam
VideoControl Interface Descriptor:
bLength 13
bDescriptorType 36
bDescriptorSubtype 1 (HEADER)
bcdUVC 1.00
wTotalLength 103
dwClockFrequency 15.000000MHz
bInCollection 1
baInterfaceNr( 0) 1
VideoControl Interface Descriptor:
bLength 9
bDescriptorType 36
bDescriptorSubtype 3 (OUTPUT_TERMINAL)
bTerminalID 2
wTerminalType 0x0101 USB Streaming
bAssocTerminal 0
bSourceID 5
iTerminal 0
VideoControl Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 4
guidExtensionCode {7033f028-1163-2e4a-ba2c-6890eb334016}
bNumControl 8
bNrPins 1
baSourceID( 0) 3
bControlSize 1
bmControls( 0) 0x0f
iExtension 0
VideoControl Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 6 (EXTENSION_UNIT)
bUnitID 5
guidExtensionCode {3fae1228-d7bc-114e-a357-6f1edef7d61d}
bNumControl 8
bNrPins 1
baSourceID( 0) 4
bControlSize 1
bmControls( 0) 0xff
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 0x00000000
VideoControl Interface Descriptor:
bLength 11
bDescriptorType 36
bDescriptorSubtype 5 (PROCESSING_UNIT)
Warning: Descriptor too short
bUnitID 3
bSourceID 1
wMaxMultiplier 0
bControlSize 2
bmControls 0x000037ff
Brightness
Contrast
Hue
Saturation
Sharpness
Gamma
White Balance Temperature
White Balance Component
Backlight Compensation
Gain
Power Line Frequency
White Balance Temperature, Auto
White Balance Component, Auto
iProcessing 0
bmVideoStandards 0x 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 6
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
VideoStreaming Interface Descriptor:
bLength 14
bDescriptorType 36
bDescriptorSubtype 1 (INPUT_HEADER)
bNumFormats 1
wTotalLength 353
bEndPointAddress 129
bmInfo 0
bTerminalLink 2
bStillCaptureMethod 2
bTriggerSupport 0
bTriggerUsage 0
bControlSize 1
bmaControls( 0) 27
VideoStreaming Interface Descriptor:
bLength 27
bDescriptorType 36
bDescriptorSubtype 4 (FORMAT_UNCOMPRESSED)
bFormatIndex 1
bNumFrameDescriptors 6
guidFormat
{59555932-0000-1000-8000-00aa00389b71}
bBitsPerPixel 16
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 50
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x00
Still image unsupported
wWidth 640
wHeight 480
dwMinBitRate 3072000
dwMaxBitRate 18432000
dwMaxVideoFrameBufferSize 614400
dwDefaultFrameInterval 333333
bFrameIntervalType 6
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 400000
dwFrameInterval( 2) 500000
dwFrameInterval( 3) 666666
dwFrameInterval( 4) 1000000
dwFrameInterval( 5) 2000000
VideoStreaming Interface Descriptor:
bLength 50
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 2
bmCapabilities 0x00
Still image unsupported
wWidth 352
wHeight 288
dwMinBitRate 1013760
dwMaxBitRate 6082560
dwMaxVideoFrameBufferSize 202752
dwDefaultFrameInterval 333333
bFrameIntervalType 6
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 400000
dwFrameInterval( 2) 500000
dwFrameInterval( 3) 666666
dwFrameInterval( 4) 1000000
dwFrameInterval( 5) 2000000
VideoStreaming Interface Descriptor:
bLength 50
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 3
bmCapabilities 0x00
Still image unsupported
wWidth 320
wHeight 240
dwMinBitRate 768000
dwMaxBitRate 4608000
dwMaxVideoFrameBufferSize 153600
dwDefaultFrameInterval 333333
bFrameIntervalType 6
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 400000
dwFrameInterval( 2) 500000
dwFrameInterval( 3) 666666
dwFrameInterval( 4) 1000000
dwFrameInterval( 5) 2000000
VideoStreaming Interface Descriptor:
bLength 50
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 4
bmCapabilities 0x00
Still image unsupported
wWidth 176
wHeight 144
dwMinBitRate 253440
dwMaxBitRate 1520640
dwMaxVideoFrameBufferSize 50688
dwDefaultFrameInterval 333333
bFrameIntervalType 6
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 400000
dwFrameInterval( 2) 500000
dwFrameInterval( 3) 666666
dwFrameInterval( 4) 1000000
dwFrameInterval( 5) 2000000
VideoStreaming Interface Descriptor:
bLength 50
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 5
bmCapabilities 0x00
Still image unsupported
wWidth 160
wHeight 120
dwMinBitRate 192000
dwMaxBitRate 1152000
dwMaxVideoFrameBufferSize 38400
dwDefaultFrameInterval 333333
bFrameIntervalType 6
dwFrameInterval( 0) 333333
dwFrameInterval( 1) 400000
dwFrameInterval( 2) 500000
dwFrameInterval( 3) 666666
dwFrameInterval( 4) 1000000
dwFrameInterval( 5) 2000000
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 6
bmCapabilities 0x00
Still image unsupported
wWidth 1280
wHeight 1024
dwMinBitRate 23592960
dwMaxBitRate 23592960
dwMaxVideoFrameBufferSize 2621440
dwDefaultFrameInterval 1111111
bFrameIntervalType 1
dwFrameInterval( 0) 1111111
VideoStreaming Interface Descriptor:
bLength 26
bDescriptorType 36
bDescriptorSubtype 3 (STILL_IMAGE_FRAME)
bEndpointAddress 0
bNumImageSizePatterns 5
wWidth( 0) 640
wHeight( 0) 480
wWidth( 1) 352
wHeight( 1) 288
wWidth( 2) 320
wHeight( 2) 240
wWidth( 3) 176
wHeight( 3) 144
wWidth( 4) 160
wHeight( 4) 120
bNumCompressionPatterns 5
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))
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0080 1x 128 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 2
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0100 1x 256 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 3
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0320 1x 800 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 4
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0b20 2x 800 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 5
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1320 3x 800 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 6
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 2 Video Streaming
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x1400 3x 1024 bytes
bInterval 1
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: 0x0002
(Bus Powered)
Remote Wakeup Enabled


All the best,
Khashayar
Laurent Pinchart
2008-12-17 21:35:52 UTC
Permalink
Hi Khashayar,
Post by Khashayar Naderehvandi
Post by Laurent Pinchart
Post by Khashayar Naderehvandi
Post by Khashayar Naderehvandi
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)
Thanks. Could you please post the output of
lsusb -v -d 064e:a116
using usbutils 0.72 or newer (0.73+ preferred) ? Thanks.
Bus 008 Device 004: ID 064e:a116 Suyin Corp.
[snip]

Thanks for the report. I've updated the supported devices list on the website.
Could you please tell me in which notebook this camera can be found ?

Best regards,

Laurent Pinchart
Khashayar Naderehvandi
2008-12-18 17:53:03 UTC
Permalink
On Wed, Dec 17, 2008 at 10:35 PM, Laurent Pinchart
Post by Laurent Pinchart
Hi Khashayar,
Post by Khashayar Naderehvandi
Post by Laurent Pinchart
Post by Khashayar Naderehvandi
Post by Khashayar Naderehvandi
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
By the way, this particular device isn't listed at
http://linux-uvc.berlios.de/. Since it says "If your UVC device is not
listed below, please report it to the Linux UVC development mailing
list.", this is what I'm doing now :-)
Thanks. Could you please post the output of
lsusb -v -d 064e:a116
using usbutils 0.72 or newer (0.73+ preferred) ? Thanks.
Bus 008 Device 004: ID 064e:a116 Suyin Corp.
[snip]
Thanks for the report. I've updated the supported devices list on the website.
Could you please tell me in which notebook this camera can be found ?
It is found in an Asus N20A.
Laurent Pinchart
2008-12-17 21:51:16 UTC
Permalink
Hi Khashayar,
Post by Khashayar Naderehvandi
Hi all,
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
I came across these patches [1] posted on the Ubuntu forums that
allows the uvcvideo module to flip the image. I was wondering if there
are any plans to incorporate those patches in uvc to accomplish
something similar to the syntek driver's hflip & vflip options?
A little background first. Most UVC cameras are made of a video sensor and a
USB bridge. Sensors can usually be read in any direction, offering horizontal
and vertical flip options. Unfortunately, firmware developers often forget to
expose those functions through the UVC interface, making hardware horizontal
and vertical flipping impossible.

When a camera mounted upside-down doesn't offer any hardware flip control, the
image must be rotated by software. Image processing isn't allowed in the
Linux kernel (or at least hardly discouraged), so I'm not keen on
implementing software-based image rotation in the UVC driver. I could be
convinced otherwise if the proposed implementation didn't impact
performances. This is in theory be possible, as the UVC driver copies data
from USB buffers to V4L buffers. 'Backward' copy could be implemented without
hurting the source code readability and performances (please not this isn't
possible for compressed formats).

However, an alternative now exists through libv4l. The library supports
software-based image rotation in userspace. If your application is linked to
libv4l the HFLIP and VFLIP controls should be available (I haven't tried it
myself so this might require some tweaking). It might be possible to achieve
the same result for applications not designed for libv4l by preloading the
library.

In your and David's case, the webcam supports direct access to the I2C bus
from the host driver, making it possible (at least in theory) to enable image
rotation on the sensor from the driver. This would require access to the
datasheet of the video sensor used in the camera. I can assist you with
driver hacking if you want to experiment with that.

Best regards,

Laurent Pinchart
Adrian Sergiu DARABANT
2008-12-18 11:21:23 UTC
Permalink
I 've done vertical and horizontal flip in software finally as the provider
of our cameras told us that the flip is not part of uvc specification.

They don't eat alot of processing power on YUV formats. I was afraid about
that as well. We're using the cameras either in
800x600 10-15 frames/sec
1600x1200 8 or 4 frames/sec

Adrian


-----Original Message-----
From: linux-uvc-devel-***@lists.berlios.de
[mailto:linux-uvc-devel-***@lists.berlios.de] On Behalf Of Laurent
Pinchart
Sent: Wednesday, December 17, 2008 11:51 PM
To: linux-uvc-***@lists.berlios.de
Subject: Re: [Linux-uvc-devel] vflip & hflip options for uvcvideo

Hi Khashayar,
Post by Khashayar Naderehvandi
Hi all,
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
I came across these patches [1] posted on the Ubuntu forums that
allows the uvcvideo module to flip the image. I was wondering if there
are any plans to incorporate those patches in uvc to accomplish
something similar to the syntek driver's hflip & vflip options?
A little background first. Most UVC cameras are made of a video sensor and a

USB bridge. Sensors can usually be read in any direction, offering
horizontal
and vertical flip options. Unfortunately, firmware developers often forget
to
expose those functions through the UVC interface, making hardware horizontal

and vertical flipping impossible.

When a camera mounted upside-down doesn't offer any hardware flip control,
the
image must be rotated by software. Image processing isn't allowed in the
Linux kernel (or at least hardly discouraged), so I'm not keen on
implementing software-based image rotation in the UVC driver. I could be
convinced otherwise if the proposed implementation didn't impact
performances. This is in theory be possible, as the UVC driver copies data
from USB buffers to V4L buffers. 'Backward' copy could be implemented
without
hurting the source code readability and performances (please not this isn't
possible for compressed formats).

However, an alternative now exists through libv4l. The library supports
software-based image rotation in userspace. If your application is linked to

libv4l the HFLIP and VFLIP controls should be available (I haven't tried it
myself so this might require some tweaking). It might be possible to achieve

the same result for applications not designed for libv4l by preloading the
library.

In your and David's case, the webcam supports direct access to the I2C bus
from the host driver, making it possible (at least in theory) to enable
image
rotation on the sensor from the driver. This would require access to the
datasheet of the video sensor used in the camera. I can assist you with
driver hacking if you want to experiment with that.

Best regards,

Laurent Pinchart
Khashayar Naderehvandi
2008-12-18 18:00:52 UTC
Permalink
On Wed, Dec 17, 2008 at 10:51 PM, Laurent Pinchart
Post by Laurent Pinchart
Hi Khashayar,
Post by Khashayar Naderehvandi
Hi all,
I'm one of those unlucky people who has the notorious problem of an
upside-down mounted web camera in my notebook. The uvcvideo module
itself works perfectly well with this webcam, which is a Suyin
(064e:a116).
I came across these patches [1] posted on the Ubuntu forums that
allows the uvcvideo module to flip the image. I was wondering if there
are any plans to incorporate those patches in uvc to accomplish
something similar to the syntek driver's hflip & vflip options?
A little background first. Most UVC cameras are made of a video sensor and a
USB bridge. Sensors can usually be read in any direction, offering horizontal
and vertical flip options. Unfortunately, firmware developers often forget to
expose those functions through the UVC interface, making hardware horizontal
and vertical flipping impossible.
When a camera mounted upside-down doesn't offer any hardware flip control, the
image must be rotated by software. Image processing isn't allowed in the
Linux kernel (or at least hardly discouraged), so I'm not keen on
implementing software-based image rotation in the UVC driver. I could be
convinced otherwise if the proposed implementation didn't impact
performances. This is in theory be possible, as the UVC driver copies data
from USB buffers to V4L buffers. 'Backward' copy could be implemented without
hurting the source code readability and performances (please not this isn't
possible for compressed formats).
However, an alternative now exists through libv4l. The library supports
software-based image rotation in userspace. If your application is linked to
libv4l the HFLIP and VFLIP controls should be available (I haven't tried it
myself so this might require some tweaking). It might be possible to achieve
the same result for applications not designed for libv4l by preloading the
library.
In your and David's case, the webcam supports direct access to the I2C bus
from the host driver, making it possible (at least in theory) to enable image
rotation on the sensor from the driver. This would require access to the
datasheet of the video sensor used in the camera. I can assist you with
driver hacking if you want to experiment with that.
Thank you so much for this very helpful background information. I
think I understand a bit more of these things now. Unfortunately, I
have no programming skills, and as tempting as driver hacking does
sound, I'm afraid I'm completely at a loss there. Coding is on my
to-learn-list, though, and if I ever manage to learn anything usefull,
I'll be sure to start hacking on uvcvideo. In the meanwhile, I'll be
ready to help out in any other way I can.
Post by Laurent Pinchart
Best regards,
Laurent Pinchart
All the best,
Khashayar

Loading...