[XviD-devel] Multithreaded encode

Dirk Knop xvid-devel@xvid.org
Tue, 03 Dec 2002 10:55:35 +0100


Hi,

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...
>  
>
Unfortunately this won't work as expected. We now achieve our targeted 
size by determining a "scaler"-variable by dividing first pass size by 
the desired size. I can show you some stats files of movies, which in 
the first half behave completely different than on the second half (i.e. 
no linear approximation of the first pass size would be reliable).

It would of course work if you take some quality degradation into 
account (thus calling this "enhanced 1pass encode" as the goal of 2pass 
encodes is producing best-possible quality for a certain average 
bitrate) like the first half of the movie looks brilliant and gets 
quant2 all the time, and then there's much action so the second half 
gets quant 5 all the time.

Just some thoughts.

Best regards
Koepi