Commit graph

24 commits

Author SHA1 Message Date
Haihao Xiang 47bb53a80a msdk: map GST_VIDEO_FORMAT_Y210 to VA_FOURCC_Y210 2019-06-29 14:15:32 +00:00
Haihao Xiang 5b369e6e97 msdk: fix the build error with libva 2.4.0
This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/949
2019-04-17 13:10:10 +08:00
Haihao Xiang 21f07e95f5 msdk: set some parameters in mfxFrameData for a MFX_FOURCC_A2RGB10 frame 2019-04-09 14:26:02 +00:00
Haihao Xiang c40ecbe7f5 msdk: map MFX_FOURCC_A2RGB10 to VA_FOURCC_A2R10G10B10 2019-04-09 14:26:02 +00:00
Haihao Xiang 95fdc2e984 msdk: map GST_VIDEO_FORMAT_BGR10A2_LE to VA_FOURCC_A2R10G10B10 2019-04-09 14:26:02 +00:00
Haihao Xiang 24d12a4abf msdk: set some parameters in mfxFrameData for a MFX_FOURCC_AYUV frame 2019-03-25 09:50:33 +00:00
Haihao Xiang cd8696d2b2 msdk: map GST_VIDEO_FORMAT_VUYA to VA_FOURCC_AYUV 2019-03-25 09:50:33 +00:00
Seungha Yang 1d17e3891d mskd: Don't use MFX_FOURCC_RGB565 if it's undefined
../subprojects/gst-plugins-bad/sys/msdk/msdk.c(61): error C2065: 'MFX_FOURCC_RGB565'

The minimum required version for the format seems to MFX_VERSION >= 1028
2019-03-01 07:03:01 +00:00
Haihao Xiang f39bcd3920 msdk: set some parameters in mfxFrameData for a RGB16 frame 2019-02-27 15:22:43 +00:00
Haihao Xiang a09cff84ce msdk: map GST_VIDEO_FORMAT_RGB16 to VA_FOURCC_RGB565 2019-02-27 15:22:43 +00:00
Haihao Xiang fffb3f628d msdk: don't destroy an image twice
This gets rid of annoying message in the log, e.g. run the pipeline
below:

gst-launch-1.0 videotestsrc num-buffers=100 ! \
video/x-raw,format=NV12,width=352,height=288 ! msdkh264enc ! filesink \
location=test.h264

[LIBVA]:CRITICAL - DdiMedia_DestroyImage:4357: Invalid image
2019-02-24 17:59:43 +00:00
Haihao Xiang ac9423facb msdk: map GST_VIDEO_FORMAT_UYVY to VA_FOURCC_UYVY 2019-02-19 11:04:47 +00:00
Haihao Xiang 3110f3791f msdk: don't reset the external frame allocator
In gst-msdk, a mfx session may be shared between different gst
elements, each element tries to set the frame allocator. However, per
the MSDK documation[1], the behavior is undefined if reset the frame
allocator while the previous allocator is in use. Fortunately all
elements use the same frame allocator, so we can avoid to call
MFXVideoCORE_SetFrameAllocator again.

[1]: https://software.intel.com/en-us/node/628430#MFXVideoCORE3
2019-01-08 09:11:47 +00:00
Xiang, Haihao 27ab7fb40f msdk: adjust the RT format for P010 surface
According to VA API, VA_RT_FORMAT_YUV420_10 is expected for P010
surface
2018-11-26 16:47:17 +00:00
Xiang, Haihao eeb58f64c2 msdk: create VA_FOURCC_P010 surface from dmabuf 2018-11-26 16:47:17 +00:00
Xiang, Haihao 7d58424611 msdk: VA_FOURCC_P010 frame lock
P010 and NV12 have the same layout, so we may reuse the code in
gst_msdk_frame_lock()
2018-11-26 16:47:17 +00:00
Xiang, Haihao 1d97a6f00e msdk: add an assert in gst_msdk_frame_lock() for unhandled formats
We will add support for more formats, e.g. P010, Adding an assert
here may catch the error early
2018-11-26 16:47:17 +00:00
Sreerenj Balachandran a7b7939dd7 msdk: Add method to replace internal VASurface of mfxFrameSurface
Added a utility method to replace the MemID (interanl VASurfaceID)
associated with the mfxFrameSurface. This is usefull for dmabuf-import
where we need to replace the memID dynamically

https://bugzilla.gnome.org/show_bug.cgi?id=794817
2018-05-30 16:23:44 -08:00
Sreerenj Balachandran 62d2d8ebf9 msdk: Add method to export dmabuf to VASurface
Exporting DRM_PRIME fd to VASurface requires direct
invocation of VA api VACreateSurface with
VASurfaceAttribExternalBufferDescriptor and other
necessary surface attributes.

https://bugzilla.gnome.org/show_bug.cgi?id=794817
2018-05-30 16:22:49 -08:00
Hyunjun Ko 90491d889a msdk: allocator: libva: check if it's already using dmabuf when mapping
As long as we negotiate the "DMABuf" capsfeatures for now, map can't be
working. So we need to confirm not to do it if using DMABuf memory.

https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-04-02 15:49:32 -08:00
Hyunjun Ko 5df06545ef msdk: adds new function to get dmabuf information from surface.
https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:05:16 -08:00
Hyunjun Ko bd8ffcb29d msdk: allocator: get dmabuf handle during allocation if required
https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:04:28 -08:00
Hyunjun Ko 762eb97092 msdk: specify the way to find a proper cached response by request
The current way to find proper response by just comparing request's
value is wrong.  We need to compare the size of a frame and the
number of suggested frames.

Refer to the sample in https://github.com/Intel-Media-SDK/samples.

https://bugzilla.gnome.org/show_bug.cgi?id=793707
2018-03-30 11:02:26 -08:00
Hyunjun Ko 4d860ec82b msdk: adds frame allocator using libva
Implements msdk frame allocator which is required from the driver.
Also makes these functions global so that GstMsdkAllocator could use
the allocated video memory later and couple with GstMsdkMemory.

GstMsdkContext keeps allocation information such as mfxFrameAllocRequest
and mfxFrameAllocResponse after allocation.

https://bugzilla.gnome.org/show_bug.cgi?id=790752
2018-02-13 12:43:42 -09:00