GNOME Bugzilla – Bug 796468
msdk: detail vpp has no expected effect
Last modified: 2018-06-07 22:53:14 UTC
Test Env: ============================================ Platform: APL/KBL Arch: x86_64 Linux release 16.04 Kernel: 4.12.0-rc2 libva https://github.com/01org/libva.gitb commit 3be72a5a110880f70626d7c3bed953cdde124b2 media_driver https://github.com/intel/media-driver commit 1c2b0615d749c45c07f9aee6586774816989c5b3 MediaSDK: https://github.com/Intel-Media-SDK/MediaSDK commit 7c2b069dce7bed268806f680412a2f3b09a52ce9 gst-bad master branch 0bdcf51baf77926b4f29c01a2fdf133c13aad62e Reproduce Steps: ============================================ take one case for example 1. build enc as above lists 2. gst-launch-1.0 filesrc location=/media/ts/Sally.ts '!' tsdemux '!' mpegvideoparse '!' msdkmpeg2dec '!' msdkvpp detail=100 '!' video/x-raw,format=NV12 '!' videoconvert '!' ximagesink 3. gst-launch-1.0 filesrc location=/media/ts/Sally.ts '!' tsdemux '!' mpegvideoparse '!' msdkmpeg2dec '!' msdkvpp detail=0 '!' video/x-raw,format=NV12 '!' videoconvert '!' ximagesink 4. observe the two playing.
gst-launch-1.0 filesrc location=/media/ts/Sally.ts '!' tsdemux '!' mpegvideoparse '!' mfxmpeg2dec '!' msdkvpp detail=100 '!' video/x-raw,format=NV12 '!' videoconvert '!' ximagesink it can work well with mfxvpp.
@Sree, If I remove vppdouse in ensure_filters, then the detail works. In my understanding, the vppdouse should include several filters with default value, if the value is not default, it may be get error.
(In reply to Fei from comment #2) > @Sree, If I remove vppdouse in ensure_filters, then the detail works. In my > understanding, the vppdouse should include several filters with default > value, if the value is not default, it may be get error. According to msdk spec, there are two ways to enable filters: 1: Filters can be enabled by adding a filter ID to mfxExtVPPDoUse. In this case, default filter parameters are used 2: Add filter configuration structures directly to mfxVideoParam. Again: Using 1 with 2 is optional. I chose 1 & 2 since I noticed a failure with closed source msdk sometime ago. But I don't remember the scenario and I can't reproduce any issue with my current test setup too. Since the spec is indicating the usage of 1+2 as legal (optional), It is a bit strange that mfxExtVPPDetail is not working as expected. IMHO, Ideally, we should file a bug against msdk. Or at least should ask for clarification: "What happens if we use 1&2? will it use default values or the values provided in mfxVideoparm?" Note: There was a mis-ordering of structure usage which I fixed with commit: 8c7a457669de948498ed64fe1a0f9bee07faed55. It is not a fix for the issue you have raised. BTW, if you can provide a patch to remove the VPPDoUse, I have no object to push it :) VPPDoUse could be useful in future to query the supported features, but that should be a separate patch in a separate bug report.
Created attachment 372565 [details] [review] remove mfxExtVPPDoUse.
I checked sample_vpp_config.cpp in msdk, its usage is create a video filter ID without setting its value, then link the filter ID to vppdouse, and add vppdouse into mfxVidoeParam. After that, re-configure the video filter's value, and add it into mfxVideoParam. I also tested this way in gst-msdk with some ugly code,it does work. Since remove vppdouse also looks good, I uploaded the patch first. We may keep this in mind, maybe it's helpful when add query supported features:)
Review of attachment 372565 [details] [review]: The n_filters and max_filter_algorithms are redundant now.
Fei, This attached stream reveals two other issues: 1: The video playback is not smooth if you use a sink other than glimagesink You can try with ximagesink or xvimagesink 2: msdkmpeg2dec ! glimagesink is giving distorted output. This is a known issue but I don't know the root cause yet. If you use GST_GL_PLATFORM=egl then everything will work as expected. If you don't export the PLATFORM env to egl, it will use glx as the platform in X11 and in this case DMABUF backed NV12 is not rendering as expected.
(In reply to sreerenj from comment #7) > Fei, > > This attached stream reveals two other issues: > > 1: The video playback is not smooth if you use a sink other than glimagesink > You can try with ximagesink or xvimagesink > > 2: msdkmpeg2dec ! glimagesink is giving distorted output. > > This is a known issue but I don't know the root cause yet. If you use > GST_GL_PLATFORM=egl then everything will work as expected. If you don't > export the PLATFORM env to egl, it will use glx as the platform in X11 and > in this case DMABUF backed NV12 is not rendering as expected. Could you please file separate bugs about these if the issue is reproducible?
(In reply to sreerenj from comment #8) > (In reply to sreerenj from comment #7) > > Fei, > > > > This attached stream reveals two other issues: > > > > 1: The video playback is not smooth if you use a sink other than glimagesink > > You can try with ximagesink or xvimagesink > > > > 2: msdkmpeg2dec ! glimagesink is giving distorted output. > > > > This is a known issue but I don't know the root cause yet. If you use > > GST_GL_PLATFORM=egl then everything will work as expected. If you don't > > export the PLATFORM env to egl, it will use glx as the platform in X11 and > > in this case DMABUF backed NV12 is not rendering as expected. > > Could you please file separate bugs about these if the issue is reproducible? The issue can be reproduced. Bug reported at: https://bugzilla.gnome.org/show_bug.cgi?id=796521 https://bugzilla.gnome.org/show_bug.cgi?id=796522
Created attachment 372586 [details] [review] remove mfxExtVPPDoUse.
(In reply to sreerenj from comment #6) > Review of attachment 372565 [details] [review] [review]: > > The n_filters and max_filter_algorithms are redundant now. Updated, Please have a review.
Review of attachment 372586 [details] [review]: Pushed as commit 10f57b73f3afd14f3d74aaacf185f6f36cf3b0f4 Added a bit more explanation to the commit message.
Ouch! I put my email id in Author's details! Fortunately, your name is there as Author, but email-id messed up! I'm extremely sorry for the mistake.