msdkdec: Fix to not trigger SFC scaling when vpp at downstream
authorMengkejiergeli Ba <mengkejiergeli.ba@intel.com>
Wed, 2 Mar 2022 01:15:12 +0000 (09:15 +0800)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 7 Mar 2022 07:26:40 +0000 (07:26 +0000)
commitc9aa5294847db981df1e65f467e53041a0a601e9
tree219f11ec52325da7623eb8312c4ebe4c2d68986f
parent89a5cae89b9dd26cccea13ea4feb68d9429ef75d
msdkdec: Fix to not trigger SFC scaling when vpp at downstream

When there is vpp scaling downstream, we need to make sure SFC is not
triggered because vpp may fall into passthrough mode which causes
the decoder negotiation to create src caps with vpp scaled width/height.

This patch includes bitstream's original size in first query with
downstream in gst_msdkdec_src_caps, which is the same for what we do for
color format in this query. This is to ensure SFC scaling starts to
work only when downstream directly asks for a different size instead of
through vpp.

Note that here SFC scaling follows the same behavior as msdkvpp:
if user only changes width or height, e.g. dec ! video/x-raw,width=xx !,
the height will be modified to the value which fits the original DAR.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1838>
subprojects/gst-plugins-bad/sys/msdk/gstmsdkdec.c