[XviD-devel] Multithreaded encode

Dead2 xvid-devel@xvid.org
Fri, 29 Nov 2002 23:27:10 +0100


> is there a multithreaded encoding application for Windows?
> Not a multithreaded codec, but an application that does "cluster"
> encode:
> Cut input into parts, encode them individually, join them in the end?

I have not seen any yet..

But what I would like to see is for example virtualdub using buffered SMP
encoding on each filter/module.

It would be something like this:

| Module | Currently processing Frame # |
| Read from file | 16 |
| Resize filter | 15 |
| Smart blur filter | 14 |
| Some other filter | 13 |
| Xvid encoder | 12 |
| Output file writer | 11 |

If each of these filters/modules ran in its own thread, load balancing
across
SMP cpus would probably be a lot better than it is today. There could also
be a buffer for buffering up a few more frames right before the codec, to
accomodate for delays occuring before that in the chain. Thus xvid would
never have to stop and wait for another frame if an filter is taking long to
complete for some reason.

I do think Virtualdub does some SMP'ing, but I am not sure where it is, nor
how it works. Unfortunately it only uses 55-70% total cpu power here..
(100% on cpu1, 5-20% on cpu2). It might infact be that this is exactly what
it does, but I think it is not optimal, as encoding speed is severely
reduced
when using filters even if cpu usage is nowhere near 100%

For the record, I have a dual AMP MP1800 system with 512MB DDR ram,
and 10krpm scsi disks.

Anyone know anything more about this, or have comments?

-=Dead2=-