Commit b23d78ac authored by Zhaoliang Ma's avatar Zhaoliang Ma Committed by Commit Bot

media/filter: Refine the thread number for vp9 decoding

This CL refined the decoding thread number for vp9.
the thread number before and after this CL:

resolution     before     after
640x360        2          2
1280x720       4          4
1920x1080      4          4
2048x1080      8          4
2560x1440      8          8
3840x2160      8          16
4096x2160      16         16

Bug: None
Change-Id: I1a8d76b518dc27152fd52b0e807b666f924f077c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2332338Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#793745}
parent a1f57bbc
...@@ -44,11 +44,11 @@ static int GetVpxVideoDecoderThreadCount(const VideoDecoderConfig& config) { ...@@ -44,11 +44,11 @@ static int GetVpxVideoDecoderThreadCount(const VideoDecoderConfig& config) {
// maximum number of tiles possible for higher resolution streams. // maximum number of tiles possible for higher resolution streams.
if (config.codec() == kCodecVP9) { if (config.codec() == kCodecVP9) {
const int width = config.coded_size().width(); const int width = config.coded_size().width();
if (width >= 4096) if (width >= 3840)
desired_threads = 16; desired_threads = 16;
else if (width >= 2048) else if (width >= 2560)
desired_threads = 8; desired_threads = 8;
else if (width >= 1024) else if (width >= 1280)
desired_threads = 4; desired_threads = 4;
} }
......
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