[XviD-devel] Multithreaded encode

Christoph Lampert xvid-devel@xvid.org
Tue, 3 Dec 2002 12:38:07 +0100 (CET)


On 3 Dec 2002, skal wrote:
> 	just a thought around SMP encoding: if the file size
> 	target is pretty well reached on the whole movie, 
> 	would it be also reached for a quarter of movie? or,
> 	say, 50000 frames? If so, one could imagine a two
> 	pass-encoding with a 50000 frames delay between the
> 	'first pass' instance and the '2nd pass' encoder instance:
> 	once the 1rst pass instance has analyzed 50000 frames,
> 	the 2nd one is launched for final encoding, running behind
> 	with a constant delay, and finishing the last 50000 frames
> 	alone, when the 1rst instance is finished...

For the first pass, this is somehow what I planned: in most casese you
know how long the movie is going to be (approximately), so in first _and_
second pass you simply split the movie in halfs and analyse
and encode independently, only exchanging information between the
passes.  => linear speedup at almost exactly the same behaviour. 
If you don't know length in first pass, you can still set a large size
like 10000 or 50000 frames and split the material into these for the first
pass (for the second, you of course know the number of frames)

But the application has to support it, not the codec, so that's why I was
asking here. 

gruel