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 784321 - vaapi: MVC encoding via sinkcaps without setting num-views property
vaapi: MVC encoding via sinkcaps without setting num-views property
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
git master
Other Linux
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
P1
Depends on:
Blocks:
 
 
Reported: 2017-06-29 06:24 UTC by Hyunjun Ko
Modified: 2017-07-04 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libs: encoder: h264: initialize all elements of view_ids (1.33 KB, patch)
2017-06-29 06:25 UTC, Hyunjun Ko
committed Details | Review

Description Hyunjun Ko 2017-06-29 06:24:20 UTC
Currenlty, this is producing correct MVC encoded data (with setting num-views)
gst-launch-1.0 -v videotestsrc pattern=ball name=left videotestsrc name=right glstereomix name=mix \
left. ! video/x-raw,width=640,height=480! glupload ! mix. \
right. ! video/x-raw,width=640,height=480! glupload ! mix. \
mix. ! video/x-raw'(memory:GLMemory)',multiview-mode=frame-by-frame ! queue ! glcolorconvert ! gldownload ! vaapih264enc num-views=2 ! filesink location=mvc_test.264

But this is not doing the same (without setting num-views) even though there is logic to hanlde this [1], and produces wrong stream:

gst-launch-1.0 -v videotestsrc pattern=ball name=left videotestsrc name=right glstereomix name=mix \
left. ! video/x-raw,width=640,height=480! glupload ! mix. \
right. ! video/x-raw,width=640,height=480! glupload ! mix. \
mix. ! video/x-raw'(memory:GLMemory)',multiview-mode=frame-by-frame ! queue ! glcolorconvert ! gldownload ! vaapih264enc ! filesink location=mvc_test.264

This is because view_ids array is not set at the moment when num-views is being changed.
Currently view_ids array is set properly only if num-views are set, which means this is not handling the case num-views is changed on running.

[1] https://cgit.freedesktop.org/gstreamer/gstreamer-vaapi/tree/gst-libs/gst/vaapi/gstvaapiencoder_h264.c#n2833
Comment 1 Hyunjun Ko 2017-06-29 06:25:17 UTC
Created attachment 354672 [details] [review]
libs: encoder: h264: initialize all elements of view_ids

Currently when num_views is changed by multiview-mode on sink caps, it produces
wrong MVC encoded stream since the array view_ids is not set properly according
to changed num_views.

So this patch initializes all of the array sequentially to handle this case.
Side effect is not going to happen by this patch since this array is being
handled by num_views.
Comment 2 Víctor Manuel Jáquez Leal 2017-07-04 11:42:49 UTC
attachment 354672 [details] [review] was pushed as commit 9b73b31c
Comment 3 Tim-Philipp Müller 2017-07-04 11:53:32 UTC
Is the bug supposed to stay open?
Comment 4 Víctor Manuel Jáquez Leal 2017-07-04 11:58:53 UTC
(In reply to Tim-Philipp Müller from comment #3)
> Is the bug supposed to stay open?

Hehehe... sorry :)