media/gpu/vaapi: manage VP8 VABufferIDs lifetime in the decoder
Decoding a bitstream in VA has two steps: one, submitting the parsed parameters and encoded chunk as VABufferIDs, and two, executing the decode. This CL transfers managing the lifetime of the VABufferIDs to VP8VaapiVideoDecoderDelegate, avoiding vaCreateBuffer() calls. vaapi_utils' FillVP8DataStructures() needs to be changed to operate on VA-API structs passed as parameter, which in turn forces a bit of changes in the webp decoder. This is verified via chrome:tracing and codepen.io/full/qzYXba that plays 4 1280x572 VP8 videos at the same time. Tracing is captured for a few seconds, and basically we avoid calling the vaCreateBuffer(), which takes ~50us every time, reducing the overall decode time from ~0.439ms to ~0.307ms on my CML (kohaku), ~25% reduction. Improvements are of course extremely small, the advantages of this CL are in reducing lock/unlock churn and associated contention. This benefit grows with the amount of decodes (e.g. Meet grid scenarios). Bug: b/166646505 Change-Id: I6b0e2dc21ad94e2e1c9ab3696fba037d5b88830b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412132 Commit-Queue: Miguel Casas <mcasas@chromium.org> Reviewed-by:Andres Calderon Jaramillo <andrescj@chromium.org> Cr-Commit-Position: refs/heads/master@{#809676}
Showing
Please register or sign in to comment