public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* Questions about VIDIOC_G_JPEGCOMP / VIDIOC_S_JPEGCOMP
@ 2009-02-19 12:17 Jean-Francois Moine
  0 siblings, 0 replies; 6+ messages in thread
From: Jean-Francois Moine @ 2009-02-19 12:17 UTC (permalink / raw)
  To: Linux Media

Hi,

The VIDIOC_G_JPEGCOMP / VIDIOC_S_JPEGCOMP v4l2 ioctls seem not to be
used by many drivers / applications. They should!

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.

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?

Regards.

-- 
Ken ar c'hentañ	|	      ** Breizh ha Linux atav! **
Jef		|		http://moinejf.free.fr/

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: Questions about VIDIOC_G_JPEGCOMP / VIDIOC_S_JPEGCOMP
@ 2009-02-19 14:02 Hans Verkuil
  2009-02-20  8:29 ` Hans Verkuil
  0 siblings, 1 reply; 6+ messages in thread
From: Hans Verkuil @ 2009-02-19 14:02 UTC (permalink / raw)
  To: Jean-Francois Moine; +Cc: Linux Media


> 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

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-02-20 21:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-19 12:17 Questions about VIDIOC_G_JPEGCOMP / VIDIOC_S_JPEGCOMP Jean-Francois Moine
  -- strict thread matches above, loose matches on Subject: below --
2009-02-19 14:02 Hans Verkuil
2009-02-20  8:29 ` Hans Verkuil
2009-02-20 11:04   ` Jean-Francois Moine
2009-02-20 18:43     ` Hans Verkuil
2009-02-20 21:52     ` Trent Piepho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox