msdk: adjust the stride align
authorHaihao Xiang <haihao.xiang@intel.com>
Thu, 1 Aug 2019 05:48:54 +0000 (13:48 +0800)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Sat, 21 Sep 2019 16:59:10 +0000 (16:59 +0000)
commit8daac1c09a7a79c0d9f5b7a5c44ee78852174585
tree3031d0501b0c41923cbddad4dc00f75216d9c4a7
parentf1aefb77e64505e1009f48d218cb33f8aabc5e9e
msdk: adjust the stride align

GstAllocationParams::align is set to 31 in msdkdec/msdken/msdkvpp, hence
the stride align should be greater than or equal to 31, otherwise it
will result in issue
https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/861
(msdk: "GStreamer-CRITICAL: gst_buffer_resize_range failed" SPAM),

In addition, the stride should match the pitch alignment in the media driver,
otherwise it will result in some issues when a buffer is shared between
different elements, e.g. the NV12 issue mentioned in commit 3f2314a, which
can be reproduced by `gst-launch-1.0 vidoetestsrc ! msdkvpp !
video/x-raw\(memory:DMABuf\),format=NV12 ! glimagesink`

Fixed https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/861
sys/msdk/msdk.c