vapostproc: Disable cropping in pass-through mode.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Wed, 28 Jul 2021 11:04:50 +0000 (13:04 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 18 Aug 2021 09:00:55 +0000 (09:00 +0000)
commit6853c3eea8b8fdc9774a30c6f77935a2b33ef903
treed390e629e312b29451804e19290856c05bce9233
parent4784d107ed77281f1c8039889318edca2e559d46
vapostproc: Disable cropping in pass-through mode.

Originally, if a buffer arrives with crop meta but downstream doesn't
handle crop allocation meta, vapostproc tried to reconfigure itself to
non pass-through mode automatically. Sadly, this behavior was based on
the wrong assumption that propose_allocation() vmethod would bring
downstream allocation query, but it is not.

Now, if vapostproc is in pass-through mode, the cropping is passed to
downstream.  Pass-through mode can be disabled via a parameter.

Finally, if pass-through mode isn't enabled, it's assumed the buffer
is going to be processed and, if cropping, downstream already
negotiated the cropped frame size, thus it's required to do the
cropping inside vapostproc to avoid artifacts because of the size of
downstream allocated buffers.

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