crosvm/devices
Alexandre Courbot 49b08a0e2c media: cros-codecs: replace mapped resolution with image size in bytes
The concept of mapped resolution is only used in the context of copying
the frame to a CPU-mapped buffer in order to compute the size of said
buffer according to the underlying format.

This requires the caller to check the buffer format and perform the
computation themselves. It would be more efficient to just have a
function performing that computation in a single place and returning the
final buffer size.

Thus, replace MappedHandle's mapped_resolution() method with
image_size(), which returns the size of the buffer that should be passed
to read().

BUG=b:214478588
TEST=cargo build --features `video-decoder,video-encoder,ffmpeg,vaapi`
TEST=cargo test --features vaapi -p cros-codecs

Change-Id: Icff17aa5e2e08676edb450a53316e44897604958
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4005492
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.corp-partner.google.com>
2022-11-10 09:11:49 +00:00
..
src media: cros-codecs: replace mapped resolution with image size in bytes 2022-11-10 09:11:49 +00:00
tests/irqchip Reformat all files with nightly 2022-10-31 21:33:33 +00:00
Cargo.toml win_audio: build and test win_audio 2022-11-01 20:40:09 +00:00