There is new patch. With this patch you can recalculate bandwith for
jpeg stream. See my post in list and try it:
[patch] jpeg compression hacks. Tester are welcome!!!

On Fr, 2011-03-11 at 10:38 +0000, Paulo Assis wrote:
> Hi,
> 
> 2011/3/11 Alexey Fisher <bug-tr...@fisher-privat.net>:
> > Raw stream is "simple", for example YUYV need 16 bits to describe one
> > pixel. No extra action is done on this stream. Even if the camera lie
> > about it setting, we can still calculate it our self. For example if you
> > use YUYV 640x480 with 30 fps:
> > 640×480×16=4915200 bit or 4915200/8=614400 byte
> > so dwMaxVideoFrameSize=614400.
> >
> > Same value you will get if you check lsusb -vd xxxx:xxxx
> >
> > To calculate bandwidth uvc use framerate. This value deiced, can you or
> > not use your webcam with some particular settings on your usb hub.
> >
> > Compressed stream can use different compression algorithms, most populas
> > is jpeg. Compression depend on texture what your cam capture, and on the
> > time it has for compression. For example if camera forced to push 30fps,
> > it will choice speed against compression rate.
> 
> actually it can also only send a part of the sensor image, just try
> any of the logitech HD models,
> when you pick a different frame rate (even for the same resolution)
> you will get a very different image (more or less zoomed),
> The compression ration seems more or less the same (at least the
> quantization tables don't seem to alter).
> 
> 
> 
> > With compressed stream we can't say for sure, how match bandwidth do we
> > need. On cam's i tested it variate between 6% and  30% of uncompressed
> > stream. If you provide wrong bandwidth to the cam, it will just freeze
> > or send you black frame.
> 
> Yes but you can decide on a maximum (say 40% :D) that is never
> reached, this is better than allocating 100% of the bandwidth and can
> be the difference between a working camera and a non working one.
> 
> >
> > So, manufacture should provide correct settings and they are different
> > for each cam.
> 
> I totally agree with this, but unfortunately, this is not always the
> case, hence the need for the quirks.
> In fact the bandwidth settings should vary at least according to
> resolution, but what wee see in some cases is that manufactures just
> use the same value for every situation (laziness related maybe).
> 
> >
> > Or we should add new quirk setting, what adjust compression ratio too.
> > But before, we need some test cases, to find worts compression ratio,
> > and add statistic collection to the driver.
> 
> V4l2 has jpeg compression related ioctls, Laurent event created a
> patch for uvc, but for some reason it was never integrated, in fact I
> add support for it in guvcview, but as I remember although the cameras
> I tested seem to accepted it, it didn't really cause any change in the
> compression ratio, so I doubt very much it would cause any on the
> bandwidth settings.
> 
> Regards,
> Paulo
> 
> >
> > Am Freitag, den 11.03.2011, 00:35 +0200 schrieb Asmaa ElAssal:
> >> Yes, sir, but I use another one.
> >> I received that analysiz from someone on that site about that old
> >> webcam. I want to understand the problem of that previous cam
> >> Excuse me, Could you more explain "Compressed stream is not really
> >> predictable" and it's different of the uncompressed format.
> >>
> >> On Thu, Mar 10, 2011 at 11:59 PM, Alexey Fisher
> >> <bug-tr...@fisher-privat.net> wrote:
> >>         Compressed stream is not really predictable. Every camera can
> >>         act
> >>         differently, so my be it will brick more than fix.
> >>
> >>         Do your camera need this quirk?
> >>
> >>         Am Donnerstag, den 10.03.2011, 19:43 +0000 schrieb modysama:
> >>         > modysama <asmaa.elassal.student <at> pua.edu.eg> writes:
> >>         >
> >>         > >
> >>         > > Fixing bandwidth quirk is only works for uncompressed
> >>         stream
> >>         > the YUYV format, it doesn’t work for MJPG.
> >>         > > Why??need explain, please
> >>         > > _______________________________________________
> >>         > > Linux-uvc-devel mailing list
> >>         > > Linux-uvc-devel <at> lists.berlios.de
> >>         > > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
> >>         > >
> >>         >
> >>         >
> >>         >
> >>         >
> >>         > _______________________________________________
> >>         > Linux-uvc-devel mailing list
> >>         > Linux-uvc-devel@lists.berlios.de
> >>         > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
> >>
> >>         --
> >>         Regards,
> >>                Alexey
> >>
> >>
> >>
> >>
> >> --
> >> Asmaa El-said Rashad
> >> Pharos University of Alex
> >> Computer Department
> >> 5th year
> >>
> >>
> >>
> >
> >
> > _______________________________________________
> > Linux-uvc-devel mailing list
> > Linux-uvc-devel@lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/linux-uvc-devel
> >

-- 
Regards,
        Alexey

_______________________________________________
Linux-uvc-devel mailing list
Linux-uvc-devel@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/linux-uvc-devel

Reply via email to