Hi, On Fri, Dec 23, 2011 at 4:11 PM, Janne Grunau <janne-li...@jannau.net>wrote:
> On 2011-12-23 01:59:11 -0500, Alexander Strange wrote: > > On Thu, Dec 22, 2011 at 3:22 PM, Janne Grunau <janne-li...@jannau.net> > wrote: > > > Use sched_getaffinity to determine the number of logical CPUs. > > > > Try sysconf(_SC_NPROCESSORS_ONLN), which exists on BSD too. > > I started with sysconf, Mans suggested to to use sched_getaffinity() > instead since _SC_NPROCESSORS_ONLN or _SC_NPROC_ONLN are not standard > values. > > sched_getaffinity() has the advantage of giving correct results when > the process runs only on a limited subset of cpu cores. For example > taskset -c 0 avconv ... won't use threaded en/decoding. > > I guess it could make sense to add sysconf as fallback and for other > Unix systems. > > > > Limits the number of threads to 16 since slice threading of H.264 > > > seems to be buggy with more than 16 threads. > > > > That would use an unreasonable amount of memory anyway. > > Would it make sense to limit the number of threads also if manually > specified? No. Ronald
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel