Allow 3 encoder threads in libvpx for HD on > 6 core cpus

Bug: webrtc:4172
Change-Id: I50446779403eff0fe2e840afc6cfab9f8a310b1a
Reviewed-on: https://webrtc-review.googlesource.com/77981
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23511}
This commit is contained in:
Erik Språng
2018-05-23 11:01:34 +02:00
committed by Commit Bot
parent ac1501acd9
commit 27300c3546

View File

@ -606,7 +606,12 @@ int LibvpxVp8Encoder::NumberOfThreads(int width, int height, int cpus) {
// 3 threads for 1080p.
return 3;
} else if (width * height > 640 * 480 && cpus >= 3) {
// 2 threads for qHD/HD.
// Default 2 threads for qHD/HD, but allow 3 if core count is high enough,
// as this will allow more margin for high-core/low clock machines or if
// not built with highest optimization.
if (cpus >= 6) {
return 3;
}
return 2;
} else {
// 1 thread for VGA or less.