GNOME Bugzilla – Bug 784321
vaapi: MVC encoding via sinkcaps without setting num-views property
Last modified: 2017-07-04 11:58:53 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
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.
attachment 354672 [details] [review] was pushed as commit 9b73b31c
Is the bug supposed to stay open?
(In reply to Tim-Philipp Müller from comment #3) > Is the bug supposed to stay open? Hehehe... sorry :)