intel / gstreamer-media-SDK

GNU Lesser General Public License v2.1
90 stars 53 forks source link

[master] Added synchronization of decoded MFXSurfaces between multiple components. #56

Closed SiewHoon closed 6 years ago

SiewHoon commented 6 years ago

In some specific case clip, the MSDK may overwrite the decoded surface if we didn't sync the decoded MFXSurfaces.

Especially the gst-play-1.0 or gst-launch-1.0 manual command pipeline added queue in between mfxdecode and mfxsink.

video clip: cat.mkv and sample.mp4 on H264 video format.

We will add synchronization of decoded MFXSurfaces between multiples components.

ph0b commented 6 years ago

a7649f8 and ef110b3 don't seem to solve the issue unfortunately, at least when testing on Windows it didn't change anything. Slowing down the decode to match frame duration in ef110b3 doesn't seem like a good idea especially if not using the decoder to play back content at the same framerate, it should wait less than that.

SiewHoon commented 6 years ago

We will hold this code fixed workaround since it impacts to our regression test. Will further continue to debug this issue.

SiewHoon commented 6 years ago

The code fixed only target specifically to H264.

ph0b commented 6 years ago

I've backported dfd729f to my dev branch: https://github.com/ph0b/gstreamer-media-SDK/commit/1d328dff9bea28528e32b36f5ccf9aaf794b85c9 but it doesn't solve the issue when decoding cat.mkv, is it really working in the master branch?

Also, there is a call to dequeue in mfxsink, but maybe it's not ok design-wise since we should be able to use other sinks, such as glimagesink.

I've tried and didn't find a better solution yet, but I wanted to share my concerns with one since I'm afraid it doesn't solve the issue yet.

SiewHoon commented 6 years ago

Teng and me didn't got chance work on the topic branch. We all tied up with on others stuff and mainly focus on the master branch.

But this code fixed confirmed is fixing the issue, we all done full regression test and ensure no performance degradation only merge in the code fixed into master branch.

And we did aware and topic branch and master different is huge. We already allocate 1 resource to help on us to close the gap. For topic branch, it has to be reworked for it. Please put your discussion in https://github.com/intel/gstreamer-media-SDK/issues/58 to track it. Thank you.