On Thursday 19 February 2009 15:02:31 Hans Verkuil wrote: > > Hi, > > > > The VIDIOC_G_JPEGCOMP / VIDIOC_S_JPEGCOMP v4l2 ioctls seem not to be > > used by many drivers / applications. They should! > > Unfortunately, these ioctls are completely undocumented. Which might be > the reason why they aren't used :-) > > > In some ms-win traces, there are automatic and dynamic adjustments of > > the JPEG quality according to... who knows? > > > > Also, most webcams do not include the quantization tables in the > > images. Then, (in gspca), these tables are added by the subdrivers with > > a quality defined by the testers and according to their taste. > > > > As I understand, the JPEGCOMP ioctls permit to set the JPEG quality and > > to define the content of the JPEG frames. > > > > If I implement these controls in gspca: > > > > - by default, I could not add the quantization and Huffman tables in > > the image frames, > > > > - the quality could be set dynamically, this value being used to load > > the quantization tables in the webcam and also to convert the images. > > > > The questions are: > > > > 1) May the driver refuse to set some values on VIDIOC_S_JPEGCOMP? > > For example, if it cannot add the Huffman table in the frames. > > You will have to check what the existing practice is. How to other > drivers handle this? > > > 2) Will the VIDIOC_G_JPEGCOMP ioctl be used by the v4l library (for > > conversion purpose)? > > > > 3) Does anybody know a command line or X application which may get/set > > these JPEG parameters? > > Support for these ioctls should be added to v4l2-ctl.cpp. It's the right > place for that. > > But more important is to document these ioctls in the v4l2 spec. As far > as I can tell these ioctls came from the zoran driver where basically a > private ioctl was elevated to a public ioctl, but with little or no > review. > > Do you know enough about these ioctls to update the v4l2 spec? That would > be a great help. > > Regards, > > Hans I'm working on the zoran driver anyway, so I'll document this and add support to v4l2-ctl. I now understand what this is about. The COM and APP markers are either obsolete or are meant as a read-only property. And while it is possible theoretically to set multiple APP segments, it is impossible with the current API to ever read more than one back. Sigh. Regards, Hans -- Hans Verkuil - video4linux developer - sponsored by TANDBERG -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html