Re: [PATCH] Too slow libv4l MJPEG decoding with HD cameras

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

On Sun, Oct 24, 2010 at 6:04 PM, Mitar <mmitar@xxxxxxxxx> wrote:
> Has anybody tried to improve MJPEG support in libv4l? With newer
> cameras this becomes important.

I have made a patch which makes libv4l uses ffmpeg's avcodec library
for MJPEG decoding. Performance improvements are unbelievable.

I have been testing with Logitech HD Pro Webcam C910 and
2.6.36-rc6-amd64 and Intel(R) Core(TM)2 Quad CPU Q9400 @ 2.66GHz.
Camera supports 2592x1944 at 10 FPS MJPEG stream.

With using original MJPEG code it takes my computer on average 129.614
ms to decode the frame what is 0.0257 us per pixel.

With using ffmpeg MJPEG decoding it takes my computer on average
43.616 ms to decode the frame what is 0.0087 us per pixel.

In comparison with libv4l YUYV decoding which is 27.407 ms to decode
the frame what is 0.0054 us per pixel this is really amazing. So it is
same time range with YUYV decoding! This opens a new question of how
fast would YUYV decoding be if we would use swscale library for that.
(Code for that is already in my patch, I just use it only for MJPEG
decoding to proper output format.)

This makes decoding possible in real-time at 20 FPS on my computer.
This is really great. (When I will have such camera.)


Mitar

Attachment: v4l-utils-ffmpeg-mjpeg.patch
Description: Binary data


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux