crosvm/media
Daniel Almeida fb0eda5a28 media: libva: picture: allow sharing the underlying Surface
While the current design works well for progressive content, in
interlaced content a common strategy is to decode both fields to the
same Surface.

Thus, add support for sharing the underlying Surface. This means that we
can only retrieve the Surface if we are the last Picture with a
reference to it.

While we are at it: only retrieve Surfaces if we are the last users

In preparation for interlaced decoding support, only retrieve Surfaces
back into the surface pool if we are the last users. This means that the
surface will not be dropped until both of its fields have been dropped.

BUG=b:214478588
TEST="cargo build --features=video-decoder,vaapi" successfully
builds the libva crate

Change-Id: I80412a86f51ab639fab6af229572fb7bc800a928
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3946300
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
2022-10-12 07:40:27 +00:00
..
ffmpeg Re-enable video-decoder feature 2022-10-06 18:28:56 +00:00
libva media: libva: picture: allow sharing the underlying Surface 2022-10-12 07:40:27 +00:00
libvda Modify builds via CROSVM_BUILD_VARIANT env var 2022-10-04 21:23:00 +00:00
vp8 Update all copyright headers to match new style 2022-09-13 18:41:29 +00:00