You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Limiting threads for both FFmpeg and OpenMP (attempting to find a good balance of parallel performance, while not spawning too many threads). Sometimes more is not always better.
This commit is contained in:
@@ -1026,7 +1026,7 @@ void FFmpegWriter::open_audio(AVFormatContext *oc, AVStream *st)
|
||||
AV_GET_CODEC_FROM_STREAM(st, audio_codec)
|
||||
|
||||
// Set number of threads equal to number of processors (not to exceed 16)
|
||||
audio_codec->thread_count = min(OPEN_MP_NUM_PROCESSORS, 16);
|
||||
audio_codec->thread_count = min(FF_NUM_PROCESSORS, 16);
|
||||
|
||||
// Find the audio encoder
|
||||
codec = avcodec_find_encoder_by_name(info.acodec.c_str());
|
||||
@@ -1100,7 +1100,7 @@ void FFmpegWriter::open_video(AVFormatContext *oc, AVStream *st)
|
||||
AV_GET_CODEC_FROM_STREAM(st, video_codec)
|
||||
|
||||
// Set number of threads equal to number of processors (not to exceed 16)
|
||||
video_codec->thread_count = min(OPEN_MP_NUM_PROCESSORS, 16);
|
||||
video_codec->thread_count = min(FF_NUM_PROCESSORS, 16);
|
||||
|
||||
/* find the video encoder */
|
||||
codec = avcodec_find_encoder_by_name(info.vcodec.c_str());
|
||||
|
||||
Reference in New Issue
Block a user