va: av1dec: user internal buffer pool for non output layers.
authorHe Junyan <junyan.he@intel.com>
Thu, 9 Jun 2022 14:32:16 +0000 (22:32 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 16 Sep 2022 09:45:00 +0000 (09:45 +0000)
commit9a991cfe9ebfd3144b712a2f484dd49384441acd
tree76a13f1870219042fa5d3102c96586ad18e31dea
parent3d56f133f86f045003793546b3b802b4d33fe910
va: av1dec: user internal buffer pool for non output layers.

The AV1 support multi spatial layers within one TU with different
resolutions, and only the highest spatial layer need to be output.
For example, there are two spatial layer, base level is 800x600
and higher level is 1920x1080. We need to decode both because the
higher level needs base layer as reference, but we only need to output
1920x1080 frames here.

The current manner always renegotiates the caps once we detect the
current picture resolution changes, so we renegotiate again and
again between different layers. That's a big waste and has very
low performance. We now only do the renegotiation for the highest
output layer. For other non output layers, we just keep a internal
buffer pool which is big enough to handle the surface allocation.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2382>
subprojects/gst-plugins-bad/sys/va/gstvaav1dec.c