After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 796468 - msdk: detail vpp has no expected effect
msdk: detail vpp has no expected effect
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.15.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 789886
 
 
Reported: 2018-05-31 07:10 UTC by zj,wang
Modified: 2018-06-07 22:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
remove mfxExtVPPDoUse. (1.06 KB, patch)
2018-06-06 02:39 UTC, Fei
none Details | Review
remove mfxExtVPPDoUse. (4.62 KB, patch)
2018-06-07 02:54 UTC, Fei
committed Details | Review

Description zj,wang 2018-05-31 07:10:55 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.
Comment 1 zj,wang 2018-05-31 07:11:55 UTC
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.
Comment 2 Fei 2018-06-05 08:44:26 UTC
@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.
Comment 3 sreerenj 2018-06-06 00:18:09 UTC
(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.
Comment 4 Fei 2018-06-06 02:39:30 UTC
Created attachment 372565 [details] [review]
remove mfxExtVPPDoUse.
Comment 5 Fei 2018-06-06 02:52:09 UTC
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:)
Comment 6 sreerenj 2018-06-06 20:36:02 UTC
Review of attachment 372565 [details] [review]:

The n_filters and max_filter_algorithms are redundant now.
Comment 7 sreerenj 2018-06-06 21:47:20 UTC
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.
Comment 8 sreerenj 2018-06-06 21:47:55 UTC
(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?
Comment 9 Fei 2018-06-07 02:32:17 UTC
(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
Comment 10 Fei 2018-06-07 02:54:38 UTC
Created attachment 372586 [details] [review]
remove mfxExtVPPDoUse.
Comment 11 Fei 2018-06-07 02:55:28 UTC
(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.
Comment 12 sreerenj 2018-06-07 22:42:33 UTC
Review of attachment 372586 [details] [review]:

Pushed as commit 10f57b73f3afd14f3d74aaacf185f6f36cf3b0f4
Added a bit more explanation to the commit message.
Comment 13 sreerenj 2018-06-07 22:53:14 UTC
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.