All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Xavion <xavion.0@gmail.com>,
	"Linux Kernel (Media) ML" <linux-media@vger.kernel.org>
Subject: Re: My Microdia (SN9C201) webcam doesn't work properly in Linux anymore
Date: Mon, 05 Mar 2012 15:43:34 +0100	[thread overview]
Message-ID: <4F54D116.7020304@redhat.com> (raw)
In-Reply-To: <20120305130318.458bd040@tele>

Hi,

On 03/05/2012 01:03 PM, Jean-Francois Moine wrote:
> On Mon, 05 Mar 2012 09:33:18 +0100
> Hans de Goede<hdegoede@redhat.com>  wrote:
>
>> I guess that motion is using the JPG compressed frames rather then
>> the i420 like special format these cameras also support, and it looks
>> like we don't reserve enoug space to buffer these frames. To fix this
>> we need to enlarge the size we reserve per frame in the sn9c20x driver,
>> edit sn9c20x.c and search for vga_mode, in that table you will
>> find a factor "4 / 8" (its in there 3 times), change all 3 occurences
>> to "5 / 8" and try again, then "6 / 8", etc.
>>
>> Normally I would be suspicious about SOF / EOF detection when we
>> need such a factor, but the timestamps in your log exactly match 30
>> fps, so that seems to be fine. And in my experience with the USB bandwidth
>> stuff the sn9c20x does seem to compress less then other JPG cams, so
>> it makes sense that it needs bigger buffers to store the frames too.
>
> Hi Hans,
>
> The JPEG compression quality of the sn9c20x is 95%. That's why the
> frames are so big. Then, if the quality is not settable, I wonder why
> to use the JPEG format.

I think the quality is settable, and we are just not setting it to a very
useful value. I'm afraid I don't have time to work on this atm, but if you
are willing to take a shot at this, then I can test (I've such a camera).

I'll send you a private mail with info on how to set the compression
ratio.

> BTW, I wonder also about the SN9C20X_I420: this format asks for a
> buffer greater than the native image.

Yes, but then the data is ready to use, since most apps actuall want i420,
where as raw bayer needs a lot of CPU intensive processing before we get
useful data out of it.

Regards,

Hans

  reply	other threads:[~2012-03-05 14:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAKnx8Y7BAyR8A5r-eL13MVgZO2DcKndP3v-MTfkQdmXPvjjGJg@mail.gmail.com>
2012-03-03  0:23 ` My Microdia (SN9C201) webcam doesn't work properly in Linux anymore Xavion
2012-03-03  7:48   ` Hans de Goede
2012-03-04  0:25     ` Xavion
2012-03-04  7:25       ` Jean-Francois Moine
2012-03-04 21:58         ` Xavion
2012-03-05  8:33           ` Hans de Goede
2012-03-05 12:03             ` Jean-Francois Moine
2012-03-05 14:43               ` Hans de Goede [this message]
2012-03-05 17:27           ` Jean-Francois Moine
2012-03-06  0:44             ` Xavion
2012-03-06  9:40               ` Hans de Goede
2012-03-06 22:59                 ` Xavion
2012-03-06 23:44                   ` Theodore Kilgore
2012-03-08  5:15                     ` Xavion
2012-03-08  6:16                       ` Theodore Kilgore
2012-03-08 23:19                         ` Xavion
2012-03-07 15:32                   ` Jean-Francois Moine
2012-03-08  5:34                     ` Xavion

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F54D116.7020304@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=moinejf@free.fr \
    --cc=xavion.0@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.