[MPlayer-DOCS] encoding-guide: inconsistency info about threads in x264enc

Guillaume Poirier gpoirier at mplayerhq.hu
Thu Jan 11 09:25:39 CET 2007


Hi,

Andrew Savchenko wrote:
> I've found some contradiction in encoding-guide documentation:
> 
> 1) Section "Making a high quality MPEG-4 ("DivX") rip of a DVD 
> movie", subsection "Choosing the video codec" says:
> *****
> x264 also allows multi-threaded encoding, which currently speeds up 
> encoding by 15-30% (depending on the encoding settings) while 
> lowering PSNR by about 0.05dB. 
> *****
> But in recently added part "Using MEncoder to create 
> QuickTime-compatible files", subsection "Encoding example" anyone 
> can find:
> *****
> If you have multi-processor machine, you can add threads=auto. This 
> increases encoding speed by about 94% per CPU core, with very 
> little quality penalty (about 0.005dB for dual processor, about 
> 0.01dB for a quad processor machine).
> *****
> 
> I uderstand, that speedup values are only for rude estimation 
> purposes. But they differs very greatly: 15-30% vs ~94%. One of 
> them should be fixed... I've no multi-processor system, so I can't 
> check this values on my own. 
> 
> PSNR impact also varies... Maybe algorithms in x264enc was changed 
> since 1st quotation was wrote, or perhaps this value is highly 
> dependant on source material.

This contradiction should be fixed.
The paragrah in "Using MEncoder to create QuickTime-compatible files"
has the latest, updated info.
New multi-threaded mode in x264 scales much better, and doesn't impact
quality as much as it did.


> 2) The last quatation mentions about 'threads=auto' option, but 
> 'auto' is not mentioned in man page as acceptable value:
> *****
> threads=<1-4>
> Split each frame into slices and encode them in parallel (default: 
> 1).  Also  allows  multithreaded  decoding  if  the decoder 
> supports it (lavc doesnot).  This has a slight penalty to 
> compression.  Requires that libx264 was compiled  with  pthread 
> support; if not, this option will produce a warningand enables 
> slices but not multithreading.
> *****
> I've test option threads=auto, it seems work fine. So man page 
> should be updated.

yes :) I'll work on it when I have time.

"auto" means that x264 chooses a number of thread that best fits the
number of CPUs of the machine.
I don't know the new default value of "threads", it's probably "0",
but I'll have to check.

Guillaume



More information about the MPlayer-DOCS mailing list