Fix calculations for frame and tile threads with dav1d (again :O).
1ad19fb1 continued the trend of incorrect statements about dav1d thread counts :/ The actual total is (t + 1) * f when configuring tilethreads=t and framethreads=f. I've triple checked this, so this will hopefully be the last update to the calculations and comments. If a system has the cores for it, we'll end up using the following: <300p: 2 tile threads, 2 frame threads = 2 * 2 + 2 = 6 total threads. <700p: 3 tile threads, 2 frame threads = 3 * 2 + 2 = 8 total threads. For higher resolutions we hit limits::kMaxVideoThreads (16): >700p: 4 tile threads, 3 frame threads = 4 * 3 + 3 = 15 total threads. Because of this correct total exceeds limits::kMaxVideoFrames for 720p content we've had to reduce the tile thread count to 4 to ensure smooth playback. Otherwise 5 tile threads and 2 frame threads is insufficient for smooth playback on my Z840. This is handled by a new combined GetDecoderThreadCounts() which outputs both tile and frame thread counts concurrently for clarity. BUG=954659,957511 TEST=printf() on pthread_create, python test program to be sure: def count_threads(f,t): threads = 0 for i in xrange(0, f): for j in xrange(0, t): if t > 1: threads += 1 if f > 1: threads += 1 return threads R=chcunningham Change-Id: Ifcf1069ee9b1a8cede82c102fddbc3c57c2036f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1606192 Auto-Submit: Dale Curtis <dalecurtis@chromium.org> Commit-Queue: Chrome Cunningham <chcunningham@chromium.org> Reviewed-by:Chrome Cunningham <chcunningham@chromium.org> Cr-Commit-Position: refs/heads/master@{#658815}
Showing
Please register or sign in to comment