webrtc/modules/video_coding/codecs
Erik Språng d592575698 VP9 decoder: Sets thread count based on resolution, reinit on change.
Previously, number of decoder threads for VP9 were always set to 8 but
with a cap at number of cores. This was done since we "can't know" the
resolution that will be used.

With this change, we now intialize the number of threads based on
resolution given in InitDecode(). If a resolution change happens in
flight, it requires a keyframe. We therefore parse the header from
any key frame and if it has a new resolution, we re-initialize the
decoder.

The number of threads used is based on pixel count. We set one thread
as target for 1280x720, and scale up lineraly from there. The 8-thread
cap is gone, but still limit it core count.

This means for instance: 1 <= 720p, 2 for 1080p, 4 for 1440p, 9 for 4K.

Bug: webrtc:11551
Change-Id: I14c169a6c651c50bd1b870c4b22bc4495c8448fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174460
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31507}
2020-06-11 17:43:27 +00:00
..
av1 Embed FrameDependencyTemplate builder helpers directly into the struct 2020-06-11 13:43:51 +00:00
h264 Keep OpenH264 iMaxBitrate unspecified. 2020-05-08 15:10:26 +00:00
interface [Cleanup] Add missing #include. Remove useless ones. IWYU part 2. 2018-11-28 18:25:07 +00:00
multiplex Cleanup mocks for Video (en|de)coder factories 2020-05-07 11:58:50 +00:00
test Reland "Add av1 test running real video clips." 2020-06-04 06:32:46 +00:00
vp8 Embed FrameDependencyTemplate builder helpers directly into the struct 2020-06-11 13:43:51 +00:00
vp9 VP9 decoder: Sets thread count based on resolution, reinit on change. 2020-06-11 17:43:27 +00:00