> On Fr, 2011-04-15 at 19:39 +0200, Alexey Fisher wrote: > > Hallo all, > > > > here is patch (against current master git) to add two new quirks and > > some more debug string to see what happening :D > > > > The quirks are: > > UVC_QUIRK_FIX_JPEG_BANDWIDTH 0x00000040 > > /* to recalculate bandwidth needed for jpeg compressed stream */ > > UVC_QUIRK_DISABLE_URB_1024 0x00000400 > > /* by default we use safe bandwith restriction, to less than 1024 * > > * this quirk disables this restriction. So if you need URB less than > > * 1024, use this quirk. It will work only with FIX*BANDWIDTH quirk. */ > > > > Also i added module option "jpeg_comp" to change calculation for > > bandwith. Default is 4bpp, 1 is maximal compression, 16bpp is no > > compression, just normal raw stream. > > > > This patch also gather statistic about used buffers. It will report > > biggest used buffer. You will need it to calculate best value for > > jpeg_comp option. > > > > Usage. Recalculate bandwidth for jpeg and disable 1024 restriction: > > sudo rmmod uvcvideo && sudo modprobe quirks=0x440 > > > > reduce calculated bandwith to minimum: > > sudo rmmod uvcvideo && sudo modprobe quirks=0x440 jpeg_comp=1 > > > > for more info enable trace=0xffff and seek for messages like: > > ... > > [25495.869580] uvcvideo: Device requested 703 B/frame bandwidth. > > [25495.869583] uvcvideo: Selecting alternate setting 5 (800 B/frame > > bandwidth). > > [25495.869758] uvcvideo: Allocated 5 URB buffers of 32x800 bytes each. > > ... > > [25501.959475] uvcvideo: Biggest used buffer: 1382400/106438. Format: > > MJPEG 960x720@15. > >
Lets continue the conversation hier :D it is the proper place for it. > Hi Alexey, > > On Friday 15 April 2011 19:43:38 Alexey Fisher wrote: > > 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!!! > > Now I understand what your patch is for :-) > > One issue that you forgot to take into account is that, in addition to > average > bandwidth requirements, cameras also have peak bandwidth requirements. > At low > frame rates, an image could be transmitted with a lower bandwidth, but > that > would require buffering capabilities on the camera side to store the > image and > transmit it over a longer period of time. Most cameras have very > little buffer > memory, and thus require a high bandwidth even at low frame rates. > Depending > on the hardware MJPEG encoder, the average bandwidth for a frame will > not > match the peak bandwidth requirements. I thick you mean this part of code: - bandwidth = max_t(u32, bandwidth, 1024); + if(!(stream->dev->quirks & UVC_QUIRK_DISABLE_URB_1024)) + bandwidth = max_t(u32, bandwidth, 1024); but i did it optional. User who has good cam can try to use unsafe option. May be i need to mark it "highly dangerous, use on your own risk!!!" :) -- Regards, Alexey _______________________________________________ Linux-uvc-devel mailing list Linux-uvc-devel@lists.berlios.de https://lists.berlios.de/mailman/listinfo/linux-uvc-devel