Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Fog <tintwotin>2021-02-15 13:49:19 +0300
committerSergey Sharybin <sergey@blender.org>2021-02-15 14:29:14 +0300
commitd8754de7c31bc2ec775a73001132862e007f4c9a (patch)
treef17bd43df59d601f7e820b4e0939a3bd885992b7 /source/blender/imbuf
parent5b2bfb2fed03274bd0bc2007c66118ca33c9f1ca (diff)
FFmpeg: Improve multi-threading settings for VSE proxies
Following code from D8627 this patch corrects multi threaded processing of proxies, where a 60 sec proxy generation drops to 35 sec. Differential Revision: https://developer.blender.org/D8659
Diffstat (limited to 'source/blender/imbuf')
-rw-r--r--source/blender/imbuf/intern/indexer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c
index 20e1febedd7..f10e3b31141 100644
--- a/source/blender/imbuf/intern/indexer.c
+++ b/source/blender/imbuf/intern/indexer.c
@@ -40,6 +40,8 @@
#include "BKE_global.h"
+# include "BLI_threads.h"
+
#ifdef WITH_AVI
# include "AVI_avi.h"
#endif
@@ -495,6 +497,8 @@ static struct proxy_output_ctx *alloc_proxy_output_ffmpeg(
rv->st->id = 0;
rv->c = rv->st->codec;
+ rv->c->thread_count = BLI_system_thread_count();
+ rv->c->thread_type = FF_THREAD_SLICE;
rv->c->codec_type = AVMEDIA_TYPE_VIDEO;
rv->c->codec_id = AV_CODEC_ID_MJPEG;
rv->c->width = width;