Henrik Boström 57ec58b82d VideoAdapter: Fix zooming issue with requested_resolution API.
When AdaptFrameResolution() applies the requested resolution as a
restriction (max width and max height) it does so on the "input" size
rather than on the "output" size. While this results in the correct
output size anyway, it also produces cropping which results in the image
looking zoomed in (see https://crbug.com/webrtc/369865055 for repro).

To fix this issue the restrict logic is moved and applied on the
"output" instead. The logic is updated to take alignment into account
since the resulting size is the final output.

Bug: webrtc:369865055
Change-Id: I2d5476929432c45173a57c0f4964ab9a38518189
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364163
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43138}
2024-10-02 09:03:36 +00:00
..
2022-09-30 08:44:30 +00:00