Netcam Decompress In Memory
There're a fact that makes motion to decrease its performance, write to disk each frame captured from network cameras. That's happening in decompress process because every image captured is written to disk, using
function and after decompressed to YUV ( YUV420P
palette ). So motion will increase its performace just moving the decompress process to memory
Most of the code belongs to StreamingNetcamWithoutCurl
Description of Patch
This patch tries to reduce the potencial I/O bottleneck replacing the decompress process, for jpeg images , from disk (
) to memory
Installation of Patch
tar xfvz motion-3.1.17.tar.gz
patch -p1 < ../netcam_decompress_in_memory.diff
Updated to be applied to released version 3.1.17 , changed the patch status to
- 18 Oct 2004
Started looking at this.
Two things concerns me.
- Variables are declared here and there. Motion has been pretty cleanly coded so it confuses me to see variable declarations outside functions.
- I cannot easily follow what is going on because there are hardly any comments. I started adding comments to the existing code whenever I walk through new code. I would hope the same could happen with new code added and with code that gets heavily modified. As a minimum functions should have headers explaining what they do.
I have not yet tested the code. I have no network camera.
- 24 Oct 2004
Hey Kenneth sorry , i forgot to add comments and clean up a bit the code when i did the last test with this patch i'll do it soon.
- 25 Oct 2004
The patch is updated with some improvements and source code is with comments.
- 25 Oct 2004
The patch is marked as Cancelled to get it out of the queue. But all the code will be included in the StreamingNetcamWithoutCurl
patch instead so it is not abandonned.
- 03 Jan 2005