diff options
author | OvchinnikovDmitrii <ovchinnikov.dmitrii@gmail.com> | 2022-10-06 15:49:59 +0200 |
---|---|---|
committer | James Zern <jzern@google.com> | 2023-01-17 14:02:55 -0800 |
commit | c13d95934327ddad4db30f6aee93cd2aa6a26a57 (patch) | |
tree | 6629778875f84819914a8d7803573fe0b2489043 /libavdevice/android_camera.c | |
parent | 6ce51e5ee14492d8f5af10ea500b25c615c0fc31 (diff) | |
download | ffmpeg-c13d95934327ddad4db30f6aee93cd2aa6a26a57.tar.gz |
lavc/libvpx: increase thread limit to 64
This change improves the performance and multicore scalability of the vp9
codec for streaming single-pass encoded videos by taking advantage of up
to 64 cores in the system. The current thread limit for ffmpeg codecs is 16
(MAX_AUTO_THREADS in pthread_internal.h) due to a limitation in H.264 codec
that prevents more than 16 threads being used.
Experiments show that increasing the thread limit to 64 for vp9 improves
the performance for encoding 4K raw videos for streaming by up to 47%
compared to 16 threads, and from 20-30% for 32 threads, with the same quality
as measured by the VMAF score.
Rationale for this change:
Vp9 uses tiling to split the video frame into multiple columns; tiles must
be at least 256 pixels wide, so there is a limit to how many tiles can be
used. The tiles can be processed in parallel, and more tiles mean more CPU
threads can be used. 4K videos can make use of 16 threads, and 8K videos
can use 32. Row-mt can double the number of threads so 64 threads can be used.
Signed-off-by: James Zern <jzern@google.com>
Diffstat (limited to 'libavdevice/android_camera.c')
0 files changed, 0 insertions, 0 deletions