#v4l 2017-11-22,Wed

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)

WhoWhatWhen
svarbanovhverkuil: hi, is there a legal way to set IDR period for encoders [12:22]
hverkuilV4L2_CID_MPEG_VIDEO_H264_I_PERIOD perhaps? Is that what you are looking for? [12:26]
svarbanovhverkuil: i checked this CID, but it sets the I-frames period for open GOP case, but what will happen if it is closed GOP? [12:28]
hverkuilThen it uses V4L2_CID_MPEG_VIDEO_GOP_SIZE. [12:31]
svarbanovhverkuil: the venus encoder has two properties related to I-frame period (which could be set by GOP_SIZE CID) and IDR period which will define which I-frame will be IDR frame. So I'm trying to used the standard controls to give to the user control over both settings
hverkuil: i.e I-frame period (gop size) could be 32, but IDR could be every 2nd I-frame
[12:37]
hverkuilsvarbanov: it's a good question. I'm not an expert in this area, so let me ask you a few questions to understand this better.
Is IDR specific to the open GOP case? Or is it used for both open and closed?
[12:49]
svarbanovhverkuil: I'm not sure, but seems that it could be used for both open and closed GOP [12:51]
hverkuilBecause if it can be used for both, then I wonder why the GOP_SIZE control was reused instead of making an IDR_PERIOD control.
what do the other two encoders that use this I_PERIOD control do?
You may have to contact the author of this control for clarification. Or dig into the h264 spec.
[12:54]
***prabhakarlad has left [13:06]
svarbanovhverkuil: ok I see, just wanted to check with you in case you know [13:07]
............................................. (idle for 3h42mn)
***benjiG has left [16:49]
................... (idle for 1h34mn)
lucasrangitCan someone help me understand how the UVC extension units get mapped to V4L2 controls ? I'm developing the firmware for a UVC camera. [18:23]
ndufresnelucasrangit, I'm far from knowledgable about all the details, but they are somhow exposed through the media controller, sudo media-ctl -d /dev/media0 -p [18:35]
lucasrangitndufresne, thanks, i'll look into that but i think i'm having issues before the controls are mapped because my uvcdynctrl xml doesn't get imported without errors [18:40]
ndufresneah, these controls [18:42]
lucasrangitndufresne, sorry, i don't know the terminology yet [18:42]
ndufresnelucasrangit, so, rolling back, you have an XML file that sets controls, but it does not work, some controls are missing ?
lucasrangit, have you looked inside uvc_ctrl.c ?
the mapping seems rather static
if I was you, I'd follow the code using UVC_VC_EXTENSION_UNIT to figure-out
ah, it's seems generic, but some names and description are being "standardized"
[18:44]
lucasrangitndufresne, the mapping for standard controls is fixed https://elixir.free-electrons.com/linux/latest/source/drivers/media/usb/uvc/uvc_ctrl.c#L423
ndufresne, i'm trying to a vendor specific control but don't understand how to define the ID for the custom V4L2 control in the XML. i'm getting import errors like "libwebcam Warning: the V4L2_CTRL_FLAG_NEXT_CTRL flag does not return the next higher control ID"
[18:56]
ndufresneyes, but later in the code you'll see that it will accepts other controls, but it's not clear how you can access them from userspace
does uvcdynctrl support vendor CID ?
[18:59]
lucasrangit, ok, found some code in gst using vendor extension (the C920), it's calling UVCIOC_CTRL_QUERY
and UVCX_VIDEO_CONFIG_COMMIT
see /usr/include/linux/uvcvideo.h
[19:10]
lucasrangitndufresne, ok [19:12]
ndufresneinteresting, I wonder what UVCIOC_CTRL_MAP does ... [19:12]
lucasrangitndufresne, take a look at the control at https://github.com/cshorler/webcam-tools/blob/master/uvcdynctrl/data/046d/logitech.xml#L109
ndufresne, a V4L2 CID for focus control is added. but why is the value set to "0x0A046D04" ?
[19:15]
ndufresneis it a fourcc ?
na, 04 is too small
something interesting, V4L2_CID_FOCUS does not exist in the driver, instead we have V4L2_CID_FOCUS_ABSOLUTE/AUTO
there is no LED CID either
[19:16]
lucasrangitndufresne, yeah those are vendor specific UVC extension units, not part of standard UVC camera spec [19:19]
ndufresneok, if I understand right, these are controls of UVC_GUID_UVC_PROCESSING
still, it's not clear what this number is
[19:20]
lucasrangitndufresne, yeah :\ thanks for looking at it with me. [19:22]
ndufresneI'm actually curious, someday I might need to give gstreamer uvch264src some maintenance [19:24]
lucasrangitndufresne, coincidence that Logitech's vendor id 0x046d, which matches bytes 0x0A_046D_72 ? [19:24]
ndufresneand it's using bunch of vendor controls to control the type of H264
I don't believe it's a conincidence no
could it be VENDOR_CLASS_BASE + LOGITECH_BASE + N ?
[19:24]
lucasrangitndufresne, where is VENDOR_CLASS_BASE defined? [19:27]
ndufresnenowhere in the driver apparently, was the question, maybe it's inside uvcdynctl code ...
0x04 is not a conincidence either, fromt he spec, EXTERNAL_ VENDOR_SPECIFIC 0x0400
[19:28]
lucasrangitndufresne, that last byte varies for each control though, see V4L2_CID_LED1_MODE 0x0A046D05 https://github.com/cshorler/webcam-tools/blob/master/uvcdynctrl/data/046d/logitech.xml#L113 [19:32]
ndufresneso I guess it's a control ID somehow, this is HW specific, with a vendor base value + index [19:35]
.............................. (idle for 2h29mn)
lucasrangitndufresne, thanks for help and sharing your insights [22:04]

↑back Search ←Prev date Next date→ Show only urls(Click on time to select a line by its url)