Hi Haihao, On Thu, Apr 8, 2021 at 3:10 PM Haihao Xiang <haihao.xi...@intel.com> wrote: > > By default the SDK creates a thread for each CPU when creating a mfx > session for decoding / encoding, which results in CPU overhead on a > multi CPU system. Actually creating 2 threads is a better choice for > most cases in practice. > > This patch allows user to specify the number of threads created for a > mfx session via option -threads. If the number is not specified, 2 > threads will be created by default. > > Note the SDK requires at least 2 threads to avoid dead locks[1] > > [1]https://github.com/Intel-Media-SDK/MediaSDK/blob/master/_studio/mfx_lib/scheduler/linux/src/mfx_scheduler_core_ischeduler.cpp#L90-L93 > --- Optional choice for users to specify the thread number looks reasonable to me, and decreasing the CPU overhead makes sense for HW encoding pipeline.
Also curious about what's the tradeoff of decreasing the thread number to 2. Would the performance or something else drop? - linjie _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".