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 774587 - msdk: add decoder
msdk: add decoder
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other All
: Normal enhancement
: 1.11.1
Assigned To: Josep Torra Valles
GStreamer Maintainers
Depends on:
Blocks: 774793 775726
 
 
Reported: 2016-11-16 19:00 UTC by Scott D Phillips
Modified: 2016-12-12 22:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH gst-plugins-bad] msdk: Add H.264 decoder (36.72 KB, patch)
2016-11-16 19:01 UTC, Scott D Phillips
none Details | Review
[PATCH gst-plugins-bad v2] msdk: Add H.264 decoder (36.72 KB, patch)
2016-11-16 19:32 UTC, Scott D Phillips
none Details | Review
[PATCH gst-plugins-bad v3] msdk: Add H.264 decoder (36.96 KB, patch)
2016-11-22 21:21 UTC, Scott D Phillips
none Details | Review
[PATCH gst-plugins-bad v4] msdk: Add H.264 decoder (38.91 KB, patch)
2016-12-06 21:36 UTC, Scott D Phillips
none Details | Review
[PATCH gst-plugins-bad v5] msdk: Add H.264 decoder (39.02 KB, patch)
2016-12-12 18:37 UTC, Scott D Phillips
none Details | Review
[PATCH gst-plugins-bad v5] msdk: Add H.264 decoder (38.90 KB, patch)
2016-12-12 18:41 UTC, Scott D Phillips
committed Details | Review

Description Scott D Phillips 2016-11-16 19:00:15 UTC
Add a decoder for the Intel MediaSDK plugin.
Comment 1 Scott D Phillips 2016-11-16 19:01:59 UTC
Created attachment 340068 [details] [review]
[PATCH gst-plugins-bad] msdk: Add H.264 decoder
Comment 2 Sebastian Dröge (slomo) 2016-11-16 19:18:04 UTC
Awesome \o/
Comment 3 Scott D Phillips 2016-11-16 19:32:26 UTC
Created attachment 340072 [details] [review]
[PATCH gst-plugins-bad v2] msdk: Add H.264 decoder

Changes since v1:
- Update copyright in *h264dec.*
Comment 4 Scott D Phillips 2016-11-22 21:21:25 UTC
Created attachment 340555 [details] [review]
[PATCH gst-plugins-bad v3] msdk: Add H.264 decoder

Changes since v2:
- clang warns (incorrectly, I think) on the braces in the
  initializer expression for mfxBitstream. Change to a memset to
  quiet that.
Comment 5 Scott D Phillips 2016-12-06 21:36:41 UTC
Created attachment 341510 [details] [review]
[PATCH gst-plugins-bad v4] msdk: Add H.264 decoder

Changes since v3:
- Fixes to decoding with hardware=false, specifically (1)MemId
  needs to be NULL for software decoding with system memory,
  (2)Surfaces may be unlocked by the msdk without being outputted
  from DecodeFrameAsync, so handle unreffing/unmapping properly,
  (3)Surfaces may still be locked for reference when outputted, so
  map them as READWRITE so downstream elements can still read
  them.
Comment 6 Josep Torra Valles 2016-12-10 16:03:03 UTC
Review of attachment 341510 [details] [review]:

::: sys/msdk/gstmsdkdec.c
@@ +163,3 @@
+}
+
+static GstFlowReturn gst_msdkdec_drain (GstVideoDecoder * decoder);

Please reorder the code to avoid this forward declaration.

@@ +166,3 @@
+
+static void
+gst_msdkdec_set_property (GObject * object, guint prop_id, const GValue * value,

My preference and to be more consistent with the encoder base class is to have gobject overrides, _set_property, _get_property and _finalize, at the bottom just before the class_init.

::: sys/msdk/gstmsdkdec.h
@@ +81,3 @@
+  GstVideoDecoderClass parent_class;
+
+    gboolean (*set_format) (GstMsdkDec * decoder);

This vmethod is not used, maybe just drop it.
Comment 7 Tim-Philipp Müller 2016-12-10 16:13:50 UTC
It is customary in GStreamer to have the init/class_init functions fairly early in the file and then have lots of forward declarations for the various vfuncs, for what it's worth. But that can be done either way of course :)
Comment 8 Scott D Phillips 2016-12-12 18:37:39 UTC
Created attachment 341839 [details] [review]
[PATCH gst-plugins-bad v5] msdk: Add H.264 decoder

Changes since v4:
- removed the unused set_format vfunc, reordered some functions,
  whitespace adjustments.
Comment 9 Scott D Phillips 2016-12-12 18:41:47 UTC
Created attachment 341840 [details] [review]
[PATCH gst-plugins-bad v5] msdk: Add H.264 decoder

attachment 341839 [details] [review] was a mis-upload (commit message of v5, body of v4). Fixed here.
Comment 10 Josep Torra Valles 2016-12-12 22:14:23 UTC
Review of attachment 341840 [details] [review]:

Looks good to me.
Comment 11 Josep Torra Valles 2016-12-12 22:19:34 UTC
Comment on attachment 341840 [details] [review]
[PATCH gst-plugins-bad v5] msdk: Add H.264 decoder

commit 83774c3eb9662bedc4dddcbea3fd17d237d25416
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Mon Nov 7 12:32:38 2016 -0800

    msdk: Add H.264 decoder
    
    The decoder only supports system memory output presently.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774587