Friday I left the office and it was raining. I didn’t buy an umbrella because it wasn’t so bad.
Saturday I went out, Sunday night I went to sleep and felt as I was getting sick. By the end of Monday I was sick indeed !
Today, Tuesday, I decided to call in sick and face the cold and sore throat before it would get worse. It wasn’t that bad, but when it’s bad it’s already too late.
The theory goes that with cold wind, one gets his/her throat dry, making the job easier for the bacteria. That may be so, but it’s definitely not the whole story ! One get’s wet in a cold environment, he/she sneezes and there starts the cold effect. It’s that simple, but I don’t know of any proper scientific explanation for this.. at least it’s not common knowledge.
In any case, I spent a few hours on Sunday and Monday on video compression, and the not-so-sick part of today too. I’ve finally came up with some working, decent, implementation. It’s all black & white, but it’s also 640×480.
Trying to video chat at 640×480 is quite a challenge. Capturing with DirectShow from a USB 2 web-camera alone takes a big slice of CPU ! To that must be added the necessary noise reduction, then compressing one frame while decompressing another. I’ve thought about using graphics hardware acceleration to help the CPU, but the good accelerators, those with pixel shaders, are of course on already powerful computers. This is again the big trouble with PCs.. while I see that Apple has been pushing the use of hardware acceleration to do video processing. Having a relatively fixed spec hardware definitely helps push things forward. Apple also uses the AltiVec instruction set, since that’s standard on the recent Macs.
In any case, I’m hoping for a test dev release. Something for others to test (help me to test 8). First I need to add color, because B&W really sucks ! After that, I will try optimize further the compression.
One good starting point for improving compression is to assume that the camera doesn’t move and that the subject(s) are in front of a camera with a relatively static background.
At first, the moving subject will cover one part of the background, then uncover it while covering another part. My goal, would be to progressively memorize the whole background, so that at one point the subject can move anywhere and (ideally) none of the background data will need to be re-transmitted.
Something like this is already implemented in MPEG-1 compression. Hardly anything is new nowadays, it’s mostly matter of efficiently implement some specific ideas in a simple way so that code doesn’t get too complex and encoding doesn’t take too much time. Assuming that the camera is fixed helps avoiding to deal with motion compensation, a very powerful technique that is also very time consuming !
Time to zzzzzzz
poof
Posted by Davide Pasca in Uncategorized
