[theora-dev] Encoding - CPU usage ...

Mat heavensdoor78 at gmail.com
Thu Oct 5 05:46:39 PDT 2006

Ralph Giles wrote:
> On Wed, Oct 04, 2006 at 12:55:58PM +0200, Mat wrote:
> What optimization we have should work with both x86 and x86_64 cpus. You 
> do need a fast machine for SD res, but CIF shouldn't be a problem. By "4 
> BNC" do you mean capturing 4 separate CIF feeds (4x2.5 Mpixel/second) 
> simultanteously?

4 video analogic inputs... yes.

4 x 2.5 Mp... mmm. Ah ok... you get this value with a 25 fps.
For now we use 12.5 fps... so it's about 4 x 1.2 Mpixel / sec
( but with motion-detection so it's not continusly with this rate ).

CPU... we are using AMD Athlons XP actually.
But we will pass very soon to Athlon64, or another CPU if I can find 
something better on the same price level ( but I don't think )
So I hope that this change will improve a lot the situation...

>> - CPU optimisations... they are enabled by default, right?
> Should be, if you're using the latest release. alpha6 had a bug where 
> they were not. If you 'make debug' from svn it should tell you what it's 
> using.

I'm using the alpha7 release actually...

I made our theora module about 1 year ago with alpha5... and now I'm 
back to check the project again.
- Video quality: perfect
- Size: very good
- valgrind check: no mem leaks

But I have to use a statement:
    _ogg_free( tOGGpacket.packet );
in the function where I create the clip, to free a small one.
If I look in the example I don't see this line and a valgrind-chechink 
of the example gives me 0 leaks...
So I'll check this thing later eventually.

I have some problems with timestamps I think...
The clips I produce go on playing for some seconds after the clip time 
is passed.

>> - Encoding parameters... now I use:
> These looks like they're appropriate. Reducing the framerate will help a 
> lot, but that may not be acceptable for a DVR.

It's for video surveillance so 25 fps it's not a must... but I have to 
keep at least 12.5 fps.
I was thinking to other parameters I could reduce... mmm.

>> I'm studying the Theora's examples and ffmpeg2theora to see if I can 
>> optimize my code... but I don't know libogg / libtheora so I can't 
>> understand well some functions. Is there an API reference also for 
>> libogg... ?
> http://xiph.org/ogg/doc/libogg/
> It is unlikely to be a bottleneck, however.

Mmmm... ok.
I'll post some code later to see if someone can help me to correct / 
improve it.
It would be nice to have a V4L + Theora example ( in the Theora source 
package ) IMO...


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/theora-dev/attachments/20061005/f1b42992/attachment.htm

More information about the theora-dev mailing list