media/gpu/v4l2vd: use buffer affinity tracker
When using DMABUFs, it is preferable to use the same V4L2 buffer with the same underlying buffer, as failure to do so results in memory unmappings/remappings in the driver. Use the newly introduced buffer affinity tracker and V4L2Queue::GetFreeBufferForFrame() method to achieve this transparently in the video decoder. Furthermore, it is a requirement of the V4L2 stateful decoder interface that V4L2 buffers are always backed by the same underlying memory, lest some reference frames lifetime tracking might be incorrect. BUG=b:159688625 BUG=b:167412992 TEST=video.DecodeAccel.h264 passes on Trogdor. Change-Id: I220a321d5584f50406480c105844a82dd96e63c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2415909 Commit-Queue: Alexandre Courbot <acourbot@chromium.org> Reviewed-by:Fritz Koenig <frkoenig@chromium.org> Cr-Commit-Position: refs/heads/master@{#813178}
Showing
Please register or sign in to comment