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 759302 - vaapidecode causes distorted video in Qt for some files
vaapidecode causes distorted video in Qt for some files
Status: RESOLVED DUPLICATE of bug 753914
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-10 14:10 UTC by Pieterjan Camerlynck
Modified: 2017-03-07 16:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot of the output (318.05 KB, image/png)
2015-12-10 14:10 UTC, Pieterjan Camerlynck
Details
sample qml file (540 bytes, text/x-qml)
2015-12-10 14:12 UTC, Pieterjan Camerlynck
Details
gst-play-1.0 output (22.66 KB, text/plain)
2015-12-10 15:47 UTC, Pieterjan Camerlynck
Details
qmlscene output (756.95 KB, application/octet-stream)
2015-12-10 16:24 UTC, Pieterjan Camerlynck
Details

Description Pieterjan Camerlynck 2015-12-10 14:10:16 UTC
Created attachment 317115 [details]
screenshot of the output

After installing gstreamer-vaapi, some video files that worked with avdec_h264 are no longer properly displayed.

A sample file can be found at:
https://dl.dropboxusercontent.com/u/6818680/distorted.avi

Tested with:
gstreamer-1.6.1
gstreamer-vaapi-0.6.1 and gstreamer-vaapi-0.7.0
Qt-5.5.1

Hardware:
Intel Corporation Atom Processor Z36xxx/Z37xxx Series Graphics & Display
Comment 1 Pieterjan Camerlynck 2015-12-10 14:12:52 UTC
Created attachment 317116 [details]
sample qml file

run with: qmlscene video.qml
Comment 2 Víctor Manuel Jáquez Leal 2015-12-10 15:16:37 UTC
Thanks for reporting this.

I tested the file in my laptop with Haswell chipset, and the playback looks correct with gstreamer-vaapi.

Could you send the log of 

gst-play-1.0 distorted.avi --gst-debug="vaapi*:4"

??

I want to know with chipset is used in those Atoms, and which version of the libva are you using.
Comment 3 Pieterjan Camerlynck 2015-12-10 15:47:19 UTC
Created attachment 317128 [details]
gst-play-1.0 output
Comment 4 Pieterjan Camerlynck 2015-12-10 15:56:25 UTC
The file does play ok with gst-play. Only the combination of vaapidecode and Qt shows the distorted output.

I'm using libva-1.6.1.

The processor is "Intel(R) Atom(TM) CPU E3827 @ 1.74GHz", but the graphics says "To Be Filled By O.E.M." :)
Comment 5 Víctor Manuel Jáquez Leal 2015-12-10 16:14:22 UTC
So it is problem with the negotiation with the video sink used by Qt.

Do you know which sink is used?

Can you run the application with the environment variable GST_DEBUG="*:3,vaapi*:5,*sink:4" set and upload the output?
Comment 6 Pieterjan Camerlynck 2015-12-10 16:24:11 UTC
Created attachment 317155 [details]
qmlscene output
Comment 7 Pieterjan Camerlynck 2015-12-10 16:27:50 UTC
Qt uses an internal sink called QGstVideoRendererSink.

I can attach dot files of the generated pipelines with vaapidecode and avdec_h264?
Comment 8 Víctor Manuel Jáquez Leal 2015-12-10 16:38:25 UTC
(In reply to Pieterjan Camerlynck from comment #6)
> Created attachment 317155 [details]
> qmlscene output

This log is from the normal pipeline, since it shows  messages from vaapisink.

(In reply to Pieterjan Camerlynck from comment #7)
> I can attach dot files of the generated pipelines with vaapidecode and
> avdec_h264?

I guess they are not needed.

Have you saw this?

http://lists.qt-project.org/pipermail/development/2015-July/022270.html

From the output looks like the sink can't understand what's the vaapidecode delivering.
Comment 9 Pieterjan Camerlynck 2015-12-10 20:01:51 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #8)
> (In reply to Pieterjan Camerlynck from comment #6)
> > Created attachment 317155 [details]
> > qmlscene output
> 
> This log is from the normal pipeline, since it shows  messages from
> vaapisink.

Strange, this is the output when the video is rendered in Qt. I don't know why vaapisink appears in these logs. 

> (In reply to Pieterjan Camerlynck from comment #7)
> > I can attach dot files of the generated pipelines with vaapidecode and
> > avdec_h264?
> 
> I guess they are not needed.
> 
> Have you saw this?
> 
> http://lists.qt-project.org/pipermail/development/2015-July/022270.html

Oh, I was not aware of this. It does work for some video's, though not as optimal as it would using GstVideoGLTextureUploadMeta. I've also tried with the qt sink from gst-plugins-bad, but then I run into this bug: https://bugs.freedesktop.org/show_bug.cgi?id=71759

> From the output looks like the sink can't understand what's the vaapidecode
> delivering.

Is there a way to force the format that is delivered to the Qt sink?
Comment 10 sreerenj 2016-03-24 16:54:57 UTC
Moving to Product:GStreamer, Component:gstreamer-vaapi
Comment 11 Víctor Manuel Jáquez Leal 2017-03-07 16:08:34 UTC
This issue should be fixed with bug 753914. Though I see a problem with vaapipostroc negotiating the caps size.
Comment 12 Víctor Manuel Jáquez Leal 2017-03-07 16:16:14 UTC
(In reply to Víctor Manuel Jáquez Leal from comment #11)
> This issue should be fixed with bug 753914. Though I see a problem with
> vaapipostroc negotiating the caps size.

False alarm. Is part of the calculation for DAR.

This issue should be solved since release 1.10. Closing.

*** This bug has been marked as a duplicate of bug 753914 ***