[MPlayer-dev-eng] [PATCH] Autodetect # of available CPUs
Zuxy Meng
zuxy.meng at gmail.com
Sun Jul 1 11:49:57 CEST 2007
Hi,
2007/7/1, Reimar Doeffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> Hello,
> On Sun, Jul 01, 2007 at 04:12:45PM +0800, Zuxy Meng wrote:
> > The patch enables mplayer to detect the # of CPUs available to the
> > process, and sets lavdopts and lavcopts accordingly. Much of the code
> > is copied from x264 and I've tested it on Windows, Linux and SunOS.
>
> Since using threads affects encoding quality and debugging
Advanced users can always force a single-threaded run:-)
> and this kind
> of code also means lots of ugly OS-specific code
Well I hate this too but I don't know a more elegant way to do this.
If the only threading library mplayer will ever use is pthread, then
maybe pthread_num_processors_np can do the job, but is that function
always available when HAVE_PTHREAD?
> I don't really find it
> desirable.
By whom?:-) Actually x264 and xvid have already done this.
--
Zuxy
Beauty is truth,
While truth is beauty.
PGP KeyID: E8555ED6
More information about the MPlayer-dev-eng
mailing list