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:
@@ -153,7 +153,7 @@ void FFmpegReader::Open()
|
||||
pCodecCtx = AV_GET_CODEC_CONTEXT(pStream, pCodec);
|
||||
|
||||
// Set number of threads equal to number of processors (not to exceed 16)
|
||||
pCodecCtx->thread_count = min(OPEN_MP_NUM_PROCESSORS, 16);
|
||||
pCodecCtx->thread_count = min(FF_NUM_PROCESSORS, 16);
|
||||
|
||||
if (pCodec == NULL) {
|
||||
throw InvalidCodec("A valid video codec could not be found for this file.", path);
|
||||
@@ -191,7 +191,7 @@ void FFmpegReader::Open()
|
||||
aCodecCtx = AV_GET_CODEC_CONTEXT(aStream, aCodec);
|
||||
|
||||
// Set number of threads equal to number of processors (not to exceed 16)
|
||||
aCodecCtx->thread_count = min(OPEN_MP_NUM_PROCESSORS, 16);
|
||||
aCodecCtx->thread_count = min(FF_NUM_PROCESSORS, 16);
|
||||
|
||||
if (aCodec == NULL) {
|
||||
throw InvalidCodec("A valid audio codec could not be found for this file.", path);
|
||||
|
||||
Reference in New Issue
Block a user