Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Merge-M115] WebRTC HW encoders: Do SW fallback if resolution is less…
… than 360p. Manual HW vs SW quality testing has revealed that, to little surprise, the lowest resolutions provide inferior quality, especially if bitrate constrained. The HW encoders also don't like some resolutions due to divisibility, but today we already avoid e.g. 270p due to not being divisible by 4 so this already triggers SW for some HW encoders like MediaFoundationVideoEncodeAccelerator. But 180p and other resolutions suffer from bad quality. The breakeven point appears to be around 360p. This CL puts the "avoid < 360p HW" check in RTCVideoEncoder rather than on individual encoder implementations for two reasons: 1. This limits the logic to WebRTC meaning we don't break WebCodecs. 2. The quality issue appears to be similar on all implementations tested so far, power efficiency is less of a problem for lower resolutions anyway, and we don't have to duplicate this logic in multiple places. TESTED=See repro steps in https://crbug.com/1448816 as well as quality screenshots of before and after the fix: https://crbug.com/1448816#c3 (cherry picked from commit 629d58f) Bug: 1448816 Change-Id: Ibf41b815c788c475000206a4cfd6e13ffc419e45 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4562238 Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org> Commit-Queue: Henrik Boström <hbos@chromium.org> Cr-Original-Commit-Position: refs/heads/main@{#1149102} Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4568339 Auto-Submit: Henrik Boström <hbos@chromium.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@chromium.org> Cr-Commit-Position: refs/branch-heads/5790@{#109} Cr-Branched-From: 1d71a33-refs/heads/main@{#1148114}
- Loading branch information