Improve values for dav1d tile threads and frame threads.
Current AV1 content doesn't use many tiles, so we see much better performance by increasing the number of frame threads on systems that can handle the increase versus increasing tile threads. This patch sets the number of tile threads based on current encoding practices and the frame threads based on recommendations from dav1d: https://bugzilla.mozilla.org/show_bug.cgi?id=1536783 It distributes tiles threads and frame threads based on the number of available processors and other //media limits -- preferring to fulfill tile thread recommendations first since the dav1d folk indicate they are more efficient. If a system has the cores for it, we'll now use the following: <300p: 2 tile threads, 2 frame threads. <700p: 3 tile threads, 2 frame threads. <1000p: 5 tile threads, 4 frame threads >1000p: 8 tile threads, 8 frame threads. If we don't have the cores for it; i.e., on systems with <= 3 cores we'll now use less threads. Previously even if a system had <= 3 cores, we would still allocate >= 3 threads (up to 3 tile, and 2 frame). Now, for such systems, we will set frame_threads=1 (which generates no more threads, since the calling thread counts as a thread) and at most 1 more tile thread over the core count. E.g. a 3 core system will use a maximum of 3 tile threads and 1 frame thread. Single and dual core systems will use 2 tile threads and 1 frame thread. BUG=954659 TEST=https://www.youtube.com/watch?v=Fmdb-KmlzD8 plays smoothly; see 1m30s+ for most intense areas. R=chcunningham Change-Id: I82e5725a32a987a98567af9aeba495d248000105 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1576158 Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by:Chrome Cunningham <chcunningham@chromium.org> Auto-Submit: Dale Curtis <dalecurtis@chromium.org> Cr-Commit-Position: refs/heads/master@{#652893}
Showing
Please register or sign in to comment