Commit f985332d authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Always use at least 2 frame threads with dav1d.

Shows significant performance regression on even low core CrOS devices
otherwise on the following test case:
http://crosvideo2.appspot.com/?codec=av1&resolution=720

ARM 4 cores: 3%->17% dropped frame increase.
Intel Skylake 2 cores: 0.5% -> 3% dropped frame increase.

BUG=954659,957511
TEST=none
TBR=hiroh

Change-Id: I3073ca88548e9183dda5ce4d451c5c802a592213
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1602852Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Auto-Submit: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#658233}
parent a91b44f5
...@@ -194,10 +194,13 @@ void Dav1dVideoDecoder::Initialize(const VideoDecoderConfig& config, ...@@ -194,10 +194,13 @@ void Dav1dVideoDecoder::Initialize(const VideoDecoderConfig& config,
// //
// We only want 1 frame thread in low delay mode, since otherwise we'll // We only want 1 frame thread in low delay mode, since otherwise we'll
// require at least two buffers before the first frame can be output. // require at least two buffers before the first frame can be output.
//
// 2 frame threads seems desirable even on low core machines:
// https://crbug.com/957511
if (low_delay) if (low_delay)
s.n_frame_threads = 1; s.n_frame_threads = 1;
else if (s.n_frame_threads > max_threads - s.n_tile_threads) else if (s.n_frame_threads > max_threads - s.n_tile_threads)
s.n_frame_threads = std::max(1, max_threads - s.n_tile_threads); s.n_frame_threads = std::max(2, max_threads - s.n_tile_threads);
// Route dav1d internal logs through Chrome's DLOG system. // Route dav1d internal logs through Chrome's DLOG system.
s.logger = {nullptr, &LogDav1dMessage}; s.logger = {nullptr, &LogDav1dMessage};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment