crosvm/media
Alexandre Courbot 850764ad8e media: cros-codecs: make decode() take a &[u8] as input
The decode() method used to take a generic argument that can provide a
reference to the input byte stream. This appears as a convenience but is
really not since it is trivial for the caller to obtain the byte slice
from any type that implements AsRef<[u8]>, and having the generic
parameter uselessly complicates the code and results in large amounts of
monomorphization.

By removing this generic argument, we strip ~30KB on the binary in a
release build while keeping things easier to read overall.

BUG=b:214478588
TEST=cargo test --features vaapi -p cros-codecs

Change-Id: I4a4a09151259a61fa66184dfed09a9bed286de68
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4142081
Reviewed-by: Daniel Almeida <daniel.almeida@collabora.corp-partner.google.com>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2023-02-02 06:38:31 +00:00
..
cros-codecs media: cros-codecs: make decode() take a &[u8] as input 2023-02-02 06:38:31 +00:00
ffmpeg Add conditional compilation for unix-only crates 2023-01-19 21:21:59 +00:00
libva Add conditional compilation for unix-only crates 2023-01-19 21:21:59 +00:00
libvda Add conditional compilation for unix-only crates 2023-01-19 21:21:59 +00:00