GNOME Bugzilla – Bug 673939
vp8enc and vp8dec: rename threads option to max-treads.
Last modified: 2012-09-16 08:44:26 UTC
at least current libvpx code makes it's own decision haw many threads to allocate. The threads options provided by ABI is just maximal restriction. At least for me it makes difference. IMHO if we can force count of threads, it should be called "force-threads", if we can only suggest max count of threads, then it should be called "max-threads". If you have other suggestions for names, or other ideas. you are welcome. The part of this bug is also here: https://bugzilla.gnome.org/show_bug.cgi?id=673891 here are snips of code form libvpx, responsible for threading decision. libvpx/vp8/encoder/ethreading.c: void vp8cx_create_encoder_threads(VP8_COMP *cpi) ... /* don't allocate more threads than cores available */ if (cpi->oxcf.multi_threaded > cm->processor_core_count) th_count = cm->processor_core_count - 1; /* we have th_count + 1 (main) threads processing one row each */ /* no point to have more threads than the sync range allows */ if(th_count > ((cm->mb_cols / cpi->mt_sync_range) - 1)) { th_count = (cm->mb_cols / cpi->mt_sync_range) - 1; } libvpx/vp8/decoder/threading.c: void vp8_decoder_create_threads(VP8D_COMP *pbi) /* limit decoding threads to the max number of token partitions */ core_count = (pbi->max_threads > 8) ? 8 : pbi->max_threads; /* limit decoding threads to the available cores */ if (core_count > pbi->common.processor_core_count) core_count = pbi->common.processor_core_count;
Created attachment 211871 [details] [review] patch v1 this is my suggestion patch.
The number of threads that can be used for encoding and decoding only depends on the number of token partitions that are used during encoding. We should keep the property with the name threads because that's how vpxenc and the libvpx API call it too.