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 735391 - mpeg2dec: fix decoding into hardware-mapped buffers
mpeg2dec: fix decoding into hardware-mapped buffers
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-ugly
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 735360
 
 
Reported: 2014-08-25 15:35 UTC by Gwenole Beauchesne
Modified: 2018-11-03 15:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mpeg2dec: fix decoding into hardware-mapped buffers (4.58 KB, patch)
2014-08-25 15:39 UTC, Gwenole Beauchesne
none Details | Review

Description Gwenole Beauchesne 2014-08-25 15:35:13 UTC
Make sure to commit decoded contents into hardware mapped buffers. In some situations, and for performance reasons actually, we might not be able to directly write into buffers backed by 3rdparty hardware. So, this means that we need to maintain some temporary surface/buffers and those are what are being exposed through GstVideoMeta info. Then, internally, the implementation may decide to efficiently convert that into a native format instead.

More precisely, VA-API exposes a vaDeriveImage() API but it might not always be efficient to directly expose GPU memory buffers. So, a temporary surface suitable for CPU interop is being exposed instead. This same happens for VDPAU where there is no direct rendering API, so a temporary image is being used and exposed.

In practice, we just need to carefully maintain map/unmap chains. On map, a clean writable memory buffer is being exposed. On unmap, the contents written by the SW decoder is to be committed. Then, if the frame is to be used again (as reference for example), then it can be mapped again, but with read-only flags this time.
Comment 1 Gwenole Beauchesne 2014-08-25 15:39:51 UTC
Created attachment 284423 [details] [review]
mpeg2dec: fix decoding into hardware-mapped buffers
Comment 2 Gwenole Beauchesne 2014-08-25 15:41:33 UTC
We could also consider this as the mpeg2 SW decoder fix to bug #704083. Though, the "commit" phase, i.e. unmap still needs to be paired.
Comment 3 GStreamer system administrator 2018-11-03 15:34:39 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-ugly/issues/8.