summaryrefslogtreecommitdiff
path: root/sys/msdk
Commit message (Collapse)AuthorAgeFilesLines
* msdk: move the comment to the correct placeHaihao Xiang2019-02-241-5/+6
|
* msdk: add Hardware tag to element metadataTim-Philipp Müller2019-02-1912-12/+12
|
* msdkvpp: allow UYVY in DMABuf mode in the sink padHaihao Xiang2019-02-191-1/+1
| | | | | | | | Tested with the pipeline below: gst-launch-1.0 videotestsrc num-buffers=1 ! msdkvpp ! \ video/x-raw\(memory:DMABuf\),format=UYVY ! msdkvpp ! video/x-raw, \ format=YUY2 ! filesink location=a.yuv
* msdkvpp: allow UYVY in the src padHaihao Xiang2019-02-191-2/+2
| | | | | | | | | | | | | This make the pipeline below works: gst-launch-1.0 videotestsrc num-buffers=1 ! msdkvpp ! \ video/x-raw,format=UYVY ! filesink location=a.yuv Once https://github.com/intel/media-driver/pull/526 in the media-driver is merged, the pipeline below also works: gst-launch-1.0 videotestsrc num-buffers=1 ! msdkvpp ! \ video/x-raw\(memory:DMABuf\),format=UYVY ! filesink location=a.yuv
* msdk: map GST_VIDEO_FORMAT_UYVY to VA_FOURCC_UYVYHaihao Xiang2019-02-191-0/+4
|
* msdkvpp: allow BGRx in DMABuf mode in the src padHaihao Xiang2019-02-191-1/+1
| | | | | | | Tested with the pipeline below: gst-launch-1.0 videotestsrc ! msdkvpp ! \ video/x-raw\(memory:DMABuf\),format=BGRx ! glimagesink
* msdkdec: set decode_only for output onlyHaihao Xiang2019-02-121-2/+5
| | | | | | MSDK may return MFX_ERR_MORE_DATA but without output surface Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/887
* msdk: verify the driver nameHaihao Xiang2019-02-121-1/+2
| | | | | | | We need to make sure the Intel graphics card is used in a dual GPU system. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/895
* msdkdec: Release occupied surface for MFX_ERR_MORE_DATAHaihao Xiang2019-02-032-2/+14
| | | | | | | | | | | | | | | | | | | | An output surface is returned but without sync point when when MFXVideoDECODE_DecodeFrameAsync () returns MFX_ERR_MORE_DATA, this surface should be released too, otherwise the surface is occupied and it is easy to exhaust all pre-allocated mfx surfaces. Example pipeline (input_vp8.webm contains lots of frame with show_frame set to 0): gst-launch-1.0 filesrc location=input_vp8.webm ! matroskademux ! msdkvp8dec ! msdkvpp ! fakesink 0:00:05.995959693 19866 0x563f30f14590 ERROR default gstmsdkvideomemory.c:77:gst_msdk_video_allocator_get_surface: failed to get surface available ERROR: from element /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: Internal data stream error.
* msdkdec: explain the the extra ref of input bufferVíctor Manuel Jáquez Leal2019-02-021-0/+7
|
* msdkdec: avoid releasing the input buffer when it is still in useHaihao Xiang2019-02-021-5/+12
| | | | | | | | | The input buffer is released in gst_msdkdec_finish_task () when decoding some special clips however this buffer is still in use, so ref the input buffer before gst_msdkdec_finish_task () and unref it at the end of gst_msdkdec_handle_frame (). Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/862
* msdkvp9dec: output P010_10LE buffer if possibleHaihao Xiang2019-01-311-2/+2
|
* msdkvp9dec: use separate src capsHaihao Xiang2019-01-311-0/+14
| | | | | | We will add more formats in the src caps of msdkvp9dec, so let msdkvp9dec uses separate src caps. Note it doesn't change any capability
* msdkdec: set the mfx picture structure to MFX_PICSTRUCT_PROGRESSIVE if it is ↵Haihao Xiang2019-01-251-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | unknown The picture structure in the output parameters from MFXVideoDECODE_Query is set to MFX_PICSTRUCT_UNKNOWN for some codecs, so the structure of the corresponding mfx surfaces created for decoding are unknown. The pipeline will be broken when these surfaces are used as the input for msdkvpp. Example pipeline: gst-launch-1.0 filesrc location=input_vp8.webm ! matroskademux ! msdkvp8dec ! msdkvpp ! fakesink Error message: 0:00:00.031568911 14259 0x55b79dc684a0 ERROR msdkvpp gstmsdkvpp.c:728:gst_msdkvpp_transform:<msdkvpp0> MSDK Failed to do VPP ERROR: from element /GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: Internal data stream error. This is a workaround for the above issue
* msdkh265enc: enable low power modeHaihao Xiang2019-01-242-4/+44
| | | | | Low power mode is disabled by default, set the value of low-power to true to enable this mode.
* msdk: bufferpool: refactor memory type decisionVíctor Manuel Jáquez Leal2019-01-241-26/+31
| | | | | | | | | | | The memory type was used as bitwise enum, but the enum was not defined in that way. Nonetheless, most of the usage of the memory type was as mutually exclusive options, rather than option composition. This patch refactor how the memory type is defined, so it is kept the mutual exclusion among options.
* msdk: fix some comments typosVíctor Manuel Jáquez Leal2019-01-241-4/+5
|
* msdk: decoder: fatal failure if negotiations failsVíctor Manuel Jáquez Leal2019-01-241-1/+6
| | | | | | Otherwise it crashes when no parser is used placed upstream, v.gr. gst-launch-1.0 filesrc location=file.264 ! msdkh264dec ! fakesink
* msdk: decoder: comment to explain array resetVíctor Manuel Jáquez Leal2019-01-241-1/+1
|
* msdk: decoder: fix an usage-after-free pointer bugVíctor Manuel Jáquez Leal2019-01-241-1/+1
|
* msdkvpp: add P010_10LE to sink and src capsHaihao Xiang2019-01-211-4/+4
| | | | | | | | | | | | example pipelines: gst-launch-1.0 videotestsrc num-buffers=100 ! \ video/x-raw,format=P010_10LE,width=352,height=288 ! msdkvpp ! \ video/x-raw,format=NV12! fakesink gst-launch-1.0 videotestsrc num-buffers=100 ! \ video/x-raw,format=NV12,width=352,height=288 ! msdkvpp ! \ video/x-raw,format=P010_10LE ! fakesink
* msdkh265dec: support P010_10LE in DMABuf modeHaihao Xiang2019-01-211-1/+1
|
* meson: Fix automagic build of msdk pluginNirbheek Chauhan2019-01-191-5/+8
| | | | | | | | | When building the msdk plugin even if libmfx is found, unless the plugin is explicitly enabled we should not error out if msdk dependencies are not found. Also give an error message when we don't build the plugin on Windows because we're not building with MSVC.
* build: Don't forget to add windows files to EXTRA_DISTNirbheek Chauhan2019-01-181-2/+3
|
* msdk: set the right BRCParamMultiplierHaihao Xiang2019-01-111-4/+21
| | | | | | | | BRCParamMultiplier in mfxInfoMFX is a parameter which specifies a multiplier for bitrate control parameters [1], it impacts TargetKbps, MaxKbps, BufferSizeInKB and InitialDelayInKB. [1]: https://software.intel.com/en-us/node/628473
* msdk: set the upper bound of max-vbv-bitrate to 2048000 kbpsHaihao Xiang2019-01-111-1/+2
| | | | | | | The upper bound of bitrate is also 2048000 kbps which should be large enough in practice. Fix https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/863
* meson: Fix building of MSDK plugin on WindowsNirbheek Chauhan2019-01-101-1/+1
| | | | Variable name was typoed in 604c8d5232eba961ca34c9e98de8d5454cd5ab5f
* msdk: needn't call MFXJoinSession after MFXCloneSessionHaihao Xiang2019-01-091-7/+0
| | | | | | | | | | | | | | | | | | | | | According to the MSDK documation[1], MFXCloneSession is a light-weight equivalent of MFXJoinSession after MFXInit, so MFXJoinSession call isn't needed in the msdk plugin, otherwise the cloned session is joined to the parent session twice, and we will get a MFX error when closing the parent session example pipeline: gst-launch-1.0 videotestsrc num-buffers=100 ! \ video/x-raw,format=NV12,width=352,height=288 ! msdkh264enc ! msdkh264dec ! \ msdkh264enc ! fakesink Error message: 0:00:00.211948518 21733 0x5586ee741c60 ERROR msdk msdk.c:148:msdk_close_session: Close failed (undefined behavior) [1]: https://software.intel.com/en-us/node/628429#MFXCloneSession
* msdk: check whether mfx function call failsHaihao Xiang2019-01-093-5/+22
| | | | And log the failures for debugging
* msdkenc: return NULL instead of FALSEHaihao Xiang2019-01-091-4/+4
| | | | The returned type is a pointer
* msdk: release resources if failing to create the buffer poolHaihao Xiang2019-01-093-6/+10
| | | | | Needn't check the pointers against NULL because the pointers are non-NULL
* msdk: meson: compile vp9dec if availableVíctor Manuel Jáquez Leal2019-01-081-0/+5
| | | | based on the patches provided by Haihao Xiang <haihao.xiang@intel.com>
* msdk: add mfx in include pathVíctor Manuel Jáquez Leal2019-01-089-49/+13
| | | | Thus removing the preprocessor's directives to included if found.
* msdk: meson: use libmfx pkg-config if availableVíctor Manuel Jáquez Leal2019-01-081-34/+45
| | | | | | Refactoring to bail out early if MediaSDK is not found. based on the patches provided by Haihao Xiang <haihao.xiang@intel.com>
* msdk: don't reset the external frame allocatorHaihao Xiang2019-01-084-4/+29
| | | | | | | | | | | 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
* msdkvpp: don't use NV12 as default output in normal modeHaihao Xiang2019-01-081-1/+1
| | | | | | | | | If so, BGRA is the preferred output format hence BGRA will be selected as input format by default, e.g. in the pipleline below, BGRA instead of NV12 is selected without renegotiation, so we can avoid the NV12 issue (see commit 3f2314a) by default. gst-launch-1.0 videotestsrc ! msdkvpp ! glimagesink
* msdkvpp: close the current VPP session if this session has been initializedHaihao Xiang2019-01-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Otherwise MFXVideoVPP_Init will fail because it is called twice without a close. Example pipeline: gst-launch-1.0 videotestsrc ! msdkvpp ! glimagesink Sometimes glimagesink emits GST_EVENT_RECONFIGURE event which results in that MFXVideoVPP_Init is called twice, then get the negotiation failure below: 0:00:00.093715518 21218 0x558ef56231e0 ERROR msdkvpp gstmsdkvpp.c:995:gst_msdkvpp_initialize:<msdkvpp0> Init failed (undefined behavior) WARNING: from element /GstPipeline:pipeline0/GstMsdkVPP:msdkvpp0: not negotiated After applying this commit, the pipeline above may run without negotiation failure, however NV12 layout in dmabuf mode is selected in renegotiation, the display image is corrupted due to the NV12 issue which was mentioned in commit 3f2314a. Some other fixes are needed to avoid renegotiation by default
* msdkvpp: don't update pads' info if nothing have changedHaihao Xiang2019-01-081-3/+3
|
* msdkenc: break out of flush frames loop on errorU. Artie Eoff2019-01-061-0/+1
| | | | | | | | | | | | | | In general, we should assume any unhandled error is non-recoverable. In the flush frames loop, some error states can cause us to never increment the task and therefore we get stuck in an infinite loop and generate GST_ELEMENT_ERROR over and over again. This eventually consumes all system memory and triggers OOM. Thus, assume the worst and break out of the loop upon the first "unhandled" error. https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/859
* msdk: Fix invalid return type build warningSeungha Yang2018-12-251-1/+1
| | | | | | | void function cannot have return value gst-plugins-bad/sys/msdk/gstmsdkbufferpool.c(332): warning C4098: 'gst_msdk_buffer_pool_release_buffer': ...
* msdk: change the wait time for encoder and vppHaihao Xiang2018-12-122-3/+10
| | | | | In MSDK samples, the wait time for encoder, decoder and vpp is 300000. Let's set the wait time to the same value in msdk plugin
* msdk: correct the error messageHaihao Xiang2018-12-121-1/+1
| | | | It is VPP session instead of Encoder session
* msdk: check the created context against NULL pointerHaihao Xiang2018-12-123-6/+27
| | | | gst_msdk_context_new_with_parent() may return NULL
* msdk: decrease the reference count of objectHaihao Xiang2018-12-121-0/+2
| | | | | Otherwise there are reference leaks if failed to clone or join a mfx session
* msdk: assign the returned value to status variableHaihao Xiang2018-12-121-2/+2
| | | | | Othervise the subsequent check will use the stale value of status variable
* msdkh265enc: output main-10 bitstream if the input is P010_10LEXiang, Haihao2018-12-121-3/+10
| | | | | | | | Tested on KBL using the following command: gst-launch-1.0 videotestsrc num_buffers=100 ! video/x-raw,format=P010_10LE ! \ msdkh265enc ! filesink location=a.hevc This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/829
* msdkh265enc: add P010_10LE to the sink pad templateXiang, Haihao2018-12-121-1/+1
|
* msdkh265enc: re-add the sink pad templateXiang, Haihao2018-12-121-0/+14
| | | | | | We will add more profiles in the sink caps of msdkh265enc, so let msdkh265enc re-add the sink pad template. Note this change doesn't impact any capability
* msdkenc: handle P010_10LE input formatXiang, Haihao2018-12-121-3/+19
| | | | Note it is up to each codec to support P010_10LE format
* msdkenc: use macro GST_VIDEO_INFO_FORMAT if possibleXiang, Haihao2018-12-121-2/+2
|