Commit graph

17 commits

Author SHA1 Message Date
Haihao Xiang
fbd1d0cecb msdk: add a helper function to get codename of the platform
The features supported in MSDK vary from platform to platform. We may
support some features based on the codename of the platform in future.
2020-03-31 09:27:03 +08:00
Haihao Xiang
b18be3562c msdk: ignore MFX_ERR_UNDEFINED_BEHAVIOR when loading a plugin
An issue can be seen when using msdkh265enc with bitrate change in
playing state. The root cause is the corresponding plugin is loaded
again.

Returning MFX_ERR_UNDEFINED_BEHAVIOR from MSDK just means the plugin has
been loaded, so we may ignore this error when doing configuation again
in the sub class, otherwise the pipeline will be interrupted
2019-12-10 17:23:53 +00:00
Seungha Yang
54c5ebbd53 msdk: Remove all DMABuf caps features on Windows
Add new macro for sink/src pad template to ensure no DMABuf caps
features are exposed on Windows. Some DMABuf caps features
were not handled by the commit 9ec62418c3
2019-09-10 13:29:11 +00:00
Haihao Xiang
d5fd9bc22b msdkvpp: support video-direction property
video-direction property is common property in gstreamer. In addition,
both mirroring & rotation properties are marked as deprecated,
video-direction will override mirroring & rotation properties when they
are set explicitly

Fix https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/1058
2019-08-26 16:39:39 +00:00
Haihao Xiang
ef81c9d6c4 msdkdec: Update frame info from video parameters
A 10bit stream may have different depth values for Luma and Chroma, and
MSDK requires the frame info must match the corresponding video
parameters
2019-08-06 09:20:21 +00:00
Haihao Xiang
20f61db2e5 msdkdec: make sure mfx frame width/height meets MSDK's requirement
It is possible that the output region size (e.g. 192x144) is different
from the coded picture size (e.g. 192x256). We may adjust the alignment
parameters so that the padding is respected in GstVideoInfo and use
GstVideoInfo to calculate mfx frame width and height

This fixes the error below when decoding a stream which has different
output region size and coded picture size

0:00:00.057726900 28634 0x55df6c3220a0 ERROR                msdkdec
gstmsdkdec.c:1065:gst_msdkdec_handle_frame:<msdkh265dec0>
DecodeFrameAsync failed (failed to allocate memory)

Sample pipeline:

gst-launch-1.0 filesrc location=output.h265 ! h265parse ! msdkh265dec !
glimagesink
2019-07-24 08:41:13 +08:00
Víctor Manuel Jáquez Leal
c22f92c799 msdk: add mfx in include path
Thus removing the preprocessor's directives to included if found.
2019-01-08 12:59:45 +00:00
Xiang, Haihao
fda4918cc8 msdk: don't use hard-coded video format
Some codecs may support varied formats, e.g. HEVC may support NV12
and P010_10LE etc
2018-11-26 16:47:17 +00:00
Sreerenj Balachandran
dec0953517 msdk: allow building against open sourced msdk
Building against mfx_dispatcher is used to search for
headers in PREFIX/include/mfx/ only (commit: 62f04e801b),
but it is just PREFIX/include with open source msdk version.

https://bugzilla.gnome.org/show_bug.cgi?id=796118
2018-05-15 16:31:02 -08:00
U. Artie Eoff
275d754156 msdk: fix plugin load on implementations with only HW support
We can't assume that MSDK always supports SW implementation
on all platforms.  Thus, msdk_is_available should check for
ANY implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=794991
2018-04-04 17:31:14 -08:00
Hyunjun Ko
580a52ec49 msdkenc: use bufferpool
1\ Proposes msdk bufferpool to upstream.
  - If upstream has accepted the proposed msdk bufferpool,
    encoder can get msdk surface from the buffer directly.
  - If not, encoder get msdk surface its own msdk bufferpool
    and copy from upstream's frame to the surface.

2\ Replace arrays of surfaces with msdk bufferpool.

3\ In case of using VPP, there should be another msdk bufferpool
   with NV12 info so that it could convert first and encode.

Calls gst_msdk_set_frame_allocator and uses video memory only on linux.
and uses system memory on Windows until d3d allocator is implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=790752
2018-02-13 13:48:32 -09:00
Hyunjun Ko
6ce9a66b80 msdk: implements GstMsdkContext.
Makes GstMsdkContext to be a descendant of GstObject so that
we could track the life-cycle of the session of the driver.

Also replaces MsdkContext with this one.
Keeps msdk_d3d.c alive for the future.

https://bugzilla.gnome.org/show_bug.cgi?id=790752
2018-02-13 12:41:28 -09:00
Hyunjun Ko
b45147a6d4 msdk: adds new utility functions for conversion from gstreamer to libmfx
https://bugzilla.gnome.org/show_bug.cgi?id=790752
2018-02-13 12:37:47 -09:00
Hyunjun Ko
8f0450dad4 msdk: move and rename the function msdk_video_alignment
Move the msdk_video_alignment function from decoder
to msdk.c and rename so that others could call this function
without duplicated declaration.

https://bugzilla.gnome.org/show_bug.cgi?id=790752
2018-02-13 12:36:46 -09:00
Sebastian Dröge
62f04e801b msdk: Allow building against mfx_dispatcher
E.g. from https://github.com/lu-zero/mfx_dispatch
2017-10-30 18:20:23 +02:00
Scott D Phillips
71df82db63 msdk: Initial windows build support
https://bugzilla.gnome.org/show_bug.cgi?id=770990
2016-11-14 15:17:41 +01:00
Josep Torra
7d68d40239 msdk: Create plugin for Intel's Media SDK
[scott.d.phillips@intel.com: gst-indent *.c *.h]
[scott.d.phillips@intel.com: link with libva at build time]
[scott.d.phillips@intel.com: remove unused includes]
[scott.d.phillips@intel.com: Update README]

https://bugzilla.gnome.org/show_bug.cgi?id=770990
2016-11-14 15:16:45 +01:00