2012/2/28 John Dexter <[email protected]>: > I have a single-thread application which does 3D rendering; it is a > moderate-heavy user of the single core it uses (~50%). In my quick > tests, recording the rendered output to video using libav is fastest > when I use AVCodecContext::thread_count == 3 on my quad-core PC, but > it's almost identical with it set to 0. > > As well as any general advice you can offer, a couple of specific questions... > > 1)What does setting AVCodecContext::thread_count = 0 do (on Windows > x86/64 hardware if it is platform-dependent)? Does it default to > num-cores or nothing that simple?
If num of cores is 1, then 1. If >1, then num of cores + 1, but not more than 16. (from libavcodec/pthread.c:thread_init()) > 2)In a situation similar to mine with a single-thread app using most > of one core on a N-core CPU, what would you set > AVCodecContext::thread_count to, and why? I'd use 0, if i am sure that only one instance of my app is launched. Otherwise, i'd stay with 1 to avoid overloading CPU and host going slowly responsive. -- Andrey Utkin _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
